Versions in this module Expand all Collapse all v0 v0.1.0 Apr 18, 2018 Changes in this version + const BODY_DYNAMIC + const BODY_KINEMATIC + const BODY_STATIC + const CONTACTS_BUFFER_SIZE + const CP_ARBITER_STATE_CACHED + const CP_ARBITER_STATE_FIRST_COLLISION + const CP_ARBITER_STATE_IGNORE + const CP_ARBITER_STATE_INVALIDATED + const CP_ARBITER_STATE_NORMAL + const DRAW_COLLISION_POINTS + const DRAW_CONSTRAINTS + const DRAW_SHAPES + const DegreeConst + const HASH_COEF + const INFINITY + const MAGIC_EPSILON + const MAX_CONTACTS_PER_ARBITER + const MAX_EPA_ITERATIONS + const MAX_GJK_ITERATIONS + const POOLED_BUFFER_SIZE + const RadianConst + const SHAPE_TYPE_NUM + const WARN_EPA_ITERATIONS + const WARN_GJK_ITERATIONS + var ALL_CATEGORIES uint = ^uint(0) + var BuiltinCollisionFuncs = [9]CollisionFunc + var CollisionHandlerDefault = CollisionHandler + var CollisionHandlerDoNothing = CollisionHandler + var NO_GROUP uint = 0 + var SHAPE_FILTER_ALL = ShapeFilter + var SHAPE_FILTER_NONE = ShapeFilter + var ShapeUpdateFunc = func(shape *Shape) + var ShapeVelocityFunc = func(obj interface{}) Vector + func AlwaysCollide(_ *Arbiter, _ *Space, _ interface{}) bool + func AreaForCircle(r1, r2 float64) float64 + func AreaForPoly(count int, verts []Vector, r float64) float64 + func AreaForSegment(a, b Vector, r float64) float64 + func BodyUpdatePosition(body *Body, dt float64) + func BodyUpdateVelocity(body *Body, gravity Vector, damping, dt float64) + func CachedArbitersFilter(arb *Arbiter, space *Space, shape *Shape, body *Body) bool + func CircleSegmentQuery(shape *Shape, center Vector, r1 float64, a, b Vector, r2 float64, ...) + func CircleToCircle(info *CollisionInfo) + func CircleToPoly(info *CollisionInfo) + func CircleToSegment(info *CollisionInfo) + func Clamp(f, min, max float64) float64 + func Clamp01(f float64) float64 + func CollisionError(info *CollisionInfo) + func ComponentActive(root *Body, threshold float64) bool + func ContactPoints(e1, e2 Edge, points ClosestPoints, info *CollisionInfo) + func Contains(bodies []*Body, body *Body) bool + func ConvexHull(count int, verts []Vector, first *int, tol float64) int + func DebugInfo(space *Space) string + func DefaultBegin(arb *Arbiter, space *Space, _ interface{}) bool + func DefaultPostSolve(arb *Arbiter, space *Space, _ interface{}) + func DefaultPreSolve(arb *Arbiter, space *Space, _ interface{}) bool + func DefaultSeparate(arb *Arbiter, space *Space, _ interface{}) + func DefaultSpringForce(spring *DampedSpring, dist float64) float64 + func DoNothing(_ *Arbiter, _ *Space, _ interface{}) + func DrawConstraint(constraint *Constraint, options Drawer) + func DrawShape(shape *Shape, options Drawer) + func DrawSpace(space *Space, options Drawer) + func FloodFillComponent(root *Body, body *Body) + func Lerp(f1, f2, t float64) float64 + func LerpConst(f1, f2, d float64) float64 + func LoopIndexes(verts []Vector, count int) (int, int) + func MomentForBox(m, width, height float64) float64 + func MomentForBox2(m float64, box BB) float64 + func MomentForCircle(m, r1, r2 float64, offset Vector) float64 + func MomentForPoly(m float64, count int, verts []Vector, offset Vector, r float64) float64 + func MomentForSegment(m float64, a, b Vector, r float64) float64 + func NearestPointQueryNearest(obj interface{}, shape *Shape, collisionId uint32, out interface{}) uint32 + func NodeSetA(node, value *Node) + func NodeSetB(node, value *Node) + func PolySupportPointIndex(count int, planes []SplittingPlane, n Vector) int + func PolyToPoly(info *CollisionInfo) + func PostStepDoNothing(space *Space, key, data interface{}) + func QHullPartition(verts []Vector, count int, a, b Vector, tol float64) int + func QHullReduce(tol float64, verts []Vector, count int, a, pivot, b Vector, result []Vector) int + func QueryReject(a, b *Shape) bool + func QueryRejectConstraints(a, b *Body) bool + func SegmentToPoly(info *CollisionInfo) + func SegmentToSegment(info *CollisionInfo) + func SpaceArbiterSetFilter(arb *Arbiter, space *Space) bool + func SpaceCollideShapesFunc(obj interface{}, b *Shape, collisionId uint32, vspace interface{}) uint32 + func VoidQueryFunc(obj1 interface{}, obj2 *Shape, collisionId uint32, data interface{}) uint32 + type Arbiter struct + UserData interface{} + func ArbiterNext(arb *Arbiter, body *Body) *Arbiter + func SpaceArbiterSetTrans(shapes ShapePair, space *Space) *Arbiter + func (arb *Arbiter) Bodies() (*Body, *Body) + func (arb *Arbiter) CallWildcardBeginA(space *Space) bool + func (arb *Arbiter) CallWildcardBeginB(space *Space) bool + func (arb *Arbiter) CallWildcardPostSolveA(space *Space) + func (arb *Arbiter) CallWildcardPostSolveB(space *Space) + func (arb *Arbiter) CallWildcardPreSolveA(space *Space) bool + func (arb *Arbiter) CallWildcardPreSolveB(space *Space) bool + func (arb *Arbiter) CallWildcardSeparateA(space *Space) + func (arb *Arbiter) CallWildcardSeparateB(space *Space) + func (arb *Arbiter) ContactPointSet() ContactPointSet + func (arb *Arbiter) Count() int + func (arb *Arbiter) Ignore() bool + func (arb *Arbiter) Normal() Vector + func (arb *Arbiter) PreStep(dt, slop, bias float64) + func (arb *Arbiter) SetContactPointSet(set *ContactPointSet) + func (arb *Arbiter) Shapes() (*Shape, *Shape) + func (arb *Arbiter) TotalImpulse() Vector + func (arb *Arbiter) Update(info *CollisionInfo, space *Space) + func (arbiter *Arbiter) ApplyCachedImpulse(dt_coef float64) + func (arbiter *Arbiter) ApplyImpulse() + func (arbiter *Arbiter) Init(a, b *Shape) *Arbiter + func (arbiter *Arbiter) IsFirstContact() bool + func (arbiter *Arbiter) ThreadForBody(body *Body) *ArbiterThread + func (arbiter *Arbiter) Unthread() + func (node *Arbiter) Next(body *Body) *Arbiter + type ArbiterThread struct + type BB struct + B float64 + L float64 + R float64 + T float64 + func NewBBForCircle(p Vector, r float64) BB + func NewBBForExtents(c Vector, hw, hh float64) BB + func ShapeGetBB(obj *Shape) BB + func (a BB) Intersects(b BB) bool + func (a BB) Merge(b BB) BB + func (a BB) MergedArea(b BB) float64 + func (a BB) Proximity(b BB) float64 + func (bb BB) Area() float64 + func (bb BB) Center() Vector + func (bb BB) ClampVect(v *Vector) Vector + func (bb BB) Contains(other BB) bool + func (bb BB) ContainsVect(v Vector) bool + func (bb BB) Expand(v Vector) BB + func (bb BB) IntersectsSegment(a, b Vector) bool + func (bb BB) Offset(v Vector) BB + func (bb BB) SegmentQuery(a, b Vector) float64 + func (bb BB) String() string + func (bb BB) WrapVect(v Vector) Vector + type BBQueryContext struct + type BBTree struct + func (subtree *BBTree) PairFromPool() *Pair + func (tree *BBTree) Contains(obj *Shape, hashId HashValue) bool + func (tree *BBTree) Count() int + func (tree *BBTree) Destroy() + func (tree *BBTree) Each(f SpatialIndexIterator) + func (tree *BBTree) GetBB(obj *Shape) BB + func (tree *BBTree) GetMasterTree() *BBTree + func (tree *BBTree) IncrementStamp() + func (tree *BBTree) Insert(obj *Shape, hashId HashValue) + func (tree *BBTree) LeafAddPairs(leaf *Node) + func (tree *BBTree) LeafUpdate(leaf *Node) bool + func (tree *BBTree) NewLeaf(obj *Shape) *Node + func (tree *BBTree) NewNode(a, b *Node) *Node + func (tree *BBTree) NodeFromPool() *Node + func (tree *BBTree) PairInsert(a *Node, b *Node) + func (tree *BBTree) PairsClear(leaf *Node) + func (tree *BBTree) Query(obj interface{}, bb BB, f SpatialIndexQuery, data interface{}) + func (tree *BBTree) RecycleNode(node *Node) + func (tree *BBTree) RecyclePair(pair *Pair) + func (tree *BBTree) Reindex() + func (tree *BBTree) ReindexObject(obj *Shape, hashId HashValue) + func (tree *BBTree) ReindexQuery(f SpatialIndexQuery, data interface{}) + func (tree *BBTree) Remove(obj *Shape, hashId HashValue) + func (tree *BBTree) ReplaceChild(parent, child, value *Node) + func (tree *BBTree) SegmentQuery(obj interface{}, a, b Vector, t_exit float64, f SpatialIndexSegmentQuery, ...) + func (tree *BBTree) SubtreeInsert(subtree *Node, leaf *Node) *Node + func (tree *BBTree) SubtreeRemove(subtree *Node, leaf *Node) *Node + type BBTreeVelocityFunc func(obj interface{}) Vector + type Body struct + UserData interface{} + func NewBody(mass, moment float64) *Body + func NewKinematicBody() *Body + func NewStaticBody() *Body + func (b Body) String() string + func (body *Body) AccumulateMassFromShapes() + func (body *Body) Activate() + func (body *Body) ActivateStatic(filter *Shape) + func (body *Body) AddShape(shape *Shape) *Shape + func (body *Body) Angle() float64 + func (body *Body) AngularVelocity() float64 + func (body *Body) ApplyForceAtLocalPoint(force, point Vector) + func (body *Body) ApplyForceAtWorldPoint(force, point Vector) + func (body *Body) ApplyImpulseAtLocalPoint(impulse, point Vector) + func (body *Body) ApplyImpulseAtWorldPoint(impulse, point Vector) + func (body *Body) ComponentRoot() *Body + func (body *Body) EachArbiter(f func(*Arbiter)) + func (body *Body) EachConstraint(f func(*Constraint)) + func (body *Body) EachShape(f func(*Shape)) + func (body *Body) Force() Vector + func (body *Body) GetType() int + func (body *Body) IdleTime() float64 + func (body *Body) IsSleeping() bool + func (body *Body) KineticEnergy() float64 + func (body *Body) LocalToWorld(point Vector) Vector + func (body *Body) Mass() float64 + func (body *Body) Position() Vector + func (body *Body) PushArbiter(arb *Arbiter) + func (body *Body) RemoveConstraint(constraint *Constraint) + func (body *Body) RemoveShape(shape *Shape) + func (body *Body) Rotation() Vector + func (body *Body) SetAngle(angle float64) + func (body *Body) SetAngularVelocity(angularVelocity float64) + func (body *Body) SetForce(force Vector) + func (body *Body) SetMass(mass float64) + func (body *Body) SetMoment(moment float64) + func (body *Body) SetPosition(position Vector) + func (body *Body) SetPositionUpdateFunc(f BodyPositionFunc) + func (body *Body) SetTransform(p Vector, a float64) + func (body *Body) SetType(newType int) + func (body *Body) SetVelocity(x, y float64) + func (body *Body) SetVelocityUpdateFunc(f BodyVelocityFunc) + func (body *Body) SetVelocityVector(v Vector) + func (body *Body) UpdateVelocity(gravity Vector, damping, dt float64) + func (body *Body) Velocity() Vector + func (body *Body) VelocityAtLocalPoint(point Vector) Vector + func (body *Body) VelocityAtWorldPoint(point Vector) Vector + func (body *Body) WorldToLocal(point Vector) Vector + func (body Body) CenterOfGravity() Vector + func (body Body) Moment() float64 + func (root *Body) ComponentAdd(body *Body) + type BodyPositionFunc func(body *Body, dt float64) + type BodyVelocityFunc func(body *Body, gravity Vector, damping float64, dt float64) + type Children struct + type Circle struct + func (*Circle) Destroy() + func (circle *Circle) CacheData(transform Transform) BB + func (circle *Circle) PointQuery(p Vector, info *PointQueryInfo) + func (circle *Circle) Radius() float64 + func (circle *Circle) SegmentQuery(a, b Vector, radius float64, info *SegmentQueryInfo) + func (circle *Circle) SetRadius(r float64) + func (circle *Circle) TransformC() Vector + type ClosestPoints struct + func EPA(ctx SupportContext, v0 MinkowskiPoint, v1 MinkowskiPoint, v2 MinkowskiPoint) ClosestPoints + func EPARecurse(ctx SupportContext, count int, hull []MinkowskiPoint, iteration int) ClosestPoints + func GJK(ctx SupportContext, collisionId *uint32) ClosestPoints + func GJKRecurse(ctx SupportContext, v0, v1 MinkowskiPoint, iteration int) ClosestPoints + type CollisionBeginFunc func(arb *Arbiter, space *Space, userData interface{}) bool + type CollisionFunc func(info *CollisionInfo) + type CollisionHandler struct + BeginFunc CollisionBeginFunc + PostSolveFunc CollisionPostSolveFunc + PreSolveFunc CollisionPreSolveFunc + SeparateFunc CollisionSeparateFunc + TypeA CollisionType + TypeB CollisionType + UserData interface{} + type CollisionInfo struct + func (info *CollisionInfo) Collide(a, b *Shape) + func (info *CollisionInfo) PushContact(p1, p2 Vector, hash HashValue) + type CollisionPostSolveFunc func(arb *Arbiter, space *Space, userData interface{}) + type CollisionPreSolveFunc func(arb *Arbiter, space *Space, userData interface{}) bool + type CollisionSeparateFunc func(arb *Arbiter, space *Space, userData interface{}) + type CollisionType uintptr + var WILDCARD_COLLISION_TYPE CollisionType = ^CollisionType(0) + type Constrainer interface + ApplyCachedImpulse func(dt_coef float64) + ApplyImpulse func(dt float64) + GetImpulse func() float64 + PreStep func(dt float64) + type Constraint struct + Class Constrainer + PostSolve ConstraintPostSolveFunc + PreSolve ConstraintPreSolveFunc + func NewConstraint(class Constrainer, a, b *Body) *Constraint + func NewDampedRotarySpring(a, b *Body, restAngle, stiffness, damping float64) *Constraint + func NewDampedSpring(a, b *Body, anchorA, anchorB Vector, restLength, stiffness, damping float64) *Constraint + func NewGearJoint(a, b *Body, phase, ratio float64) *Constraint + func NewGrooveJoint(a, b *Body, grooveA, grooveB, anchorB Vector) *Constraint + func NewPinJoint(a, b *Body, anchorA, anchorB Vector) *Constraint + func NewPivotJoint(a, b *Body, pivot Vector) *Constraint + func NewPivotJoint2(a, b *Body, anchorA, anchorB Vector) *Constraint + func NewRatchetJoint(a, b *Body, phase, ratchet float64) *Constraint + func NewRotaryLimitJoint(a, b *Body, min, max float64) *Constraint + func NewSimpleMotor(a, b *Body, rate float64) *Constraint + func NewSlideJoint(a, b *Body, anchorA, anchorB Vector, min, max float64) *Constraint + func (c *Constraint) ActivateBodies() + func (c *Constraint) Next(body *Body) *Constraint + func (c *Constraint) SetCollideBodies(collideBodies bool) + func (c *Constraint) SetErrorBias(errorBias float64) + func (c *Constraint) SetMaxBias(max float64) + func (c *Constraint) SetMaxForce(max float64) + func (c Constraint) ErrorBias() float64 + func (c Constraint) MaxBias() float64 + func (c Constraint) MaxForce() float64 + type ConstraintPostSolveFunc func(*Constraint, *Space) + type ConstraintPreSolveFunc func(*Constraint, *Space) + type Contact struct + func (c *Contact) Clone() Contact + type ContactBuffer struct + func NewContactBuffer(stamp uint, slice *ContactBuffer) *ContactBuffer + func (c *ContactBuffer) InitHeader(stamp uint, splice *ContactBuffer) *ContactBuffer + type ContactPointSet struct + Count int + Normal Vector + Points [MAX_CONTACTS_PER_ARBITER]struct{ ... } + type DampedRotarySpring struct + Damping float64 + RestAngle float64 + SpringTorqueFunc func(spring *DampedRotarySpring, relativeAngle float64) float64 + Stiffness float64 + func (joint *DampedRotarySpring) ApplyCachedImpulse(dt_coef float64) + func (joint *DampedRotarySpring) GetImpulse() float64 + func (spring *DampedRotarySpring) ApplyImpulse(dt float64) + func (spring *DampedRotarySpring) PreStep(dt float64) + type DampedSpring struct + AnchorA Vector + AnchorB Vector + Damping float64 + RestLength float64 + SpringForceFunc DampedSpringForceFunc + Stiffness float64 + func (spring *DampedSpring) ApplyCachedImpulse(dt_coef float64) + func (spring *DampedSpring) ApplyImpulse(dt float64) + func (spring *DampedSpring) GetImpulse() float64 + func (spring *DampedSpring) PreStep(dt float64) + type DampedSpringForceFunc func(spring *DampedSpring, dist float64) float64 + type Drawer interface + CollisionPointColor func() FColor + ConstraintColor func() FColor + Data func() interface{} + DrawCircle func(pos Vector, angle, radius float64, outline, fill FColor, data interface{}) + DrawDot func(size float64, pos Vector, fill FColor, data interface{}) + DrawFatSegment func(a, b Vector, radius float64, outline, fill FColor, data interface{}) + DrawPolygon func(count int, verts []Vector, radius float64, outline, fill FColor, ...) + DrawSegment func(a, b Vector, fill FColor, data interface{}) + Flags func() uint + OutlineColor func() FColor + ShapeColor func(shape *Shape, data interface{}) FColor + type Edge struct + func SupportEdgeForPoly(poly *PolyShape, n Vector) Edge + func SupportEdgeForSegment(seg *Segment, n Vector) Edge + type EdgePoint struct + type FColor struct + A float32 + B float32 + G float32 + R float32 + type GearJoint struct + func (joint *GearJoint) ApplyCachedImpulse(dt_coef float64) + func (joint *GearJoint) ApplyImpulse(dt float64) + func (joint *GearJoint) GetImpulse() float64 + func (joint *GearJoint) PreStep(dt float64) + type GrooveJoint struct + AnchorB Vector + GrooveA Vector + GrooveB Vector + GrooveN Vector + func (joint *GrooveJoint) ApplyCachedImpulse(dt_coef float64) + func (joint *GrooveJoint) ApplyImpulse(dt float64) + func (joint *GrooveJoint) GetImpulse() float64 + func (joint *GrooveJoint) PreStep(dt float64) + type Handle struct + func (hand *Handle) Init(obj *Shape) + type HashSet struct + func NewHashSet(eql HashSetEqual) *HashSet + func (set *HashSet) Count() uint + func (set *HashSet) Each(f HashSetIterator) + func (set *HashSet) Filter(f HashSetFilter, data interface{}) + func (set *HashSet) Find(hash HashValue, ptr interface{}) interface{} + func (set *HashSet) Free() + func (set *HashSet) GetUnusedBin() *HashSetBin + func (set *HashSet) Insert(hash HashValue, ptr interface{}, trans HashSetTrans, data interface{}) interface{} + func (set *HashSet) Recycle(bin *HashSetBin) + func (set *HashSet) Remove(hash HashValue, ptr interface{}) interface{} + func (set *HashSet) Resize() + type HashSetArbiter struct + func NewHashSetArbiter(eql HashSetEqualArbiter) *HashSetArbiter + func (set *HashSetArbiter) Count() uint + func (set *HashSetArbiter) Each(f HashSetIteratorArbiter) + func (set *HashSetArbiter) Filter(filter func(arb *Arbiter) bool) + func (set *HashSetArbiter) Find(hash HashValue, ptr ShapePair) interface{} + func (set *HashSetArbiter) Free() + func (set *HashSetArbiter) GetUnusedBin() *HashSetBinArbiter + func (set *HashSetArbiter) Insert(hash HashValue, ptr ShapePair, trans HashSetTransArbiter, space *Space) *Arbiter + func (set *HashSetArbiter) InsertArb(hash HashValue, ptr ShapePair, arb *Arbiter) interface{} + func (set *HashSetArbiter) Recycle(bin *HashSetBinArbiter) + func (set *HashSetArbiter) Remove(hash HashValue, ptr ShapePair) *Arbiter + func (set *HashSetArbiter) Resize() + type HashSetBin struct + type HashSetBinArbiter struct + type HashSetBinCollisionHandler struct + type HashSetBinHandle struct + type HashSetCollisionHandler struct + func NewHashSetCollisionHandler() *HashSetCollisionHandler + func (set *HashSetCollisionHandler) Count() uint + func (set *HashSetCollisionHandler) Each(f HashSetIterator) + func (set *HashSetCollisionHandler) Find(hash HashValue, ptr *CollisionHandler) *CollisionHandler + func (set *HashSetCollisionHandler) Insert(hash HashValue, ptr *CollisionHandler) *CollisionHandler + func (set *HashSetCollisionHandler) Resize() + type HashSetEqual func(ptr, elt interface{}) bool + type HashSetEqualArbiter func(ptr ShapePair, elt *Arbiter) bool + type HashSetEqualCollisionHandler func(ptr, elt interface{}) bool + type HashSetEqualHandle func(ptr *Shape, elt *Handle) bool + type HashSetFilter func(elt, data interface{}) bool + type HashSetFilterArbiter func(arb *Arbiter, space *Space) bool + type HashSetFilterCollisionHandler func(elt, data interface{}) bool + type HashSetFilterHandle func(arb *Handle, space *Space) bool + type HashSetHandle struct + func NewHashSetHandle(eql HashSetEqualHandle) *HashSetHandle + func (set *HashSetHandle) Count() uint + func (set *HashSetHandle) Each(f HashSetIteratorHandle) + func (set *HashSetHandle) Find(hash HashValue, ptr *Shape) interface{} + func (set *HashSetHandle) Free() + func (set *HashSetHandle) GetUnusedBin() *HashSetBinHandle + func (set *HashSetHandle) Insert(hash HashValue, ptr *Shape, trans HashSetTransHandle, spaceHash *SpaceHash) *Handle + func (set *HashSetHandle) InsertArb(hash HashValue, ptr *Shape, arb *Handle) interface{} + func (set *HashSetHandle) Recycle(bin *HashSetBinHandle) + func (set *HashSetHandle) Remove(hash HashValue, ptr *Shape) *Handle + func (set *HashSetHandle) Resize() + type HashSetIterator func(elt interface{}) + type HashSetIteratorArbiter func(elt *Arbiter) + type HashSetIteratorCollisionHandler func(elt interface{}) + type HashSetIteratorHandle func(elt *Handle) + type HashSetTrans func(ptr, data interface{}) interface + type HashSetTransArbiter func(ptr ShapePair, space *Space) *Arbiter + type HashSetTransCollisionHandler func(ptr, data interface{}) interface + type HashSetTransHandle func(ptr *Shape, hash *SpaceHash) *Handle + type HashValue uintptr + func HashPair(a, b HashValue) HashValue + type Leaf struct + type MarkContext struct + type Mat2x2 struct + func (m *Mat2x2) Transform(v Vector) Vector + type MinkowskiPoint struct + func NewMinkowskiPoint(a, b SupportPoint) MinkowskiPoint + func (v0 MinkowskiPoint) ClosestPoints(v1 MinkowskiPoint) ClosestPoints + type Node struct + func (leaf *Node) MarkLeaf(context *MarkContext) + func (node *Node) IsLeaf() bool + func (node *Node) Other(child *Node) *Node + func (subtree *Node) MarkLeafQuery(leaf *Node, left bool, context *MarkContext) + func (subtree *Node) MarkSubtree(context *MarkContext) + func (subtree *Node) SubtreeQuery(obj interface{}, bb BB, query SpatialIndexQuery, data interface{}) + func (subtree *Node) SubtreeSegmentQuery(obj interface{}, a, b Vector, t_exit float64, f SpatialIndexSegmentQuery, ...) float64 + type Pair struct + type PinJoint struct + AnchorA Vector + AnchorB Vector + Dist float64 + func (joint *PinJoint) ApplyCachedImpulse(dt_coef float64) + func (joint *PinJoint) ApplyImpulse(dt float64) + func (joint *PinJoint) GetImpulse() float64 + func (joint *PinJoint) PreStep(dt float64) + type PivotJoint struct + AnchorA Vector + AnchorB Vector + func (joint *PivotJoint) ApplyCachedImpulse(dt_coef float64) + func (joint *PivotJoint) ApplyImpulse(dt float64) + func (joint *PivotJoint) GetImpulse() float64 + func (joint *PivotJoint) PreStep(dt float64) + type PointQueryContext struct + type PointQueryInfo struct + Distance float64 + Gradient Vector + Point Vector + Shape *Shape + type PolyShape struct + func (p *PolyShape) SetVerts(count int, verts []Vector) + func (p *PolyShape) SetVertsRaw(count int, verts []Vector) + func (p *PolyShape) SetVertsUnsafe(count int, verts []Vector, transform Transform) + func (poly *PolyShape) CacheData(transform Transform) BB + func (poly *PolyShape) Destroy() + func (poly *PolyShape) PointQuery(p Vector, info *PointQueryInfo) + func (poly *PolyShape) SegmentQuery(a, b Vector, r2 float64, info *SegmentQueryInfo) + func (poly PolyShape) Count() int + func (poly PolyShape) Radius() float64 + func (poly PolyShape) SetRadius(r float64) + func (poly PolyShape) TransformVert(i int) Vector + func (poly PolyShape) Vert(i int) Vector + type PostStepCallback struct + type PostStepCallbackFunc func(space *Space, key interface{}, data interface{}) + type RatchetJoint struct + Angle float64 + Phase float64 + Ratchet float64 + func (joint *RatchetJoint) ApplyCachedImpulse(dt_coef float64) + func (joint *RatchetJoint) ApplyImpulse(dt float64) + func (joint *RatchetJoint) GetImpulse() float64 + func (joint *RatchetJoint) PreStep(dt float64) + type RotaryLimitJoint struct + Max float64 + Min float64 + func (joint *RotaryLimitJoint) ApplyCachedImpulse(dt_coef float64) + func (joint *RotaryLimitJoint) ApplyImpulse(dt float64) + func (joint *RotaryLimitJoint) GetImpulse() float64 + func (joint *RotaryLimitJoint) PreStep(dt float64) + type Segment struct + func (seg *Segment) A() Vector + func (seg *Segment) B() Vector + func (seg *Segment) CacheData(transform Transform) BB + func (seg *Segment) Destroy() + func (seg *Segment) Normal() Vector + func (seg *Segment) PointQuery(p Vector, info *PointQueryInfo) + func (seg *Segment) Radius() float64 + func (seg *Segment) SegmentQuery(a, b Vector, r2 float64, info *SegmentQueryInfo) + func (seg *Segment) SetEndpoints(a, b Vector) + func (seg *Segment) SetRadius(r float64) + func (seg *Segment) TransformA() Vector + func (seg *Segment) TransformB() Vector + type SegmentQueryContext struct + type SegmentQueryInfo struct + Alpha float64 + Normal Vector + Point Vector + Shape *Shape + type Shape struct + Class ShapeClass + Filter ShapeFilter + UserData interface{} + func NewBox(body *Body, w, h, r float64) *Shape + func NewBox2(body *Body, bb BB, r float64) *Shape + func NewCircle(body *Body, radius float64, offset Vector) *Shape + func NewPolyShape(body *Body, vectCount int, verts []Vector, transform Transform, radius float64) *Shape + func NewPolyShapeRaw(body *Body, count int, verts []Vector, radius float64) *Shape + func NewSegment(body *Body, a, b Vector, r float64) *Shape + func NewShape(class ShapeClass, body *Body, massInfo *ShapeMassInfo) *Shape + func (s *Shape) BB() BB + func (s *Shape) Body() *Body + func (s *Shape) CacheBB() BB + func (s *Shape) Elasticity() float64 + func (s *Shape) Friction() float64 + func (s *Shape) HashId() HashValue + func (s *Shape) MassInfo() *ShapeMassInfo + func (s *Shape) Order() int + func (s *Shape) Point(i uint32) SupportPoint + func (s *Shape) PointQuery(p Vector) PointQueryInfo + func (s *Shape) Sensor() bool + func (s *Shape) SetBB(bb BB) + func (s *Shape) SetCollisionType(collisionType CollisionType) + func (s *Shape) SetElasticity(e float64) + func (s *Shape) SetFilter(filter ShapeFilter) + func (s *Shape) SetFriction(u float64) + func (s *Shape) SetHashId(hashid HashValue) + func (s *Shape) SetSensor(sensor bool) + func (s *Shape) SetSpace(space *Space) + func (s *Shape) SetSurfaceV(surfaceV Vector) + func (s *Shape) Space() *Space + func (s *Shape) Update(transform Transform) BB + func (s Shape) String() string + func (shape *Shape) SegmentQuery(a, b Vector, radius float64, info *SegmentQueryInfo) bool + type ShapeClass interface + CacheData func(transform Transform) BB + Destroy func() + PointQuery func(p Vector, info *PointQueryInfo) + SegmentQuery func(a, b Vector, radius float64, info *SegmentQueryInfo) + type ShapeFilter struct + Categories uint + Group uint + Mask uint + func NewShapeFilter(group, categories, mask uint) ShapeFilter + func (a ShapeFilter) Reject(b ShapeFilter) bool + type ShapeMassInfo struct + func CircleShapeMassInfo(mass, radius float64, center Vector) *ShapeMassInfo + func NewSegmentMassInfo(mass float64, a, b Vector, r float64) *ShapeMassInfo + func PolyShapeMassInfo(mass float64, count int, verts []Vector, r float64) *ShapeMassInfo + type ShapePair struct + type Shaper interface + BB func() BB + Body func() *Body + HashId func() HashValue + MassInfo func() *ShapeMassInfo + SetBB func(BB) + SetHashId func(HashValue) + SetSpace func(*Space) + type SimpleMotor struct + Rate float64 + func (motor *SimpleMotor) ApplyCachedImpulse(dt_coef float64) + func (motor *SimpleMotor) ApplyImpulse(dt float64) + func (motor *SimpleMotor) GetImpulse() float64 + func (motor *SimpleMotor) PreStep(dt float64) + type SlideJoint struct + AnchorA Vector + AnchorB Vector + Max float64 + Min float64 + func (joint *SlideJoint) ApplyCachedImpulse(dt_coef float64) + func (joint *SlideJoint) ApplyImpulse(dt float64) + func (joint *SlideJoint) GetImpulse() float64 + func (joint *SlideJoint) PreStep(dt float64) + type Space struct + Iterations uint + SleepTimeThreshold float64 + StaticBody *Body + func NewSpace() *Space + func (space *Space) Activate(body *Body) + func (space *Space) AddBody(body *Body) *Body + func (space *Space) AddConstraint(constraint *Constraint) *Constraint + func (space *Space) AddPostStepCallback(f PostStepCallbackFunc, key, data interface{}) bool + func (space *Space) AddShape(shape *Shape) *Shape + func (space *Space) ArrayForBodyType(bodyType int) *[]*Body + func (space *Space) BBQuery(bb BB, filter ShapeFilter, f SpaceBBQueryFunc, data interface{}) + func (space *Space) ContactBufferGetArray() []Contact + func (space *Space) ContainsBody(body *Body) bool + func (space *Space) ContainsConstraint(constraint *Constraint) bool + func (space *Space) ContainsShape(shape *Shape) bool + func (space *Space) Damping() float64 + func (space *Space) Deactivate(body *Body) + func (space *Space) EachBody(f func(body *Body)) + func (space *Space) EachConstraint(f func(*Constraint)) + func (space *Space) EachShape(f func(*Shape)) + func (space *Space) FilterArbiters(body *Body, filter *Shape) + func (space *Space) Gravity() Vector + func (space *Space) Lock() + func (space *Space) LookupHandler(a, b CollisionType, defaultHandler *CollisionHandler) *CollisionHandler + func (space *Space) NewCollisionHandler(collisionTypeA, collisionTypeB CollisionType) *CollisionHandler + func (space *Space) NewWildcardCollisionHandler(collisionType CollisionType) *CollisionHandler + func (space *Space) PointQueryNearest(point Vector, maxDistance float64, filter ShapeFilter) *PointQueryInfo + func (space *Space) PopContacts(count int) + func (space *Space) PostStepCallback(key interface{}) *PostStepCallback + func (space *Space) ProcessComponents(dt float64) + func (space *Space) PushContacts(count int) + func (space *Space) PushFreshContactBuffer() + func (space *Space) RemoveBody(body *Body) + func (space *Space) RemoveConstraint(constraint *Constraint) + func (space *Space) RemoveShape(shape *Shape) + func (space *Space) SegmentQuery(start, end Vector, radius float64, filter ShapeFilter, f SpaceSegmentQueryFunc, ...) + func (space *Space) SegmentQueryFirst(start, end Vector, radius float64, filter ShapeFilter) SegmentQueryInfo + func (space *Space) SetCollisionSlop(slop float64) + func (space *Space) SetDamping(damping float64) + func (space *Space) SetGravity(gravity Vector) + func (space *Space) SetStaticBody(body *Body) + func (space *Space) Step(dt float64) + func (space *Space) TimeStep() float64 + func (space *Space) UncacheArbiter(arb *Arbiter) + func (space *Space) Unlock(runPostStep bool) + func (space *Space) UseSpatialHash(dim float64, count int) + func (space *Space) UseWildcardDefaultHandler() + type SpaceBBQueryFunc func(shape *Shape, data interface{}) + type SpaceHash struct + func (hash *SpaceHash) Contains(obj *Shape, hashId HashValue) bool + func (hash *SpaceHash) Count() int + func (hash *SpaceHash) Destroy() + func (hash *SpaceHash) Each(f SpatialIndexIterator) + func (hash *SpaceHash) Insert(obj *Shape, hashId HashValue) + func (hash *SpaceHash) Query(obj interface{}, bb BB, f SpatialIndexQuery, data interface{}) + func (hash *SpaceHash) Reindex() + func (hash *SpaceHash) ReindexObject(obj *Shape, hashId HashValue) + func (hash *SpaceHash) ReindexQuery(f SpatialIndexQuery, data interface{}) + func (hash *SpaceHash) Remove(obj *Shape, hashId HashValue) + func (hash *SpaceHash) SegmentQuery(obj interface{}, a, b Vector, t_exit float64, f SpatialIndexSegmentQuery, ...) + type SpaceHashBin struct + type SpacePointQueryFunc func(*Shape, Vector, float64, Vector, interface{}) + type SpaceSegmentQueryFunc func(shape *Shape, point, normal Vector, alpha float64, data interface{}) + type SpatialIndex struct + func NewBBTree(bbfunc SpatialIndexBB, staticIndex *SpatialIndex) *SpatialIndex + func NewSpaceHash(celldim float64, num int, bbfunc SpatialIndexBB, staticIndex *SpatialIndex) *SpatialIndex + func NewSpatialIndex(klass SpatialIndexer, bbfunc SpatialIndexBB, staticIndex *SpatialIndex) *SpatialIndex + func (dynamicIndex *SpatialIndex) CollideStatic(staticIndex *SpatialIndex, f SpatialIndexQuery, data interface{}) + func (index *SpatialIndex) GetRootIfTree() *Node + func (index *SpatialIndex) GetTree() *BBTree + type SpatialIndexBB func(obj *Shape) BB + type SpatialIndexIterator func(obj *Shape) + type SpatialIndexQuery func(obj1 interface{}, obj2 *Shape, collisionId uint32, data interface{}) uint32 + type SpatialIndexSegmentQuery func(obj1 interface{}, obj2 *Shape, data interface{}) float64 + type SpatialIndexer interface + Contains func(obj *Shape, hashId HashValue) bool + Count func() int + Destroy func() + Each func(f SpatialIndexIterator) + Insert func(obj *Shape, hashId HashValue) + Query func(obj interface{}, bb BB, f SpatialIndexQuery, data interface{}) + Reindex func() + ReindexObject func(obj *Shape, hashId HashValue) + ReindexQuery func(f SpatialIndexQuery, data interface{}) + Remove func(obj *Shape, hashId HashValue) + SegmentQuery func(obj interface{}, a, b Vector, t_exit float64, f SpatialIndexSegmentQuery, ...) + type SplittingPlane struct + type SupportContext struct + func (ctx *SupportContext) Support(n Vector) MinkowskiPoint + type SupportPoint struct + func CircleSupportPoint(shape *Shape, n Vector) SupportPoint + func NewSupportPoint(p Vector, index uint32) SupportPoint + func PolySupportPoint(shape *Shape, n Vector) SupportPoint + func SegmentSupportPoint(shape *Shape, n Vector) SupportPoint + type SupportPointFunc func(shape *Shape, n Vector) SupportPoint + type Thread struct + func (thread *Thread) Unlink() + type Transform struct + func NewTransform(a, c, tx, b, d, ty float64) Transform + func NewTransformIdentity() Transform + func NewTransformRigid(translate Vector, radians float64) Transform + func NewTransformRigidInverse(t Transform) Transform + func NewTransformRotate(radians float64) Transform + func NewTransformScale(scaleX, scaleY float64) Transform + func NewTransformTranslate(translate Vector) Transform + func NewTransformTranspose(a, c, tx, b, d, ty float64) Transform + func (outer Transform) AxialScale(axis, pivot Vector, scale float64) Transform + func (outer Transform) BoneScale(v0, v1 Vector) Transform + func (outer Transform) Ortho(bb BB) Transform + func (outer Transform) Wrap(inner Transform) Transform + func (t Transform) BB(bb BB) BB + func (t Transform) Inverse() Transform + func (t Transform) Mult(t2 Transform) Transform + func (t Transform) Point(p Vector) Vector + func (t Transform) Vect(v Vector) Vector + type Vector struct + X float64 + Y float64 + func CentroidForPoly(count int, verts []Vector) Vector + func ForAngle(a float64) Vector + func (a Vector) ClosestT(b Vector) float64 + func (a Vector) LerpT(b Vector, t float64) Vector + func (a Vector) PointGreater(b, c Vector) bool + func (p Vector) Clone() Vector + func (p Vector) ClosestPointOnSegment(a, b Vector) Vector + func (v Vector) Add(other Vector) Vector + func (v Vector) Clamp(length float64) Vector + func (v Vector) Cross(other Vector) float64 + func (v Vector) Distance(other Vector) float64 + func (v Vector) DistanceSq(other Vector) float64 + func (v Vector) Dot(other Vector) float64 + func (v Vector) Equal(other Vector) bool + func (v Vector) Length() float64 + func (v Vector) LengthSq() float64 + func (v Vector) Lerp(other Vector, t float64) Vector + func (v Vector) LerpConst(other Vector, d float64) Vector + func (v Vector) Mult(s float64) Vector + func (v Vector) Near(other Vector, d float64) bool + func (v Vector) Neg() Vector + func (v Vector) Normalize() Vector + func (v Vector) Perp() Vector + func (v Vector) Project(other Vector) Vector + func (v Vector) ReversePerp() Vector + func (v Vector) Rotate(other Vector) Vector + func (v Vector) SLerp(other Vector, t float64) Vector + func (v Vector) SlerpConst(other Vector, a float64) Vector + func (v Vector) String() string + func (v Vector) Sub(other Vector) Vector + func (v Vector) ToAngle() float64 + func (v Vector) Unrotate(other Vector) Vector + func (v0 Vector) CheckAxis(v1, p, n Vector) bool + func (v0 Vector) ClosestDist(v1 Vector) float64