Versions in this module Expand all Collapse all v0 v0.1.0 Mar 14, 2019 Changes in this version + const BeginContactEvent + const CollisionEv + const EndContactEvent + func ShowContact(scene *core.Node, contact *collision.Contact) + func ShowPenAxis(scene *core.Node, axis *math32.Vector3) + func ShowWorldFace(scene *core.Node, face []math32.Vector3, color *math32.Color) + type AttractorForceField struct + func NewAttractorForceField(position *math32.Vector3, mass float32) *AttractorForceField + func (pa *AttractorForceField) ForceAt(pos *math32.Vector3) math32.Vector3 + func (pa *AttractorForceField) Mass() float32 + func (pa *AttractorForceField) Position() *math32.Vector3 + func (pa *AttractorForceField) SetMass(newMass float32) + func (pa *AttractorForceField) SetPosition(newPosition *math32.Vector3) + type Broadphase struct + func NewBroadphase() *Broadphase + func (b *Broadphase) FindCollisionPairs(objects []*object.Body) []CollisionPair + func (b *Broadphase) NeedTest(bodyA, bodyB *object.Body) bool + type CollideEvent struct + type CollisionPair struct + BodyA *object.Body + BodyB *object.Body + type ConstantForceField struct + func NewConstantForceField(force *math32.Vector3) *ConstantForceField + func (g *ConstantForceField) Force() *math32.Vector3 + func (g *ConstantForceField) ForceAt(pos *math32.Vector3) math32.Vector3 + func (g *ConstantForceField) SetForce(newDirection *math32.Vector3) + type ContactEvent struct + type ContactMaterial struct + func NewContactMaterial() *ContactMaterial + type DebugHelper struct + type ForceField interface + ForceAt func(pos *math32.Vector3) math32.Vector3 + type Material struct + type Narrowphase struct + func NewNarrowphase(simulation *Simulation) *Narrowphase + func (n *Narrowphase) ConvexConvex(bodyA, bodyB *object.Body, convexA, convexB *shape.ConvexHull, ...) ([]*equation.Contact, []*equation.Friction) + func (n *Narrowphase) GenerateEquations(pairs []CollisionPair) ([]*equation.Contact, []*equation.Friction) + func (n *Narrowphase) PlaneConvex(bodyA, bodyB *object.Body, planeA *shape.Plane, convexB *shape.ConvexHull, ...) ([]*equation.Contact, []*equation.Friction) + func (n *Narrowphase) ResolveCollision(bodyA, bodyB *object.Body) ([]*equation.Contact, []*equation.Friction) + func (n *Narrowphase) SphereConvex(bodyA, bodyB *object.Body, sphereA *shape.Sphere, convexB *shape.ConvexHull, ...) ([]*equation.Contact, []*equation.Friction) + func (n *Narrowphase) SpherePlane(bodyA, bodyB *object.Body, sphereA *shape.Sphere, planeB *shape.Plane, ...) ([]*equation.Contact, []*equation.Friction) + func (n *Narrowphase) SphereSphere(bodyA, bodyB *object.Body, sphereA, sphereB *shape.Sphere, ...) ([]*equation.Contact, []*equation.Friction) + type RepellerForceField struct + func NewRepellerForceField(position *math32.Vector3, mass float32) *RepellerForceField + func (pr *RepellerForceField) ForceAt(pos *math32.Vector3) math32.Vector3 + func (pr *RepellerForceField) Mass() float32 + func (pr *RepellerForceField) Position() *math32.Vector3 + func (pr *RepellerForceField) SetMass(newMass float32) + func (pr *RepellerForceField) SetPosition(newPosition *math32.Vector3) + type Simulation struct + func NewSimulation(scene *core.Node) *Simulation + func (s *Simulation) AddBody(body *object.Body, name string) + func (s *Simulation) AddConstraint(c constraint.IConstraint) + func (s *Simulation) AddContactMaterial(cmat *ContactMaterial) + func (s *Simulation) AddForceField(ff ForceField) + func (s *Simulation) AddMaterial(mat *Material) + func (s *Simulation) ApplySolution(sol *solver.Solution) + func (s *Simulation) Bodies() []*object.Body + func (s *Simulation) ClearForces() + func (s *Simulation) GetContactMaterial(bodyA, bodyB *object.Body) *ContactMaterial + func (s *Simulation) Paused() bool + func (s *Simulation) RemoveBody(body *object.Body) bool + func (s *Simulation) RemoveConstraint(c constraint.IConstraint) + func (s *Simulation) RemoveForceField(ff ForceField) bool + func (s *Simulation) RemoveMaterial(mat *Material) + func (s *Simulation) Scene() *core.Node + func (s *Simulation) SetPaused(state bool) + func (s *Simulation) Step(frameDelta float32) + func (s *Simulation) StepPlus(frameDelta float32, timeSinceLastCalled float32, maxSubSteps int)