![]() |
Xors3d Engine
|
Functions | |
| void | xEntityAddCompoundShape (Entity *entity, float mass) |
| Creates a compound shape and attaches it to an entity. | |
| int | xEntityCompoundAddBox (Entity *entity, float width, float height, float depth) |
| Adds a box subshape to an entity's compound shape. | |
| int | xEntityCompoundAddCapsule (Entity *entity, float radius, float height) |
| Adds a capsule subshape to an entity's compound shape. | |
| int | xEntityCompoundAddCone (Entity *entity, float radius, float height) |
| Adds a cone subshape to an entity's compound shape. | |
| int | xEntityCompoundAddCylinder (Entity *entity, float radius, float height) |
| Adds a cylinder subshape to an entity's compound shape. | |
| int | xEntityCompoundAddSphere (Entity *entity, float radius) |
| Adds a sphere subshape to an entity's compound shape. | |
| float | xEntityCompoundChildGetPitch (Entity *entity, int index) |
| Returns a pitch angle of the compound's subshape. | |
| float | xEntityCompoundChildGetRoll (Entity *entity, int index) |
| Returns a roll angle of the compound's subshape. | |
| float | xEntityCompoundChildGetX (Entity *entity, int index) |
| Returns X coordinate of the local position of the compound's subshape. | |
| float | xEntityCompoundChildGetY (Entity *entity, int index) |
| Returns Y coordinate of the local position of the compound's subshape. | |
| float | xEntityCompoundChildGetYaw (Entity *entity, int index) |
| Returns a yaw angle of the compound's subshape. | |
| float | xEntityCompoundChildGetZ (Entity *entity, int index) |
| Returns Z coordinate of the local position of the compound's subshape. | |
| void | xEntityCompoundChildSetPosition (Entity *entity, int index, float x, float y, float z) |
| Sets a new position of the compound's subshape. | |
| void | xEntityCompoundChildSetRotation (Entity *entity, int index, float pitch, float yaw, float roll) |
| Sets a new rotation of the compound's subshape. | |
| int | xEntityCompoundCountChildren (Entity *entity) |
| Returns the number of compound's subshapes. | |
| void | xEntityCompoundRemoveChild (Entity *entity, int index) |
| Removes a compound's subshape. | |
| void 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 |
| int 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 |
| int xEntityCompoundAddSphere | ( | Entity * | entity, |
| float | radius | ||
| ) |
Adds a sphere subshape to an entity's compound shape.
| entity | Entity handle |
| radius | Radius of the sphere subshape |
| int 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 |
| int 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 |
| int 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 |
| int xEntityCompoundCountChildren | ( | Entity * | entity | ) |
Returns the number of compound's subshapes.
| entity | Entity handle |
| void xEntityCompoundRemoveChild | ( | Entity * | entity, |
| int | index | ||
| ) |
Removes a compound's subshape.
| entity | Entity handle |
| index | Index of the subshape |
| void 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 |
| float 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 |
| float 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 |
| float 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 |
| void 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 |
| float xEntityCompoundChildGetPitch | ( | Entity * | entity, |
| int | index | ||
| ) |
Returns a pitch angle of the compound's subshape.
| entity | Entity handle |
| index | Index of the subshape |
| float xEntityCompoundChildGetYaw | ( | Entity * | entity, |
| int | index | ||
| ) |
Returns a yaw angle of the compound's subshape.
| entity | Entity handle |
| index | Index of the subshape |
| float xEntityCompoundChildGetRoll | ( | Entity * | entity, |
| int | index | ||
| ) |
Returns a roll angle of the compound's subshape.
| entity | Entity handle |
| index | Index of the subshape |