![]() |
Xors3d Engine
|
Functions | |
BBDECL void BBCALL | xEntityAddCompoundShape (Entity *entity, float mass) |
Creates a compound shape and attaches it to an entity. | |
BBDECL int BBCALL | xEntityCompoundAddBox (Entity *entity, float width, float height, float depth) |
Adds a box subshape to an entity's compound shape. | |
BBDECL int BBCALL | xEntityCompoundAddCapsule (Entity *entity, float radius, float height) |
Adds a capsule subshape to an entity's compound shape. | |
BBDECL int BBCALL | xEntityCompoundAddCone (Entity *entity, float radius, float height) |
Adds a cone subshape to an entity's compound shape. | |
BBDECL int BBCALL | xEntityCompoundAddCylinder (Entity *entity, float radius, float height) |
Adds a cylinder subshape to an entity's compound shape. | |
BBDECL int BBCALL | xEntityCompoundAddSphere (Entity *entity, float radius) |
Adds a sphere subshape to an entity's compound shape. | |
BBDECL float BBCALL | xEntityCompoundChildGetPitch (Entity *entity, int index) |
Returns a pitch angle of the compound's subshape. | |
BBDECL float BBCALL | xEntityCompoundChildGetRoll (Entity *entity, int index) |
Returns a roll angle of the compound's subshape. | |
BBDECL float BBCALL | xEntityCompoundChildGetX (Entity *entity, int index) |
Returns X coordinate of the local position of the compound's subshape. | |
BBDECL float BBCALL | xEntityCompoundChildGetY (Entity *entity, int index) |
Returns Y coordinate of the local position of the compound's subshape. | |
BBDECL float BBCALL | xEntityCompoundChildGetYaw (Entity *entity, int index) |
Returns a yaw angle of the compound's subshape. | |
BBDECL float BBCALL | xEntityCompoundChildGetZ (Entity *entity, int index) |
Returns Z coordinate of the local position of the compound's subshape. | |
BBDECL void BBCALL | xEntityCompoundChildSetPosition (Entity *entity, int index, float x, float y, float z) |
Sets a new position of the compound's subshape. | |
BBDECL void BBCALL | xEntityCompoundChildSetRotation (Entity *entity, int index, float pitch, float yaw, float roll) |
Sets a new rotation of the compound's subshape. | |
BBDECL int BBCALL | xEntityCompoundCountChildren (Entity *entity) |
Returns the number of compound's subshapes. | |
BBDECL void BBCALL | xEntityCompoundRemoveChild (Entity *entity, int index) |
Removes a compound's subshape. |
BBDECL void BBCALL xEntityAddCompoundShape | ( | Entity * | entity, |
float | mass | ||
) |
Creates a compound shape and attaches it to an entity.
The compound acts as a container for several shapes belonging to one rigid body. A compound shape is conceptually similar to bodies held together by fixed joints; however, unlike fixed joints compound shapes are always kept perfectly rigid and incur no performance cost when simulating.
Compound shape can held box, sphere, capsule, cone and cylinder subshapes.
entity | Entity handle |
mass | Mass of the body |
BBDECL int BBCALL xEntityCompoundAddBox | ( | Entity * | entity, |
float | width, | ||
float | height, | ||
float | depth | ||
) |
Adds a box subshape to an entity's compound shape.
entity | Entity handle |
width | Width of the box subshape |
height | Height of the box subshape |
depth | Depth of the box subshape |
BBDECL int BBCALL xEntityCompoundAddSphere | ( | Entity * | entity, |
float | radius | ||
) |
Adds a sphere subshape to an entity's compound shape.
entity | Entity handle |
radius | Radius of the sphere subshape |
BBDECL int BBCALL xEntityCompoundAddCapsule | ( | Entity * | entity, |
float | radius, | ||
float | height | ||
) |
Adds a capsule subshape to an entity's compound shape.
entity | Entity handle |
radius | Radius of the capsule subshape |
height | Height of the capsule subshape |
BBDECL int BBCALL xEntityCompoundAddCone | ( | Entity * | entity, |
float | radius, | ||
float | height | ||
) |
Adds a cone subshape to an entity's compound shape.
entity | Entity handle |
radius | Radius of the cone subshape |
height | Height of the cone subshape |
BBDECL int BBCALL xEntityCompoundAddCylinder | ( | Entity * | entity, |
float | radius, | ||
float | height | ||
) |
Adds a cylinder subshape to an entity's compound shape.
entity | Entity handle |
radius | Radius of the cylinder subshape |
height | Height of the cylinder subshape |
BBDECL int BBCALL xEntityCompoundCountChildren | ( | Entity * | entity | ) |
Returns the number of compound's subshapes.
entity | Entity handle |
BBDECL void BBCALL xEntityCompoundRemoveChild | ( | Entity * | entity, |
int | index | ||
) |
Removes a compound's subshape.
entity | Entity handle |
index | Index of the subshape |
BBDECL void BBCALL xEntityCompoundChildSetPosition | ( | Entity * | entity, |
int | index, | ||
float | x, | ||
float | y, | ||
float | z | ||
) |
Sets a new position of the compound's subshape.
entity | Entity handle |
index | Index of the subshape |
x | x coordinate of the new position |
y | y coordinate of the new position |
z | z coordinate of the new position |
BBDECL float BBCALL xEntityCompoundChildGetX | ( | Entity * | entity, |
int | index | ||
) |
Returns X coordinate of the local position of the compound's subshape.
entity | Entity handle |
index | Index of the subshape |
BBDECL float BBCALL xEntityCompoundChildGetY | ( | Entity * | entity, |
int | index | ||
) |
Returns Y coordinate of the local position of the compound's subshape.
entity | Entity handle |
index | Index of the subshape |
BBDECL float BBCALL xEntityCompoundChildGetZ | ( | Entity * | entity, |
int | index | ||
) |
Returns Z coordinate of the local position of the compound's subshape.
entity | Entity handle |
index | Index of the subshape |
BBDECL void BBCALL xEntityCompoundChildSetRotation | ( | Entity * | entity, |
int | index, | ||
float | pitch, | ||
float | yaw, | ||
float | roll | ||
) |
Sets a new rotation of the compound's subshape.
entity | Entity handle |
index | Index of the subshape |
pitch | New pitch angle |
yaw | New yaw angle |
roll | New roll angle |
BBDECL float BBCALL xEntityCompoundChildGetPitch | ( | Entity * | entity, |
int | index | ||
) |
Returns a pitch angle of the compound's subshape.
entity | Entity handle |
index | Index of the subshape |
BBDECL float BBCALL xEntityCompoundChildGetYaw | ( | Entity * | entity, |
int | index | ||
) |
Returns a yaw angle of the compound's subshape.
entity | Entity handle |
index | Index of the subshape |
BBDECL float BBCALL xEntityCompoundChildGetRoll | ( | Entity * | entity, |
int | index | ||
) |
Returns a roll angle of the compound's subshape.
entity | Entity handle |
index | Index of the subshape |