orx  stable
Portable Game Engine
orxPhysics.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2017 Orx-Project
4  *
5  * This software is provided 'as-is', without any express or implied
6  * warranty. In no event will the authors be held liable for any damages
7  * arising from the use of this software.
8  *
9  * Permission is granted to anyone to use this software for any purpose,
10  * including commercial applications, and to alter it and redistribute it
11  * freely, subject to the following restrictions:
12  *
13  * 1. The origin of this software must not be misrepresented; you must not
14  * claim that you wrote the original software. If you use this software
15  * in a product, an acknowledgment in the product documentation would be
16  * appreciated but is not required.
17  *
18  * 2. Altered source versions must be plainly marked as such, and must not be
19  * misrepresented as being the original software.
20  *
21  * 3. This notice may not be removed or altered from any source
22  * distribution.
23  */
24 
43 #ifndef _orxPHYSICS_H_
44 #define _orxPHYSICS_H_
45 
46 
47 #include "orxInclude.h"
48 #include "plugin/orxPluginCore.h"
49 #include "math/orxAABox.h"
50 
51 
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
108 
109 
112 typedef struct __orxBODY_DEF_t
113 {
115  orxFLOAT fRotation;
116  orxFLOAT fInertia;
117  orxFLOAT fMass;
118  orxFLOAT fLinearDamping;
119  orxFLOAT fAngularDamping;
120  orxU32 u32Flags;
122 } orxBODY_DEF;
123 
126 typedef struct __orxBODY_PART_DEF_t
127 {
129  orxFLOAT fFriction;
130  orxFLOAT fRestitution;
131  orxFLOAT fDensity;
132  orxU16 u16SelfFlags;
133  orxU16 u16CheckMask;
134  orxU32 u32Flags;
136  union
137  {
138  struct
139  {
141  orxFLOAT fRadius;
142  } stSphere;
144  struct
145  {
147  } stAABox;
149  struct
150  {
154  } stMesh;
155 
156  struct
157  {
162  orxBOOL bHasVertex0;
163  orxBOOL bHasVertex3;
165  } stEdge;
166 
167  struct
168  {
172  orxU32 u32VertexCounter;
173  orxBOOL bIsLoop;
174  orxBOOL bHasPrevious;
175  orxBOOL bHasNext;
177  } stChain;
178 
179  };
182 
185 typedef struct __orxBODY_JOINT_DEF_t
186 {
191  orxU32 u32Flags;
193  union
194  {
195  struct
196  {
197  orxFLOAT fDefaultRotation;
198  orxFLOAT fMinRotation;
199  orxFLOAT fMaxRotation;
200  orxFLOAT fMotorSpeed;
201  orxFLOAT fMaxMotorTorque;
203  } stRevolute;
205  struct
206  {
207  orxFLOAT fDefaultRotation;
209  orxFLOAT fMinTranslation;
210  orxFLOAT fMaxTranslation;
211  orxFLOAT fMotorSpeed;
212  orxFLOAT fMaxMotorForce;
214  } stPrismatic;
216  struct
217  {
218  orxFLOAT fLength;
219  orxFLOAT fFrequency;
220  orxFLOAT fDamping;
222  } stSpring;
224  struct
225  {
226  orxFLOAT fLength;
228  } stRope;
230  struct
231  {
232  orxFLOAT fLengthRatio;
235  orxFLOAT fSrcLength;
236  orxFLOAT fMaxSrcLength;
237  orxFLOAT fDstLength;
238  orxFLOAT fMaxDstLength;
240  } stPulley;
242  struct
243  {
244  orxVECTOR vTranslationAxis;
245  orxFLOAT fMinTranslation;
246  orxFLOAT fMaxTranslation;
247  orxFLOAT fMotorSpeed;
248  orxFLOAT fMaxMotorForce;
250  } stSuspension;
252  struct
253  {
254  orxFLOAT fDefaultRotation;
256  } stWeld;
258  struct
259  {
260  orxFLOAT fMaxForce;
261  orxFLOAT fMaxTorque;
263  } stFriction;
265  struct
266  {
267  const orxSTRING zSrcJointName;
268  const orxSTRING zDstJointName;
269  orxFLOAT fJointRatio;
271  } stGear;
273  };
276 
277 
280 typedef enum __orxPHYSICS_EVENT_t
281 {
284 
286 
287  orxPHYSICS_EVENT_NONE = orxENUM_NONE
288 
290 
293 typedef struct __orxPHYSICS_EVENT_PAYLOAD_t
294 {
297  const orxSTRING zSenderPartName;
298  const orxSTRING zRecipientPartName;
301 
304 typedef struct __orxPHYSICS_BODY_t orxPHYSICS_BODY;
305 
308 typedef struct __orxPHYSICS_BODY_PART_t orxPHYSICS_BODY_PART;
309 
312 typedef struct __orxPHYSICS_BODY_JOINT_t orxPHYSICS_BODY_JOINT;
313 
314 
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"
326 
327 
328 /***************************************************************************
329  * Functions directly implemented by orx core
330  ***************************************************************************/
331 
334 extern orxDLLAPI void orxFASTCALL orxPhysics_Setup();
335 
336 
341 extern orxDLLAPI const orxSTRING orxFASTCALL orxPhysics_GetCollisionFlagName(orxU32 _u32Flag);
342 
347 extern orxDLLAPI orxU32 orxFASTCALL orxPhysics_GetCollisionFlagValue(const orxSTRING _zFlag);
348 
349 
350 /***************************************************************************
351  * Functions extended by plugins
352  ***************************************************************************/
353 
357 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_Init();
358 
361 extern orxDLLAPI void orxFASTCALL orxPhysics_Exit();
362 
363 
368 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetGravity(const orxVECTOR *_pvGravity);
369 
374 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetGravity(orxVECTOR *_pvGravity);
375 
376 
382 extern orxDLLAPI orxPHYSICS_BODY *orxFASTCALL orxPhysics_CreateBody(const orxHANDLE _hUserData, const orxBODY_DEF *_pstBodyDef);
383 
387 extern orxDLLAPI void orxFASTCALL orxPhysics_DeleteBody(orxPHYSICS_BODY *_pstBody);
388 
395 extern orxDLLAPI orxPHYSICS_BODY_PART *orxFASTCALL orxPhysics_CreatePart(orxPHYSICS_BODY *_pstBody, const orxHANDLE _hUserData, const orxBODY_PART_DEF *_pstBodyPartDef);
396 
400 extern orxDLLAPI void orxFASTCALL orxPhysics_DeletePart(orxPHYSICS_BODY_PART *_pstBodyPart);
401 
402 
410 extern orxDLLAPI orxPHYSICS_BODY_JOINT *orxFASTCALL orxPhysics_CreateJoint(orxPHYSICS_BODY *_pstSrcBody, orxPHYSICS_BODY *_pstDstBody, const orxHANDLE _hUserData, const orxBODY_JOINT_DEF *_pstBodyJointDef);
411 
415 extern orxDLLAPI void orxFASTCALL orxPhysics_DeleteJoint(orxPHYSICS_BODY_JOINT *_pstBodyJoint);
416 
417 
423 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPosition(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvPosition);
424 
430 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetRotation(orxPHYSICS_BODY *_pstBody, orxFLOAT _fRotation);
431 
437 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetSpeed(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvSpeed);
438 
444 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAngularVelocity(orxPHYSICS_BODY *_pstBody, orxFLOAT _fVelocity);
445 
451 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetCustomGravity(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvCustomGravity);
452 
458 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetFixedRotation(orxPHYSICS_BODY *_pstBody, orxBOOL _bFixed);
459 
465 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetPosition(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvPosition);
466 
471 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetRotation(const orxPHYSICS_BODY *_pstBody);
472 
478 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetSpeed(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvSpeed);
479 
486 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetSpeedAtWorldPosition(const orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvPosition, orxVECTOR *_pvSpeed);
487 
492 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetAngularVelocity(const orxPHYSICS_BODY *_pstBody);
493 
499 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetCustomGravity(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvCustomGravity);
500 
505 extern orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsFixedRotation(const orxPHYSICS_BODY *_pstBody);
506 
511 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetMass(const orxPHYSICS_BODY *_pstBody);
512 
518 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetMassCenter(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvMassCenter);
519 
520 
526 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetLinearDamping(orxPHYSICS_BODY *_pstBody, orxFLOAT _fDamping);
527 
533 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAngularDamping(orxPHYSICS_BODY *_pstBody, orxFLOAT _fDamping);
534 
539 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetLinearDamping(const orxPHYSICS_BODY *_pstBody);
540 
545 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetAngularDamping(const orxPHYSICS_BODY *_pstBody);
546 
547 
553 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyTorque(orxPHYSICS_BODY *_pstBody, orxFLOAT _fTorque);
554 
561 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyForce(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvForce, const orxVECTOR *_pvPoint);
562 
569 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyImpulse(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvImpulse, const orxVECTOR *_pvPoint);
570 
571 
577 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartSelfFlags(orxPHYSICS_BODY_PART *_pstBodyPart, orxU16 _u16SelfFlags);
578 
584 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartCheckMask(orxPHYSICS_BODY_PART *_pstBodyPart, orxU16 _u16CheckMask);
585 
590 extern orxDLLAPI orxU16 orxFASTCALL orxPhysics_GetPartSelfFlags(const orxPHYSICS_BODY_PART *_pstBodyPart);
591 
596 extern orxDLLAPI orxU16 orxFASTCALL orxPhysics_GetPartCheckMask(const orxPHYSICS_BODY_PART *_pstBodyPart);
597 
602 extern orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsPartSolid(const orxPHYSICS_BODY_PART *_pstBodyPart);
603 
609 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartSolid(orxPHYSICS_BODY_PART *_pstBodyPart, orxBOOL _bSolid);
610 
611 
617 extern orxDLLAPI void orxFASTCALL orxPhysics_EnableMotor(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxBOOL _bEnable);
618 
624 extern orxDLLAPI void orxFASTCALL orxPhysics_SetJointMotorSpeed(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxFLOAT _fSpeed);
625 
631 extern orxDLLAPI void orxFASTCALL orxPhysics_SetJointMaxMotorTorque(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxFLOAT _fMaxTorque);
632 
633 
639 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetJointReactionForce(const orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxVECTOR *_pvForce);
640 
645 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetJointReactionTorque(const orxPHYSICS_BODY_JOINT *_pstBodyJoint);
646 
647 
658 extern orxDLLAPI orxHANDLE orxFASTCALL orxPhysics_Raycast(const orxVECTOR *_pvStart, const orxVECTOR *_pvEnd, orxU16 _u16SelfFlags, orxU16 _u16CheckMask, orxBOOL _bEarlyExit, orxVECTOR *_pvContact, orxVECTOR *_pvNormal);
659 
660 
664 extern orxDLLAPI void orxFASTCALL orxPhysics_EnableSimulation(orxBOOL _bEnable);
665 
666 #endif /* _orxPHYSICS_H_ */
667 
orxFLOAT fRotation
Definition: orxPhysics.h:115
orxDLLAPI void orxFASTCALL orxPhysics_SetJointMaxMotorTorque(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxFLOAT _fMaxTorque)
orxVECTOR vNext
Definition: orxPhysics.h:170
orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsFixedRotation(const orxPHYSICS_BODY *_pstBody)
orxFLOAT fJointRatio
Definition: orxPhysics.h:269
orxFLOAT fDstLength
Definition: orxPhysics.h:237
orxFLOAT fInertia
Definition: orxPhysics.h:116
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)
orxFLOAT fMinRotation
Definition: orxPhysics.h:198
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartSolid(orxPHYSICS_BODY_PART *_pstBodyPart, orxBOOL _bSolid)
orxFLOAT fMotorSpeed
Definition: orxPhysics.h:200
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyImpulse(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvImpulse, const orxVECTOR *_pvPoint)
orxVECTOR vPrevious
Definition: orxPhysics.h:169
orxDLLAPI void orxFASTCALL orxPhysics_DeleteJoint(orxPHYSICS_BODY_JOINT *_pstBodyJoint)
orxFLOAT fMaxSrcLength
Definition: orxPhysics.h:236
orxFLOAT fLength
Definition: orxPhysics.h:218
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPosition(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvPosition)
orxDLLAPI orxU16 orxFASTCALL orxPhysics_GetPartSelfFlags(const orxPHYSICS_BODY_PART *_pstBodyPart)
orxFLOAT fLengthRatio
Definition: orxPhysics.h:232
orxU32 u32VertexCounter
Definition: orxPhysics.h:151
orxVECTOR vDstAnchor
Definition: orxPhysics.h:190
orxVECTOR vSrcAnchor
Definition: orxPhysics.h:189
orxVECTOR vScale
Definition: orxPhysics.h:128
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)
orxFLOAT fRestitution
Definition: orxPhysics.h:130
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartCheckMask(orxPHYSICS_BODY_PART *_pstBodyPart, orxU16 _u16CheckMask)
orxVECTOR vPosition
Definition: orxPhysics.h:114
orxFLOAT fSrcLength
Definition: orxPhysics.h:235
orxU32 u32Flags
Definition: orxPhysics.h:120
orxDLLAPI void orxFASTCALL orxPhysics_Exit()
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetGravity(orxVECTOR *_pvGravity)
orxVECTOR vSrcScale
Definition: orxPhysics.h:187
orxVECTOR v2
Definition: orxPhysics.h:160
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetAngularDamping(const orxPHYSICS_BODY *_pstBody)
orxVECTOR v3
Definition: orxPhysics.h:161
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
Definition: orxPhysics.h:308
orxBOOL bHasVertex0
Definition: orxPhysics.h:162
const orxSTRING zSenderPartName
Definition: orxPhysics.h:297
orxPHYSICS_EVENT
Definition: orxPhysics.h:280
orxVECTOR vTranslationAxis
Definition: orxPhysics.h:208
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetSpeed(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvSpeed)
orxVECTOR * avVertices
Definition: orxPhysics.h:171
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
Definition: orxPhysics.h:312
orxFLOAT fLinearDamping
Definition: orxPhysics.h:118
orxBOOL bHasVertex3
Definition: orxPhysics.h:163
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetLinearDamping(const orxPHYSICS_BODY *_pstBody)
orxFLOAT fMinTranslation
Definition: orxPhysics.h:209
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()
orxVECTOR vDstScale
Definition: orxPhysics.h:188
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetFixedRotation(orxPHYSICS_BODY *_pstBody, orxBOOL _bFixed)
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetCustomGravity(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvCustomGravity)
orxDLLAPI orxHANDLE orxFASTCALL orxPhysics_Raycast(const orxVECTOR *_pvStart, const orxVECTOR *_pvEnd, orxU16 _u16SelfFlags, orxU16 _u16CheckMask, orxBOOL _bEarlyExit, orxVECTOR *_pvContact, orxVECTOR *_pvNormal)
orxFLOAT fDensity
Definition: orxPhysics.h:131
orxFLOAT fRadius
Definition: orxPhysics.h:141
orxDLLAPI orxU16 orxFASTCALL orxPhysics_GetPartCheckMask(const orxPHYSICS_BODY_PART *_pstBodyPart)
#define orxBODY_PART_DEF_KU32_MESH_VERTEX_NUMBER
Definition: orxPhysics.h:107
orxFLOAT fMaxMotorTorque
Definition: orxPhysics.h:201
orxBOOL bHasPrevious
Definition: orxPhysics.h:174
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_Init()
orxFLOAT fMaxTorque
Definition: orxPhysics.h:261
orxSTATUS
Definition: orxType.h:243
orxFLOAT fMass
Definition: orxPhysics.h:117
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)
orxFLOAT fMaxMotorForce
Definition: orxPhysics.h:212
orxVECTOR vDstGroundAnchor
Definition: orxPhysics.h:234
orxU16 u16SelfFlags
Definition: orxPhysics.h:132
orxFLOAT fDamping
Definition: orxPhysics.h:220
const orxSTRING zRecipientPartName
Definition: orxPhysics.h:298
orxDLLAPI orxU32 orxFASTCALL orxPhysics_GetCollisionFlagValue(const orxSTRING _zFlag)
const orxSTRING zSrcJointName
Definition: orxPhysics.h:267
orxAABOX stBox
Definition: orxPhysics.h:146
orxFLOAT fFrequency
Definition: orxPhysics.h:219
orxFLOAT fDefaultRotation
Definition: orxPhysics.h:197
#define orxDLLAPI
Definition: orxDecl.h:387
struct __orxPHYSICS_BODY_t orxPHYSICS_BODY
Definition: orxPhysics.h:304
orxFLOAT fMaxDstLength
Definition: orxPhysics.h:238
orxDLLAPI void orxFASTCALL orxPhysics_EnableMotor(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxBOOL _bEnable)
const orxSTRING zDstJointName
Definition: orxPhysics.h:268
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)
orxVECTOR vCenter
Definition: orxPhysics.h:140
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetRotation(const orxPHYSICS_BODY *_pstBody)
orxVECTOR v1
Definition: orxPhysics.h:159
orxU16 u16CheckMask
Definition: orxPhysics.h:133
orxFLOAT fAngularDamping
Definition: orxPhysics.h:119
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetJointReactionTorque(const orxPHYSICS_BODY_JOINT *_pstBodyJoint)
orxVECTOR v0
Definition: orxPhysics.h:158
orxVECTOR vSrcGroundAnchor
Definition: orxPhysics.h:233
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetLinearDamping(orxPHYSICS_BODY *_pstBody, orxFLOAT _fDamping)
orxFLOAT fMaxForce
Definition: orxPhysics.h:260
orxBOOL bHasNext
Definition: orxPhysics.h:175
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)
orxFLOAT fMaxTranslation
Definition: orxPhysics.h:210
orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsPartSolid(const orxPHYSICS_BODY_PART *_pstBodyPart)
orxFLOAT fMaxRotation
Definition: orxPhysics.h:199
orxFLOAT fFriction
Definition: orxPhysics.h:129
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAngularVelocity(orxPHYSICS_BODY *_pstBody, orxFLOAT _fVelocity)

Generated for orx by doxygen 1.5.6