AttractorForceField is a force field where all forces point to a single point. The force strength changes with the inverse distance squared. This can be used to model planetary attractions.
| 51 | // This can be used to model planetary attractions. |
| 52 | // |
| 53 | type AttractorForceField struct { |
| 54 | position math32.Vector3 |
| 55 | mass float32 |
| 56 | } |
| 57 | |
| 58 | // NewAttractorForceField creates and returns a pointer to a new AttractorForceField. |
| 59 | func NewAttractorForceField(position *math32.Vector3, mass float32) *AttractorForceField { |
nothing calls this directly
no outgoing calls
no test coverage detected