orx  1.11
Portable Game Engine
orxPhysics.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2020 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  {
151  orxU32 u32VertexCount;
154  } stMesh;
155 
156  struct
157  {
158  orxVECTOR avVertices[2];
161  orxBOOL bHasPrevious;
162  orxBOOL bHasNext;
164  } stEdge;
165 
166  struct
167  {
168  orxVECTOR vPrevious;
169  orxVECTOR vNext;
171  orxU32 u32VertexCount;
172  orxBOOL bIsLoop;
173  orxBOOL bHasPrevious;
174  orxBOOL bHasNext;
176  } stChain;
177 
178  };
181 
184 typedef struct __orxBODY_JOINT_DEF_t
185 {
191  union
192  {
193  struct
194  {
195  orxFLOAT fDefaultRotation;
196  orxFLOAT fMinRotation;
197  orxFLOAT fMaxRotation;
198  orxFLOAT fMotorSpeed;
199  orxFLOAT fMaxMotorTorque;
201  } stRevolute;
203  struct
204  {
206  orxFLOAT fDefaultRotation;
207  orxFLOAT fMinTranslation;
208  orxFLOAT fMaxTranslation;
209  orxFLOAT fMotorSpeed;
210  orxFLOAT fMaxMotorForce;
212  } stPrismatic;
214  struct
215  {
216  orxFLOAT fLength;
217  orxFLOAT fFrequency;
218  orxFLOAT fDamping;
220  } stSpring;
222  struct
223  {
224  orxFLOAT fLength;
226  } stRope;
228  struct
229  {
232  orxFLOAT fLengthRatio;
233  orxFLOAT fSrcLength;
234  orxFLOAT fMaxSrcLength;
235  orxFLOAT fDstLength;
236  orxFLOAT fMaxDstLength;
238  } stPulley;
240  struct
241  {
242  orxVECTOR vTranslationAxis;
243  orxFLOAT fFrequency;
244  orxFLOAT fDamping;
245  orxFLOAT fMotorSpeed;
246  orxFLOAT fMaxMotorForce;
248  } stSuspension;
250  struct
251  {
252  orxFLOAT fDefaultRotation;
254  } stWeld;
256  struct
257  {
258  orxFLOAT fMaxForce;
259  orxFLOAT fMaxTorque;
261  } stFriction;
263  struct
264  {
265  const orxSTRING zSrcJointName;
266  const orxSTRING zDstJointName;
267  orxFLOAT fJointRatio;
269  } stGear;
271  };
273  orxU32 u32Flags;
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 orxSTATUS orxFASTCALL orxPhysics_SetDynamic(orxPHYSICS_BODY *_pstBody, orxBOOL _bDynamic);
466 
472 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAllowMoving(orxPHYSICS_BODY *_pstBody, orxBOOL _bAllowMoving);
473 
479 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetPosition(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvPosition);
480 
485 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetRotation(const orxPHYSICS_BODY *_pstBody);
486 
492 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetSpeed(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvSpeed);
493 
500 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetSpeedAtWorldPosition(const orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvPosition, orxVECTOR *_pvSpeed);
501 
506 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetAngularVelocity(const orxPHYSICS_BODY *_pstBody);
507 
513 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetCustomGravity(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvCustomGravity);
514 
519 extern orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsFixedRotation(const orxPHYSICS_BODY *_pstBody);
520 
525 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetMass(const orxPHYSICS_BODY *_pstBody);
526 
532 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetMassCenter(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvMassCenter);
533 
534 
540 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetLinearDamping(orxPHYSICS_BODY *_pstBody, orxFLOAT _fDamping);
541 
547 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAngularDamping(orxPHYSICS_BODY *_pstBody, orxFLOAT _fDamping);
548 
553 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetLinearDamping(const orxPHYSICS_BODY *_pstBody);
554 
559 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetAngularDamping(const orxPHYSICS_BODY *_pstBody);
560 
561 
567 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyTorque(orxPHYSICS_BODY *_pstBody, orxFLOAT _fTorque);
568 
575 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyForce(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvForce, const orxVECTOR *_pvPoint);
576 
583 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyImpulse(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvImpulse, const orxVECTOR *_pvPoint);
584 
585 
591 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartSelfFlags(orxPHYSICS_BODY_PART *_pstBodyPart, orxU16 _u16SelfFlags);
592 
598 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartCheckMask(orxPHYSICS_BODY_PART *_pstBodyPart, orxU16 _u16CheckMask);
599 
604 extern orxDLLAPI orxU16 orxFASTCALL orxPhysics_GetPartSelfFlags(const orxPHYSICS_BODY_PART *_pstBodyPart);
605 
610 extern orxDLLAPI orxU16 orxFASTCALL orxPhysics_GetPartCheckMask(const orxPHYSICS_BODY_PART *_pstBodyPart);
611 
617 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartSolid(orxPHYSICS_BODY_PART *_pstBodyPart, orxBOOL _bSolid);
618 
623 extern orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsPartSolid(const orxPHYSICS_BODY_PART *_pstBodyPart);
624 
630 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartFriction(orxPHYSICS_BODY_PART *_pstBodyPart, orxFLOAT _fFriction);
631 
636 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetPartFriction(const orxPHYSICS_BODY_PART *_pstBodyPart);
637 
643 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartRestitution(orxPHYSICS_BODY_PART *_pstBodyPart, orxFLOAT _fRestitution);
644 
649 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetPartRestitution(const orxPHYSICS_BODY_PART *_pstBodyPart);
650 
656 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartDensity(orxPHYSICS_BODY_PART *_pstBodyPart, orxFLOAT _fDensity);
657 
662 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetPartDensity(const orxPHYSICS_BODY_PART *_pstBodyPart);
663 
669 extern orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsInsidePart(const orxPHYSICS_BODY_PART *_pstBodyPart, const orxVECTOR *_pvPosition);
670 
671 
677 extern orxDLLAPI void orxFASTCALL orxPhysics_EnableMotor(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxBOOL _bEnable);
678 
684 extern orxDLLAPI void orxFASTCALL orxPhysics_SetJointMotorSpeed(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxFLOAT _fSpeed);
685 
691 extern orxDLLAPI void orxFASTCALL orxPhysics_SetJointMaxMotorTorque(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxFLOAT _fMaxTorque);
692 
693 
699 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetJointReactionForce(const orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxVECTOR *_pvForce);
700 
705 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetJointReactionTorque(const orxPHYSICS_BODY_JOINT *_pstBodyJoint);
706 
707 
718 extern orxDLLAPI orxHANDLE orxFASTCALL orxPhysics_Raycast(const orxVECTOR *_pvBegin, const orxVECTOR *_pvEnd, orxU16 _u16SelfFlags, orxU16 _u16CheckMask, orxBOOL _bEarlyExit, orxVECTOR *_pvContact, orxVECTOR *_pvNormal);
719 
720 
729 extern orxDLLAPI orxU32 orxFASTCALL orxPhysics_BoxPick(const orxAABOX *_pstBox, orxU16 _u16SelfFlags, orxU16 _u16CheckMask, orxHANDLE _ahUserDataList[], orxU32 _u32Number);
730 
731 
735 extern orxDLLAPI void orxFASTCALL orxPhysics_EnableSimulation(orxBOOL _bEnable);
736 
737 #endif /* _orxPHYSICS_H_ */
738 
orxFLOAT fRotation
Definition: orxPhysics.h:115
orxDLLAPI void orxFASTCALL orxPhysics_SetJointMaxMotorTorque(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxFLOAT _fMaxTorque)
orxVECTOR vNext
Definition: orxPhysics.h:160
orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsFixedRotation(const orxPHYSICS_BODY *_pstBody)
orxFLOAT fJointRatio
Definition: orxPhysics.h:267
orxFLOAT fDstLength
Definition: orxPhysics.h:235
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)
orxDLLAPI orxHANDLE orxFASTCALL orxPhysics_Raycast(const orxVECTOR *_pvBegin, const orxVECTOR *_pvEnd, orxU16 _u16SelfFlags, orxU16 _u16CheckMask, orxBOOL _bEarlyExit, orxVECTOR *_pvContact, orxVECTOR *_pvNormal)
orxFLOAT fMinRotation
Definition: orxPhysics.h:196
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartSolid(orxPHYSICS_BODY_PART *_pstBodyPart, orxBOOL _bSolid)
orxFLOAT fMotorSpeed
Definition: orxPhysics.h:198
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyImpulse(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvImpulse, const orxVECTOR *_pvPoint)
orxVECTOR vPrevious
Definition: orxPhysics.h:159
orxDLLAPI void orxFASTCALL orxPhysics_DeleteJoint(orxPHYSICS_BODY_JOINT *_pstBodyJoint)
orxFLOAT fMaxSrcLength
Definition: orxPhysics.h:234
orxFLOAT fLength
Definition: orxPhysics.h:216
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
orxVECTOR vDstAnchor
Definition: orxPhysics.h:189
orxVECTOR vSrcAnchor
Definition: orxPhysics.h:188
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:233
orxU32 u32Flags
Definition: orxPhysics.h:120
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)
orxVECTOR vSrcScale
Definition: orxPhysics.h:186
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
Definition: orxPhysics.h:308
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartDensity(orxPHYSICS_BODY_PART *_pstBodyPart, orxFLOAT _fDensity)
const orxSTRING zSenderPartName
Definition: orxPhysics.h:297
orxPHYSICS_EVENT
Definition: orxPhysics.h:280
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartRestitution(orxPHYSICS_BODY_PART *_pstBodyPart, orxFLOAT _fRestitution)
orxVECTOR vTranslationAxis
Definition: orxPhysics.h:205
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetSpeed(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvSpeed)
orxVECTOR * avVertices
Definition: orxPhysics.h:170
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
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetDynamic(orxPHYSICS_BODY *_pstBody, orxBOOL _bDynamic)
orxFLOAT fLinearDamping
Definition: orxPhysics.h:118
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetLinearDamping(const orxPHYSICS_BODY *_pstBody)
orxFLOAT fMinTranslation
Definition: orxPhysics.h:207
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:187
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetFixedRotation(orxPHYSICS_BODY *_pstBody, orxBOOL _bFixed)
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetCustomGravity(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvCustomGravity)
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:199
orxBOOL bHasPrevious
Definition: orxPhysics.h:161
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_Init()
orxDLLAPI orxU32 orxFASTCALL orxPhysics_BoxPick(const orxAABOX *_pstBox, orxU16 _u16SelfFlags, orxU16 _u16CheckMask, orxHANDLE _ahUserDataList[], orxU32 _u32Number)
orxFLOAT fMaxTorque
Definition: orxPhysics.h:259
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartFriction(orxPHYSICS_BODY_PART *_pstBodyPart, orxFLOAT _fFriction)
orxSTATUS
Definition: orxType.h:246
orxFLOAT fMass
Definition: orxPhysics.h:117
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)
orxFLOAT fMaxMotorForce
Definition: orxPhysics.h:210
orxVECTOR vDstGroundAnchor
Definition: orxPhysics.h:231
orxU16 u16SelfFlags
Definition: orxPhysics.h:132
orxFLOAT fDamping
Definition: orxPhysics.h:218
const orxSTRING zRecipientPartName
Definition: orxPhysics.h:298
orxDLLAPI orxU32 orxFASTCALL orxPhysics_GetCollisionFlagValue(const orxSTRING _zFlag)
const orxSTRING zSrcJointName
Definition: orxPhysics.h:265
orxAABOX stBox
Definition: orxPhysics.h:146
orxFLOAT fFrequency
Definition: orxPhysics.h:217
orxFLOAT fDefaultRotation
Definition: orxPhysics.h:195
#define orxDLLAPI
Definition: orxDecl.h:381
struct __orxPHYSICS_BODY_t orxPHYSICS_BODY
Definition: orxPhysics.h:304
orxFLOAT fMaxDstLength
Definition: orxPhysics.h:236
orxDLLAPI void orxFASTCALL orxPhysics_EnableMotor(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxBOOL _bEnable)
const orxSTRING zDstJointName
Definition: orxPhysics.h:266
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)
orxU16 u16CheckMask
Definition: orxPhysics.h:133
orxFLOAT fAngularDamping
Definition: orxPhysics.h:119
orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetJointReactionTorque(const orxPHYSICS_BODY_JOINT *_pstBodyJoint)
orxVECTOR vSrcGroundAnchor
Definition: orxPhysics.h:230
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetLinearDamping(orxPHYSICS_BODY *_pstBody, orxFLOAT _fDamping)
orxU32 u32VertexCount
Definition: orxPhysics.h:151
orxFLOAT fMaxForce
Definition: orxPhysics.h:258
orxBOOL bHasNext
Definition: orxPhysics.h:162
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:208
orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsPartSolid(const orxPHYSICS_BODY_PART *_pstBodyPart)
orxFLOAT fMaxRotation
Definition: orxPhysics.h:197
orxFLOAT fFriction
Definition: orxPhysics.h:129
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAngularVelocity(orxPHYSICS_BODY *_pstBody, orxFLOAT _fVelocity)

Generated for orx by doxygen 1.8.11