Documentation ¶
Overview ¶
Package ode provide a Go interface to the Open Dynamics Engine library. See the ODE documentation for more information.
Index ¶
- Constants
- Variables
- func CleanupAllDataForThread()
- func Close()
- func Init(initFlags, allocFlags int)
- type AABB
- type AMotorJoint
- func (j AMotorJoint) AddTorques(torque1, torque2, torque3 float64)
- func (j AMotorJoint) Angle(num int) float64
- func (j AMotorJoint) AngleRate(num int) float64
- func (j AMotorJoint) Axis(num int) Vector3
- func (j AMotorJoint) AxisRel(num int) int
- func (j AMotorJoint) Mode() int
- func (j AMotorJoint) NumAxes() int
- func (j AMotorJoint) Param(parameter int) float64
- func (j AMotorJoint) SetAngle(num int, angle float64)
- func (j AMotorJoint) SetAxis(num, rel int, axis Vector3)
- func (j AMotorJoint) SetMode(mode int)
- func (j AMotorJoint) SetNumAxes(num int)
- func (j AMotorJoint) SetParam(parameter int, value float64)
- type BallJoint
- type Body
- func (b Body) AddForce(force Vector3)
- func (b Body) AddForceAtPos(force, pos Vector3)
- func (b Body) AddForceAtRelPos(force, pos Vector3)
- func (b Body) AddRelForce(force Vector3)
- func (b Body) AddRelForceAtPos(force, pos Vector3)
- func (b Body) AddRelForceAtRelPos(force, pos Vector3)
- func (b Body) AddRelTorque(torque Vector3)
- func (b Body) AddTorque(torque Vector3)
- func (b Body) AngularDamping() float64
- func (b Body) AngularDampingThreshold() float64
- func (b Body) AngularVel() Vector3
- func (b Body) AutoDisable() bool
- func (b Body) AutoDisableAngularThreshold() float64
- func (b Body) AutoDisableAverageSamplesCount() int
- func (b Body) AutoDisableLinearThreshold() float64
- func (b Body) AutoDisableSteps() int
- func (b Body) AutoDisableTime() float64
- func (b Body) Connected(other Body) bool
- func (b Body) ConnectedExcluding(other Body, jointType int) bool
- func (b Body) ConnectingJoint(other Body) Joint
- func (b Body) ConnectingJointList(other Body) []Joint
- func (b Body) Data() interface{}
- func (b Body) Destroy()
- func (b Body) Enabled() bool
- func (b Body) FiniteRotationAxis() Vector3
- func (b Body) FiniteRotationMode() bool
- func (b Body) FirstGeom() Geom
- func (b Body) Force() Vector3
- func (b Body) GravityEnabled() bool
- func (b Body) GyroModeEnabled() bool
- func (b Body) Joint(index int) Joint
- func (b Body) Kinematic() bool
- func (b Body) LinearDamping() float64
- func (b Body) LinearDampingThreshold() float64
- func (b Body) LinearVelocity() Vector3
- func (b Body) Mass() *Mass
- func (b Body) MaxAngularSpeed() float64
- func (b Body) NumJoints() int
- func (b Body) PointVel(pt Vector3) Vector3
- func (b Body) PosRelPoint(pos Vector3) Vector3
- func (b Body) Position() Vector3
- func (b Body) Quaternion() Quaternion
- func (b Body) RelPointPos(pt Vector3) Vector3
- func (b Body) RelPointVel(pt Vector3) Vector3
- func (b Body) Rotation() Matrix3
- func (b Body) SetAngularDamping(scale float64)
- func (b Body) SetAngularDampingThreshold(threshold float64)
- func (b Body) SetAngularVelocity(vel Vector3)
- func (b Body) SetAutoAutoDisableAverageSamplesCount(count int)
- func (b Body) SetAutoDisable(doAutoDisable bool)
- func (b Body) SetAutoDisableAngularThreshold(thresh float64)
- func (b Body) SetAutoDisableDefaults()
- func (b Body) SetAutoDisableLinearThreshold(thresh float64)
- func (b Body) SetAutoDisableSteps(steps int)
- func (b Body) SetAutoDisableTime(time float64)
- func (b Body) SetDampingDefaults()
- func (b Body) SetData(data interface{})
- func (b Body) SetEnabled(isEnabled bool)
- func (b Body) SetFiniteRotationAxis(axis Vector3)
- func (b Body) SetFiniteRotationMode(isFinite bool)
- func (b Body) SetForce(force Vector3)
- func (b Body) SetGravityEnabled(isGravityEnabled bool)
- func (b Body) SetGyroModeEnabled(isEnabled bool)
- func (b Body) SetKinematic(isKinematic bool)
- func (b Body) SetLinearDamping(scale float64)
- func (b Body) SetLinearDampingThreshold(threshold float64)
- func (b Body) SetLinearVelocity(vel Vector3)
- func (b Body) SetMass(mass *Mass)
- func (b Body) SetMaxAngularSpeed(maxSpeed float64)
- func (b Body) SetMovedCallback(cb MovedCallback)
- func (b Body) SetPosition(pos Vector3)
- func (b Body) SetQuaternion(quat Quaternion)
- func (b Body) SetRotation(rot Matrix3)
- func (b Body) SetTorque(torque Vector3)
- func (b Body) Torque() Vector3
- func (b Body) VectorFromWorld(wld Vector3) Vector3
- func (b Body) VectorToWorld(vec Vector3) Vector3
- func (b Body) World() World
- type Box
- type Capsule
- type Contact
- type ContactGeom
- type ContactJoint
- type Convex
- type Cylinder
- type DBallJoint
- func (j DBallJoint) Anchor1() Vector3
- func (j DBallJoint) Anchor2() Vector3
- func (j DBallJoint) Distance() float64
- func (j DBallJoint) Param(parameter int) float64
- func (j DBallJoint) SetAnchor1(pt Vector3)
- func (j DBallJoint) SetAnchor2(pt Vector3)
- func (j DBallJoint) SetParam(parameter int, value float64)
- type DHingeJoint
- func (j DHingeJoint) Anchor1() Vector3
- func (j DHingeJoint) Anchor2() Vector3
- func (j DHingeJoint) Axis() Vector3
- func (j DHingeJoint) Distance() float64
- func (j DHingeJoint) Param(parameter int) float64
- func (j DHingeJoint) SetAnchor1(pt Vector3)
- func (j DHingeJoint) SetAnchor2(pt Vector3)
- func (j DHingeJoint) SetAxis(axis Vector3)
- func (j DHingeJoint) SetParam(parameter int, value float64)
- type FixedJoint
- type Geom
- type GeomBase
- func (g GeomBase) AABB() AABB
- func (g GeomBase) Body() Body
- func (g GeomBase) CategoryBits() int
- func (g GeomBase) Class() int
- func (g GeomBase) ClearOffset()
- func (g GeomBase) Collide(other Geom, maxContacts uint16, flags int) []ContactGeom
- func (g GeomBase) Collide2(other Geom, data interface{}, cb NearCallback)
- func (g GeomBase) CollideBits() int
- func (g GeomBase) Data() interface{}
- func (g GeomBase) Destroy()
- func (g GeomBase) Enabled() bool
- func (g GeomBase) IsOffset() bool
- func (g GeomBase) IsSpace() bool
- func (g GeomBase) Next() Geom
- func (g GeomBase) OffsetPosition() Vector3
- func (g GeomBase) OffsetQuaternion() Quaternion
- func (g GeomBase) OffsetRotation() Matrix3
- func (g GeomBase) PosRelPoint(pos Vector3) Vector3
- func (g GeomBase) Position() Vector3
- func (g GeomBase) Quaternion() Quaternion
- func (g GeomBase) RelPointPos(pt Vector3) Vector3
- func (g GeomBase) Rotation() Matrix3
- func (g GeomBase) SetBody(body Body)
- func (g GeomBase) SetCategoryBits(bits int)
- func (g GeomBase) SetCollideBits(bits int)
- func (g GeomBase) SetData(data interface{})
- func (g GeomBase) SetEnabled(isEnabled bool)
- func (g GeomBase) SetOffsetPosition(pos Vector3)
- func (g GeomBase) SetOffsetQuaternion(quat Quaternion)
- func (g GeomBase) SetOffsetRotation(rot Matrix3)
- func (g GeomBase) SetOffsetWorldPosition(pos Vector3)
- func (g GeomBase) SetOffsetWorldQuaternion(quat Quaternion)
- func (g GeomBase) SetOffsetWorldRotation(rot Matrix3)
- func (g GeomBase) SetPosition(pos Vector3)
- func (g GeomBase) SetQuaternion(quat Quaternion)
- func (g GeomBase) SetRotation(rot Matrix3)
- func (g GeomBase) Space() Space
- func (g GeomBase) VectorFromWorld(wld Vector3) Vector3
- func (g GeomBase) VectorToWorld(vec Vector3) Vector3
- type HashSpace
- type Heightfield
- type HeightfieldData
- type Hinge2Joint
- func (j Hinge2Joint) AddTorques(torque1, torque2 float64)
- func (j Hinge2Joint) Anchor() Vector3
- func (j Hinge2Joint) Anchor2() Vector3
- func (j Hinge2Joint) Angle1() float64
- func (j Hinge2Joint) Angle1Rate() float64
- func (j Hinge2Joint) Angle2() float64
- func (j Hinge2Joint) Angle2Rate() float64
- func (j Hinge2Joint) Axis1() Vector3
- func (j Hinge2Joint) Axis2() Vector3
- func (j Hinge2Joint) Param(parameter int) float64
- func (j Hinge2Joint) SetAnchor(pt Vector3)
- func (j Hinge2Joint) SetAxis1(axis Vector3)
- func (j Hinge2Joint) SetAxis2(axis Vector3)
- func (j Hinge2Joint) SetParam(parameter int, value float64)
- type HingeJoint
- func (j HingeJoint) AddTorque(torque float64)
- func (j HingeJoint) Anchor() Vector3
- func (j HingeJoint) Anchor2() Vector3
- func (j HingeJoint) Angle() float64
- func (j HingeJoint) AngleRate() float64
- func (j HingeJoint) Axis() Vector3
- func (j HingeJoint) Param(parameter int) float64
- func (j HingeJoint) SetAnchor(pt Vector3)
- func (j HingeJoint) SetAnchorDelta(pt, delta Vector3)
- func (j HingeJoint) SetAxis(axis Vector3)
- func (j HingeJoint) SetAxisOffset(axis Vector3, angle float64)
- func (j HingeJoint) SetParam(parameter int, value float64)
- type Joint
- type JointBase
- func (j JointBase) Attach(body1, body2 Body)
- func (j JointBase) Body(index int) Body
- func (j JointBase) Data() interface{}
- func (j JointBase) Destroy()
- func (j JointBase) Enabled() bool
- func (j JointBase) Feedback() *JointFeedback
- func (j JointBase) NumBodies() int
- func (j JointBase) SetData(data interface{})
- func (j JointBase) SetEnabled(isEnabled bool)
- func (j JointBase) SetFeedback(f *JointFeedback)
- func (j JointBase) Type() int
- type JointFeedback
- type JointGroup
- type LMotorJoint
- type Mass
- func (m *Mass) Add(other *Mass)
- func (m *Mass) Adjust(mass float64)
- func (m *Mass) Check() bool
- func (m *Mass) Rotate(rot Matrix3)
- func (m *Mass) SetBox(density float64, lens Vector3)
- func (m *Mass) SetBoxTotal(totalMass float64, lens Vector3)
- func (m *Mass) SetCapsule(density float64, direction int, radius, length float64)
- func (m *Mass) SetCapsuleTotal(totalMass float64, direction int, radius, length float64)
- func (m *Mass) SetCylinder(density float64, direction int, radius, length float64)
- func (m *Mass) SetCylinderTotal(totalMass float64, direction int, radius, length float64)
- func (m *Mass) SetParams(mass float64, com Vector3, inert Matrix3)
- func (m *Mass) SetSphere(density, radius float64)
- func (m *Mass) SetSphereTotal(totalMass, radius float64)
- func (m *Mass) SetTriMesh(density float64, mesh TriMesh)
- func (m *Mass) SetTriMeshTotal(totalMass float64, mesh TriMesh)
- func (m *Mass) SetZero()
- func (m *Mass) Translate(vec Vector3)
- type Matrix
- type Matrix3
- type Matrix4
- type MovedCallback
- type NearCallback
- type NullJoint
- type PRJoint
- func (j PRJoint) AddTorque(torque float64)
- func (j PRJoint) Anchor() Vector3
- func (j PRJoint) Angle() float64
- func (j PRJoint) AngleRate() float64
- func (j PRJoint) Axis1() Vector3
- func (j PRJoint) Axis2() Vector3
- func (j PRJoint) Param(parameter int) float64
- func (j PRJoint) Position() float64
- func (j PRJoint) PositionRate() float64
- func (j PRJoint) SetAnchor(pt Vector3)
- func (j PRJoint) SetAxis1(axis Vector3)
- func (j PRJoint) SetAxis2(axis Vector3)
- func (j PRJoint) SetParam(parameter int, value float64)
- type PUJoint
- func (j PUJoint) Anchor() Vector3
- func (j PUJoint) Angle1() float64
- func (j PUJoint) Angle1Rate() float64
- func (j PUJoint) Angle2() float64
- func (j PUJoint) Angle2Rate() float64
- func (j PUJoint) Angles() (float64, float64)
- func (j PUJoint) Axis1() Vector3
- func (j PUJoint) Axis2() Vector3
- func (j PUJoint) Axis3() Vector3
- func (j PUJoint) Param(parameter int) float64
- func (j PUJoint) Position() float64
- func (j PUJoint) PositionRate() float64
- func (j PUJoint) SetAnchor(pt Vector3)
- func (j PUJoint) SetAnchorOffset(pt, delta Vector3)
- func (j PUJoint) SetAxis1(axis Vector3)
- func (j PUJoint) SetAxis2(axis Vector3)
- func (j PUJoint) SetAxis3(axis Vector3)
- func (j PUJoint) SetParam(parameter int, value float64)
- type PistonJoint
- func (j PistonJoint) AddForce(force float64)
- func (j PistonJoint) Anchor2() Vector3
- func (j PistonJoint) Angle() float64
- func (j PistonJoint) AngleRate() float64
- func (j PistonJoint) Axis() Vector3
- func (j PistonJoint) Param(parameter int) float64
- func (j PistonJoint) Position() float64
- func (j PistonJoint) PositionRate() float64
- func (j PistonJoint) SetAnchor(pt Vector3)
- func (j PistonJoint) SetAnchorOffset(pt, delta Vector3)
- func (j PistonJoint) SetAxis(axis Vector3)
- func (j PistonJoint) SetParam(parameter int, value float64)
- type Plane
- type Plane2DJoint
- type PlaneList
- type PolygonList
- type QuadTreeSpace
- type Quaternion
- type Ray
- func (r Ray) BackfaceCull() bool
- func (r Ray) ClosestHit() bool
- func (r Ray) FirstContact() bool
- func (r Ray) Length() float64
- func (r Ray) PosDir() (Vector3, Vector3)
- func (r Ray) SetBackfaceCull(backfaceCull bool)
- func (r Ray) SetClosestHit(closestHit bool)
- func (r Ray) SetFirstContact(firstContact bool)
- func (r Ray) SetLength(length float64)
- func (r Ray) SetPosDir(pos, dir Vector3)
- type SimpleSpace
- type SliderJoint
- func (j SliderJoint) AddForce(force float64)
- func (j SliderJoint) Axis() Vector3
- func (j SliderJoint) Param(parameter int) float64
- func (j SliderJoint) Position() float64
- func (j SliderJoint) PositionRate() float64
- func (j SliderJoint) SetAxis(axis Vector3)
- func (j SliderJoint) SetAxisDelta(pt, delta Vector3)
- func (j SliderJoint) SetParam(parameter int, value float64)
- type Space
- type SpaceBase
- func (s SpaceBase) Add(g Geom)
- func (s SpaceBase) Class() int
- func (s SpaceBase) Clean()
- func (s SpaceBase) Cleanup() bool
- func (s SpaceBase) Collide(data interface{}, cb NearCallback)
- func (s SpaceBase) Destroy()
- func (s SpaceBase) Geom(index int) Geom
- func (s SpaceBase) ManualCleanup() bool
- func (s SpaceBase) NewBox(lens Vector3) Box
- func (s SpaceBase) NewCapsule(radius, length float64) Capsule
- func (s SpaceBase) NewConvex(planes PlaneList, pts VertexList, polyList PolygonList) Convex
- func (s SpaceBase) NewCylinder(radius, length float64) Cylinder
- func (s SpaceBase) NewHashSpace() HashSpace
- func (s SpaceBase) NewHeightfield(data HeightfieldData, placeable bool) Heightfield
- func (s SpaceBase) NewPlane(params Vector4) Plane
- func (s SpaceBase) NewQuadTreeSpace(center, extents Vector3, depth int) QuadTreeSpace
- func (s SpaceBase) NewRay(length float64) Ray
- func (s SpaceBase) NewSimpleSpace() SimpleSpace
- func (s SpaceBase) NewSphere(radius float64) Sphere
- func (s SpaceBase) NewSweepAndPruneSpace(axisOrder int) SweepAndPruneSpace
- func (s SpaceBase) NewTriMesh(data TriMeshData) TriMesh
- func (s SpaceBase) NumGeoms(g Geom) int
- func (s SpaceBase) Query(g Geom) bool
- func (s SpaceBase) Remove(g Geom)
- func (s SpaceBase) SetCleanup(mode bool)
- func (s SpaceBase) SetManualCleanup(mode bool)
- func (s SpaceBase) SetSublevel(sublevel int)
- func (s SpaceBase) Sublevel() int
- type Sphere
- type SurfaceParameters
- type SweepAndPruneSpace
- type TransmissionJoint
- func (j TransmissionJoint) Anchor1() Vector3
- func (j TransmissionJoint) Anchor2() Vector3
- func (j TransmissionJoint) Angle1() float64
- func (j TransmissionJoint) Angle2() float64
- func (j TransmissionJoint) Axis() Vector3
- func (j TransmissionJoint) Axis1() Vector3
- func (j TransmissionJoint) Axis2() Vector3
- func (j TransmissionJoint) Backlash() float64
- func (j TransmissionJoint) ContactPoint1() Vector3
- func (j TransmissionJoint) ContactPoint2() Vector3
- func (j TransmissionJoint) Mode() int
- func (j TransmissionJoint) Param(parameter int) float64
- func (j TransmissionJoint) Radius1() float64
- func (j TransmissionJoint) Radius2() float64
- func (j TransmissionJoint) Ratio() float64
- func (j TransmissionJoint) SetAnchor1(pt Vector3)
- func (j TransmissionJoint) SetAnchor2(pt Vector3)
- func (j TransmissionJoint) SetAxis(axis Vector3)
- func (j TransmissionJoint) SetAxis1(axis Vector3)
- func (j TransmissionJoint) SetAxis2(axis Vector3)
- func (j TransmissionJoint) SetBacklash(backlash float64)
- func (j TransmissionJoint) SetMode(mode int)
- func (j TransmissionJoint) SetParam(parameter int, value float64)
- func (j TransmissionJoint) SetRadius1(radius float64)
- func (j TransmissionJoint) SetRadius2(radius float64)
- func (j TransmissionJoint) SetRatio(ratio float64)
- type TriCallback
- type TriMesh
- func (t TriMesh) ClearTCCache()
- func (t TriMesh) LastTransform() Matrix4
- func (t TriMesh) MeshData() TriMeshData
- func (t TriMesh) Point(index int, u, v float64) Vector3
- func (t TriMesh) SetLastTransform(xform Matrix4)
- func (t TriMesh) SetMeshData(data TriMeshData)
- func (t TriMesh) SetTCEnabled(class int, isEnabled bool)
- func (t TriMesh) SetTriCallback(cb TriCallback)
- func (t TriMesh) SetTriRayCallback(cb TriRayCallback)
- func (t TriMesh) TCEnabled(class int) bool
- func (t TriMesh) TriCallback() TriCallback
- func (t TriMesh) TriRayCallback() TriRayCallback
- func (t TriMesh) Triangle(index int) (Vector3, Vector3, Vector3)
- func (t TriMesh) TriangleCount() int
- type TriMeshData
- type TriRayCallback
- type TriVertexIndexList
- type UniversalJoint
- func (j UniversalJoint) AddTorques(torque1, torque2 float64)
- func (j UniversalJoint) Anchor() Vector3
- func (j UniversalJoint) Anchor2() Vector3
- func (j UniversalJoint) Angle1() float64
- func (j UniversalJoint) Angle1Rate() float64
- func (j UniversalJoint) Angle2() float64
- func (j UniversalJoint) Angle2Rate() float64
- func (j UniversalJoint) Angles() (float64, float64)
- func (j UniversalJoint) Axis1() Vector3
- func (j UniversalJoint) Axis2() Vector3
- func (j UniversalJoint) Param(parameter int) float64
- func (j UniversalJoint) SetAnchor(pt Vector3)
- func (j UniversalJoint) SetAxis1(axis Vector3)
- func (j UniversalJoint) SetAxis1Offset(axis Vector3, offset1, offset2 float64)
- func (j UniversalJoint) SetAxis2(axis Vector3)
- func (j UniversalJoint) SetAxis2Offset(axis Vector3, offset1, offset2 float64)
- func (j UniversalJoint) SetParam(parameter int, value float64)
- type Vector
- type Vector3
- type Vector4
- type VertexList
- type World
- func (w World) AngularDamping() float64
- func (w World) AngularDampingThreshold() float64
- func (w World) AutoDisable() bool
- func (w World) AutoDisableAngularThreshold() float64
- func (w World) AutoDisableAverageSamplesCount() bool
- func (w World) AutoDisableLinearThreshold() float64
- func (w World) AutoDisableSteps() int
- func (w World) AutoDisableTime() float64
- func (w World) CFM() float64
- func (w World) CleanupWorkingMemory()
- func (w World) ContactMaxCorrectingVelocity() float64
- func (w World) ContactSurfaceLayer() float64
- func (w World) Data() interface{}
- func (w World) Destroy()
- func (w World) ERP() float64
- func (w World) Gravity() Vector3
- func (w World) ImpulseToForce(stepSize float64, impulse Vector3) Vector3
- func (w World) LinearDamping() float64
- func (w World) LinearDampingThreshold() float64
- func (w World) MaxAngularSpeed() float64
- func (w World) NewAMotorJoint(group JointGroup) AMotorJoint
- func (w World) NewBallJoint(group JointGroup) BallJoint
- func (w World) NewBody() Body
- func (w World) NewContactJoint(group JointGroup, contact *Contact) ContactJoint
- func (w World) NewDBallJoint(group JointGroup) DBallJoint
- func (w World) NewDHingeJoint(group JointGroup) DHingeJoint
- func (w World) NewFixedJoint(group JointGroup) FixedJoint
- func (w World) NewHinge2Joint(group JointGroup) Hinge2Joint
- func (w World) NewHingeJoint(group JointGroup) HingeJoint
- func (w World) NewLMotorJoint(group JointGroup) LMotorJoint
- func (w World) NewNullJoint(group JointGroup) NullJoint
- func (w World) NewPRJoint(group JointGroup) PRJoint
- func (w World) NewPUJoint(group JointGroup) PUJoint
- func (w World) NewPistonJoint(group JointGroup) PistonJoint
- func (w World) NewPlane2DJoint(group JointGroup) Plane2DJoint
- func (w World) NewSliderJoint(group JointGroup) SliderJoint
- func (w World) NewTransmissionJoint(group JointGroup) TransmissionJoint
- func (w World) NewUniversalJoint(group JointGroup) UniversalJoint
- func (w World) QuickStep(stepSize float64) bool
- func (w World) QuickStepNumIterations() int
- func (w World) QuickStepW() float64
- func (w World) SetAngularDamping(scale float64)
- func (w World) SetAngularDampingThreshold(threshold float64)
- func (w World) SetAutoAutoDisableAverageSamplesCount(averageSamplesCount bool)
- func (w World) SetAutoDisable(doAutoDisable bool)
- func (w World) SetAutoDisableAngularThreshold(angularThreshold float64)
- func (w World) SetAutoDisableLinearThreshold(linearThreshold float64)
- func (w World) SetAutoDisableSteps(steps int)
- func (w World) SetAutoDisableTime(time float64)
- func (w World) SetCFM(cfm float64)
- func (w World) SetContactMaxCorrectingVelocity(overRelaxation float64)
- func (w World) SetContactSurfaceLayer(depth float64)
- func (w World) SetData(data interface{})
- func (w World) SetERP(erp float64)
- func (w World) SetGravity(grav Vector3)
- func (w World) SetLinearDamping(scale float64)
- func (w World) SetLinearDampingThreshold(threshold float64)
- func (w World) SetMaxAngularSpeed(maxSpeed float64)
- func (w World) SetQuickStepNumIterations(num int)
- func (w World) SetQuickStepW(overRelaxation float64)
- func (w World) SetStepIslandsProcessingMaxThreadCount(count int)
- func (w World) Step(stepSize float64) bool
- func (w World) StepIslandsProcessingMaxThreadCount() int
- func (w World) UseSharedWorkingMemory(from World) bool
Constants ¶
const ( Mu2CtParam = C.dContactMu2 AxisDepCtParam = C.dContactAxisDep FDir1CtParam = C.dContactFDir1 BounceCtParam = C.dContactBounce SoftERPCtParam = C.dContactSoftERP SoftCFMCtParam = C.dContactSoftCFM Motion1CtParam = C.dContactMotion1 Motion2CtParam = C.dContactMotion2 MotionNCtParam = C.dContactMotionN Slip1CtParam = C.dContactSlip1 Slip2CtParam = C.dContactSlip2 RollingCtParam = C.dContactRolling Approx0CtParam = C.dContactApprox0 Approx11CtParam = C.dContactApprox1_1 Approx12CtParam = C.dContactApprox1_2 Approx1NCtParam = C.dContactApprox1_N Approx1CtParam = C.dContactApprox1 )
Contact parameter types
const ( SphereClass = C.dSphereClass BoxClass = C.dBoxClass CapsuleClass = C.dCapsuleClass CylinderClass = C.dCylinderClass PlaneClass = C.dPlaneClass RayClass = C.dRayClass ConvexClass = C.dConvexClass TriMeshClass = C.dTriMeshClass HeightfieldClass = C.dHeightfieldClass SimpleSpaceClass = C.dSimpleSpaceClass HashSpaceClass = C.dHashSpaceClass SweepAndPruneSpaceClass = C.dSweepAndPruneSpaceClass QuadTreeSpaceClass = C.dQuadTreeSpaceClass NumClasses = C.dGeomNumClasses MaxUserClasses = C.dMaxUserClasses FirstUserClass = C.dFirstUserClass LastUserClass = C.dLastUserClass FirstSpaceClass = C.dFirstSpaceClass LastSpaceClass = C.dLastSpaceClass )
Geometry classes
const ( BallJointType = C.dJointTypeBall HingeJointType = C.dJointTypeHinge SliderJointType = C.dJointTypeSlider ContactJointType = C.dJointTypeContact UniversalJointType = C.dJointTypeUniversal Hinge2JointType = C.dJointTypeHinge2 FixedJointType = C.dJointTypeFixed NullJointType = C.dJointTypeNull AMotorJointType = C.dJointTypeAMotor LMotorJointType = C.dJointTypeLMotor Plane2DJointType = C.dJointTypePlane2D PRJointType = C.dJointTypePR PUJointType = C.dJointTypePU PistonJointType = C.dJointTypePiston DBallJointType = C.dJointTypeDBall DHingeJointType = C.dJointTypeDHinge TransmissionJointType = C.dJointTypeTransmission )
Joint types
const ( LoStopJtParam = C.dParamLoStop HiStopJtParam = C.dParamHiStop VelJtParam = C.dParamVel LoVelJtParam = C.dParamLoVel HiVelJtParam = C.dParamHiVel FMaxJtParam = C.dParamFMax FudgeFactorJtParam = C.dParamFudgeFactor BounceJtParam = C.dParamBounce CFMJtParam = C.dParamCFM StopERPJtParam = C.dParamStopERP StopCFMJtParam = C.dParamStopCFM SuspensionERPJtParam = C.dParamSuspensionERP SuspensionCFMJtParam = C.dParamSuspensionCFM ERPJtParam = C.dParamERP NumJtParams = C.dParamsInGroup JtParamGroup1 = C.dParamGroup1 LoStopJtParam1 = C.dParamLoStop1 HiStopJtParam1 = C.dParamHiStop1 VelJtParam1 = C.dParamVel1 LoVelJtParam1 = C.dParamLoVel1 HiVelJtParam1 = C.dParamHiVel1 FMaxJtParam1 = C.dParamFMax1 FudgeFactorJtParam1 = C.dParamFudgeFactor1 BounceJtParam1 = C.dParamBounce1 CFMJtParam1 = C.dParamCFM1 StopERPJtParam1 = C.dParamStopERP1 StopCFMJtParam1 = C.dParamStopCFM1 SuspensionERPJtParam1 = C.dParamSuspensionERP1 SuspensionCFMJtParam1 = C.dParamSuspensionCFM1 ERPJtParam1 = C.dParamERP1 JtParamGroup2 = C.dParamGroup2 LoStopJtParam2 = C.dParamLoStop2 HiStopJtParam2 = C.dParamHiStop2 VelJtParam2 = C.dParamVel2 LoVelJtParam2 = C.dParamLoVel2 HiVelJtParam2 = C.dParamHiVel2 FMaxJtParam2 = C.dParamFMax2 FudgeFactorJtParam2 = C.dParamFudgeFactor2 BounceJtParam2 = C.dParamBounce2 CFMJtParam2 = C.dParamCFM2 StopERPJtParam2 = C.dParamStopERP2 StopCFMJtParam2 = C.dParamStopCFM2 SuspensionERPJtParam2 = C.dParamSuspensionERP2 SuspensionCFMJtParam2 = C.dParamSuspensionCFM2 ERPJtParam2 = C.dParamERP2 JtParamGroup3 = C.dParamGroup3 LoStopJtParam3 = C.dParamLoStop3 HiStopJtParam3 = C.dParamHiStop3 VelJtParam3 = C.dParamVel3 LoVelJtParam3 = C.dParamLoVel3 HiVelJtParam3 = C.dParamHiVel3 FMaxJtParam3 = C.dParamFMax3 FudgeFactorJtParam3 = C.dParamFudgeFactor3 BounceJtParam3 = C.dParamBounce3 CFMJtParam3 = C.dParamCFM3 StopERPJtParam3 = C.dParamStopERP3 StopCFMJtParam3 = C.dParamStopCFM3 SuspensionERPJtParam3 = C.dParamSuspensionERP3 SuspensionCFMJtParam3 = C.dParamSuspensionCFM3 ERPJtParam3 = C.dParamERP3 )
Joint parameters
const ( AMotorUser = C.dAMotorUser AMotorEuler = C.dAMotorEuler )
Angular motor parameters
const ( TransmissionParallelAxes = C.dTransmissionParallelAxes TransmissionIntersectingAxes = C.dTransmissionIntersectingAxes TransmissionChainDrive = C.dTransmissionChainDrive )
Transmission parameters
const ( BasicDataAFlag = C.dAllocateFlagBasicData CollisionDataAFlag = C.dAllocateFlagCollisionData AllAFlag = C.dAllocateMaskAll )
Allocation flags
const ( SAPAxesXYZ = C.dSAP_AXES_XYZ SAPAxesXZY = C.dSAP_AXES_XZY SAPAxesYXZ = C.dSAP_AXES_YXZ SAPAxesYZX = C.dSAP_AXES_YZX SAPAxesZXY = C.dSAP_AXES_ZXY SAPAxesZYX = C.dSAP_AXES_ZYX )
Sweep and prune axis orders
const (
ManualThreadCleanupIFlag = C.dInitFlagManualThreadCleanup
)
Initialization flags
const (
WorldStepThreadCountUnlimited = C.dWORLDSTEP_THREADCOUNT_UNLIMITED
)
World constants
Variables ¶
var ( V3 = NewVector3 V4 = NewVector4 M3 = NewMatrix3 M4 = NewMatrix4 Q = NewQuaternion BB = NewAABB )
Short constructor aliases for convenience
Functions ¶
func CleanupAllDataForThread ¶
func CleanupAllDataForThread()
CleanupAllDataForThread manually releases ODE resources for the current thread.
Types ¶
type AMotorJoint ¶
type AMotorJoint struct {
JointBase
}
AMotorJoint represents an angular motor joint.
func (AMotorJoint) AddTorques ¶
func (j AMotorJoint) AddTorques(torque1, torque2, torque3 float64)
AddTorques adds torques to the joint.
func (AMotorJoint) Angle ¶
func (j AMotorJoint) Angle(num int) float64
Angle returns the angle of the given axis.
func (AMotorJoint) AngleRate ¶
func (j AMotorJoint) AngleRate(num int) float64
AngleRate returns the angle's rate of change for the given axis.
func (AMotorJoint) AxisRel ¶
func (j AMotorJoint) AxisRel(num int) int
AxisRel returns the relative mode for the given axis.
func (AMotorJoint) Param ¶
func (j AMotorJoint) Param(parameter int) float64
Param returns a joint parameter.
func (AMotorJoint) SetAngle ¶
func (j AMotorJoint) SetAngle(num int, angle float64)
SetAngle sets the angle of the given axis.
func (AMotorJoint) SetAxis ¶
func (j AMotorJoint) SetAxis(num, rel int, axis Vector3)
SetAxis sets the given axis relative to body rel (1 or 2) or none (0).
func (AMotorJoint) SetNumAxes ¶
func (j AMotorJoint) SetNumAxes(num int)
SetNumAxes sets the number of axes.
func (AMotorJoint) SetParam ¶
func (j AMotorJoint) SetParam(parameter int, value float64)
SetParam sets a joint parameter.
type BallJoint ¶
type BallJoint struct {
JointBase
}
BallJoint implements a ball-and-socket joint.
func (BallJoint) SetAnchor2 ¶
SetAnchor2 sets the anchor point for the second body.
type Body ¶
type Body uintptr
Body represents a rigid body.
func (Body) AddForceAtPos ¶
AddForceAtPos adds a force in world coordinates at the position in world coordinates.
func (Body) AddForceAtRelPos ¶
AddForceAtRelPos adds a force in world coordinates at the position in body coordinates.
func (Body) AddRelForce ¶
AddRelForce adds a force in body coordinates at the center of mass.
func (Body) AddRelForceAtPos ¶
AddRelForceAtPos adds a force in body coordinates at the position in world coordinates.
func (Body) AddRelForceAtRelPos ¶
AddRelForceAtRelPos adds a force in body coordinates at the position in body coordinates.
func (Body) AddRelTorque ¶
AddRelTorque adds a torque in body coordinates at the center of mass.
func (Body) AngularDamping ¶
AngularDamping returns the angular damping scale.
func (Body) AngularDampingThreshold ¶
AngularDampingThreshold returns the angular damping threshold.
func (Body) AngularVel ¶
AngularVel returns the angular velocity.
func (Body) AutoDisable ¶
AutoDisable returns whether the body will be auto disabled.
func (Body) AutoDisableAngularThreshold ¶
AutoDisableAngularThreshold returns the auto disable angular average threshold.
func (Body) AutoDisableAverageSamplesCount ¶
AutoDisableAverageSamplesCount returns the auto disable sample count.
func (Body) AutoDisableLinearThreshold ¶
AutoDisableLinearThreshold returns the auto disable linear average threshold.
func (Body) AutoDisableSteps ¶
AutoDisableSteps returns the number of auto disable steps.
func (Body) AutoDisableTime ¶
AutoDisableTime returns the auto disable time.
func (Body) Connected ¶
Connected returns whether the body is connected to the given body by a joint.
func (Body) ConnectedExcluding ¶
ConnectedExcluding returns whether the body is connected to the given body by a joint, except for joints of the given class.
func (Body) ConnectingJoint ¶
ConnectingJoint returns the first joint connecting the body to the specified body.
func (Body) ConnectingJointList ¶
ConnectingJointList returns a list of joints connecting the body to the specified body.
func (Body) Data ¶
func (b Body) Data() interface{}
Data returns the user-specified data associated with the body.
func (Body) FiniteRotationAxis ¶
FiniteRotationAxis returns the finite rotation axis.
func (Body) FiniteRotationMode ¶
FiniteRotationMode returns whether finite rotation mode is used.
func (Body) GravityEnabled ¶
GravityEnabled returns whether gravity affects the body.
func (Body) GyroModeEnabled ¶
GyroModeEnabled returns whether gyroscopic mode is enabled.
func (Body) LinearDamping ¶
LinearDamping returns the linear damping scale.
func (Body) LinearDampingThreshold ¶
LinearDampingThreshold returns the linear damping threshold.
func (Body) LinearVelocity ¶
LinearVelocity returns the linear velocity.
func (Body) MaxAngularSpeed ¶
MaxAngularSpeed returns the maximum angular speed.
func (Body) PointVel ¶
PointVel returns the velocity in world coordinates of a point in world coordinates.
func (Body) PosRelPoint ¶
PosRelPoint returns the position in body coordinates of a point in world coordinates.
func (Body) Quaternion ¶
func (b Body) Quaternion() Quaternion
Quaternion returns the orientation represented by a quaternion.
func (Body) RelPointPos ¶
RelPointPos returns the position in world coordinates of a point in body coordinates.
func (Body) RelPointVel ¶
RelPointVel returns the velocity in world coordinates of a point in body coordinates.
func (Body) SetAngularDamping ¶
SetAngularDamping sets the angular damping scale.
func (Body) SetAngularDampingThreshold ¶
SetAngularDampingThreshold sets the angular damping threshold.
func (Body) SetAngularVelocity ¶
SetAngularVelocity sets the angular velocity.
func (Body) SetAutoAutoDisableAverageSamplesCount ¶
SetAutoAutoDisableAverageSamplesCount sets auto disable average sample count.
func (Body) SetAutoDisable ¶
SetAutoDisable sets wether the body will be auto disabled.
func (Body) SetAutoDisableAngularThreshold ¶
SetAutoDisableAngularThreshold sets the auto disable angular average threshold.
func (Body) SetAutoDisableDefaults ¶
func (b Body) SetAutoDisableDefaults()
SetAutoDisableDefaults sets auto disable settings to default defaults.
func (Body) SetAutoDisableLinearThreshold ¶
SetAutoDisableLinearThreshold sets the auto disable linear average threshold.
func (Body) SetAutoDisableSteps ¶
SetAutoDisableSteps sets the number of auto disable steps.
func (Body) SetAutoDisableTime ¶
SetAutoDisableTime sets the auto disable time.
func (Body) SetDampingDefaults ¶
func (b Body) SetDampingDefaults()
SetDampingDefaults sets damping settings to default values.
func (Body) SetData ¶
func (b Body) SetData(data interface{})
SetData associates user-specified data with the body.
func (Body) SetEnabled ¶
SetEnabled sets whether the body is enabled.
func (Body) SetFiniteRotationAxis ¶
SetFiniteRotationAxis sets the finite rotation axis.
func (Body) SetFiniteRotationMode ¶
SetFiniteRotationMode sets whether finite rotation mode is used.
func (Body) SetGravityEnabled ¶
SetGravityEnabled sets whether gravity affects the body.
func (Body) SetGyroModeEnabled ¶
SetGyroModeEnabled sets whether gyroscopic mode is enabled.
func (Body) SetKinematic ¶
SetKinematic sets whether the body is in kinematic mode.
func (Body) SetLinearDamping ¶
SetLinearDamping sets the linear damping scale.
func (Body) SetLinearDampingThreshold ¶
SetLinearDampingThreshold sets the linear damping threshold.
func (Body) SetLinearVelocity ¶
SetLinearVelocity sets the linear velocity.
func (Body) SetMaxAngularSpeed ¶
SetMaxAngularSpeed sets the maximum angular speed.
func (Body) SetMovedCallback ¶
func (b Body) SetMovedCallback(cb MovedCallback)
SetMovedCallback sets callback to call when the body has moved.
func (Body) SetQuaternion ¶
func (b Body) SetQuaternion(quat Quaternion)
SetQuaternion sets the orientation represented by a quaternion.
func (Body) SetRotation ¶
SetRotation sets the orientation represented by a rotation matrix.
func (Body) VectorFromWorld ¶
VectorFromWorld converts a vector in world coordinates to body coordinates.
func (Body) VectorToWorld ¶
VectorToWorld converts a vector in body coordinates to world coordinates.
type Box ¶
type Box struct {
GeomBase
}
Box is a geometry representing a rectangular box.
func (Box) PointDepth ¶
PointDepth returns the depth of the given point.
func (Box) SetLengths ¶
SetLengths sets the lengths of the sides.
type Capsule ¶
type Capsule struct {
GeomBase
}
Capsule is a geometry that represents a capsule (a cylinder with a half sphere on each end).
func (Capsule) PointDepth ¶
PointDepth returns the depth of the given point.
type Contact ¶
type Contact struct { Surface SurfaceParameters Geom ContactGeom FDir1 Vector3 }
Contact represents a contact.
type ContactGeom ¶
type ContactGeom struct { Pos Vector3 Normal Vector3 Depth float64 G1 Geom G2 Geom Side1 int Side2 int }
ContactGeom represents a contact point.
type Convex ¶
type Convex struct {
GeomBase
}
Convex is a geometry representing a convex object.
func (Convex) Set ¶
func (c Convex) Set(planes PlaneList, pts VertexList, polyList PolygonList)
Set sets convex object data
type Cylinder ¶
type Cylinder struct {
GeomBase
}
Cylinder is a geometry that represents a cylider.
type DBallJoint ¶
type DBallJoint struct {
JointBase
}
DBallJoint represents a double ball joint.
func (DBallJoint) Anchor1 ¶
func (j DBallJoint) Anchor1() Vector3
Anchor1 returns the anchor point for the first body.
func (DBallJoint) Anchor2 ¶
func (j DBallJoint) Anchor2() Vector3
Anchor2 returns the anchor point for the second body.
func (DBallJoint) Distance ¶
func (j DBallJoint) Distance() float64
Distance returns the joint distance.
func (DBallJoint) Param ¶
func (j DBallJoint) Param(parameter int) float64
Param returns a joint parameter.
func (DBallJoint) SetAnchor1 ¶
func (j DBallJoint) SetAnchor1(pt Vector3)
SetAnchor1 sets the anchor point for the first body.
func (DBallJoint) SetAnchor2 ¶
func (j DBallJoint) SetAnchor2(pt Vector3)
SetAnchor2 sets the anchor point for the second body.
func (DBallJoint) SetParam ¶
func (j DBallJoint) SetParam(parameter int, value float64)
SetParam sets a joint parameter.
type DHingeJoint ¶
type DHingeJoint struct {
JointBase
}
DHingeJoint represents a double hinge joint.
func (DHingeJoint) Anchor1 ¶
func (j DHingeJoint) Anchor1() Vector3
Anchor1 returns the anchor point for the first body.
func (DHingeJoint) Anchor2 ¶
func (j DHingeJoint) Anchor2() Vector3
Anchor2 returns the anchor point for the second body.
func (DHingeJoint) Distance ¶
func (j DHingeJoint) Distance() float64
Distance returns the joint distance.
func (DHingeJoint) Param ¶
func (j DHingeJoint) Param(parameter int) float64
Param returns a joint parameter.
func (DHingeJoint) SetAnchor1 ¶
func (j DHingeJoint) SetAnchor1(pt Vector3)
SetAnchor1 sets the anchor point for the first body.
func (DHingeJoint) SetAnchor2 ¶
func (j DHingeJoint) SetAnchor2(pt Vector3)
SetAnchor2 sets the anchor point for the second body.
func (DHingeJoint) SetAxis ¶
func (j DHingeJoint) SetAxis(axis Vector3)
SetAxis sets the joint axis.
func (DHingeJoint) SetParam ¶
func (j DHingeJoint) SetParam(parameter int, value float64)
SetParam sets a joint parameter.
type FixedJoint ¶
type FixedJoint struct {
JointBase
}
FixedJoint represents a fixed joint.
func (FixedJoint) Param ¶
func (j FixedJoint) Param(parameter int) float64
Param returns a joint parameter.
func (FixedJoint) SetParam ¶
func (j FixedJoint) SetParam(parameter int, value float64)
SetParam sets a joint parameter.
type Geom ¶
type Geom interface { Destroy() SetData(data interface{}) Data() interface{} SetBody(body Body) Body() Body SetPosition(pos Vector3) Position() Vector3 SetRotation(rot Matrix3) Rotation() Matrix3 SetQuaternion(quat Quaternion) Quaternion() Quaternion AABB() AABB IsSpace() bool Space() Space Class() int SetCategoryBits(bits int) SetCollideBits(bits int) CategoryBits() int CollideBits() int SetEnabled(isEnabled bool) Enabled() bool RelPointPos(pt Vector3) Vector3 PosRelPoint(pos Vector3) Vector3 VectorToWorld(vec Vector3) Vector3 VectorFromWorld(wld Vector3) Vector3 OffsetPosition() Vector3 SetOffsetPosition(pos Vector3) OffsetRotation() Matrix3 SetOffsetRotation(rot Matrix3) OffsetQuaternion() Quaternion SetOffsetQuaternion(quat Quaternion) SetOffsetWorldPosition(pos Vector3) SetOffsetWorldRotation(rot Matrix3) SetOffsetWorldQuaternion(quat Quaternion) ClearOffset() IsOffset() bool Collide(other Geom, maxContacts uint16, flags int) []ContactGeom Collide2(other Geom, data interface{}, cb NearCallback) Next() Geom // contains filtered or unexported methods }
Geom represents rigid body geometry.
type GeomBase ¶
type GeomBase uintptr
GeomBase implements Geom, and is embedded by specific Geom types.
func (GeomBase) CategoryBits ¶
CategoryBits returns the category bitfield.
func (GeomBase) Collide ¶
func (g GeomBase) Collide(other Geom, maxContacts uint16, flags int) []ContactGeom
Collide tests for collision with the given geometry and returns a list of contact points.
func (GeomBase) Collide2 ¶
func (g GeomBase) Collide2(other Geom, data interface{}, cb NearCallback)
Collide2 tests for collision with the given geometry, applying cb for each contact.
func (GeomBase) CollideBits ¶
CollideBits returns the collide bitfield.
func (GeomBase) Data ¶
func (g GeomBase) Data() interface{}
Data returns the user-specified data associated with the geometry.
func (GeomBase) OffsetPosition ¶
OffsetPosition returns the position offset from the body.
func (GeomBase) OffsetQuaternion ¶
func (g GeomBase) OffsetQuaternion() Quaternion
OffsetQuaternion returns the orientation offset from the body represented by a quaternion.
func (GeomBase) OffsetRotation ¶
OffsetRotation returns the orientation offset from the body represented by a rotation matrix.
func (GeomBase) PosRelPoint ¶
PosRelPoint returns the position in geometry coordinates of a point in world coordinates.
func (GeomBase) Quaternion ¶
func (g GeomBase) Quaternion() Quaternion
Quaternion returns the orientation represented by a quaternion.
func (GeomBase) RelPointPos ¶
RelPointPos returns the position in world coordinates of a point in geometry coordinates.
func (GeomBase) SetCategoryBits ¶
SetCategoryBits sets the category bitfield.
func (GeomBase) SetCollideBits ¶
SetCollideBits sets the collide bitfield.
func (GeomBase) SetData ¶
func (g GeomBase) SetData(data interface{})
SetData associates user-specified data with the geometry.
func (GeomBase) SetEnabled ¶
SetEnabled sets whether the geometry is enabled.
func (GeomBase) SetOffsetPosition ¶
SetOffsetPosition sets the position offset from the body.
func (GeomBase) SetOffsetQuaternion ¶
func (g GeomBase) SetOffsetQuaternion(quat Quaternion)
SetOffsetQuaternion sets the offset from the body orientation represented by a quaternion.
func (GeomBase) SetOffsetRotation ¶
SetOffsetRotation sets the orientation offset from the body represented by a rotation matrix.
func (GeomBase) SetOffsetWorldPosition ¶
SetOffsetWorldPosition sets the offset to the body position such that the geom's world position is pos.
func (GeomBase) SetOffsetWorldQuaternion ¶
func (g GeomBase) SetOffsetWorldQuaternion(quat Quaternion)
SetOffsetWorldQuaternion sets the offset to the body orientation such that the geom's world orientation is represented by the quaternion quat.
func (GeomBase) SetOffsetWorldRotation ¶
SetOffsetWorldRotation sets the offset to the body orientation such that the geom's world orientation is represented by the matrix rot.
func (GeomBase) SetPosition ¶
SetPosition sets the position.
func (GeomBase) SetQuaternion ¶
func (g GeomBase) SetQuaternion(quat Quaternion)
SetQuaternion sets the orientation represented by a quaternion.
func (GeomBase) SetRotation ¶
SetRotation sets the orientation represented by a rotation matrix.
func (GeomBase) VectorFromWorld ¶
VectorFromWorld converts a vector in world coordinates to geometry coordinates.
func (GeomBase) VectorToWorld ¶
VectorToWorld converts a vector in geometry coordinates to world coordinates.
type HashSpace ¶
type HashSpace struct {
SpaceBase
}
HashSpace represents a hash space.
type Heightfield ¶
type Heightfield struct {
GeomBase
}
Heightfield is a geometry representing a heightfield.
func (Heightfield) Build ¶
func (h Heightfield) Build(data HeightfieldData, heightSamples Matrix, width, depth, scale, offset, thickness float64, doWrap bool)
Build builds a heightfield data set.
func (Heightfield) HeightfieldData ¶
func (h Heightfield) HeightfieldData() HeightfieldData
HeightfieldData returns the data set associated with the heightfield.
func (Heightfield) SetBounds ¶
func (h Heightfield) SetBounds(data HeightfieldData, minHeight, maxHeight float64)
SetBounds sets the minimum and maximum height.
func (Heightfield) SetHeightfieldData ¶
func (h Heightfield) SetHeightfieldData(data HeightfieldData)
SetHeightfieldData associates a data set to the heightfield.
type HeightfieldData ¶
type HeightfieldData uintptr
HeightfieldData represents heightfield data.
func NewHeightfieldData ¶
func NewHeightfieldData() HeightfieldData
NewHeightfieldData returns a new HeightfieldData instance.
func (*HeightfieldData) Destroy ¶
func (h *HeightfieldData) Destroy()
Destroy destroys the heightfield data.
type Hinge2Joint ¶
type Hinge2Joint struct {
JointBase
}
Hinge2Joint represents two hinge joints in series.
func (Hinge2Joint) AddTorques ¶
func (j Hinge2Joint) AddTorques(torque1, torque2 float64)
AddTorques adds torques to the joint.
func (Hinge2Joint) Anchor ¶
func (j Hinge2Joint) Anchor() Vector3
Anchor returns the anchor point for the first body.
func (Hinge2Joint) Anchor2 ¶
func (j Hinge2Joint) Anchor2() Vector3
Anchor2 returns the anchor point for the second body.
func (Hinge2Joint) Angle1Rate ¶
func (j Hinge2Joint) Angle1Rate() float64
Angle1Rate returns the first angle's rate of change.
func (Hinge2Joint) Angle2Rate ¶
func (j Hinge2Joint) Angle2Rate() float64
Angle2Rate returns the second angle's rate of change.
func (Hinge2Joint) Param ¶
func (j Hinge2Joint) Param(parameter int) float64
Param returns a joint parameter.
func (Hinge2Joint) SetAnchor ¶
func (j Hinge2Joint) SetAnchor(pt Vector3)
SetAnchor sets the anchor point.
func (Hinge2Joint) SetAxis1 ¶
func (j Hinge2Joint) SetAxis1(axis Vector3)
SetAxis1 sets the first axis.
func (Hinge2Joint) SetAxis2 ¶
func (j Hinge2Joint) SetAxis2(axis Vector3)
SetAxis2 sets the second axis.
func (Hinge2Joint) SetParam ¶
func (j Hinge2Joint) SetParam(parameter int, value float64)
SetParam sets a joint parameter.
type HingeJoint ¶
type HingeJoint struct {
JointBase
}
HingeJoint represents a hinge joint.
func (HingeJoint) AddTorque ¶
func (j HingeJoint) AddTorque(torque float64)
AddTorque adds a torque to the joint.
func (HingeJoint) Anchor ¶
func (j HingeJoint) Anchor() Vector3
Anchor returns the anchor point for the first body.
func (HingeJoint) Anchor2 ¶
func (j HingeJoint) Anchor2() Vector3
Anchor2 returns the anchor point for the second body.
func (HingeJoint) AngleRate ¶
func (j HingeJoint) AngleRate() float64
AngleRate returns the joint angle's rate of change.
func (HingeJoint) Param ¶
func (j HingeJoint) Param(parameter int) float64
Param returns a joint parameter.
func (HingeJoint) SetAnchor ¶
func (j HingeJoint) SetAnchor(pt Vector3)
SetAnchor sets the anchor point.
func (HingeJoint) SetAnchorDelta ¶
func (j HingeJoint) SetAnchorDelta(pt, delta Vector3)
SetAnchorDelta sets the hinge anchor delta.
func (HingeJoint) SetAxisOffset ¶
func (j HingeJoint) SetAxisOffset(axis Vector3, angle float64)
SetAxisOffset set the hinge axis as if the 2 bodies were already at angle appart.
func (HingeJoint) SetParam ¶
func (j HingeJoint) SetParam(parameter int, value float64)
SetParam sets a joint parameter.
type Joint ¶
type Joint interface { Destroy() SetData(data interface{}) Data() interface{} NumBodies() int Attach(body1, body2 Body) SetEnabled(isEnabled bool) Enabled() bool Type() int Body(index int) Body SetFeedback(f *JointFeedback) Feedback() *JointFeedback // contains filtered or unexported methods }
Joint represents a joint.
type JointBase ¶
type JointBase uintptr
JointBase implements Joint, and is embedded by specific Joint types.
func (JointBase) Data ¶
func (j JointBase) Data() interface{}
Data returns the user-specified data associated with the joint.
func (JointBase) Feedback ¶
func (j JointBase) Feedback() *JointFeedback
Feedback returns the feedback forces and torques.
func (JointBase) SetData ¶
func (j JointBase) SetData(data interface{})
SetData associates user-specified data with the joint.
func (JointBase) SetEnabled ¶
SetEnabled sets whether the joint is enabled.
func (JointBase) SetFeedback ¶
func (j JointBase) SetFeedback(f *JointFeedback)
SetFeedback sets the feedback forces and torques.
type JointFeedback ¶
type JointFeedback struct { Force1 Vector3 // force applied to body 1 Torque1 Vector3 // torque applied to body 1 Force2 Vector3 // force applied to body 2 Torque2 Vector3 // torque applied to body 2 }
JointFeedback represents feedback forces and torques associated with a joint.
type JointGroup ¶
type JointGroup uintptr
JointGroup represents a group of joints.
func NewJointGroup ¶
func NewJointGroup(maxJoints int) JointGroup
NewJointGroup returns a new JointGroup instance.
type LMotorJoint ¶
type LMotorJoint struct {
JointBase
}
LMotorJoint represents a linear motor joint.
func (LMotorJoint) Param ¶
func (j LMotorJoint) Param(parameter int) float64
Param returns a joint parameter.
func (LMotorJoint) SetAxis ¶
func (j LMotorJoint) SetAxis(num, rel int, axis Vector3)
SetAxis sets the given axis relative to a body (1 or 2) or none (0).
func (LMotorJoint) SetNumAxes ¶
func (j LMotorJoint) SetNumAxes(num int)
SetNumAxes sets the number of axes.
func (LMotorJoint) SetParam ¶
func (j LMotorJoint) SetParam(parameter int, value float64)
SetParam sets a joint parameter.
type Mass ¶
Mass represents object mass properties.
func (*Mass) SetBoxTotal ¶
SetBoxTotal sets the mass for a box of given properties.
func (*Mass) SetCapsule ¶
SetCapsule sets the mass for a capsule of given properties.
func (*Mass) SetCapsuleTotal ¶
SetCapsuleTotal sets the mass for a capsule of given properties.
func (*Mass) SetCylinder ¶
SetCylinder sets the mass for a cylinder of given properties.
func (*Mass) SetCylinderTotal ¶
SetCylinderTotal sets the mass for a cylinder of given properties.
func (*Mass) SetSphereTotal ¶
SetSphereTotal sets the mass for a sphere of given properties.
func (*Mass) SetTriMesh ¶
SetTrimesh sets the mass for the given triangle mesh.
func (*Mass) SetTriMeshTotal ¶
SetTrimeshTotal sets the mass for the given triangle mesh.
type Matrix3 ¶
type Matrix3 Matrix
Matrix3 represents a 3x3 matrix.
func NewMatrix3 ¶
NewMatrix3 returns a new Matrix3 instance.
type Matrix4 ¶
type Matrix4 Matrix
Matrix4 represents a 4x4 matrix.
func NewMatrix4 ¶
NewMatrix4 returns a new Matrix4 instance.
type MovedCallback ¶
type MovedCallback func(b Body)
MovedCallback is called when the body has moved.
type NearCallback ¶
type NearCallback func(data interface{}, obj1, obj2 Geom)
NearCallback is a callback type for handling potential object collisions.
type PRJoint ¶
type PRJoint struct {
JointBase
}
PRJoint represents a prismatic rotoide joint.
func (PRJoint) PositionRate ¶
PositionRate returns the slider position's rate of change.
type PUJoint ¶
type PUJoint struct {
JointBase
}
PUJoint represents a prismatic universal joint.
func (PUJoint) Angle1Rate ¶
Angle1Rate returns the first angle's rate of change.
func (PUJoint) Angle2Rate ¶
Angle2Rate returns the second angle's rate of change.
func (PUJoint) PositionRate ¶
PositionRate returns the joint position's rate of change.
func (PUJoint) SetAnchorOffset ¶
SetAnchorOffset sets the anchor as if the 2 bodies were already delta appart.
type PistonJoint ¶
type PistonJoint struct {
JointBase
}
PistonJoint represents a piston joint.
func (PistonJoint) AddForce ¶
func (j PistonJoint) AddForce(force float64)
AddForce adds a force to the joint.
func (PistonJoint) Anchor2 ¶
func (j PistonJoint) Anchor2() Vector3
Anchor2 returns the anchor point for the second body.
func (PistonJoint) AngleRate ¶
func (j PistonJoint) AngleRate() float64
AngleRate returns the joint angle's rate of change.
func (PistonJoint) Param ¶
func (j PistonJoint) Param(parameter int) float64
Param returns a joint parameter.
func (PistonJoint) Position ¶
func (j PistonJoint) Position() float64
Position returns the piston position.
func (PistonJoint) PositionRate ¶
func (j PistonJoint) PositionRate() float64
PositionRate returns the piston position's rate of change.
func (PistonJoint) SetAnchor ¶
func (j PistonJoint) SetAnchor(pt Vector3)
SetAnchor sets the anchor point.
func (PistonJoint) SetAnchorOffset ¶
func (j PistonJoint) SetAnchorOffset(pt, delta Vector3)
SetAnchorOffset sets the anchor as if the 2 bodies were already delta appart.
func (PistonJoint) SetAxis ¶
func (j PistonJoint) SetAxis(axis Vector3)
SetAxis sets the piston axis.
func (PistonJoint) SetParam ¶
func (j PistonJoint) SetParam(parameter int, value float64)
SetParam sets a joint parameter.
type Plane ¶
type Plane struct {
GeomBase
}
Plane is a geometry that represents a plane.
func (Plane) PointDepth ¶
PointDepth returns the depth of the given point.
type Plane2DJoint ¶
type Plane2DJoint struct {
JointBase
}
Plane2DJoint represents a plane joint.
func (Plane2DJoint) SetAngleParam ¶
func (j Plane2DJoint) SetAngleParam(parameter int, value float64)
SetAngleParam sets a joint parameter.
func (Plane2DJoint) SetXParam ¶
func (j Plane2DJoint) SetXParam(parameter int, value float64)
SetXParam sets a joint parameter.
func (Plane2DJoint) SetYParam ¶
func (j Plane2DJoint) SetYParam(parameter int, value float64)
SetYParam sets a joint parameter.
type PlaneList ¶
type PlaneList Matrix
PlaneList represents a list of plane definitions.
func NewPlaneList ¶
NewPlaneList returns a new PlaneList instance.
type QuadTreeSpace ¶
type QuadTreeSpace struct {
SpaceBase
}
QuadTreeSpace represents a quad tree space.
type Quaternion ¶
type Quaternion Vector
Quaternion represents a quaternion.
func NewQuaternion ¶
func NewQuaternion(vals ...float64) Quaternion
NewQuaternion returns a new Quaternion instance.
type Ray ¶
type Ray struct {
GeomBase
}
Ray is a geometry representing a ray.
func (Ray) BackfaceCull ¶
BackfaceCull returns whether backface culling is enabled.
func (Ray) ClosestHit ¶
ClosestHit returns whether only the closest hit will be reported.
func (Ray) FirstContact ¶
FirstContact returns whether collision detection will stop after finding the first contact.
func (Ray) SetBackfaceCull ¶
SetBackfaceCull sets whether backface culling is enabled.
func (Ray) SetClosestHit ¶
SetClosestHit sets whether to only report the closest hit.
func (Ray) SetFirstContact ¶
SetFirstContact sets whether to stop collision detection after finding the first contact point.
type SliderJoint ¶
type SliderJoint struct {
JointBase
}
SliderJoint represents a slider joints.
func (SliderJoint) AddForce ¶
func (j SliderJoint) AddForce(force float64)
AddForce adds a force to the joint.
func (SliderJoint) Param ¶
func (j SliderJoint) Param(parameter int) float64
Param returns a joint parameter.
func (SliderJoint) Position ¶
func (j SliderJoint) Position() float64
Position returns the slider position.
func (SliderJoint) PositionRate ¶
func (j SliderJoint) PositionRate() float64
PositionRate returns the slider position's rate of change.
func (SliderJoint) SetAxis ¶
func (j SliderJoint) SetAxis(axis Vector3)
SetAxis sets the slider axis.
func (SliderJoint) SetAxisDelta ¶
func (j SliderJoint) SetAxisDelta(pt, delta Vector3)
SetAxisDelta sets the slider axis delta.
func (SliderJoint) SetParam ¶
func (j SliderJoint) SetParam(parameter int, value float64)
SetParam sets a joint parameter.
type Space ¶
type Space interface { Destroy() SetCleanup(mode bool) Cleanup() bool SetManualCleanup(mode bool) SetSublevel(sublevel int) Sublevel() int ManualCleanup() bool Clean() Class() int Add(g Geom) Remove(g Geom) Query(g Geom) bool NumGeoms(g Geom) int Geom(index int) Geom Collide(data interface{}, cb NearCallback) NewSphere(radius float64) Sphere NewBox(lens Vector3) Box NewPlane(params Vector4) Plane NewCapsule(radius, length float64) Capsule NewCylinder(radius, length float64) Cylinder NewRay(length float64) Ray NewHeightfield(data HeightfieldData, placeable bool) Heightfield NewSimpleSpace() SimpleSpace NewHashSpace() HashSpace NewQuadTreeSpace(center, extents Vector3, depth int) QuadTreeSpace NewSweepAndPruneSpace(axisOrder int) SweepAndPruneSpace // contains filtered or unexported methods }
Space represents a space containing bodies.
type SpaceBase ¶
type SpaceBase uintptr
SpaceBase implements Space, and is embedded by specific Space types.
func (SpaceBase) Collide ¶
func (s SpaceBase) Collide(data interface{}, cb NearCallback)
Collide tests for collision between contained objects.
func (SpaceBase) ManualCleanup ¶
ManualCleanup returns whether this space is marked for manual cleanup.
func (SpaceBase) NewCapsule ¶
NewCapsule returns a new Capsule instance.
func (SpaceBase) NewConvex ¶
func (s SpaceBase) NewConvex(planes PlaneList, pts VertexList, polyList PolygonList) Convex
NewConvex returns a new Convex instance.
func (SpaceBase) NewCylinder ¶
NewCylinder returns a new Cylinder instance.
func (SpaceBase) NewHashSpace ¶
NewHashSpace returns a new HashSpace instance.
func (SpaceBase) NewHeightfield ¶
func (s SpaceBase) NewHeightfield(data HeightfieldData, placeable bool) Heightfield
NewHeightfield returns a new Heightfield instance.
func (SpaceBase) NewQuadTreeSpace ¶
func (s SpaceBase) NewQuadTreeSpace(center, extents Vector3, depth int) QuadTreeSpace
NewQuadTreeSpace returns a new QuadTreeSpace instance.
func (SpaceBase) NewSimpleSpace ¶
func (s SpaceBase) NewSimpleSpace() SimpleSpace
NewSimpleSpace returns a new SimpleSpace instance.
func (SpaceBase) NewSweepAndPruneSpace ¶
func (s SpaceBase) NewSweepAndPruneSpace(axisOrder int) SweepAndPruneSpace
NewSweepAndPruneSpace returns a new SweepAndPruneSpace instance.
func (SpaceBase) NewTriMesh ¶
func (s SpaceBase) NewTriMesh(data TriMeshData) TriMesh
NewTriMesh returns a new TriMesh instance.
func (SpaceBase) SetCleanup ¶
SetCleanup sets whether contained objects will be destroyed.
func (SpaceBase) SetManualCleanup ¶
SetManualCleanup sets whether this space is marked for manual cleanup.
func (SpaceBase) SetSublevel ¶
SetSublevel sets the sublevel for this space.
type Sphere ¶
type Sphere struct {
GeomBase
}
Sphere is a geometry representing a sphere.
func (Sphere) SpherePointDepth ¶
SpherePointDepth returns the depth of the given point.
type SurfaceParameters ¶
type SurfaceParameters struct { // must always be defined Mode int Mu float64 // only defined if the corresponding flag is set in mode Mu2 float64 Rho float64 Rho2 float64 RhoN float64 Bounce float64 BounceVel float64 SoftErp float64 SoftCfm float64 Motion1 float64 Motion2 float64 MotionN float64 Slip1 float64 Slip2 float64 }
SurfaceParameters represents the parameters of a contact surface.
type SweepAndPruneSpace ¶
type SweepAndPruneSpace struct {
SpaceBase
}
SweepAndPruneSpace represents a sweep and prune space.
type TransmissionJoint ¶
type TransmissionJoint struct {
JointBase
}
TransmissionJoint represents a transmission joint.
func (TransmissionJoint) Anchor1 ¶
func (j TransmissionJoint) Anchor1() Vector3
Anchor1 returns the anchor point for the first body.
func (TransmissionJoint) Anchor2 ¶
func (j TransmissionJoint) Anchor2() Vector3
Anchor2 returns the anchor point for the second body.
func (TransmissionJoint) Angle1 ¶
func (j TransmissionJoint) Angle1() float64
Angle1 returns the angle of the first wheel.
func (TransmissionJoint) Angle2 ¶
func (j TransmissionJoint) Angle2() float64
Angle2 returns the angle of the second wheel.
func (TransmissionJoint) Axis ¶
func (j TransmissionJoint) Axis() Vector3
Axis returns the common axis.
func (TransmissionJoint) Axis1 ¶
func (j TransmissionJoint) Axis1() Vector3
Axis1 returns the first axis.
func (TransmissionJoint) Axis2 ¶
func (j TransmissionJoint) Axis2() Vector3
Axis2 returns the second axis.
func (TransmissionJoint) Backlash ¶
func (j TransmissionJoint) Backlash() float64
Backlash returns the backlash (gear tooth play distance).
func (TransmissionJoint) ContactPoint1 ¶
func (j TransmissionJoint) ContactPoint1() Vector3
ContactPoint1 returns the contact point on the first wheel.
func (TransmissionJoint) ContactPoint2 ¶
func (j TransmissionJoint) ContactPoint2() Vector3
ContactPoint2 returns the contact point on the second wheel.
func (TransmissionJoint) Mode ¶
func (j TransmissionJoint) Mode() int
Mode returns the transmission mode.
func (TransmissionJoint) Param ¶
func (j TransmissionJoint) Param(parameter int) float64
Param returns a joint parameter.
func (TransmissionJoint) Radius1 ¶
func (j TransmissionJoint) Radius1() float64
Radius1 returns the radius of the first wheel.
func (TransmissionJoint) Radius2 ¶
func (j TransmissionJoint) Radius2() float64
Radius2 returns the radius of the second wheel.
func (TransmissionJoint) Ratio ¶
func (j TransmissionJoint) Ratio() float64
Ratio returns the gear ratio.
func (TransmissionJoint) SetAnchor1 ¶
func (j TransmissionJoint) SetAnchor1(pt Vector3)
SetAnchor1 sets the anchor point for the first body.
func (TransmissionJoint) SetAnchor2 ¶
func (j TransmissionJoint) SetAnchor2(pt Vector3)
SetAnchor2 sets the anchor point for the second body.
func (TransmissionJoint) SetAxis ¶
func (j TransmissionJoint) SetAxis(axis Vector3)
SetAxis sets the common axis.
func (TransmissionJoint) SetAxis1 ¶
func (j TransmissionJoint) SetAxis1(axis Vector3)
SetAxis1 sets the first axis.
func (TransmissionJoint) SetAxis2 ¶
func (j TransmissionJoint) SetAxis2(axis Vector3)
SetAxis2 sets the second axis.
func (TransmissionJoint) SetBacklash ¶
func (j TransmissionJoint) SetBacklash(backlash float64)
SetBacklash set the backlash (gear tooth play distance).
func (TransmissionJoint) SetMode ¶
func (j TransmissionJoint) SetMode(mode int)
SetMode sets the transmission mode.
func (TransmissionJoint) SetParam ¶
func (j TransmissionJoint) SetParam(parameter int, value float64)
SetParam sets a joint parameter.
func (TransmissionJoint) SetRadius1 ¶
func (j TransmissionJoint) SetRadius1(radius float64)
SetRadius1 sets the radius of the first wheel.
func (TransmissionJoint) SetRadius2 ¶
func (j TransmissionJoint) SetRadius2(radius float64)
SetRadius2 sets the radius of the second wheel.
func (TransmissionJoint) SetRatio ¶
func (j TransmissionJoint) SetRatio(ratio float64)
SetRatio sets the gear ratio.
type TriCallback ¶
TriCallback is called to determine whether to collide a triangle with another geometry.
type TriMesh ¶
type TriMesh struct {
GeomBase
}
TriMesh is a geometry representing a triangle mesh.
func (TriMesh) ClearTCCache ¶
func (t TriMesh) ClearTCCache()
ClearTCCache clears the temporal coherence cache.
func (TriMesh) LastTransform ¶
LastTransform returns the last transform.
func (TriMesh) Point ¶
Point returns a point on the specified triangle at the given barycentric coordinates.
func (TriMesh) SetLastTransform ¶
SetLastTransform sets the last transform.
func (TriMesh) SetMeshData ¶
func (t TriMesh) SetMeshData(data TriMeshData)
SetMeshData sets the mesh data.
func (TriMesh) SetTCEnabled ¶
SetTCEnabled sets whether temporal coherence is enabled for the given geometry class.
func (TriMesh) SetTriCallback ¶
func (t TriMesh) SetTriCallback(cb TriCallback)
SetTriCallback sets the triangle collision callback.
func (TriMesh) SetTriRayCallback ¶
func (t TriMesh) SetTriRayCallback(cb TriRayCallback)
SetTriRayCallback sets the triangle/ray collision callback.
func (TriMesh) TCEnabled ¶
TCEnabled returns whether temporal coherence is enabled for the given geometry class.
func (TriMesh) TriCallback ¶
func (t TriMesh) TriCallback() TriCallback
TriCallback returns the triangle collision callback.
func (TriMesh) TriRayCallback ¶
func (t TriMesh) TriRayCallback() TriRayCallback
TriRayCallback returns the triangle/ray collision callback.
func (TriMesh) TriangleCount ¶
TriangleCount returns the number of triangles in the mesh.
type TriMeshData ¶
type TriMeshData uintptr
TriMeshData represents triangle mesh data.
func NewTriMeshData ¶
func NewTriMeshData() TriMeshData
NewTriMeshData returns a new TriMeshData instance.
func (TriMeshData) Build ¶
func (t TriMeshData) Build(verts VertexList, tris TriVertexIndexList)
Build builds a triangle mesh from the given data.
func (TriMeshData) Destroy ¶
func (t TriMeshData) Destroy()
Destroy destroys the triangle mesh data.
func (TriMeshData) Preprocess ¶
func (t TriMeshData) Preprocess()
Preprocess preprocesses the triangle mesh data.
type TriRayCallback ¶
TriRayCallback is called to determine whether to collide a triangle with a ray at a given point.
type TriVertexIndexList ¶
type TriVertexIndexList [][]uint32
TriVertexIndexList represents a list of triangle vertex indices.
func NewTriVertexIndexList ¶
func NewTriVertexIndexList(size int, indices ...uint32) TriVertexIndexList
NewTriVertexIndexList returns a new TriVertexIndexList instance.
type UniversalJoint ¶
type UniversalJoint struct {
JointBase
}
UniversalJoint represents a universal joint.
func (UniversalJoint) AddTorques ¶
func (j UniversalJoint) AddTorques(torque1, torque2 float64)
AddTorques adds torques to the joint.
func (UniversalJoint) Anchor ¶
func (j UniversalJoint) Anchor() Vector3
Anchor returns the anchor point for the first body.
func (UniversalJoint) Anchor2 ¶
func (j UniversalJoint) Anchor2() Vector3
Anchor2 returns the anchor point for the second body.
func (UniversalJoint) Angle1 ¶
func (j UniversalJoint) Angle1() float64
Angle1 returns the first angle.
func (UniversalJoint) Angle1Rate ¶
func (j UniversalJoint) Angle1Rate() float64
Angle1Rate returns the first angle's rate of change.
func (UniversalJoint) Angle2 ¶
func (j UniversalJoint) Angle2() float64
Angle2 returns the second angle.
func (UniversalJoint) Angle2Rate ¶
func (j UniversalJoint) Angle2Rate() float64
Angle2Rate returns the second angle's rate of change.
func (UniversalJoint) Angles ¶
func (j UniversalJoint) Angles() (float64, float64)
Angles returns the two angles.
func (UniversalJoint) Axis2 ¶
func (j UniversalJoint) Axis2() Vector3
Axis2 returns the second axis.
func (UniversalJoint) Param ¶
func (j UniversalJoint) Param(parameter int) float64
Param returns a joint parameter.
func (UniversalJoint) SetAnchor ¶
func (j UniversalJoint) SetAnchor(pt Vector3)
SetAnchor sets the anchor point.
func (UniversalJoint) SetAxis1 ¶
func (j UniversalJoint) SetAxis1(axis Vector3)
SetAxis1 sets the first axis.
func (UniversalJoint) SetAxis1Offset ¶
func (j UniversalJoint) SetAxis1Offset(axis Vector3, offset1, offset2 float64)
SetAxis1Offset sets the first axis as if the 2 bodies were already at offset1 and offset2 appart with respect to the first and second axes.
func (UniversalJoint) SetAxis2 ¶
func (j UniversalJoint) SetAxis2(axis Vector3)
SetAxis2 sets the second axis.
func (UniversalJoint) SetAxis2Offset ¶
func (j UniversalJoint) SetAxis2Offset(axis Vector3, offset1, offset2 float64)
SetAxis2Offset sets the second axis as if the 2 bodies were already at offset1 and offset2 appart with respect to the first and second axes.
func (UniversalJoint) SetParam ¶
func (j UniversalJoint) SetParam(parameter int, value float64)
SetParam sets a joint parameter.
type Vector3 ¶
type Vector3 Vector
Vector3 represents a 3 component vector.
func NewVector3 ¶
NewVector3 returns a new Vector3 instance.
type Vector4 ¶
type Vector4 Vector
Vector4 represents a 4 component vector.
func NewVector4 ¶
NewVector4 returns a new Vector4 instance.
type VertexList ¶
type VertexList Matrix
VertexList represents a list of 3D vertices.
func NewVertexList ¶
func NewVertexList(size int, vals ...float64) VertexList
NewVertexList returns a new VertexList instance.
type World ¶
type World uintptr
World represents a simulation world.
func (World) AngularDamping ¶
AngularDamping returns the angular damping scale.
func (World) AngularDampingThreshold ¶
AngularDampingThreshold returns the angular damping threshold.
func (World) AutoDisable ¶
AutoDisable returns whether the body will be auto disabled.
func (World) AutoDisableAngularThreshold ¶
AutoDisableAngularThreshold returns the auto disable angular average threshold.
func (World) AutoDisableAverageSamplesCount ¶
AutoDisableAverageSamplesCount returns the auto disable sample count.
func (World) AutoDisableLinearThreshold ¶
AutoDisableLinearThreshold returns the auto disable linear average threshold.
func (World) AutoDisableSteps ¶
AutoDisableSteps returns the number of auto disable steps.
func (World) AutoDisableTime ¶
AutoDisableTime returns the auto disable time.
func (World) CleanupWorkingMemory ¶
func (w World) CleanupWorkingMemory()
CleanupWorkingMemory cleans up the world's working memory.
func (World) ContactMaxCorrectingVelocity ¶
ContactMaxCorrectingVelocity returns the maximum correcting velocity that contacts are allowed to generate.
func (World) ContactSurfaceLayer ¶
ContactSurfaceLayer returns the depth of the surface layer around all geometry objects.
func (World) Data ¶
func (w World) Data() interface{}
Data returns the user-specified data associated with the world.
func (World) ImpulseToForce ¶
ImpulseToForce converts an impulse to a force over a step duration.
func (World) LinearDamping ¶
LinearDamping returns the linear damping scale.
func (World) LinearDampingThreshold ¶
LinearDampingThreshold returns the linear damping threshold.
func (World) MaxAngularSpeed ¶
MaxAngularSpeed returns the maximum angular speed.
func (World) NewAMotorJoint ¶
func (w World) NewAMotorJoint(group JointGroup) AMotorJoint
NewAMotorJoint returns a new AMotorJoint instance
func (World) NewBallJoint ¶
func (w World) NewBallJoint(group JointGroup) BallJoint
NewBallJoint returns a new BallJoint instance
func (World) NewContactJoint ¶
func (w World) NewContactJoint(group JointGroup, contact *Contact) ContactJoint
NewContactJoint returns a new ContactJoint instance
func (World) NewDBallJoint ¶
func (w World) NewDBallJoint(group JointGroup) DBallJoint
NewDBallJoint returns a new DBallJoint instance
func (World) NewDHingeJoint ¶
func (w World) NewDHingeJoint(group JointGroup) DHingeJoint
NewDHingeJoint returns a new DHingeJoint instance
func (World) NewFixedJoint ¶
func (w World) NewFixedJoint(group JointGroup) FixedJoint
NewFixedJoint returns a new FixedJoint instance
func (World) NewHinge2Joint ¶
func (w World) NewHinge2Joint(group JointGroup) Hinge2Joint
NewHinge2Joint returns a new Hinge2Joint instance
func (World) NewHingeJoint ¶
func (w World) NewHingeJoint(group JointGroup) HingeJoint
NewHingeJoint returns a new HingeJoint instance
func (World) NewLMotorJoint ¶
func (w World) NewLMotorJoint(group JointGroup) LMotorJoint
NewLMotorJoint returns a new LMotorJoint instance
func (World) NewNullJoint ¶
func (w World) NewNullJoint(group JointGroup) NullJoint
NewNullJoint returns a new NullJoint instance
func (World) NewPRJoint ¶
func (w World) NewPRJoint(group JointGroup) PRJoint
NewPRJoint returns a new PRJoint instance
func (World) NewPUJoint ¶
func (w World) NewPUJoint(group JointGroup) PUJoint
NewPUJoint returns a new PUJoint instance
func (World) NewPistonJoint ¶
func (w World) NewPistonJoint(group JointGroup) PistonJoint
NewPistonJoint returns a new PistonJoint instance
func (World) NewPlane2DJoint ¶
func (w World) NewPlane2DJoint(group JointGroup) Plane2DJoint
NewPlane2DJoint returns a new Plane2DJoint instance
func (World) NewSliderJoint ¶
func (w World) NewSliderJoint(group JointGroup) SliderJoint
NewSliderJoint returns a new SliderJoint instance
func (World) NewTransmissionJoint ¶
func (w World) NewTransmissionJoint(group JointGroup) TransmissionJoint
NewTransmissionJoint returns a new TransmissionJoint instance
func (World) NewUniversalJoint ¶
func (w World) NewUniversalJoint(group JointGroup) UniversalJoint
NewUniversalJoint returns a new UniversalJoint instance
func (World) QuickStep ¶
QuickStep executes a simulation quick step, and returns whether the operation succeeded.
func (World) QuickStepNumIterations ¶
QuickStepNumIterations returns the number of iterations to execute during a quick step.
func (World) QuickStepW ¶
QuickStepW returns the over-relaxation parameter.
func (World) SetAngularDamping ¶
SetAngularDamping sets the angular damping scale.
func (World) SetAngularDampingThreshold ¶
SetAngularDampingThreshold sets the angular damping threshold.
func (World) SetAutoAutoDisableAverageSamplesCount ¶
SetAutoAutoDisableAverageSamplesCount sets auto disable average sample count.
func (World) SetAutoDisable ¶
SetAutoDisable sets wether the body will be auto disabled.
func (World) SetAutoDisableAngularThreshold ¶
SetAutoDisableAngularThreshold sets the auto disable angular average threshold.
func (World) SetAutoDisableLinearThreshold ¶
SetAutoDisableLinearThreshold sets the auto disable linear average threshold.
func (World) SetAutoDisableSteps ¶
SetAutoDisableSteps sets the number of auto disable steps.
func (World) SetAutoDisableTime ¶
SetAutoDisableTime sets the auto disable time.
func (World) SetContactMaxCorrectingVelocity ¶
SetContactMaxCorrectingVelocity sets the maximum correcting velocity that contacts are allowed to generate.
func (World) SetContactSurfaceLayer ¶
SetContactSurfaceLayer sets the depth of the surface layer around all geometry objects.
func (World) SetData ¶
func (w World) SetData(data interface{})
SetData associates user-specified data with the world.
func (World) SetGravity ¶
SetGravity sets the gravity vector.
func (World) SetLinearDamping ¶
SetLinearDamping sets the linear damping scale.
func (World) SetLinearDampingThreshold ¶
SetLinearDampingThreshold sets the linear damping threshold.
func (World) SetMaxAngularSpeed ¶
SetMaxAngularSpeed sets the maximum angular speed.
func (World) SetQuickStepNumIterations ¶
SetQuickStepNumIterations sets the number of iterations to execute during a quick step.
func (World) SetQuickStepW ¶
SetQuickStepW sets the over-relaxation parameter.
func (World) SetStepIslandsProcessingMaxThreadCount ¶
SetStepIslandsProcessingMaxThreadCount sets the maximum number of threads to use for island stepping.
func (World) StepIslandsProcessingMaxThreadCount ¶
StepIslandsProcessingMaxThreadCount returns the maximum number of threads to use for island stepping.
func (World) UseSharedWorkingMemory ¶
UseSharedWorkingMemory enables sharing working memory with another world, and returns whether the operation succeeded.