orx  1.10
Portable Game Engine
orxPhysics.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2019 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  {
162  orxBOOL bHasVertex0;
163  orxBOOL bHasVertex3;
165  } stEdge;
166 
167  struct
168  {
172  orxU32 u32VertexCount;
173  orxBOOL bIsLoop;
174  orxBOOL bHasPrevious;
175  orxBOOL bHasNext;
177  } stChain;
178 
179  };
182 
185 typedef struct __orxBODY_JOINT_DEF_t
186 {
192  union
193  {
194  struct
195  {
196  orxFLOAT fDefaultRotation;
197  orxFLOAT fMinRotation;
198  orxFLOAT fMaxRotation;
199  orxFLOAT fMotorSpeed;
200  orxFLOAT fMaxMotorTorque;
202  } stRevolute;
204  struct
205  {
207  orxFLOAT fDefaultRotation;
208  orxFLOAT fMinTranslation;
209  orxFLOAT fMaxTranslation;
210  orxFLOAT fMotorSpeed;
211  orxFLOAT fMaxMotorForce;
213  } stPrismatic;
215  struct
216  {
217  orxFLOAT fLength;
218  orxFLOAT fFrequency;
219  orxFLOAT fDamping;
221  } stSpring;
223  struct
224  {
225  orxFLOAT fLength;
227  } stRope;
229  struct
230  {
233  orxFLOAT fLengthRatio;
234  orxFLOAT fSrcLength;
235  orxFLOAT fMaxSrcLength;
236  orxFLOAT fDstLength;
237  orxFLOAT fMaxDstLength;
239  } stPulley;
241  struct
242  {
243  orxVECTOR vTranslationAxis;
244  orxFLOAT fMinTranslation;
245  orxFLOAT fMaxTranslation;
246  orxFLOAT fMotorSpeed;
247  orxFLOAT fMaxMotorForce;
249  } stSuspension;
251  struct
252  {
253  orxFLOAT fDefaultRotation;
255  } stWeld;
257  struct
258  {
259  orxFLOAT fMaxForce;
260  orxFLOAT fMaxTorque;
262  } stFriction;
264  struct
265  {
266  const orxSTRING zSrcJointName;
267  const orxSTRING zDstJointName;
268  orxFLOAT fJointRatio;
270  } stGear;
272  };
274  orxU32 u32Flags;
277 
278 
281 typedef enum __orxPHYSICS_EVENT_t
282 {
285 
287 
288  orxPHYSICS_EVENT_NONE = orxENUM_NONE
289 
291 
294 typedef struct __orxPHYSICS_EVENT_PAYLOAD_t
295 {
298  const orxSTRING zSenderPartName;
299  const orxSTRING zRecipientPartName;
302 
305 typedef struct __orxPHYSICS_BODY_t orxPHYSICS_BODY;
306 
309 typedef struct __orxPHYSICS_BODY_PART_t orxPHYSICS_BODY_PART;
310 
313 typedef struct __orxPHYSICS_BODY_JOINT_t orxPHYSICS_BODY_JOINT;
314 
315 
318 #define orxPHYSICS_KZ_CONFIG_SECTION "Physics"
319 #define orxPHYSICS_KZ_CONFIG_GRAVITY "Gravity"
320 #define orxPHYSICS_KZ_CONFIG_ALLOW_SLEEP "AllowSleep"
321 #define orxPHYSICS_KZ_CONFIG_ITERATIONS "IterationsPerStep"
322 #define orxPHYSICS_KZ_CONFIG_RATIO "DimensionRatio"
323 #define orxPHYSICS_KZ_CONFIG_STEP_FREQUENCY "StepFrequency"
324 #define orxPHYSICS_KZ_CONFIG_SHOW_DEBUG "ShowDebug"
325 #define orxPHYSICS_KZ_CONFIG_COLLISION_FLAG_LIST "CollisionFlagList"
326 #define orxPHYSICS_KZ_CONFIG_INTERPOLATE "Interpolate"
327 
328 
329 /***************************************************************************
330  * Functions directly implemented by orx core
331  ***************************************************************************/
332 
335 extern orxDLLAPI void orxFASTCALL orxPhysics_Setup();
336 
337 
342 extern orxDLLAPI const orxSTRING orxFASTCALL orxPhysics_GetCollisionFlagName(orxU32 _u32Flag);
343 
348 extern orxDLLAPI orxU32 orxFASTCALL orxPhysics_GetCollisionFlagValue(const orxSTRING _zFlag);
349 
350 
351 /***************************************************************************
352  * Functions extended by plugins
353  ***************************************************************************/
354 
358 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_Init();
359 
362 extern orxDLLAPI void orxFASTCALL orxPhysics_Exit();
363 
364 
369 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetGravity(const orxVECTOR *_pvGravity);
370 
375 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetGravity(orxVECTOR *_pvGravity);
376 
377 
383 extern orxDLLAPI orxPHYSICS_BODY *orxFASTCALL orxPhysics_CreateBody(const orxHANDLE _hUserData, const orxBODY_DEF *_pstBodyDef);
384 
388 extern orxDLLAPI void orxFASTCALL orxPhysics_DeleteBody(orxPHYSICS_BODY *_pstBody);
389 
396 extern orxDLLAPI orxPHYSICS_BODY_PART *orxFASTCALL orxPhysics_CreatePart(orxPHYSICS_BODY *_pstBody, const orxHANDLE _hUserData, const orxBODY_PART_DEF *_pstBodyPartDef);
397 
401 extern orxDLLAPI void orxFASTCALL orxPhysics_DeletePart(orxPHYSICS_BODY_PART *_pstBodyPart);
402 
403 
411 extern orxDLLAPI orxPHYSICS_BODY_JOINT *orxFASTCALL orxPhysics_CreateJoint(orxPHYSICS_BODY *_pstSrcBody, orxPHYSICS_BODY *_pstDstBody, const orxHANDLE _hUserData, const orxBODY_JOINT_DEF *_pstBodyJointDef);
412 
416 extern orxDLLAPI void orxFASTCALL orxPhysics_DeleteJoint(orxPHYSICS_BODY_JOINT *_pstBodyJoint);
417 
418 
424 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPosition(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvPosition);
425 
431 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetRotation(orxPHYSICS_BODY *_pstBody, orxFLOAT _fRotation);
432 
438 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetSpeed(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvSpeed);
439 
445 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAngularVelocity(orxPHYSICS_BODY *_pstBody, orxFLOAT _fVelocity);
446 
452 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetCustomGravity(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvCustomGravity);
453 
459 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetFixedRotation(orxPHYSICS_BODY *_pstBody, orxBOOL _bFixed);
460 
466 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetDynamic(orxPHYSICS_BODY *_pstBody, orxBOOL _bDynamic);
467 
473 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAllowMoving(orxPHYSICS_BODY *_pstBody, orxBOOL _bAllowMoving);
474 
480 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetPosition(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvPosition);
481 
486 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetRotation(const orxPHYSICS_BODY *_pstBody);
487 
493 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetSpeed(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvSpeed);
494 
501 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetSpeedAtWorldPosition(const orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvPosition, orxVECTOR *_pvSpeed);
502 
507 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetAngularVelocity(const orxPHYSICS_BODY *_pstBody);
508 
514 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetCustomGravity(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvCustomGravity);
515 
520 extern orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsFixedRotation(const orxPHYSICS_BODY *_pstBody);
521 
526 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetMass(const orxPHYSICS_BODY *_pstBody);
527 
533 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetMassCenter(const orxPHYSICS_BODY *_pstBody, orxVECTOR *_pvMassCenter);
534 
535 
541 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetLinearDamping(orxPHYSICS_BODY *_pstBody, orxFLOAT _fDamping);
542 
548 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAngularDamping(orxPHYSICS_BODY *_pstBody, orxFLOAT _fDamping);
549 
554 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetLinearDamping(const orxPHYSICS_BODY *_pstBody);
555 
560 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetAngularDamping(const orxPHYSICS_BODY *_pstBody);
561 
562 
568 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyTorque(orxPHYSICS_BODY *_pstBody, orxFLOAT _fTorque);
569 
576 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyForce(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvForce, const orxVECTOR *_pvPoint);
577 
584 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_ApplyImpulse(orxPHYSICS_BODY *_pstBody, const orxVECTOR *_pvImpulse, const orxVECTOR *_pvPoint);
585 
586 
592 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartSelfFlags(orxPHYSICS_BODY_PART *_pstBodyPart, orxU16 _u16SelfFlags);
593 
599 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartCheckMask(orxPHYSICS_BODY_PART *_pstBodyPart, orxU16 _u16CheckMask);
600 
605 extern orxDLLAPI orxU16 orxFASTCALL orxPhysics_GetPartSelfFlags(const orxPHYSICS_BODY_PART *_pstBodyPart);
606 
611 extern orxDLLAPI orxU16 orxFASTCALL orxPhysics_GetPartCheckMask(const orxPHYSICS_BODY_PART *_pstBodyPart);
612 
617 extern orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsPartSolid(const orxPHYSICS_BODY_PART *_pstBodyPart);
618 
624 extern orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartSolid(orxPHYSICS_BODY_PART *_pstBodyPart, orxBOOL _bSolid);
625 
626 
632 extern orxDLLAPI void orxFASTCALL orxPhysics_EnableMotor(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxBOOL _bEnable);
633 
639 extern orxDLLAPI void orxFASTCALL orxPhysics_SetJointMotorSpeed(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxFLOAT _fSpeed);
640 
646 extern orxDLLAPI void orxFASTCALL orxPhysics_SetJointMaxMotorTorque(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxFLOAT _fMaxTorque);
647 
648 
654 extern orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetJointReactionForce(const orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxVECTOR *_pvForce);
655 
660 extern orxDLLAPI orxFLOAT orxFASTCALL orxPhysics_GetJointReactionTorque(const orxPHYSICS_BODY_JOINT *_pstBodyJoint);
661 
662 
673 extern orxDLLAPI orxHANDLE orxFASTCALL orxPhysics_Raycast(const orxVECTOR *_pvBegin, const orxVECTOR *_pvEnd, orxU16 _u16SelfFlags, orxU16 _u16CheckMask, orxBOOL _bEarlyExit, orxVECTOR *_pvContact, orxVECTOR *_pvNormal);
674 
675 
679 extern orxDLLAPI void orxFASTCALL orxPhysics_EnableSimulation(orxBOOL _bEnable);
680 
681 #endif /* _orxPHYSICS_H_ */
682 
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:268
orxFLOAT fDstLength
Definition: orxPhysics.h:236
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:197
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetPartSolid(orxPHYSICS_BODY_PART *_pstBodyPart, orxBOOL _bSolid)
orxFLOAT fMotorSpeed
Definition: orxPhysics.h:199
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:235
orxFLOAT fLength
Definition: orxPhysics.h:217
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:233
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:234
orxU32 u32Flags
Definition: orxPhysics.h:120
orxDLLAPI void orxFASTCALL orxPhysics_Exit()
orxDLLAPI orxVECTOR *orxFASTCALL orxPhysics_GetGravity(orxVECTOR *_pvGravity)
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAllowMoving(orxPHYSICS_BODY *_pstBody, orxBOOL _bAllowMoving)
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:309
orxBOOL bHasVertex0
Definition: orxPhysics.h:162
const orxSTRING zSenderPartName
Definition: orxPhysics.h:298
orxPHYSICS_EVENT
Definition: orxPhysics.h:281
orxVECTOR vTranslationAxis
Definition: orxPhysics.h:206
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:313
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetDynamic(orxPHYSICS_BODY *_pstBody, orxBOOL _bDynamic)
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:208
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)
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:200
orxBOOL bHasPrevious
Definition: orxPhysics.h:174
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_Init()
orxFLOAT fMaxTorque
Definition: orxPhysics.h:260
orxSTATUS
Definition: orxType.h:246
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:211
orxVECTOR vDstGroundAnchor
Definition: orxPhysics.h:232
orxU16 u16SelfFlags
Definition: orxPhysics.h:132
orxFLOAT fDamping
Definition: orxPhysics.h:219
const orxSTRING zRecipientPartName
Definition: orxPhysics.h:299
orxDLLAPI orxU32 orxFASTCALL orxPhysics_GetCollisionFlagValue(const orxSTRING _zFlag)
const orxSTRING zSrcJointName
Definition: orxPhysics.h:266
orxAABOX stBox
Definition: orxPhysics.h:146
orxFLOAT fFrequency
Definition: orxPhysics.h:218
orxFLOAT fDefaultRotation
Definition: orxPhysics.h:196
#define orxDLLAPI
Definition: orxDecl.h:381
struct __orxPHYSICS_BODY_t orxPHYSICS_BODY
Definition: orxPhysics.h:305
orxFLOAT fMaxDstLength
Definition: orxPhysics.h:237
orxDLLAPI void orxFASTCALL orxPhysics_EnableMotor(orxPHYSICS_BODY_JOINT *_pstBodyJoint, orxBOOL _bEnable)
const orxSTRING zDstJointName
Definition: orxPhysics.h:267
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:231
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetLinearDamping(orxPHYSICS_BODY *_pstBody, orxFLOAT _fDamping)
orxU32 u32VertexCount
Definition: orxPhysics.h:151
orxFLOAT fMaxForce
Definition: orxPhysics.h:259
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:209
orxDLLAPI orxBOOL orxFASTCALL orxPhysics_IsPartSolid(const orxPHYSICS_BODY_PART *_pstBodyPart)
orxFLOAT fMaxRotation
Definition: orxPhysics.h:198
orxFLOAT fFriction
Definition: orxPhysics.h:129
orxDLLAPI orxSTATUS orxFASTCALL orxPhysics_SetAngularVelocity(orxPHYSICS_BODY *_pstBody, orxFLOAT _fVelocity)

Generated for orx by doxygen 1.8.11