orx 1.16
Portable Game Engine
|
Data Structures | |
struct | orxBODY_DEF |
struct | orxBODY_JOINT_DEF |
struct | orxBODY_PART_DEF |
struct | orxPHYSICS_EVENT_PAYLOAD |
Typedefs | |
typedef struct __orxPHYSICS_BODY_t | orxPHYSICS_BODY |
typedef struct __orxPHYSICS_BODY_JOINT_t | orxPHYSICS_BODY_JOINT |
typedef struct __orxPHYSICS_BODY_PART_t | orxPHYSICS_BODY_PART |
Enumerations | |
enum | orxPHYSICS_EVENT { orxPHYSICS_EVENT_CONTACT_ADD = 0 , orxPHYSICS_EVENT_CONTACT_REMOVE , orxPHYSICS_EVENT_NUMBER , orxPHYSICS_EVENT_NONE = orxENUM_NONE } |
Physics plugin module Module that handles physics interactions
#define orxBODY_DEF_KU32_FLAG_2D 0x00000001 |
2D type body def flag
Definition at line 56 of file orxPhysics.h.
#define orxBODY_DEF_KU32_FLAG_ALLOW_SLEEP 0x00000020 |
Allow sleep body def flag
Definition at line 61 of file orxPhysics.h.
#define orxBODY_DEF_KU32_FLAG_CAN_MOVE 0x00000010 |
Static body is allowed to move through direct user access
Definition at line 60 of file orxPhysics.h.
#define orxBODY_DEF_KU32_FLAG_DYNAMIC 0x00000002 |
Dynamic type body def flag
Definition at line 57 of file orxPhysics.h.
#define orxBODY_DEF_KU32_FLAG_FIXED_ROTATION 0x00000008 |
Body can't be rotated by physics
Definition at line 59 of file orxPhysics.h.
#define orxBODY_DEF_KU32_FLAG_HIGH_SPEED 0x00000004 |
High speed type body def flag
Definition at line 58 of file orxPhysics.h.
#define orxBODY_DEF_KU32_FLAG_NONE 0x00000000 |
Body definition flags No flags
Definition at line 54 of file orxPhysics.h.
#define orxBODY_DEF_KU32_MASK_ALL 0xFFFFFFFF |
Body def all mask
Definition at line 63 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_COLLIDE 0x10000000 |
Collide body joint def flag
Definition at line 97 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_FRICTION 0x00000080 |
Friction body joint def flag
Definition at line 92 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_GEAR 0x00000100 |
Gear body joint def flag
Definition at line 93 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_MOTOR 0x40000000 |
Motor body joint def flag
Definition at line 99 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_NONE 0x00000000 |
Body joint definition flags No flags
Definition at line 83 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_PRISMATIC 0x00000002 |
Prismatic body joint def flag
Definition at line 86 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_PULLEY 0x00000010 |
Pulley body joint def flag
Definition at line 89 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_REVOLUTE 0x00000001 |
Revolute body joint def flag
Definition at line 85 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_ROPE 0x00000008 |
Rope body joint def flag
Definition at line 88 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_ROTATION_LIMIT 0x20000000 |
Rotation limit body joint def flag
Definition at line 98 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_SPRING 0x00000004 |
Spring body joint def flag
Definition at line 87 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_SUSPENSION 0x00000020 |
Suspension body joint def flag
Definition at line 90 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_TRANSLATION_LIMIT 0x80000000 |
Translation limit def flag
Definition at line 100 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_FLAG_WELD 0x00000040 |
Weld body joint def flag
Definition at line 91 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_MASK_ALL 0xFFFFFFFF |
Body joint def all mask
Definition at line 102 of file orxPhysics.h.
#define orxBODY_JOINT_DEF_KU32_MASK_TYPE 0x00000FFF |
Type body joint def mask
Definition at line 95 of file orxPhysics.h.
#define orxBODY_PART_DEF_KU32_FLAG_BOX 0x00000002 |
Box body part def flag
Definition at line 70 of file orxPhysics.h.
#define orxBODY_PART_DEF_KU32_FLAG_CHAIN 0x00000010 |
Chain body part def flag
Definition at line 73 of file orxPhysics.h.
#define orxBODY_PART_DEF_KU32_FLAG_EDGE 0x00000008 |
Edge body part def flag
Definition at line 72 of file orxPhysics.h.
#define orxBODY_PART_DEF_KU32_FLAG_MESH 0x00000004 |
Mesh body part def flag
Definition at line 71 of file orxPhysics.h.
#define orxBODY_PART_DEF_KU32_FLAG_NONE 0x00000000 |
Body part definition flags No flags
Definition at line 67 of file orxPhysics.h.
#define orxBODY_PART_DEF_KU32_FLAG_SOLID 0x10000000 |
Solid body part def flag
Definition at line 77 of file orxPhysics.h.
#define orxBODY_PART_DEF_KU32_FLAG_SPHERE 0x00000001 |
Sphere body part def flag
Definition at line 69 of file orxPhysics.h.
#define orxBODY_PART_DEF_KU32_MASK_ALL 0xFFFFFFFF |
Body part def all mask
Definition at line 79 of file orxPhysics.h.
#define orxBODY_PART_DEF_KU32_MASK_TYPE 0x0000001F |
Type body part def mask
Definition at line 75 of file orxPhysics.h.
#define orxBODY_PART_DEF_KU32_MESH_VERTEX_NUMBER 8 |
Misc defines
Definition at line 107 of file orxPhysics.h.
#define orxPHYSICS_KZ_CONFIG_ALLOW_SLEEP "AllowSleep" |
Definition at line 319 of file orxPhysics.h.
#define orxPHYSICS_KZ_CONFIG_COLLISION_FLAG_LIST "CollisionFlagList" |
Definition at line 324 of file orxPhysics.h.
#define orxPHYSICS_KZ_CONFIG_GRAVITY "Gravity" |
Definition at line 318 of file orxPhysics.h.
#define orxPHYSICS_KZ_CONFIG_INTERPOLATE "Interpolate" |
Definition at line 325 of file orxPhysics.h.
#define orxPHYSICS_KZ_CONFIG_ITERATIONS "IterationsPerStep" |
Definition at line 320 of file orxPhysics.h.
#define orxPHYSICS_KZ_CONFIG_RATIO "DimensionRatio" |
Definition at line 321 of file orxPhysics.h.
#define orxPHYSICS_KZ_CONFIG_SECTION "Physics" |
Config defines
Definition at line 317 of file orxPhysics.h.
#define orxPHYSICS_KZ_CONFIG_SHOW_DEBUG "ShowDebug" |
Definition at line 323 of file orxPhysics.h.
#define orxPHYSICS_KZ_CONFIG_STEP_FREQUENCY "StepFrequency" |
Definition at line 322 of file orxPhysics.h.
typedef struct __orxPHYSICS_BODY_t orxPHYSICS_BODY |
Internal physics body structure
Definition at line 304 of file orxPhysics.h.
typedef struct __orxPHYSICS_BODY_JOINT_t orxPHYSICS_BODY_JOINT |
Internal physics joint structure
Definition at line 312 of file orxPhysics.h.
typedef struct __orxPHYSICS_BODY_PART_t orxPHYSICS_BODY_PART |
Internal physics part structure
Definition at line 308 of file orxPhysics.h.
enum orxPHYSICS_EVENT |
Event enum
Enumerator | |
---|---|
orxPHYSICS_EVENT_CONTACT_ADD | |
orxPHYSICS_EVENT_CONTACT_REMOVE | |
orxPHYSICS_EVENT_NUMBER | |
orxPHYSICS_EVENT_NONE |
Definition at line 280 of file orxPhysics.h.
|
extern |
Applies a force to a physical body
[in] | _pstBody | Concerned physical body |
[in] | _pvForce | Force to apply |
[in] | _pvPoint | Point of application (world coordinates) (if null, center of mass will be used) |
|
extern |
Applies an impulse to a physical body
[in] | _pstBody | Concerned physical body |
[in] | _pvImpulse | Impulse to apply |
[in] | _pvPoint | Point of application (world coordinates) (if null, center of mass will be used) |
|
extern |
Applies a torque to a physical body
[in] | _pstBody | Concerned physical body |
[in] | _fTorque | Torque to apply |
|
extern |
Picks bodies in contact with the given axis aligned box
[in] | _pstBox | Box used for picking |
[in] | _u16SelfFlags | Selfs flags used for filtering (0xFFFF for no filtering) |
[in] | _u16CheckMask | Check mask used for filtering (0xFFFF for no filtering) |
[in] | _ahUserDataList | List of user data to fill |
[in] | _u32Number | Number of user data |
|
extern |
Creates a physical body
[in] | _hUserData | User data to associate with this physical body |
[in] | _pstBodyDef | Physical body definition |
|
extern |
Creates a joint to link two physical bodies together
[in] | _pstSrcBody | Concerned source body |
[in] | _pstDstBody | Concerned destination body |
[in] | _hUserData | User data to associate with this physical body part |
[in] | _pstBodyJointDef | Physical body joint definition |
|
extern |
Creates a part for a physical body
[in] | _pstBody | Concerned physical body |
[in] | _hUserData | User data to associate with this physical body part |
[in] | _pstBodyPartDef | Physical body part definition |
|
extern |
Deletes a physical body
[in] | _pstBody | Concerned physical body |
|
extern |
Deletes a physical body joint
[in] | _pstBodyJoint | Concerned physical body joint |
|
extern |
Deletes a physical body part
[in] | _pstBodyPart | Concerned physical body part |
|
extern |
Enables a (revolute) body joint motor
[in] | _pstBodyJoint | Concerned body joint |
[in] | _bEnable | Enable / Disable |
|
extern |
Enables/disables physics simulation
[in] | _bEnable | Enable / disable |
|
extern |
Exits from the physics module
|
extern |
Gets angular damping of a physical body
[in] | _pstBody | Concerned physical body |
|
extern |
Gets the angular velocity of a physical body
[in] | _pstBody | Concerned physical body |
|
extern |
Gets collision flag literal name
[in] | _u32Flag | Concerned collision flag numerical value |
|
extern |
Gets collision flag numerical value
[in] | _zFlag | Concerned collision flag literal name |
|
extern |
Gets the custom gravity of a physical body
[in] | _pstBody | Concerned physical body |
[out] | _pvCustomGravity | Custom gravity to get |
|
extern |
Gets the reaction force on the attached body at the joint anchor
[in] | _pstBodyJoint | Concerned body joint |
[out] | _pvForce | Reaction force |
|
extern |
Gets the reaction torque on the attached body
[in] | _pstBodyJoint | Concerned body joint |
|
extern |
Gets linear damping of a physical body
[in] | _pstBody | Concerned physical body |
|
extern |
Gets the mass of a physical body
[in] | _pstBody | Concerned physical body |
|
extern |
Gets the center of mass of a physical body (object space but scale isn't accounted for)
[in] | _pstBody | Concerned physical body |
[out] | _pvMassCenter | Center of mass to get |
|
extern |
Gets check mask of a physical body part
[in] | _pstBodyPart | Concerned physical body part |
|
extern |
Gets density of a physical body part
[in] | _pstBodyPart | Concerned physical body part |
|
extern |
Gets friction of a physical body part
[in] | _pstBodyPart | Concerned physical body part |
|
extern |
Gets restitution of a physical body part
[in] | _pstBodyPart | Concerned physical body part |
|
extern |
Gets self flags of a physical body part
[in] | _pstBodyPart | Concerned physical body part |
|
extern |
Gets the position of a physical body
[in] | _pstBody | Concerned physical body |
[out] | _pvPosition | Position to get |
|
extern |
Gets the rotation of a physical body
[in] | _pstBody | Concerned physical body |
|
extern |
Gets the speed of a physical body
[in] | _pstBody | Concerned physical body |
[out] | _pvSpeed | Speed to get |
|
extern |
Gets the speed of a physical body at a specified world position
[in] | _pstBody | Concerned body |
[in] | _pvPosition | Concerned world position |
[out] | _pvSpeed | Speed to get |
Inits the physics module
|
extern |
Is a physical body using a fixed rotation
[in] | _pstBody | Concerned physical body |
|
extern |
Is point inside part? (Using world coordinates)
[in] | _pstBodyPart | Concerned physical body part |
[in] | _pvPosition | Position to test (world coordinates) |
|
extern |
Is a physical body part solid?
[in] | _pstBodyPart | Concerned physical body part |
|
extern |
Issues a raycast to test for potential physics bodies in the way
[in] | _pvBegin | Beginning of raycast |
[in] | _pvEnd | End of raycast |
[in] | _u16SelfFlags | Selfs flags used for filtering (0xFFFF for no filtering) |
[in] | _u16CheckMask | Check mask used for filtering (0xFFFF for no filtering) |
[in] | _bEarlyExit | Should stop as soon as an object has been hit (which might not be the closest) |
[in] | _pvContact | If non-null and a contact is found it will be stored here |
[in] | _pvNormal | If non-null and a contact is found, its normal will be stored here |
|
extern |
Sets the "allow moving" property of a body
[in] | _pstBody | Concerned physical body |
[in] | _bAllowMoving | Only used for non-dynamic bodies, Kinematic / Static |
|
extern |
Sets angular damping of a physical body
[in] | _pstBody | Concerned physical body |
[in] | _fDamping | Angular damping to set |
|
extern |
Sets the angular velocity of a physical body
[in] | _pstBody | Concerned physical body |
[in] | _fVelocity | Angular velocity (radians/seconds) to set |
|
extern |
Sets the custom gravity of a physical body
[in] | _pstBody | Concerned physical body |
[in] | _pvCustomGravity | Custom gravity multiplier to set / orxNULL to remove it |
|
extern |
Sets the dynamic property of a body
[in] | _pstBody | Concerned physical body |
[in] | _bDynamic | Dynamic / Static (or Kinematic depending on the "allow moving" property) |
|
extern |
Sets the fixed rotation property of a physical body
[in] | _pstBody | Concerned physical body |
[in] | _bFixed | Fixed / not fixed |
Sets physics gravity
[in] | _pvGravity | Gravity to set |
|
extern |
Sets a (revolute) body joint maximum motor torque
[in] | _pstBodyJoint | Concerned body joint |
[in] | _fMaxTorque | Maximum motor torque |
|
extern |
Sets a (revolute) body joint motor speed
[in] | _pstBodyJoint | Concerned body joint |
[in] | _fSpeed | Speed |
|
extern |
Sets linear damping of a physical body
[in] | _pstBody | Concerned physical body |
[in] | _fDamping | Linear damping to set |
|
extern |
Sets check mask of a physical body part
[in] | _pstBodyPart | Concerned physical body part |
[in] | _u16CheckMask | Check mask to set |
|
extern |
Sets density of a physical body part
[in] | _pstBodyPart | Concerned physical body part |
[in] | _fDensity | Density |
|
extern |
Sets friction of a physical body part
[in] | _pstBodyPart | Concerned physical body part |
[in] | _fFriction | Friction |
|
extern |
Sets restitution of a physical body part
[in] | _pstBodyPart | Concerned physical body part |
[in] | _fRestitution | Restitution |
|
extern |
Sets self flags of a physical body part
[in] | _pstBodyPart | Concerned physical body part |
[in] | _u16SelfFlags | Self flags to set |
|
extern |
Sets a physical body part solid
[in] | _pstBodyPart | Concerned physical body part |
[in] | _bSolid | Solid or sensor? |
|
extern |
Sets the position of a physical body
[in] | _pstBody | Concerned physical body |
[in] | _pvPosition | Position to set |
|
extern |
Sets the rotation of a physical body
[in] | _pstBody | Concerned physical body |
[in] | _fRotation | Rotation (radians) to set |
|
extern |
Sets the speed of a physical body
[in] | _pstBody | Concerned physical body |
[in] | _pvSpeed | Speed to set |
|
extern |
Physics module setup