Typedefs | Functions

OrxBody

Typedefs

typedef struct __orxBODY_t orxBODY
typedef struct __orxBODY_JOINT_t orxBODY_JOINT
typedef struct __orxBODY_PART_t orxBODY_PART

Functions

orxDLLAPI orxBODY_JOINT
*orxFASTCALL 
orxBody_AddJoint (orxBODY *_pstSrcBody, orxBODY *_pstDstBody, const orxBODY_JOINT_DEF *_pstBodyJointDef)
orxDLLAPI orxBODY_JOINT
*orxFASTCALL 
orxBody_AddJointFromConfig (orxBODY *_pstSrcBody, orxBODY *_pstDstBody, const orxSTRING _zConfigID)
orxDLLAPI orxBODY_PART *orxFASTCALL orxBody_AddPart (orxBODY *_pstBody, const orxBODY_PART_DEF *_pstBodyPartDef)
orxDLLAPI orxBODY_PART *orxFASTCALL orxBody_AddPartFromConfig (orxBODY *_pstBody, const orxSTRING _zConfigID)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_ApplyForce (orxBODY *_pstBody, const orxVECTOR *_pvForce, const orxVECTOR *_pvPoint)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_ApplyImpulse (orxBODY *_pstBody, const orxVECTOR *_pvImpulse, const orxVECTOR *_pvPoint)
orxDLLAPI void orxFASTCALL orxBody_ApplySimulationResult (orxBODY *_pstBody)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_ApplyTorque (orxBODY *_pstBody, orxFLOAT _fTorque)
orxDLLAPI orxBODY *orxFASTCALL orxBody_Create (const orxSTRUCTURE *_pstOwner, const orxBODY_DEF *_pstBodyDef)
orxDLLAPI orxBODY *orxFASTCALL orxBody_CreateFromConfig (const orxSTRUCTURE *_pstOwner, const orxSTRING _zConfigID)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_Delete (orxBODY *_pstBody)
orxDLLAPI void orxFASTCALL orxBody_Exit ()
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetAngularDamping (const orxBODY *_pstBody)
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetAngularVelocity (const orxBODY *_pstBody)
orxDLLAPI orxU16 orxFASTCALL orxBody_GetCheckMask (const orxBODY_PART *_pstBodyPart)
orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetCustomGravity (const orxBODY *_pstBody, orxVECTOR *_pvCustomGravity)
orxDLLAPI orxU32 orxFASTCALL orxBody_GetDefFlags (const orxBODY *_pstBody, orxU32 _u32Mask)
orxDLLAPI const orxSTRING
orxFASTCALL 
orxBody_GetJointName (const orxBODY_JOINT *_pstBodyJoint)
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetLinearDamping (const orxBODY *_pstBody)
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetMass (const orxBODY *_pstBody)
orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetMassCenter (const orxBODY *_pstBody, orxVECTOR *_pvMassCenter)
orxDLLAPI orxBODY_JOINT
*orxFASTCALL 
orxBody_GetNextJoint (const orxBODY *_pstBody, const orxBODY_JOINT *_pstBodyJoint)
orxDLLAPI orxBODY_PART *orxFASTCALL orxBody_GetNextPart (const orxBODY *_pstBody, const orxBODY_PART *_pstBodyPart)
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxBody_GetOwner (const orxBODY *_pstBody)
orxDLLAPI const orxSTRING
orxFASTCALL 
orxBody_GetPartName (const orxBODY_PART *_pstBodyPart)
orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetPosition (const orxBODY *_pstBody, orxVECTOR *_pvPosition)
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetRotation (const orxBODY *_pstBody)
orxDLLAPI orxU16 orxFASTCALL orxBody_GetSelfFlags (const orxBODY_PART *_pstBodyPart)
orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetSpeed (const orxBODY *_pstBody, orxVECTOR *_pvSpeed)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_Init ()
orxDLLAPI orxBODY *orxFASTCALL orxBody_Raycast (const orxVECTOR *_pvStart, const orxVECTOR *_pvEnd, orxU16 _u16SelfFlags, orxU16 _u16CheckMask, orxBOOL _bEarlyExit, orxVECTOR *_pvContact, orxVECTOR *_pvNormal)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_RemoveJoint (orxBODY_JOINT *_pstBodyJoint)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_RemovePart (orxBODY_PART *_pstBodyPart)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetAngularDamping (orxBODY *_pstBody, orxFLOAT _fDamping)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetAngularVelocity (orxBODY *_pstBody, orxFLOAT _fVelocity)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetCheckMask (orxBODY_PART *_pstBodyPart, orxU16 _u16CheckMask)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetCustomGravity (orxBODY *_pstBody, const orxVECTOR *_pvCustomGravity)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetLinearDamping (orxBODY *_pstBody, orxFLOAT _fDamping)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPosition (orxBODY *_pstBody, const orxVECTOR *_pvPosition)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetRotation (orxBODY *_pstBody, orxFLOAT _fRotation)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetScale (orxBODY *_pstBody, const orxVECTOR *_pvScale)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetSelfFlags (orxBODY_PART *_pstBodyPart, orxU16 _u16SelfFlags)
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetSpeed (orxBODY *_pstBody, const orxVECTOR *_pvSpeed)
orxDLLAPI void orxFASTCALL orxBody_Setup ()
orxDLLAPI orxBOOL orxFASTCALL orxBody_TestAllDefFlags (const orxBODY *_pstBody, orxU32 _u32Flags)
orxDLLAPI orxBOOL orxFASTCALL orxBody_TestDefFlags (const orxBODY *_pstBody, orxU32 _u32Flags)

Detailed Description

Body Module Allows to creates and handle physical bodies They are used as container with associated properties Bodies are used by objects They thus can be referenced by objects as structures


Typedef Documentation

typedef struct __orxBODY_t orxBODY

Internal Body structure

Definition at line 57 of file orxBody.h.

typedef struct __orxBODY_JOINT_t orxBODY_JOINT

Internal Body joint structure

Definition at line 65 of file orxBody.h.

typedef struct __orxBODY_PART_t orxBODY_PART

Internal Body part structure

Definition at line 61 of file orxBody.h.


Function Documentation

orxDLLAPI orxBODY_JOINT* orxFASTCALL orxBody_AddJoint ( orxBODY _pstSrcBody,
orxBODY _pstDstBody,
const orxBODY_JOINT_DEF _pstBodyJointDef 
)

Adds a joint to link two bodies together

Parameters:
[in]_pstSrcBodyConcerned source body
[in]_pstDstBodyConcerned destination body
[in]_pstBodyJointDefBody joint definition
Returns:
orxBODY_JOINT / orxNULL
orxDLLAPI orxBODY_JOINT* orxFASTCALL orxBody_AddJointFromConfig ( orxBODY _pstSrcBody,
orxBODY _pstDstBody,
const orxSTRING  _zConfigID 
)

Adds a joint from config to link two bodies together

Parameters:
[in]_pstSrcBodyConcerned source body
[in]_pstDstBodyConcerned destination body
[in]_zConfigIDBody joint config ID
Returns:
orxBODY_JOINT / orxNULL
orxDLLAPI orxBODY_PART* orxFASTCALL orxBody_AddPart ( orxBODY _pstBody,
const orxBODY_PART_DEF _pstBodyPartDef 
)

Adds a part to body

Parameters:
[in]_pstBodyConcerned body
[in]_pstBodyPartDefBody part definition
Returns:
orxBODY_PART / orxNULL
orxDLLAPI orxBODY_PART* orxFASTCALL orxBody_AddPartFromConfig ( orxBODY _pstBody,
const orxSTRING  _zConfigID 
)

Adds a part to body from config

Parameters:
[in]_pstBodyConcerned body
[in]_zConfigIDBody part config ID
Returns:
orxBODY_PART / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxBody_ApplyForce ( orxBODY _pstBody,
const orxVECTOR _pvForce,
const orxVECTOR _pvPoint 
)

Applies a force

Parameters:
[in]_pstBodyConcerned body
[in]_pvForceForce to apply
[in]_pvPointPoint (world coordinates) where the force will be applied, if orxNULL, center of mass will be used
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_ApplyImpulse ( orxBODY _pstBody,
const orxVECTOR _pvImpulse,
const orxVECTOR _pvPoint 
)

Applies an impulse

Parameters:
[in]_pstBodyConcerned body
[in]_pvImpulseImpulse to apply
[in]_pvPointPoint (world coordinates) where the impulse will be applied, if orxNULL, center of mass will be used
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxBody_ApplySimulationResult ( orxBODY _pstBody )

Applies physics simulation result to the Body

Parameters:
[in]_pstBodyConcerned body
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_ApplyTorque ( orxBODY _pstBody,
orxFLOAT  _fTorque 
)

Applies a torque

Parameters:
[in]_pstBodyConcerned body
[in]_fTorqueTorque to apply
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxBODY* orxFASTCALL orxBody_Create ( const orxSTRUCTURE _pstOwner,
const orxBODY_DEF _pstBodyDef 
)

Creates an empty body

Parameters:
[in]_pstOwnerBody's owner used for collision callbacks (usually an orxOBJECT)
[in]_pstBodyDefBody definition
Returns:
Created orxGRAPHIC / orxNULL
orxDLLAPI orxBODY* orxFASTCALL orxBody_CreateFromConfig ( const orxSTRUCTURE _pstOwner,
const orxSTRING  _zConfigID 
)

Creates a body from config

Parameters:
[in]_pstOwnerBody's owner used for collision callbacks (usually an orxOBJECT)
[in]_zConfigIDBody config ID
Returns:
Created orxGRAPHIC / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxBody_Delete ( orxBODY _pstBody )

Deletes a body

Parameters:
[in]_pstBodyConcerned body
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxBody_Exit (  )

Exits from the Body module

orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetAngularDamping ( const orxBODY _pstBody )

Gets a body angular damping

Parameters:
[in]_pstBodyConcerned body
Returns:
Body's angular damping
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetAngularVelocity ( const orxBODY _pstBody )

Gets a body angular velocity

Parameters:
[in]_pstBodyConcerned body
Returns:
Body angular velocity (radians/seconds)
orxDLLAPI orxU16 orxFASTCALL orxBody_GetCheckMask ( const orxBODY_PART _pstBodyPart )

Gets check mask of a physical body part

Parameters:
[in]_pstBodyPartConcerned physical body part
Returns:
Check mask of the physical body part
orxDLLAPI orxVECTOR* orxFASTCALL orxBody_GetCustomGravity ( const orxBODY _pstBody,
orxVECTOR _pvCustomGravity 
)

Gets a body custom gravity

Parameters:
[in]_pstBodyConcerned body
[out]_pvCustomGravityCustom gravity to get
Returns:
Body custom gravity / orxNULL is object doesn't have any
orxDLLAPI orxU32 orxFASTCALL orxBody_GetDefFlags ( const orxBODY _pstBody,
orxU32  _u32Mask 
)

Gets body definition flags

Parameters:
[in]_pstBodyConcerned body
[in]_u32MaskMask to use for getting flags
Returns:
orxU32
orxDLLAPI const orxSTRING orxFASTCALL orxBody_GetJointName ( const orxBODY_JOINT _pstBodyJoint )

Gets a body joint name

Parameters:
[in]_pstBodyJointConcerned body joint
Returns:
orxSTRING / orxNULL
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetLinearDamping ( const orxBODY _pstBody )

Gets a body linear damping

Parameters:
[in]_pstBodyConcerned body
Returns:
Body's linear damping
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetMass ( const orxBODY _pstBody )

Gets a body mass

Parameters:
[in]_pstBodyConcerned body
Returns:
Body mass
orxDLLAPI orxVECTOR* orxFASTCALL orxBody_GetMassCenter ( const orxBODY _pstBody,
orxVECTOR _pvMassCenter 
)

Gets a body center of mass

Parameters:
[in]_pstBodyConcerned body
[out]_pvMassCenterMass center to get
Returns:
Mass center / orxNULL
orxDLLAPI orxBODY_JOINT* orxFASTCALL orxBody_GetNextJoint ( const orxBODY _pstBody,
const orxBODY_JOINT _pstBodyJoint 
)

Gets next body joint

Parameters:
[in]_pstBodyConcerned body
[in]_pstBodyJointCurrent body joint (orxNULL to get the first one)
Returns:
orxBODY_JOINT / orxNULL
orxDLLAPI orxBODY_PART* orxFASTCALL orxBody_GetNextPart ( const orxBODY _pstBody,
const orxBODY_PART _pstBodyPart 
)

Gets next body part

Parameters:
[in]_pstBodyConcerned body
[in]_pstBodyPartCurrent body part (orxNULL to get the first one)
Returns:
orxBODY_PART / orxNULL
orxDLLAPI orxSTRUCTURE* orxFASTCALL orxBody_GetOwner ( const orxBODY _pstBody )

Gets a body owner

Parameters:
[in]_pstBodyConcerned body
Returns:
orxSTRUCTURE / orxNULL
orxDLLAPI const orxSTRING orxFASTCALL orxBody_GetPartName ( const orxBODY_PART _pstBodyPart )

Gets a body part name

Parameters:
[in]_pstBodyPartConcerned body part
Returns:
orxSTRING / orxNULL
orxDLLAPI orxVECTOR* orxFASTCALL orxBody_GetPosition ( const orxBODY _pstBody,
orxVECTOR _pvPosition 
)

Gets a body position

Parameters:
[in]_pstBodyConcerned body
[out]_pvPositionPosition to get
Returns:
Body position / orxNULL
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetRotation ( const orxBODY _pstBody )

Gets a body rotation

Parameters:
[in]_pstBodyConcerned body
Returns:
Body rotation (radians)
orxDLLAPI orxU16 orxFASTCALL orxBody_GetSelfFlags ( const orxBODY_PART _pstBodyPart )

Gets self flags of a physical body part

Parameters:
[in]_pstBodyPartConcerned physical body part
Returns:
Self flags of the physical body part
orxDLLAPI orxVECTOR* orxFASTCALL orxBody_GetSpeed ( const orxBODY _pstBody,
orxVECTOR _pvSpeed 
)

Gets a body speed

Parameters:
[in]_pstBodyConcerned body
[out]_pvSpeedSpeed to get
Returns:
Body speed / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxBody_Init (  )

Inits the Body module

orxDLLAPI orxBODY* orxFASTCALL orxBody_Raycast ( const orxVECTOR _pvStart,
const orxVECTOR _pvEnd,
orxU16  _u16SelfFlags,
orxU16  _u16CheckMask,
orxBOOL  _bEarlyExit,
orxVECTOR _pvContact,
orxVECTOR _pvNormal 
)

Issues a raycast to test for potential bodies in the way

Parameters:
[in]_pvStartStart of raycast
[in]_pvEndEnd of raycast
[in]_u16SelfFlagsSelfs flags used for filtering (0xFFFF for no filtering)
[in]_u16CheckMaskCheck mask used for filtering (0xFFFF for no filtering)
[in]_bEarlyExitShould stop as soon as an object has been hit (which might not be the closest)
[in]_pvContactIf non-null and a contact is found it will be stored here
[in]_pvNormalIf non-null and a contact is found, its normal will be stored here
Returns:
Colliding orxBODY / orxNULL
orxDLLAPI orxSTATUS orxFASTCALL orxBody_RemoveJoint ( orxBODY_JOINT _pstBodyJoint )

Removes a body joint

Parameters:
[in]_pstBodyJointConcerned body joint
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_RemovePart ( orxBODY_PART _pstBodyPart )

Removes a body part

Parameters:
[in]_pstBodyPartConcerned body part
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetAngularDamping ( orxBODY _pstBody,
orxFLOAT  _fDamping 
)

Sets a body angular damping

Parameters:
[in]_pstBodyConcerned body
[in]_fDampingAngular damping to set
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetAngularVelocity ( orxBODY _pstBody,
orxFLOAT  _fVelocity 
)

Sets a body angular velocity

Parameters:
[in]_pstBodyConcerned body
[in]_fVelocityAngular velocity to set (radians/seconds)
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetCheckMask ( orxBODY_PART _pstBodyPart,
orxU16  _u16CheckMask 
)

Sets check mask of a physical body part

Parameters:
[in]_pstBodyPartConcerned physical body part
[in]_u16CheckMaskCheck mask to set
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetCustomGravity ( orxBODY _pstBody,
const orxVECTOR _pvCustomGravity 
)

Sets a body custom gravity

Parameters:
[in]_pstBodyConcerned body
[in]_pvCustomGravityCustom gravity to set / orxNULL to remove it
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetLinearDamping ( orxBODY _pstBody,
orxFLOAT  _fDamping 
)

Sets a body linear damping

Parameters:
[in]_pstBodyConcerned body
[in]_fDampingLinear damping to set
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPosition ( orxBODY _pstBody,
const orxVECTOR _pvPosition 
)

Sets a body position

Parameters:
[in]_pstBodyConcerned body
[in]_pvPositionPosition to set
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetRotation ( orxBODY _pstBody,
orxFLOAT  _fRotation 
)

Sets a body rotation

Parameters:
[in]_pstBodyConcerned body
[in]_fRotationRotation to set (radians)
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetScale ( orxBODY _pstBody,
const orxVECTOR _pvScale 
)

Sets a body scale

Parameters:
[in]_pstBodyConcerned body
[in]_pvScaleScale to set
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetSelfFlags ( orxBODY_PART _pstBodyPart,
orxU16  _u16SelfFlags 
)

Sets self flags of a physical body part

Parameters:
[in]_pstBodyPartConcerned physical body part
[in]_u16SelfFlagsSelf flags to set
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetSpeed ( orxBODY _pstBody,
const orxVECTOR _pvSpeed 
)

Sets a body speed

Parameters:
[in]_pstBodyConcerned body
[in]_pvSpeedSpeed to set
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxBody_Setup (  )

Body module setup

orxDLLAPI orxBOOL orxFASTCALL orxBody_TestAllDefFlags ( const orxBODY _pstBody,
orxU32  _u32Flags 
)

Tests all flags against body definition ones

Parameters:
[in]_pstBodyConcerned body
[in]_u32FlagsFlags to test
Returns:
orxTRUE / orxFALSE
orxDLLAPI orxBOOL orxFASTCALL orxBody_TestDefFlags ( const orxBODY _pstBody,
orxU32  _u32Flags 
)

Tests flags against body definition ones

Parameters:
[in]_pstBodyConcerned body
[in]_u32FlagsFlags to test
Returns:
orxTRUE / orxFALSE

Generated for orx by doxygen 1.5.6