![]() |
Xors3d Engine
|
Modules | |
Compound | |
Functions | |
BBDECL void BBCALL | xEntityAddBoxShape (Entity *entity, float mass, float width=0.0f, float height=0.0f, float depth=0.0f) |
Creates a box shape and attaches it to the entity. | |
BBDECL void BBCALL | xEntityAddCapsuleShape (Entity *entity, float mass, float radius=0.0f, float height=0.0f) |
Creates a capsule shape and attaches it to the entity. | |
BBDECL void BBCALL | xEntityAddConcaveShape (Entity *entity, float mass) |
Creates a concave shape and attaches it to the entity. | |
BBDECL void BBCALL | xEntityAddConcaveShapeProxy (Entity *entity, Entity *proxy, float mass) |
Creates a concave shape using information about vertices and indices of the proxy entity and attaches it to the main entity. | |
BBDECL void BBCALL | xEntityAddConeShape (Entity *entity, float mass, float radius=0.0f, float height=0.0f) |
Creates a cone shape and attaches it to the entity. | |
BBDECL void BBCALL | xEntityAddConvexShape (Entity *entity, float mass) |
Creates a convex shape and attaches it to the entity. | |
BBDECL void BBCALL | xEntityAddConvexShapeProxy (Entity *entity, Entity *proxy, float mass) |
Creates a convex shape using information about vertices and indices of the proxy entity and attaches it to the main entity. | |
BBDECL void BBCALL | xEntityAddCylinderShape (Entity *entity, float mass, float width=0.0f, float height=0.0f, float depth=0.0f) |
Creates a cylinder shape and attaches it to the entity. | |
BBDECL void BBCALL | xEntityAddDummyShape (Entity *entity) |
Creates a dummy shape and attaches it to the entity. | |
BBDECL void BBCALL | xEntityAddSphereShape (Entity *entity, float mass, float radius=0.0f) |
Creates a sphere shape and attaches it to the entity. | |
BBDECL void BBCALL | xEntityAddTerrainShape (Entity *entity) |
Creates a static shape for a terrain. | |
BBDECL void BBCALL | xEntityAddTriMeshShape (Entity *entity) |
Creates a trimesh (triangle mesh) shape and attaches it to the entity. | |
BBDECL void BBCALL | xEntityAddTriMeshShapeProxy (Entity *entity, Entity *proxy) |
Creates a trimesh (triangle mesh) shape using information about vertices and indices of the proxy entity and attaches it to the main entity. | |
BBDECL void BBCALL | xEntityAttachBody (Entity *entity, IBody *body) |
Attaches a previously detached body. | |
BBDECL IBody *BBCALL | xEntityDetachBody (Entity *entity) |
Detaches a body from an entity. | |
BBDECL void BBCALL | xFreeEntityBody (Entity *entity) |
Frees the body of an entity. |
BBDECL void BBCALL xEntityAddDummyShape | ( | Entity * | entity | ) |
Creates a dummy shape and attaches it to the entity.
A dummy shape has no mass and collision body.
entity | Entity handle |
BBDECL void BBCALL xEntityAddBoxShape | ( | Entity * | entity, |
float | mass, | ||
float | width = 0.0f , |
||
float | height = 0.0f , |
||
float | depth = 0.0f |
||
) |
Creates a box shape and attaches it to the entity.
Set any dimension of the box shape to zero or less than zero and the shape will fit the dimensions of the entity automatically.
entity | Entity handle |
mass | Mass of the body |
width | Width of the body |
height | Height of the body |
depth | Depth of the body |
BBDECL void BBCALL xEntityAddSphereShape | ( | Entity * | entity, |
float | mass, | ||
float | radius = 0.0f |
||
) |
Creates a sphere shape and attaches it to the entity.
Set the radius of the sphere shape to zero or less than zero and the shape will fit the dimensions of the entity automatically.
entity | Entity handle |
mass | Mass of the body |
radius | Radius of the body |
BBDECL void BBCALL xEntityAddCapsuleShape | ( | Entity * | entity, |
float | mass, | ||
float | radius = 0.0f , |
||
float | height = 0.0f |
||
) |
Creates a capsule shape and attaches it to the entity.
Set any dimension of the capsule shape to zero or less than zero and the shape will fit the dimensions of the entity automatically.
entity | Entity handle |
mass | Mass of the body |
radius | Radius of the body |
height | Height of the body |
BBDECL void BBCALL xEntityAddConeShape | ( | Entity * | entity, |
float | mass, | ||
float | radius = 0.0f , |
||
float | height = 0.0f |
||
) |
Creates a cone shape and attaches it to the entity.
Set any dimension of the cone shape to zero or less than zero and the shape will fit the dimensions of the entity automatically.
entity | Entity handle |
mass | Mass of the body |
radius | Radius of the body |
height | Height of the body |
BBDECL void BBCALL xEntityAddCylinderShape | ( | Entity * | entity, |
float | mass, | ||
float | width = 0.0f , |
||
float | height = 0.0f , |
||
float | depth = 0.0f |
||
) |
Creates a cylinder shape and attaches it to the entity.
Set any dimension of the cylinder shape to zero or less than zero and the shape will fit the dimensions of the entity automatically.
entity | Entity handle |
mass | Mass of the body |
width | Width of the body |
height | Height of the body |
depth | Depth of the body |
BBDECL void BBCALL xEntityAddTriMeshShape | ( | Entity * | entity | ) |
Creates a trimesh (triangle mesh) shape and attaches it to the entity.
Created trimesh shape is static which means that moving of vertices won't affect the shape.
entity | Entity handle |
BBDECL void BBCALL xEntityAddTriMeshShapeProxy | ( | Entity * | entity, |
Entity * | proxy | ||
) |
Creates a trimesh (triangle mesh) shape using information about vertices and indices of the proxy entity and attaches it to the main entity.
Created trimesh shape is static which means that moving of vertices won't affect the shape.
Usually proxy entity is a lowpoly version of the main entity. Proxy entity may be freed after using in this function.
entity | Entity handle |
proxy | Proxy entity handle |
BBDECL void BBCALL xEntityAddConvexShape | ( | Entity * | entity, |
float | mass | ||
) |
Creates a convex shape and attaches it to the entity.
The convex shape works much faster than the concave one. That's why the use of the convex shape is more preferable if it fits your needs.
entity | Entity handle |
mass | Mass of the body |
BBDECL void BBCALL xEntityAddConvexShapeProxy | ( | Entity * | entity, |
Entity * | proxy, | ||
float | mass | ||
) |
Creates a convex shape using information about vertices and indices of the proxy entity and attaches it to the main entity.
The convex shape works much faster than the concave one. That's why the use of the convex shape is more preferable if it fits your needs.
entity | Entity handle |
proxy | Proxy entity handle |
mass | Mass of the body |
BBDECL void BBCALL xEntityAddConcaveShape | ( | Entity * | entity, |
float | mass | ||
) |
Creates a concave shape and attaches it to the entity.
Unlike a convex shape a concave shape can have dents and holes. For instance, a torus will have a hole if it was created as a concave shape.
entity | Entity handle |
mass | Mass of the body |
BBDECL void BBCALL xEntityAddConcaveShapeProxy | ( | Entity * | entity, |
Entity * | proxy, | ||
float | mass | ||
) |
Creates a concave shape using information about vertices and indices of the proxy entity and attaches it to the main entity.
Unlike a convex shape a concave shape can have dents and holes. For instance, a torus will have a hole if it was created as a concave shape.
entity | Entity handle |
proxy | Proxy entity handle |
mass | Mass of the body |
BBDECL void BBCALL xEntityAddTerrainShape | ( | Entity * | entity | ) |
Creates a static shape for a terrain.
Can be used only with the terrains.
entity | Entity handle |
BBDECL void BBCALL xEntityAttachBody | ( | Entity * | entity, |
IBody * | body | ||
) |
Attaches a previously detached body.
In combination with xEntityDetachBody() this function is useful if you need to switch bodies between two or more shapes.
entity | Entity handle |
body | Body handle |
BBDECL IBody* BBCALL xEntityDetachBody | ( | Entity * | entity | ) |
Detaches a body from an entity.
In combination with xEntityAttachBody() this function is useful if you need to switch bodies between two or more shapes.
entity | Entity handle |
BBDECL void BBCALL xFreeEntityBody | ( | Entity * | entity | ) |
Frees the body of an entity.
entity | Entity handle. |