orx  1.14
Portable Game Engine
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 orxSTATUS orxFASTCALL orxBody_ApplyTorque (orxBODY *_pstBody, orxFLOAT _fTorque)
 
orxDLLAPI orxU32 orxFASTCALL orxBody_BoxPick (const orxAABOX *_pstBox, orxU16 _u16SelfFlags, orxU16 _u16CheckMask, orxBODY *_apstBodyList[], orxU32 _u32Number)
 
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 orxSTATUS orxFASTCALL orxBody_EnableMotor (orxBODY_JOINT *_pstBodyJoint, orxBOOL _bEnable)
 
orxDLLAPI void orxFASTCALL orxBody_Exit ()
 
orxDLLAPI orxBOOL orxFASTCALL orxBody_GetAllowMoving (const orxBODY *_pstBody)
 
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetAngularDamping (const orxBODY *_pstBody)
 
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetAngularVelocity (const orxBODY *_pstBody)
 
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 orxVECTOR *orxFASTCALL orxBody_GetJointReactionForce (const orxBODY_JOINT *_pstBodyJoint, orxVECTOR *_pvForce)
 
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetJointReactionTorque (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 const orxSTRING orxFASTCALL orxBody_GetName (const orxBODY *_pstBody)
 
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 orxBODY *orxFASTCALL orxBody_GetPartBody (const orxBODY_PART *_pstBodyPart)
 
orxDLLAPI orxU16 orxFASTCALL orxBody_GetPartCheckMask (const orxBODY_PART *_pstBodyPart)
 
orxDLLAPI const orxBODY_PART_DEF *orxFASTCALL orxBody_GetPartDef (const orxBODY_PART *_pstBodyPart)
 
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetPartDensity (const orxBODY_PART *_pstBodyPart)
 
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetPartFriction (const orxBODY_PART *_pstBodyPart)
 
orxDLLAPI const orxSTRING orxFASTCALL orxBody_GetPartName (const orxBODY_PART *_pstBodyPart)
 
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetPartRestitution (const orxBODY_PART *_pstBodyPart)
 
orxDLLAPI orxU16 orxFASTCALL orxBody_GetPartSelfFlags (const orxBODY_PART *_pstBodyPart)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetPosition (const orxBODY *_pstBody, orxVECTOR *_pvPosition)
 
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetRotation (const orxBODY *_pstBody)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetSpeed (const orxBODY *_pstBody, orxVECTOR *_pvSpeed)
 
orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetSpeedAtWorldPosition (const orxBODY *_pstBody, const orxVECTOR *_pvPosition, orxVECTOR *_pvSpeed)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_Init ()
 
orxDLLAPI orxBOOL orxFASTCALL orxBody_IsDynamic (const orxBODY *_pstBody)
 
orxDLLAPI orxBOOL orxFASTCALL orxBody_IsFixedRotation (const orxBODY *_pstBody)
 
orxDLLAPI orxBOOL orxFASTCALL orxBody_IsInside (const orxBODY *_pstBody, const orxVECTOR *_pvPosition)
 
orxDLLAPI orxBOOL orxFASTCALL orxBody_IsInsidePart (const orxBODY_PART *_pstBodyPart, const orxVECTOR *_pvPosition)
 
orxDLLAPI orxBOOL orxFASTCALL orxBody_IsPartSolid (const orxBODY_PART *_pstBodyPart)
 
orxDLLAPI orxBODY *orxFASTCALL orxBody_Raycast (const orxVECTOR *_pvBegin, 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_RemovePartFromConfig (orxBODY *_pstBody, const orxSTRING _zConfigID)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetAllowMoving (orxBODY *_pstBody, orxBOOL _bAllowMoving)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetAngularDamping (orxBODY *_pstBody, orxFLOAT _fDamping)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetAngularVelocity (orxBODY *_pstBody, orxFLOAT _fVelocity)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetCustomGravity (orxBODY *_pstBody, const orxVECTOR *_pvCustomGravity)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetDynamic (orxBODY *_pstBody, orxBOOL _bDynamic)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetFixedRotation (orxBODY *_pstBody, orxBOOL _bFixed)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetJointMaxMotorTorque (orxBODY_JOINT *_pstBodyJoint, orxFLOAT _fMaxTorque)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetJointMotorSpeed (orxBODY_JOINT *_pstBodyJoint, orxFLOAT _fSpeed)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetLinearDamping (orxBODY *_pstBody, orxFLOAT _fDamping)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartCheckMask (orxBODY_PART *_pstBodyPart, orxU16 _u16CheckMask)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartDensity (orxBODY_PART *_pstBodyPart, orxFLOAT _fDensity)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartFriction (orxBODY_PART *_pstBodyPart, orxFLOAT _fFriction)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartRestitution (orxBODY_PART *_pstBodyPart, orxFLOAT _fRestitution)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartSelfFlags (orxBODY_PART *_pstBodyPart, orxU16 _u16SelfFlags)
 
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartSolid (orxBODY_PART *_pstBodyPart, orxBOOL _bSolid)
 
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_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 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 orxU32 orxFASTCALL orxBody_BoxPick ( const orxAABOX _pstBox,
orxU16  _u16SelfFlags,
orxU16  _u16CheckMask,
orxBODY _apstBodyList[],
orxU32  _u32Number 
)

Picks bodies in contact with the given axis aligned box.

Parameters
[in]_pstBoxBox used for picking
[in]_u16SelfFlagsSelfs flags used for filtering (0xFFFF for no filtering)
[in]_u16CheckMaskCheck mask used for filtering (0xFFFF for no filtering)
[in]_apstBodyListList of bodies to fill
[in]_u32NumberNumber of bodies
Returns
Count of actual found bodies. It might be larger than the given array, in which case you'd need to pass a larger array to retrieve them all.
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 orxSTATUS orxFASTCALL orxBody_EnableMotor ( orxBODY_JOINT _pstBodyJoint,
orxBOOL  _bEnable 
)

Enables a (revolute) body joint motor

Parameters
[in]_pstBodyJointConcerned body joint
[in]_bEnableEnable / Disable
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI void orxFASTCALL orxBody_Exit ( )

Exits from the Body module

orxDLLAPI orxBOOL orxFASTCALL orxBody_GetAllowMoving ( const orxBODY _pstBody)

Gets the "allow moving" property of a body, only relevant for non-dynamic bodies

Parameters
[in]_pstBodyConcerned physical body
Returns
orxTRUE / orxFALSE
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 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 orxVECTOR* orxFASTCALL orxBody_GetJointReactionForce ( const orxBODY_JOINT _pstBodyJoint,
orxVECTOR _pvForce 
)

Gets the reaction force on the attached body at the joint anchor

Parameters
[in]_pstBodyJointConcerned body joint
[out]_pvForceReaction force
Returns
Reaction force in Newtons
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetJointReactionTorque ( const orxBODY_JOINT _pstBodyJoint)

Gets the reaction torque on the attached body

Parameters
[in]_pstBodyJointConcerned body joint
Returns
Reaction torque
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 (object space)

Parameters
[in]_pstBodyConcerned body
[out]_pvMassCenterMass center to get
Returns
Mass center / orxNULL
orxDLLAPI const orxSTRING orxFASTCALL orxBody_GetName ( const orxBODY _pstBody)

Gets body config name

Parameters
[in]_pstBodyConcerned body
Returns
orxSTRING / orxSTRING_EMPTY
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 orxBODY* orxFASTCALL orxBody_GetPartBody ( const orxBODY_PART _pstBodyPart)

Gets a body part body (ie. owner)

Parameters
[in]_pstBodyPartConcerned body part
Returns
orxBODY / orxNULL
orxDLLAPI orxU16 orxFASTCALL orxBody_GetPartCheckMask ( const orxBODY_PART _pstBodyPart)

Gets check mask of a body part

Parameters
[in]_pstBodyPartConcerned body part
Returns
Check mask of the body part
orxDLLAPI const orxBODY_PART_DEF* orxFASTCALL orxBody_GetPartDef ( const orxBODY_PART _pstBodyPart)

Gets a body part definition (matching current part status)

Parameters
[in]_pstBodyPartConcerned body part
Returns
orxBODY_PART_DEF / orxNULL
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetPartDensity ( const orxBODY_PART _pstBodyPart)

Gets density of a body part

Parameters
[in]_pstBodyPartConcerned body part
Returns
Density
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetPartFriction ( const orxBODY_PART _pstBodyPart)

Gets friction of a body part

Parameters
[in]_pstBodyPartConcerned body part
Returns
Friction
orxDLLAPI const orxSTRING orxFASTCALL orxBody_GetPartName ( const orxBODY_PART _pstBodyPart)

Gets a body part name

Parameters
[in]_pstBodyPartConcerned body part
Returns
orxSTRING / orxNULL
orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetPartRestitution ( const orxBODY_PART _pstBodyPart)

Gets restitution of a body part

Parameters
[in]_pstBodyPartConcerned body part
Returns
Restitution
orxDLLAPI orxU16 orxFASTCALL orxBody_GetPartSelfFlags ( const orxBODY_PART _pstBodyPart)

Gets self flags of a body part

Parameters
[in]_pstBodyPartConcerned body part
Returns
Self flags of the body part
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 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 orxVECTOR* orxFASTCALL orxBody_GetSpeedAtWorldPosition ( const orxBODY _pstBody,
const orxVECTOR _pvPosition,
orxVECTOR _pvSpeed 
)

Gets a body speed at a specified world position

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

Inits the Body module

orxDLLAPI orxBOOL orxFASTCALL orxBody_IsDynamic ( const orxBODY _pstBody)

Gets the dynamic property of a body

Parameters
[in]_pstBodyConcerned physical body
Returns
orxTRUE / orxFALSE
orxDLLAPI orxBOOL orxFASTCALL orxBody_IsFixedRotation ( const orxBODY _pstBody)

Is a body using a fixed rotation

Parameters
[in]_pstBodyConcerned body
Returns
orxTRUE if fixed rotation, orxFALSE otherwise
orxDLLAPI orxBOOL orxFASTCALL orxBody_IsInside ( const orxBODY _pstBody,
const orxVECTOR _pvPosition 
)

Is point inside body? (Using world coordinates)

Parameters
[in]_pstBodyConcerned physical body
[in]_pvPositionPosition to test (world coordinates)
Returns
orxTRUE / orxFALSE
orxDLLAPI orxBOOL orxFASTCALL orxBody_IsInsidePart ( const orxBODY_PART _pstBodyPart,
const orxVECTOR _pvPosition 
)

Is point inside part? (Using world coordinates)

Parameters
[in]_pstBodyPartConcerned physical body part
[in]_pvPositionPosition to test (world coordinates)
Returns
orxTRUE / orxFALSE
orxDLLAPI orxBOOL orxFASTCALL orxBody_IsPartSolid ( const orxBODY_PART _pstBodyPart)

Is a body part solid?

Parameters
[in]_pstBodyPartConcerned body part
Returns
orxTRUE / orxFALSE
orxDLLAPI orxBODY* orxFASTCALL orxBody_Raycast ( const orxVECTOR _pvBegin,
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]_pvBeginBeginning 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_RemovePartFromConfig ( orxBODY _pstBody,
const orxSTRING  _zConfigID 
)

Removes a part using its config ID

Parameters
[in]_pstBodyConcerned body
[in]_zConfigIDConfig ID of the part to remove
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetAllowMoving ( orxBODY _pstBody,
orxBOOL  _bAllowMoving 
)

Sets the "allow moving" property of a body

Parameters
[in]_pstBodyConcerned physical body
[in]_bAllowMovingOnly used for non-dynamic bodies, Kinematic / Static
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_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_SetDynamic ( orxBODY _pstBody,
orxBOOL  _bDynamic 
)

Sets the dynamic property of a body

Parameters
[in]_pstBodyConcerned physical body
[in]_bDynamicDynamic / Static (or Kinematic depending on the "allow moving" property)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetFixedRotation ( orxBODY _pstBody,
orxBOOL  _bFixed 
)

Sets a body fixed rotation

Parameters
[in]_pstBodyConcerned body
[in]_bFixedFixed / not fixed
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetJointMaxMotorTorque ( orxBODY_JOINT _pstBodyJoint,
orxFLOAT  _fMaxTorque 
)

Sets a (revolute) body joint maximum motor torque

Parameters
[in]_pstBodyJointConcerned body joint
[in]_fMaxTorqueMaximum motor torque
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetJointMotorSpeed ( orxBODY_JOINT _pstBodyJoint,
orxFLOAT  _fSpeed 
)

Sets a (revolute) body joint motor speed

Parameters
[in]_pstBodyJointConcerned body joint
[in]_fSpeedSpeed
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_SetPartCheckMask ( orxBODY_PART _pstBodyPart,
orxU16  _u16CheckMask 
)

Sets check mask of a body part

Parameters
[in]_pstBodyPartConcerned body part
[in]_u16CheckMaskCheck mask to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartDensity ( orxBODY_PART _pstBodyPart,
orxFLOAT  _fDensity 
)

Sets density of a body part

Parameters
[in]_pstBodyPartConcerned body part
[in]_fDensityDensity
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartFriction ( orxBODY_PART _pstBodyPart,
orxFLOAT  _fFriction 
)

Sets friction of a body part

Parameters
[in]_pstBodyPartConcerned body part
[in]_fFrictionFriction
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartRestitution ( orxBODY_PART _pstBodyPart,
orxFLOAT  _fRestitution 
)

Sets restitution of a body part

Parameters
[in]_pstBodyPartConcerned body part
[in]_fRestitutionRestitution
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartSelfFlags ( orxBODY_PART _pstBodyPart,
orxU16  _u16SelfFlags 
)

Sets self flags of a body part

Parameters
[in]_pstBodyPartConcerned body part
[in]_u16SelfFlagsSelf flags to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartSolid ( orxBODY_PART _pstBodyPart,
orxBOOL  _bSolid 
)

Sets a body part solid

Parameters
[in]_pstBodyPartConcerned body part
[in]_bSolidSolid or sensor?
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_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.8.11