orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
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

◆ orxBODY

typedef struct __orxBODY_t orxBODY

Internal Body structure

Definition at line 57 of file orxBody.h.

◆ orxBODY_JOINT

typedef struct __orxBODY_JOINT_t orxBODY_JOINT

Internal Body joint structure

Definition at line 65 of file orxBody.h.

◆ orxBODY_PART

typedef struct __orxBODY_PART_t orxBODY_PART

Internal Body part structure

Definition at line 61 of file orxBody.h.

Function Documentation

◆ orxBody_AddJoint()

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

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

◆ orxBody_AddJointFromConfig()

orxDLLAPI orxBODY_JOINT *orxFASTCALL orxBody_AddJointFromConfig ( orxBODY * _pstSrcBody,
orxBODY * _pstDstBody,
const orxSTRING _zConfigID )
extern

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

◆ orxBody_AddPart()

orxDLLAPI orxBODY_PART *orxFASTCALL orxBody_AddPart ( orxBODY * _pstBody,
const orxBODY_PART_DEF * _pstBodyPartDef )
extern

Adds a part to body

Parameters
[in]_pstBodyConcerned body
[in]_pstBodyPartDefBody part definition
Returns
orxBODY_PART / orxNULL

◆ orxBody_AddPartFromConfig()

orxDLLAPI orxBODY_PART *orxFASTCALL orxBody_AddPartFromConfig ( orxBODY * _pstBody,
const orxSTRING _zConfigID )
extern

Adds a part to body from config

Parameters
[in]_pstBodyConcerned body
[in]_zConfigIDBody part config ID
Returns
orxBODY_PART / orxNULL

◆ orxBody_ApplyForce()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_ApplyForce ( orxBODY * _pstBody,
const orxVECTOR * _pvForce,
const orxVECTOR * _pvPoint )
extern

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

◆ orxBody_ApplyImpulse()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_ApplyImpulse ( orxBODY * _pstBody,
const orxVECTOR * _pvImpulse,
const orxVECTOR * _pvPoint )
extern

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

◆ orxBody_ApplyTorque()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_ApplyTorque ( orxBODY * _pstBody,
orxFLOAT _fTorque )
extern

Applies a torque

Parameters
[in]_pstBodyConcerned body
[in]_fTorqueTorque to apply
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_BoxPick()

orxDLLAPI orxU32 orxFASTCALL orxBody_BoxPick ( const orxAABOX * _pstBox,
orxU16 _u16SelfFlags,
orxU16 _u16CheckMask,
orxBODY * _apstBodyList[],
orxU32 _u32Number )
extern

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.

◆ orxBody_Create()

orxDLLAPI orxBODY *orxFASTCALL orxBody_Create ( const orxSTRUCTURE * _pstOwner,
const orxBODY_DEF * _pstBodyDef )
extern

Creates an empty body

Parameters
[in]_pstOwnerBody's owner used for collision callbacks (usually an orxOBJECT)
[in]_pstBodyDefBody definition
Returns
Created orxGRAPHIC / orxNULL

◆ orxBody_CreateFromConfig()

orxDLLAPI orxBODY *orxFASTCALL orxBody_CreateFromConfig ( const orxSTRUCTURE * _pstOwner,
const orxSTRING _zConfigID )
extern

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

◆ orxBody_Delete()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_Delete ( orxBODY * _pstBody)
extern

Deletes a body

Parameters
[in]_pstBodyConcerned body
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_EnableMotor()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_EnableMotor ( orxBODY_JOINT * _pstBodyJoint,
orxBOOL _bEnable )
extern

Enables a (revolute) body joint motor

Parameters
[in]_pstBodyJointConcerned body joint
[in]_bEnableEnable / Disable
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_Exit()

orxDLLAPI void orxFASTCALL orxBody_Exit ( )
extern

Exits from the Body module

◆ orxBody_GetAllowMoving()

orxDLLAPI orxBOOL orxFASTCALL orxBody_GetAllowMoving ( const orxBODY * _pstBody)
extern

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

Parameters
[in]_pstBodyConcerned physical body
Returns
orxTRUE / orxFALSE

◆ orxBody_GetAngularDamping()

orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetAngularDamping ( const orxBODY * _pstBody)
extern

Gets a body angular damping

Parameters
[in]_pstBodyConcerned body
Returns
Body's angular damping

◆ orxBody_GetAngularVelocity()

orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetAngularVelocity ( const orxBODY * _pstBody)
extern

Gets a body angular velocity

Parameters
[in]_pstBodyConcerned body
Returns
Body angular velocity (radians/seconds)

◆ orxBody_GetCustomGravity()

orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetCustomGravity ( const orxBODY * _pstBody,
orxVECTOR * _pvCustomGravity )
extern

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

◆ orxBody_GetDefFlags()

orxDLLAPI orxU32 orxFASTCALL orxBody_GetDefFlags ( const orxBODY * _pstBody,
orxU32 _u32Mask )
extern

Gets body definition flags

Parameters
[in]_pstBodyConcerned body
[in]_u32MaskMask to use for getting flags
Returns
orxU32

◆ orxBody_GetJointName()

orxDLLAPI const orxSTRING orxFASTCALL orxBody_GetJointName ( const orxBODY_JOINT * _pstBodyJoint)
extern

Gets a body joint name

Parameters
[in]_pstBodyJointConcerned body joint
Returns
orxSTRING / orxNULL

◆ orxBody_GetJointReactionForce()

orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetJointReactionForce ( const orxBODY_JOINT * _pstBodyJoint,
orxVECTOR * _pvForce )
extern

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

◆ orxBody_GetJointReactionTorque()

orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetJointReactionTorque ( const orxBODY_JOINT * _pstBodyJoint)
extern

Gets the reaction torque on the attached body

Parameters
[in]_pstBodyJointConcerned body joint
Returns
Reaction torque

◆ orxBody_GetLinearDamping()

orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetLinearDamping ( const orxBODY * _pstBody)
extern

Gets a body linear damping

Parameters
[in]_pstBodyConcerned body
Returns
Body's linear damping

◆ orxBody_GetMass()

orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetMass ( const orxBODY * _pstBody)
extern

Gets a body mass

Parameters
[in]_pstBodyConcerned body
Returns
Body mass

◆ orxBody_GetMassCenter()

orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetMassCenter ( const orxBODY * _pstBody,
orxVECTOR * _pvMassCenter )
extern

Gets a body center of mass (object space)

Parameters
[in]_pstBodyConcerned body
[out]_pvMassCenterMass center to get
Returns
Mass center / orxNULL

◆ orxBody_GetName()

orxDLLAPI const orxSTRING orxFASTCALL orxBody_GetName ( const orxBODY * _pstBody)
extern

Gets body config name

Parameters
[in]_pstBodyConcerned body
Returns
orxSTRING / orxSTRING_EMPTY

◆ orxBody_GetNextJoint()

orxDLLAPI orxBODY_JOINT *orxFASTCALL orxBody_GetNextJoint ( const orxBODY * _pstBody,
const orxBODY_JOINT * _pstBodyJoint )
extern

Gets next body joint

Parameters
[in]_pstBodyConcerned body
[in]_pstBodyJointCurrent body joint (orxNULL to get the first one)
Returns
orxBODY_JOINT / orxNULL

◆ orxBody_GetNextPart()

orxDLLAPI orxBODY_PART *orxFASTCALL orxBody_GetNextPart ( const orxBODY * _pstBody,
const orxBODY_PART * _pstBodyPart )
extern

Gets next body part

Parameters
[in]_pstBodyConcerned body
[in]_pstBodyPartCurrent body part (orxNULL to get the first one)
Returns
orxBODY_PART / orxNULL

◆ orxBody_GetPartBody()

orxDLLAPI orxBODY *orxFASTCALL orxBody_GetPartBody ( const orxBODY_PART * _pstBodyPart)
extern

Gets a body part body (ie. owner)

Parameters
[in]_pstBodyPartConcerned body part
Returns
orxBODY / orxNULL

◆ orxBody_GetPartCheckMask()

orxDLLAPI orxU16 orxFASTCALL orxBody_GetPartCheckMask ( const orxBODY_PART * _pstBodyPart)
extern

Gets check mask of a body part

Parameters
[in]_pstBodyPartConcerned body part
Returns
Check mask of the body part

◆ orxBody_GetPartDef()

orxDLLAPI const orxBODY_PART_DEF *orxFASTCALL orxBody_GetPartDef ( const orxBODY_PART * _pstBodyPart)
extern

Gets a body part definition (matching current part status)

Parameters
[in]_pstBodyPartConcerned body part
Returns
orxBODY_PART_DEF / orxNULL

◆ orxBody_GetPartDensity()

orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetPartDensity ( const orxBODY_PART * _pstBodyPart)
extern

Gets density of a body part

Parameters
[in]_pstBodyPartConcerned body part
Returns
Density

◆ orxBody_GetPartFriction()

orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetPartFriction ( const orxBODY_PART * _pstBodyPart)
extern

Gets friction of a body part

Parameters
[in]_pstBodyPartConcerned body part
Returns
Friction

◆ orxBody_GetPartName()

orxDLLAPI const orxSTRING orxFASTCALL orxBody_GetPartName ( const orxBODY_PART * _pstBodyPart)
extern

Gets a body part name

Parameters
[in]_pstBodyPartConcerned body part
Returns
orxSTRING / orxNULL

◆ orxBody_GetPartRestitution()

orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetPartRestitution ( const orxBODY_PART * _pstBodyPart)
extern

Gets restitution of a body part

Parameters
[in]_pstBodyPartConcerned body part
Returns
Restitution

◆ orxBody_GetPartSelfFlags()

orxDLLAPI orxU16 orxFASTCALL orxBody_GetPartSelfFlags ( const orxBODY_PART * _pstBodyPart)
extern

Gets self flags of a body part

Parameters
[in]_pstBodyPartConcerned body part
Returns
Self flags of the body part

◆ orxBody_GetPosition()

orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetPosition ( const orxBODY * _pstBody,
orxVECTOR * _pvPosition )
extern

Gets a body position

Parameters
[in]_pstBodyConcerned body
[out]_pvPositionPosition to get
Returns
Body position / orxNULL

◆ orxBody_GetRotation()

orxDLLAPI orxFLOAT orxFASTCALL orxBody_GetRotation ( const orxBODY * _pstBody)
extern

Gets a body rotation

Parameters
[in]_pstBodyConcerned body
Returns
Body rotation (radians)

◆ orxBody_GetSpeed()

orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetSpeed ( const orxBODY * _pstBody,
orxVECTOR * _pvSpeed )
extern

Gets a body speed

Parameters
[in]_pstBodyConcerned body
[out]_pvSpeedSpeed to get
Returns
Body speed / orxNULL

◆ orxBody_GetSpeedAtWorldPosition()

orxDLLAPI orxVECTOR *orxFASTCALL orxBody_GetSpeedAtWorldPosition ( const orxBODY * _pstBody,
const orxVECTOR * _pvPosition,
orxVECTOR * _pvSpeed )
extern

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

◆ orxBody_Init()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_Init ( )
extern

Inits the Body module

◆ orxBody_IsDynamic()

orxDLLAPI orxBOOL orxFASTCALL orxBody_IsDynamic ( const orxBODY * _pstBody)
extern

Gets the dynamic property of a body

Parameters
[in]_pstBodyConcerned physical body
Returns
orxTRUE / orxFALSE

◆ orxBody_IsFixedRotation()

orxDLLAPI orxBOOL orxFASTCALL orxBody_IsFixedRotation ( const orxBODY * _pstBody)
extern

Is a body using a fixed rotation

Parameters
[in]_pstBodyConcerned body
Returns
orxTRUE if fixed rotation, orxFALSE otherwise

◆ orxBody_IsInside()

orxDLLAPI orxBOOL orxFASTCALL orxBody_IsInside ( const orxBODY * _pstBody,
const orxVECTOR * _pvPosition )
extern

Is point inside body? (Using world coordinates)

Parameters
[in]_pstBodyConcerned physical body
[in]_pvPositionPosition to test (world coordinates)
Returns
orxTRUE / orxFALSE

◆ orxBody_IsInsidePart()

orxDLLAPI orxBOOL orxFASTCALL orxBody_IsInsidePart ( const orxBODY_PART * _pstBodyPart,
const orxVECTOR * _pvPosition )
extern

Is point inside part? (Using world coordinates)

Parameters
[in]_pstBodyPartConcerned physical body part
[in]_pvPositionPosition to test (world coordinates)
Returns
orxTRUE / orxFALSE

◆ orxBody_IsPartSolid()

orxDLLAPI orxBOOL orxFASTCALL orxBody_IsPartSolid ( const orxBODY_PART * _pstBodyPart)
extern

Is a body part solid?

Parameters
[in]_pstBodyPartConcerned body part
Returns
orxTRUE / orxFALSE

◆ orxBody_Raycast()

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

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

◆ orxBody_RemoveJoint()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_RemoveJoint ( orxBODY_JOINT * _pstBodyJoint)
extern

Removes a body joint

Parameters
[in]_pstBodyJointConcerned body joint
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_RemovePart()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_RemovePart ( orxBODY_PART * _pstBodyPart)
extern

Removes a body part

Parameters
[in]_pstBodyPartConcerned body part
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_RemovePartFromConfig()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_RemovePartFromConfig ( orxBODY * _pstBody,
const orxSTRING _zConfigID )
extern

Removes a part using its config ID

Parameters
[in]_pstBodyConcerned body
[in]_zConfigIDConfig ID of the part to remove
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetAllowMoving()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetAllowMoving ( orxBODY * _pstBody,
orxBOOL _bAllowMoving )
extern

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

◆ orxBody_SetAngularDamping()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetAngularDamping ( orxBODY * _pstBody,
orxFLOAT _fDamping )
extern

Sets a body angular damping

Parameters
[in]_pstBodyConcerned body
[in]_fDampingAngular damping to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetAngularVelocity()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetAngularVelocity ( orxBODY * _pstBody,
orxFLOAT _fVelocity )
extern

Sets a body angular velocity

Parameters
[in]_pstBodyConcerned body
[in]_fVelocityAngular velocity to set (radians/seconds)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetCustomGravity()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetCustomGravity ( orxBODY * _pstBody,
const orxVECTOR * _pvCustomGravity )
extern

Sets a body custom gravity

Parameters
[in]_pstBodyConcerned body
[in]_pvCustomGravityCustom gravity to set / orxNULL to remove it
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetDynamic()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetDynamic ( orxBODY * _pstBody,
orxBOOL _bDynamic )
extern

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

◆ orxBody_SetFixedRotation()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetFixedRotation ( orxBODY * _pstBody,
orxBOOL _bFixed )
extern

Sets a body fixed rotation

Parameters
[in]_pstBodyConcerned body
[in]_bFixedFixed / not fixed
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetJointMaxMotorTorque()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetJointMaxMotorTorque ( orxBODY_JOINT * _pstBodyJoint,
orxFLOAT _fMaxTorque )
extern

Sets a (revolute) body joint maximum motor torque

Parameters
[in]_pstBodyJointConcerned body joint
[in]_fMaxTorqueMaximum motor torque
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetJointMotorSpeed()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetJointMotorSpeed ( orxBODY_JOINT * _pstBodyJoint,
orxFLOAT _fSpeed )
extern

Sets a (revolute) body joint motor speed

Parameters
[in]_pstBodyJointConcerned body joint
[in]_fSpeedSpeed
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetLinearDamping()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetLinearDamping ( orxBODY * _pstBody,
orxFLOAT _fDamping )
extern

Sets a body linear damping

Parameters
[in]_pstBodyConcerned body
[in]_fDampingLinear damping to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetPartCheckMask()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartCheckMask ( orxBODY_PART * _pstBodyPart,
orxU16 _u16CheckMask )
extern

Sets check mask of a body part

Parameters
[in]_pstBodyPartConcerned body part
[in]_u16CheckMaskCheck mask to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetPartDensity()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartDensity ( orxBODY_PART * _pstBodyPart,
orxFLOAT _fDensity )
extern

Sets density of a body part

Parameters
[in]_pstBodyPartConcerned body part
[in]_fDensityDensity
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetPartFriction()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartFriction ( orxBODY_PART * _pstBodyPart,
orxFLOAT _fFriction )
extern

Sets friction of a body part

Parameters
[in]_pstBodyPartConcerned body part
[in]_fFrictionFriction
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetPartRestitution()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartRestitution ( orxBODY_PART * _pstBodyPart,
orxFLOAT _fRestitution )
extern

Sets restitution of a body part

Parameters
[in]_pstBodyPartConcerned body part
[in]_fRestitutionRestitution
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetPartSelfFlags()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartSelfFlags ( orxBODY_PART * _pstBodyPart,
orxU16 _u16SelfFlags )
extern

Sets self flags of a body part

Parameters
[in]_pstBodyPartConcerned body part
[in]_u16SelfFlagsSelf flags to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetPartSolid()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPartSolid ( orxBODY_PART * _pstBodyPart,
orxBOOL _bSolid )
extern

Sets a body part solid

Parameters
[in]_pstBodyPartConcerned body part
[in]_bSolidSolid or sensor?
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetPosition()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetPosition ( orxBODY * _pstBody,
const orxVECTOR * _pvPosition )
extern

Sets a body position

Parameters
[in]_pstBodyConcerned body
[in]_pvPositionPosition to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetRotation()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetRotation ( orxBODY * _pstBody,
orxFLOAT _fRotation )
extern

Sets a body rotation

Parameters
[in]_pstBodyConcerned body
[in]_fRotationRotation to set (radians)
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetScale()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetScale ( orxBODY * _pstBody,
const orxVECTOR * _pvScale )
extern

Sets a body scale

Parameters
[in]_pstBodyConcerned body
[in]_pvScaleScale to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_SetSpeed()

orxDLLAPI orxSTATUS orxFASTCALL orxBody_SetSpeed ( orxBODY * _pstBody,
const orxVECTOR * _pvSpeed )
extern

Sets a body speed

Parameters
[in]_pstBodyConcerned body
[in]_pvSpeedSpeed to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxBody_Setup()

orxDLLAPI void orxFASTCALL orxBody_Setup ( )
extern

Body module setup

◆ orxBody_TestAllDefFlags()

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

Tests all flags against body definition ones

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

◆ orxBody_TestDefFlags()

orxDLLAPI orxBOOL orxFASTCALL orxBody_TestDefFlags ( const orxBODY * _pstBody,
orxU32 _u32Flags )
extern

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