TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
iDynamicsBody Struct Referenceabstract
Inheritance diagram for iDynamicsBody:
iCollideObject iUnknown

Detailed Description

DynamicsBody interface.

General

virtual void AddJoint (iDynamicsJoint *apJoint)=0
 Add a joint. More...
 
virtual void RemoveJoint (iDynamicsJoint *apJoint)=0
 Remove a joint. More...
 

Position and orientation

virtual void SetLinearVelocity (const sVec3f &avVel)=0
 Set the body's linear velocity. {Property}. More...
 
virtual sVec3f GetLinearVelocity () const =0
 Get the body's linear velocity. {Property}. More...
 
virtual void SetAngularVelocity (const sVec3f &avVel)=0
 Set the body's angular velocity. {Property}. More...
 
virtual sVec3f GetAngularVelocity () const =0
 Get the body's angular velocity. {Property}. More...
 
virtual sVec3f GetVelocityAt (const sVec3f &avVel) const =0
 Get the velocity of the body at the specified point. More...
 
virtual void SetLinearDamping (tF32 afDamping)=0
 Set the body's angular damping. {Property}. More...
 
virtual tF32 GetLinearDamping () const =0
 Get the body's angular velocity. {Property}. More...
 
virtual void SetAngularDamping (tF32 afDamping)=0
 Set the body's angular damping. {Property}. More...
 
virtual tF32 GetAngularDamping () const =0
 Get the body's angular velocity. {Property}. More...
 
virtual void SetMaxLinearSpeed (tF32 afSpeed)=0
 Set the body's maximum linear speed. {Property}. More...
 
virtual tF32 GetMaxLinearSpeed () const =0
 Get the body's maximum linear speed. {Property}. More...
 
virtual void SetMaxAngularSpeed (tF32 afDamping)=0
 Set the body's maximum angular speed. {Property}. More...
 
virtual tF32 GetMaxAngularSpeed () const =0
 Get the body's maximum angular speed. {Property}. More...
 

Mass and force

virtual void SetMass (tF32 afMass)=0
 Set the body's mass. {Property}. More...
 
virtual tF32 GetMass () const =0
 Get the body's mass. {Property}. More...
 
virtual void ClearForces ()=0
 Clear all forces applied to the body. More...
 
virtual void AddForce (const sVec3f &avForce)=0
 Add force to the body. More...
 
virtual void AddTorque (const sVec3f &avTorque)=0
 Add torque to the body. More...
 
virtual void AddForceAtPosition (const sVec3f &avForce, const sVec3f &avPos)=0
 Add a force at a specific position to the body. More...
 
virtual void AddImpulse (const sVec3f &avImpulse)=0
 Add an impulse to the body. More...
 
virtual void AddImpulseAtPosition (const sVec3f &avImpulse, const sVec3f &avPos)=0
 Add an impulse at a specific position to the body. More...
 

States

virtual void Activate ()=0
 Force the activation of the object if its currently sleeping. More...
 
virtual tBool GetIsActive () const =0
 Get whether the object is currently active. {Property}. More...
 
virtual void SetAutoDisable (tBool abEnabled)=0
 Set auto disable on/off. {Property}. More...
 
virtual tBool GetAutoDisable () const =0
 Get auto disable status. {Property}. More...
 
virtual void SetAutoDisableLinearThreshold (tF32 afThresold)=0
 Set auto disable linear threshold. {Property}. More...
 
virtual tF32 GetAutoDisableLinearThreshold () const =0
 Get auto disable linear threshold. {Property}. More...
 
virtual void SetAutoDisableAngularThreshold (tF32 afThresold)=0
 Set auto disable angular threshold. {Property}. More...
 
virtual tF32 GetAutoDisableAngularThreshold () const =0
 Get auto disable angular threshold. {Property}. More...
 
virtual void SetAutoDisableNumSteps (tU32 anNum)=0
 Set auto disable number of steps. {Property}. More...
 
virtual tU32 GetAutoDisableNumSteps () const =0
 Get auto disable number of steps. {Property}. More...
 
virtual void SetGravity (tBool abEnabled)=0
 Switch on/off the influence of gravity on this body. {Property}. More...
 
virtual tBool GetGravity () const =0
 Get the gravity enabling status. {Property}. More...
 
virtual void SetElasticity (tF32 afElasticity)=0
 Set the default elasticity of the body. (default 0) {Property}. More...
 
virtual tF32 GetElasticity () const =0
 Get the default elasticity of the body. {Property}. More...
 
virtual void SetFriction (tF32 afFriction)=0
 Set the default friction of the body. (default 0.5) {Property}. More...
 
virtual tF32 GetFriction () const =0
 Get the default friction of the body. {Property}. More...
 

Additional Inherited Members

- Public Member Functions inherited from iCollideObject
virtual iCollideShapeGetShape () const =0
 Get the object's associated shape. {Property}. More...
 
virtual void SetEnabled (tBool abEnabled)=0
 Set whether the object is enabled. {Property}. More...
 
virtual tBool GetEnabled () const =0
 Get whether the object is enabled. {Property}. More...
 
virtual void SetName (iHString *ahspName)=0
 Set the name of the object. {Property}. More...
 
virtual iHStringGetName () const =0
 Get the name of the object. {Property}. More...
 
virtual void SetClass (iHString *ahspClass)=0
 Set the class of the object. {Property}. More...
 
virtual iHStringGetClass () const =0
 Get the class of the object. {Property}. More...
 
virtual sVec3f GetMin () const =0
 Get the object's AABB min. {Property}. More...
 
virtual sVec3f GetMax () const =0
 Get the object's AABB max. {Property}. More...
 
virtual sVec3f GetSize () const =0
 Get the object's size. {Property}. More...
 
virtual tF32 GetRadius () const =0
 Get the object's radius. {Property}. More...
 
virtual void SetPosition (const sVec3f &avPos)=0
 Set the object's position. {Property}. More...
 
virtual sVec3f GetPosition () const =0
 Get the object's position. {Property}. More...
 
virtual void SetMatrix (const sMatrixf &aMatrix)=0
 Set the object's matrix. {Property}. More...
 
virtual sMatrixf GetMatrix () const =0
 Get the object's matrix. {Property}. More...
 
virtual tBool SetUserdata (iHString *ahspID, iUnknown *apUserdata)=0
 Set a userdata. {Property}. More...
 
virtual iUnknownGetUserdata (iHString *ahspID) const =0
 Get a userdata. {Property}. More...
 
virtual tSize GetNumUserdata () const =0
 Get the number of userdata. {Property}. More...
 
virtual iHStringGetUserdataName (tU32 anIndex) const =0
 Get the name of the user data at the specified index. {Property}. More...
 
virtual iUnknownGetUserdataFromIndex (tU32 anIndex) const =0
 Get the userdata at the specified index. {Property}. More...
 
virtual void SetKinematic (tBool abEnabled)=0
 Set whether the collide object is kinematic. {Property}. More...
 
virtual tBool GetKinematic () const =0
 Get whether this is a kinematic object. {Property}. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual void AddJoint ( iDynamicsJoint apJoint)
pure virtual

Add a joint.

virtual void RemoveJoint ( iDynamicsJoint apJoint)
pure virtual

Remove a joint.

virtual void SetLinearVelocity ( const sVec3f avVel)
pure virtual

Set the body's linear velocity. {Property}.

virtual sVec3f GetLinearVelocity ( ) const
pure virtual

Get the body's linear velocity. {Property}.

virtual void SetAngularVelocity ( const sVec3f avVel)
pure virtual

Set the body's angular velocity. {Property}.

virtual sVec3f GetAngularVelocity ( ) const
pure virtual

Get the body's angular velocity. {Property}.

virtual sVec3f GetVelocityAt ( const sVec3f avVel) const
pure virtual

Get the velocity of the body at the specified point.

virtual void SetLinearDamping ( tF32  afDamping)
pure virtual

Set the body's angular damping. {Property}.

virtual tF32 GetLinearDamping ( ) const
pure virtual

Get the body's angular velocity. {Property}.

virtual void SetAngularDamping ( tF32  afDamping)
pure virtual

Set the body's angular damping. {Property}.

virtual tF32 GetAngularDamping ( ) const
pure virtual

Get the body's angular velocity. {Property}.

virtual void SetMaxLinearSpeed ( tF32  afSpeed)
pure virtual

Set the body's maximum linear speed. {Property}.

virtual tF32 GetMaxLinearSpeed ( ) const
pure virtual

Get the body's maximum linear speed. {Property}.

virtual void SetMaxAngularSpeed ( tF32  afDamping)
pure virtual

Set the body's maximum angular speed. {Property}.

virtual tF32 GetMaxAngularSpeed ( ) const
pure virtual

Get the body's maximum angular speed. {Property}.

virtual void SetMass ( tF32  afMass)
pure virtual

Set the body's mass. {Property}.

Remarks
Changing the mass may involve recomputing the body's inertia tensor and some other heavy computation. Use this method carefully.
virtual tF32 GetMass ( ) const
pure virtual

Get the body's mass. {Property}.

virtual void ClearForces ( )
pure virtual

Clear all forces applied to the body.

virtual void AddForce ( const sVec3f avForce)
pure virtual

Add force to the body.

virtual void AddTorque ( const sVec3f avTorque)
pure virtual

Add torque to the body.

virtual void AddForceAtPosition ( const sVec3f avForce,
const sVec3f avPos 
)
pure virtual

Add a force at a specific position to the body.

virtual void AddImpulse ( const sVec3f avImpulse)
pure virtual

Add an impulse to the body.

virtual void AddImpulseAtPosition ( const sVec3f avImpulse,
const sVec3f avPos 
)
pure virtual

Add an impulse at a specific position to the body.

virtual void Activate ( )
pure virtual

Force the activation of the object if its currently sleeping.

Remarks
If the object is disabled or kinematic this method will do nothing.
virtual tBool GetIsActive ( ) const
pure virtual

Get whether the object is currently active. {Property}.

virtual void SetAutoDisable ( tBool  abEnabled)
pure virtual

Set auto disable on/off. {Property}.

virtual tBool GetAutoDisable ( ) const
pure virtual

Get auto disable status. {Property}.

virtual void SetAutoDisableLinearThreshold ( tF32  afThresold)
pure virtual

Set auto disable linear threshold. {Property}.

virtual tF32 GetAutoDisableLinearThreshold ( ) const
pure virtual

Get auto disable linear threshold. {Property}.

virtual void SetAutoDisableAngularThreshold ( tF32  afThresold)
pure virtual

Set auto disable angular threshold. {Property}.

virtual tF32 GetAutoDisableAngularThreshold ( ) const
pure virtual

Get auto disable angular threshold. {Property}.

virtual void SetAutoDisableNumSteps ( tU32  anNum)
pure virtual

Set auto disable number of steps. {Property}.

virtual tU32 GetAutoDisableNumSteps ( ) const
pure virtual

Get auto disable number of steps. {Property}.

virtual void SetGravity ( tBool  abEnabled)
pure virtual

Switch on/off the influence of gravity on this body. {Property}.

virtual tBool GetGravity ( ) const
pure virtual

Get the gravity enabling status. {Property}.

virtual void SetElasticity ( tF32  afElasticity)
pure virtual

Set the default elasticity of the body. (default 0) {Property}.

virtual tF32 GetElasticity ( ) const
pure virtual

Get the default elasticity of the body. {Property}.

virtual void SetFriction ( tF32  afFriction)
pure virtual

Set the default friction of the body. (default 0.5) {Property}.

virtual tF32 GetFriction ( ) const
pure virtual

Get the default friction of the body. {Property}.