Files
fluids/elements/particle.go

26 lines
429 B
Go
Raw Permalink Normal View History

2025-11-27 22:50:36 -05:00
package elements
import "fluids/gamedata"
type Particle struct {
Position gamedata.Vector
Velocity gamedata.Vector
Radius float64
}
func (p Particle) GetDimensions() gamedata.Vector {
dim := gamedata.Vector{
X: p.Radius * 2,
Y: p.Radius * 2,
}
return dim
}
func (p Particle) GetPosition() gamedata.Vector {
return p.Position
}
func (p *Particle) SetPosition(position gamedata.Vector) {
p.Position = position
}