43 #ifndef _orxPHYSICS_H_ 44 #define _orxPHYSICS_H_ 54 #define orxBODY_DEF_KU32_FLAG_NONE 0x00000000 56 #define orxBODY_DEF_KU32_FLAG_2D 0x00000001 57 #define orxBODY_DEF_KU32_FLAG_DYNAMIC 0x00000002 58 #define orxBODY_DEF_KU32_FLAG_HIGH_SPEED 0x00000004 59 #define orxBODY_DEF_KU32_FLAG_FIXED_ROTATION 0x00000008 60 #define orxBODY_DEF_KU32_FLAG_CAN_MOVE 0x00000010 61 #define orxBODY_DEF_KU32_FLAG_ALLOW_SLEEP 0x00000020 63 #define orxBODY_DEF_KU32_MASK_ALL 0xFFFFFFFF 67 #define orxBODY_PART_DEF_KU32_FLAG_NONE 0x00000000 69 #define orxBODY_PART_DEF_KU32_FLAG_SPHERE 0x00000001 70 #define orxBODY_PART_DEF_KU32_FLAG_BOX 0x00000002 71 #define orxBODY_PART_DEF_KU32_FLAG_MESH 0x00000004 72 #define orxBODY_PART_DEF_KU32_FLAG_EDGE 0x00000008 73 #define orxBODY_PART_DEF_KU32_FLAG_CHAIN 0x00000010 75 #define orxBODY_PART_DEF_KU32_MASK_TYPE 0x0000001F 77 #define orxBODY_PART_DEF_KU32_FLAG_SOLID 0x10000000 79 #define orxBODY_PART_DEF_KU32_MASK_ALL 0xFFFFFFFF 83 #define orxBODY_JOINT_DEF_KU32_FLAG_NONE 0x00000000 85 #define orxBODY_JOINT_DEF_KU32_FLAG_REVOLUTE 0x00000001 86 #define orxBODY_JOINT_DEF_KU32_FLAG_PRISMATIC 0x00000002 87 #define orxBODY_JOINT_DEF_KU32_FLAG_SPRING 0x00000004 88 #define orxBODY_JOINT_DEF_KU32_FLAG_ROPE 0x00000008 89 #define orxBODY_JOINT_DEF_KU32_FLAG_PULLEY 0x00000010 90 #define orxBODY_JOINT_DEF_KU32_FLAG_SUSPENSION 0x00000020 91 #define orxBODY_JOINT_DEF_KU32_FLAG_WELD 0x00000040 92 #define orxBODY_JOINT_DEF_KU32_FLAG_FRICTION 0x00000080 93 #define orxBODY_JOINT_DEF_KU32_FLAG_GEAR 0x00000100 95 #define orxBODY_JOINT_DEF_KU32_MASK_TYPE 0x00000FFF 97 #define orxBODY_JOINT_DEF_KU32_FLAG_COLLIDE 0x10000000 98 #define orxBODY_JOINT_DEF_KU32_FLAG_ROTATION_LIMIT 0x20000000 99 #define orxBODY_JOINT_DEF_KU32_FLAG_MOTOR 0x40000000 100 #define orxBODY_JOINT_DEF_KU32_FLAG_TRANSLATION_LIMIT 0x80000000 102 #define orxBODY_JOINT_DEF_KU32_MASK_ALL 0xFFFFFFFF 107 #define orxBODY_PART_DEF_KU32_MESH_VERTEX_NUMBER 8 112 typedef struct __orxBODY_DEF_t
126 typedef struct __orxBODY_PART_DEF_t
171 orxU32 u32VertexCount;
173 orxBOOL bHasPrevious;
184 typedef struct __orxBODY_JOINT_DEF_t
206 orxFLOAT fDefaultRotation;
209 orxFLOAT fMotorSpeed;
245 orxFLOAT fMotorSpeed;
246 orxFLOAT fMaxMotorForce;
252 orxFLOAT fDefaultRotation;
280 typedef enum __orxPHYSICS_EVENT_t
293 typedef struct __orxPHYSICS_EVENT_PAYLOAD_t
317 #define orxPHYSICS_KZ_CONFIG_SECTION "Physics" 318 #define orxPHYSICS_KZ_CONFIG_GRAVITY "Gravity" 319 #define orxPHYSICS_KZ_CONFIG_ALLOW_SLEEP "AllowSleep" 320 #define orxPHYSICS_KZ_CONFIG_ITERATIONS "IterationsPerStep" 321 #define orxPHYSICS_KZ_CONFIG_RATIO "DimensionRatio" 322 #define orxPHYSICS_KZ_CONFIG_STEP_FREQUENCY "StepFrequency" 323 #define orxPHYSICS_KZ_CONFIG_SHOW_DEBUG "ShowDebug" 324 #define orxPHYSICS_KZ_CONFIG_COLLISION_FLAG_LIST "CollisionFlagList" 325 #define orxPHYSICS_KZ_CONFIG_INTERPOLATE "Interpolate"
orxDLLAPI void orxFASTCALL orxPhysics_SetJointMaxMotorTorque(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxFLOAT _fMaxTorque)
orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsFixedRotation(const orxPHYSICS_BODY *_pstBody)
orxDLLAPI void orxFASTCALL orxPhysics_EnableSimulation(orxBOOL _bEnable)
orxDLLAPI orxPHYSICS_BODY_JOINT *orxFASTCALL orxPhysics_CreateJoint(orxPHYSICS_BODY *_pstSrcBody, orxPHYSICS_BODY *_pstDstBody, const orxHANDLE _hUserData, const orxBODY_JOINT_DEF *_pstBodyJointDef)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetRotation(orxPHYSICS_BODY *_pstBody, orxFLOAT _fRotation)
orxDLLAPI orxHANDLE orxFASTCALL orxPhysics_Raycast(const orxVECTOR *_pvBegin, const orxVECTOR *_pvEnd, orxU16 _u16SelfFlags, orxU16 _u16CheckMask, orxBOOL _bEarlyExit, orxVECTOR *_pvContact, orxVECTOR *_pvNormal)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartSolid(orxPHYSICS_BODY_PART *_pstBodyPart, orxBOOL _bSolid)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyImpulse(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvImpulse, const orxVECTOR *_pvPoint)
orxDLLAPI void orxFASTCALL orxPhysics_DeleteJoint(orxPHYSICS_BODY_JOINT *_pstBodyJoint)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPosition(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvPosition)
orxDLLAPI orxU16 orxFASTCALL orxPhysics_GetPartSelfFlags(const orxPHYSICS_BODY_PART *_pstBodyPart)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartSelfFlags(orxPHYSICS_BODY_PART *_pstBodyPart, orxU16 _u16SelfFlags)
orxDLLAPI void orxFASTCALL orxPhysics_SetJointMotorSpeed(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxFLOAT _fSpeed)
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetJointReactionForce(const orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxVECTOR *_pvForce)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartCheckMask(orxPHYSICS_BODY_PART *_pstBodyPart, orxU16 _u16CheckMask)
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetPartDensity(const orxPHYSICS_BODY_PART *_pstBodyPart)
orxDLLAPI void orxFASTCALL orxPhysics_Exit()
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetPartFriction(const orxPHYSICS_BODY_PART *_pstBodyPart)
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetGravity(orxVECTOR *_pvGravity)
orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsInsidePart(const orxPHYSICS_BODY_PART *_pstBodyPart, const orxVECTOR *_pvPosition)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAllowMoving(orxPHYSICS_BODY *_pstBody, orxBOOL _bAllowMoving)
struct __orxBODY_PART_t * pstRecipientPart
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetAngularDamping(const orxPHYSICS_BODY *_pstBody)
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetPosition(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvPosition)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAngularDamping(orxPHYSICS_BODY *_pstBody, orxFLOAT _fDamping)
struct __orxPHYSICS_BODY_PART_t orxPHYSICS_BODY_PART
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartDensity(orxPHYSICS_BODY_PART *_pstBodyPart, orxFLOAT _fDensity)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartRestitution(orxPHYSICS_BODY_PART *_pstBodyPart, orxFLOAT _fRestitution)
orxVECTOR vTranslationAxis
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetSpeed(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvSpeed)
orxDLLAPI orxPHYSICS_BODY_PART *orxFASTCALL orxPhysics_CreatePart(orxPHYSICS_BODY *_pstBody, const orxHANDLE _hUserData, const orxBODY_PART_DEF *_pstBodyPartDef)
struct __orxPHYSICS_BODY_JOINT_t orxPHYSICS_BODY_JOINT
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetDynamic(orxPHYSICS_BODY *_pstBody, orxBOOL _bDynamic)
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetLinearDamping(const orxPHYSICS_BODY *_pstBody)
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetMassCenter(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvMassCenter)
orxDLLAPI void orxFASTCALL orxPhysics_DeletePart(orxPHYSICS_BODY_PART *_pstBodyPart)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetGravity(const orxVECTOR *_pvGravity)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetCustomGravity(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvCustomGravity)
orxDLLAPI void orxFASTCALL orxPhysics_Setup()
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetFixedRotation(orxPHYSICS_BODY *_pstBody, orxBOOL _bFixed)
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetCustomGravity(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvCustomGravity)
orxDLLAPI orxU16 orxFASTCALL orxPhysics_GetPartCheckMask(const orxPHYSICS_BODY_PART *_pstBodyPart)
#define orxBODY_PART_DEF_KU32_MESH_VERTEX_NUMBER
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_Init()
orxDLLAPI orxU32 orxFASTCALL orxPhysics_BoxPick(const orxAABOX *_pstBox, orxU16 _u16SelfFlags, orxU16 _u16CheckMask, orxHANDLE _ahUserDataList[], orxU32 _u32Number)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartFriction(orxPHYSICS_BODY_PART *_pstBodyPart, orxFLOAT _fFriction)
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetPartRestitution(const orxPHYSICS_BODY_PART *_pstBodyPart)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyForce(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvForce, const orxVECTOR *_pvPoint)
orxDLLAPI orxPHYSICS_BODY *orxFASTCALL orxPhysics_CreateBody(const orxHANDLE _hUserData, const orxBODY_DEF *_pstBodyDef)
orxVECTOR vDstGroundAnchor
orxDLLAPI orxU32 orxFASTCALL orxPhysics_GetCollisionFlagValue(const orxSTRING _zFlag)
const orxSTRING zSrcJointName
orxFLOAT fDefaultRotation
struct __orxPHYSICS_BODY_t orxPHYSICS_BODY
struct __orxBODY_PART_t * pstSenderPart
orxDLLAPI void orxFASTCALL orxPhysics_EnableMotor(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxBOOL _bEnable)
const orxSTRING zDstJointName
orxDLLAPI void orxFASTCALL orxPhysics_DeleteBody(orxPHYSICS_BODY *_pstBody)
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetMass(const orxPHYSICS_BODY *_pstBody)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyTorque(orxPHYSICS_BODY *_pstBody, orxFLOAT _fTorque)
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetRotation(const orxPHYSICS_BODY *_pstBody)
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetJointReactionTorque(const orxPHYSICS_BODY_JOINT *_pstBodyJoint)
orxVECTOR vSrcGroundAnchor
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetLinearDamping(orxPHYSICS_BODY *_pstBody, orxFLOAT _fDamping)
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetSpeedAtWorldPosition(const orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvPosition, orxVECTOR *_pvSpeed)
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetAngularVelocity(const orxPHYSICS_BODY *_pstBody)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetSpeed(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvSpeed)
orxDLLAPI const orxSTRING orxFASTCALL orxPhysics_GetCollisionFlagName(orxU32 _u32Flag)
orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsPartSolid(const orxPHYSICS_BODY_PART *_pstBodyPart)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAngularVelocity(orxPHYSICS_BODY *_pstBody, orxFLOAT _fVelocity)