Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct {
// contains filtered or unexported fields
}
Conf represents the configuration structure of a particle system
type Particle ¶
type Particle struct {
// contains filtered or unexported fields
}
Particle keeps vectors.Mover and adds a lifespan property
func NewParticle ¶
NewParticle creates an object of type Particle (constructor)
type ParticleSystem ¶
type ParticleSystem struct {
// contains filtered or unexported fields
}
ParticleSystem describes a set a of particles
func NewParticleSystem ¶
func NewParticleSystem(objs interface{}, conf *Conf) *ParticleSystem
NewParticleSystem creates an object of type ParticleSystem (constructor)
func (*ParticleSystem) SetMasses ¶
func (ps *ParticleSystem) SetMasses(masses []float64) error
SetMasses adds mass to every particle in the system
func (*ParticleSystem) UpdateSystem ¶
func (ps *ParticleSystem) UpdateSystem(update func(p *Particle))
UpdateSystem is a genetic method for updating particles in the system
func (*ParticleSystem) UpdateSystemSdl2 ¶
func (ps *ParticleSystem) UpdateSystemSdl2(updateSdlObj func(obj interface{}))
UpdateSystemSdl2 execures UpdateSdl2 on every mover/particle
Click to show internal directories.
Click to hide internal directories.