MCPcopy
hub / github.com/g3n/engine / RepellerForceField

Struct RepellerForceField

experimental/physics/forcefield.go:116–119  ·  view source on GitHub ↗

RepellerForceField is a force field where all forces point away from a single point. The force strength changes with the inverse distance squared.

Source from the content-addressed store, hash-verified

114// The force strength changes with the inverse distance squared.
115//
116type RepellerForceField struct {
117 position math32.Vector3
118 mass float32
119}
120
121// NewRepellerForceField creates and returns a pointer to a new RepellerForceField.
122func NewRepellerForceField(position *math32.Vector3, mass float32) *RepellerForceField {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected