Functions | |
BBDECL Entity *BBCALL | xContactEntity (Entity *entity, int index) |
Returns an entity which has a contact with a given entity. | |
BBDECL int BBCALL | xCountContacts (Entity *entity) |
Returns the number of contacts of the entity's body. | |
BBDECL IJoint *BBCALL | xCreateJoint (int jointType, Entity *firstBody, Entity *secondBody) |
Creates a joint between to bodies and returns its 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 links 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 links it to the entity. | |
BBDECL void BBCALL | xEntityAddConeShape (Entity *entity, float mass, float radius=0.0f, float height=0.0f) |
Creates a cone shape and links it to the 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 links it to the entity. | |
BBDECL void BBCALL | xEntityAddDummyShape (Entity *entity) |
Creates a dummy shape and links it to the entity. | |
BBDECL void BBCALL | xEntityAddHullShape (Entity *entity, float mass) |
Creates a shape of a convex hull and links it to the entity. | |
BBDECL void BBCALL | xEntityAddSphereShape (Entity *entity, float mass, float radius=0.0f) |
Creates a sphere shape and links it to the entity. | |
BBDECL void BBCALL | xEntityAddTriMeshShape (Entity *entity, float mass) |
Creates a trimesh (triangle mesh) shape and links it to the entity. | |
BBDECL void BBCALL | xEntityAngularFactor (Entity *entity, float x, float y, float z) |
Sets the angular factor of the entity's body. | |
BBDECL float BBCALL | xEntityAngularFactorX (Entity *entity) |
Returns the angular factor of the entity's body around the X axis. | |
BBDECL float BBCALL | xEntityAngularFactorY (Entity *entity) |
Returns the angular factor of the entity's body around the Y axis. | |
BBDECL float BBCALL | xEntityAngularFactorZ (Entity *entity) |
Returns the angular factor of the entity's body around the Z axis. | |
BBDECL void BBCALL | xEntityApplyCentralForce (Entity *entity, float x, float y, float z) |
Applies a force to the center of mass of the entity's body. | |
BBDECL void BBCALL | xEntityApplyCentralImpulse (Entity *entity, float x, float y, float z) |
Applies an impulse to the center of mass of the entity's body. | |
BBDECL void BBCALL | xEntityApplyForce (Entity *entity, float x, float y, float z, float pointx, float pointy, float pointz) |
Applies a force to the entity's body at the specific point relative to the center of this body. | |
BBDECL void BBCALL | xEntityApplyImpulse (Entity *entity, float x, float y, float z, float pointx, float pointy, float pointz) |
Applies an impulse to the entity's body at the specific point relative to the center of this body. | |
BBDECL void BBCALL | xEntityApplyTorque (Entity *entity, float x, float y, float z) |
Applies a torque to the entity's body. | |
BBDECL void BBCALL | xEntityApplyTorqueImpulse (Entity *entity, float x, float y, float z) |
Applies a torque impulse to the entity's body. | |
BBDECL float BBCALL | xEntityContactDistance (Entity *entity, int index) |
Returns the distance of a particular contact. | |
BBDECL float BBCALL | xEntityContactNX (Entity *entity, int index) |
Returns the x component of the nornal of a particular contact. | |
BBDECL float BBCALL | xEntityContactNY (Entity *entity, int index) |
Returns the y component of the nornal of a particular contact. | |
BBDECL float BBCALL | xEntityContactNZ (Entity *entity, int index) |
Returns the z component of the nornal of a particular contact. | |
BBDECL float BBCALL | xEntityContactX (Entity *entity, int index) |
Returns the world x coordinate of a particular contact. | |
BBDECL float BBCALL | xEntityContactY (Entity *entity, int index) |
Returns the world y coordinate of a particular contact. | |
BBDECL float BBCALL | xEntityContactZ (Entity *entity, int index) |
Returns the world z coordinate of a particular contact. | |
BBDECL void BBCALL | xEntityDamping (Entity *entity, float linear, float angular) |
Sets the linear and angular damping of the entity's body. | |
BBDECL float BBCALL | xEntityForceX (Entity *entity) |
Returns the x-component of the force acting on the entity's body. | |
BBDECL float BBCALL | xEntityForceY (Entity *entity) |
Returns the y-component of the force acting on the entity's body. | |
BBDECL float BBCALL | xEntityForceZ (Entity *entity) |
Returns the z-component of the force acting on the entity's body. | |
BBDECL void BBCALL | xEntityFriction (Entity *entity, float friction) |
Sets the friction of the entity's body. | |
BBDECL void BBCALL | xEntityGravity (Entity *entity, float x, float y, float z) |
Sets the vector of the gravity for the given entity. | |
BBDECL float BBCALL | xEntityGravityX (Entity *entity) |
Returns the X-component of the gravity vector for the given entity. | |
BBDECL float BBCALL | xEntityGravityY (Entity *entity) |
Returns the Y-component of the gravity vector for the given entity. | |
BBDECL float BBCALL | xEntityGravityZ (Entity *entity) |
Returns the Z-component of the gravity vector for the given entity. | |
BBDECL void BBCALL | xEntityLinearFactor (Entity *entity, float x, float y, float z) |
Sets the linear factor of the entity's body. | |
BBDECL float BBCALL | xEntityLinearFactorX (Entity *entity) |
Returns the linear factor of the entity's body along the X axis. | |
BBDECL float BBCALL | xEntityLinearFactorY (Entity *entity) |
Returns the linear factor of the entity's body along the Y axis. | |
BBDECL float BBCALL | xEntityLinearFactorZ (Entity *entity) |
Returns the linear factor of the entity's body along the Z axis. | |
BBDECL void BBCALL | xEntityReleaseForces (Entity *entity) |
Releases all the forces which were applied to the entity's body. | |
BBDECL float BBCALL | xEntityTorqueX (Entity *entity) |
Returns the x-component of the torque acting on the entity's body. | |
BBDECL float BBCALL | xEntityTorqueY (Entity *entity) |
Returns the y-component of the torque acting on the entity's body. | |
BBDECL float BBCALL | xEntityTorqueZ (Entity *entity) |
Returns the z-component of the torque acting on the entity's body. | |
BBDECL void BBCALL | xFreeEntityShapes (Entity *entity) |
Frees the shape and the body of an entity. | |
BBDECL void BBCALL | xFreeJoint (IJoint *joint) |
Frees a joint. | |
BBDECL float BBCALL | xGetEntityAngularDamping (Entity *entity) |
Returns the coefficient of the angular damping of the entity's body. | |
BBDECL float BBCALL | xGetEntityFriction (Entity *entity) |
Returns the friction of the entity's body. | |
BBDECL float BBCALL | xGetEntityLinearDamping (Entity *entity) |
Returns the coefficient of the linear damping of the entity's body. | |
BBDECL void BBCALL | xJoint6dofSpringParam (IJoint *joint, int index, bool enabled, float damping=1.0f, float stiffness=1.0f) |
Enables or disables a spring on the specific DOF of '6dofSpring' joint. | |
BBDECL void BBCALL | xJointAngularLimits (IJoint *joint, float lowerX, float lowerY, float lowerZ, float upperX, float upperY, float upperZ) |
Sets the angular limits of '6dof' and '6dofSpring' joints. | |
BBDECL float BBCALL | xJointAngularLowerX (IJoint *joint) |
Returns the lower angular limit of the X axis of '6dof' and '6dofSpring' joints. | |
BBDECL float BBCALL | xJointAngularLowerY (IJoint *joint) |
Returns the lower angular limit of the Y axis of '6dof' and '6dofSpring' joints. | |
BBDECL float BBCALL | xJointAngularLowerZ (IJoint *joint) |
Returns the lower angular limit of the Z axis of '6dof' and '6dofSpring' joints. | |
BBDECL float BBCALL | xJointAngularUpperX (IJoint *joint) |
Returns the upper angular limit of the X axis of '6dof' and '6dofSpring' joints. | |
BBDECL float BBCALL | xJointAngularUpperY (IJoint *joint) |
Returns the upper angular limit of the Y axis of '6dof' and '6dofSpring' joints. | |
BBDECL float BBCALL | xJointAngularUpperZ (IJoint *joint) |
Returns the upper angular limit of the Z axis of '6dof' and '6dofSpring' joints. | |
BBDECL void BBCALL | xJointEnableMotor (IJoint *joint, bool enabled, float targetVelocity, float maxForce, int index=0) |
Enables a motor of the specific dof of '6dof' or '6dofSpring' joints or the hinge joint. | |
BBDECL void BBCALL | xJointHingeAxis (IJoint *joint, float x, float y, float z) |
Sets the axis of the hinge joint. | |
BBDECL void BBCALL | xJointHingeLimit (IJoint *joint, float lowerLimit, float upperLimit, float softness=0.9f, float biasFactor=0.3f, float relaxationFactor=1.0f) |
Sets the limits and other parameters of the hinge joint. | |
BBDECL float BBCALL | xJointHingeLowerLimit (IJoint *joint) |
Returns the lower limit of the hinge joint. | |
BBDECL void BBCALL | xJointHingeMotorTarget (IJoint *joint, float targetAngle, float deltaTime) |
Sets the motor target of the hinge joint. | |
BBDECL float BBCALL | xJointHingeUpperLimit (IJoint *joint) |
Returns the upper limit of the hinge joint. | |
BBDECL void BBCALL | xJointLinearLimits (IJoint *joint, float lowerX, float lowerY, float lowerZ, float upperX, float upperY, float upperZ) |
Sets the linear limits of '6dof' and '6dofSpring' joints. | |
BBDECL float BBCALL | xJointLinearLowerX (IJoint *joint) |
Returns the lower linear limit of the X axis of '6dof' and '6dofSpring' joints. | |
BBDECL float BBCALL | xJointLinearLowerY (IJoint *joint) |
Returns the lower linear limit of the Y axis of '6dof' and '6dofSpring' joints. | |
BBDECL float BBCALL | xJointLinearLowerZ (IJoint *joint) |
Returns the lower linear limit of the Z axis of '6dof' and '6dofSpring' joints. | |
BBDECL float BBCALL | xJointLinearUpperX (IJoint *joint) |
Returns the upper linear limit of the X axis of '6dof' and '6dofSpring' joints. | |
BBDECL float BBCALL | xJointLinearUpperY (IJoint *joint) |
Returns the upper linear limit of the Y axis of '6dof' and '6dofSpring' joints. | |
BBDECL float BBCALL | xJointLinearUpperZ (IJoint *joint) |
Returns the upper linear limit of the Z axis of '6dof' and '6dofSpring' joints. | |
BBDECL void BBCALL | xJointPivotA (IJoint *joint, float x, float y, float z) |
Sets the coordinates of the pivot A of the 'point to point' joint. | |
BBDECL float BBCALL | xJointPivotAX (IJoint *joint) |
Returns the local x-coodinate of the pivot A of the 'point to point' joint. | |
BBDECL float BBCALL | xJointPivotAY (IJoint *joint) |
Returns the local y-coodinate of the pivot A of the 'point to point' joint. | |
BBDECL float BBCALL | xJointPivotAZ (IJoint *joint) |
Returns the local z-coodinate of the pivot A of the 'point to point' joint. | |
BBDECL void BBCALL | xJointPivotB (IJoint *joint, float x, float y, float z) |
Sets the coordinates of the pivot B of the 'point to point' joint. | |
BBDECL float BBCALL | xJointPivotBX (IJoint *joint) |
Returns the local x-coodinate of the pivot B of the 'point to point' joint. | |
BBDECL float BBCALL | xJointPivotBY (IJoint *joint) |
Returns the local y-coodinate of the pivot B of the 'point to point' joint. | |
BBDECL float BBCALL | xJointPivotBZ (IJoint *joint) |
Returns the local z-coodinate of the pivot B of the 'point to point' joint. | |
BBDECL void BBCALL | xPhysicsDebugRender (bool state) |
Enables or disables debug rendering for physics. | |
BBDECL void BBCALL | xWorldFrequency (float frequency, xWorld *world=NULL) |
Sets the world's physics simulation frequency. | |
BBDECL void BBCALL | xWorldGravity (float x, float y, float z, xWorld *world=NULL) |
Sets the vector of the gravity in the given world. | |
BBDECL float BBCALL | xWorldGravityX (xWorld *world=NULL) |
Returns the X-component of the gravity vector in the given world. | |
BBDECL float BBCALL | xWorldGravityY (xWorld *world=NULL) |
Returns the Y-component of the gravity vector in the given world. | |
BBDECL float BBCALL | xWorldGravityZ (xWorld *world=NULL) |
Returns the Z-component of the gravity vector in the given world. |
BBDECL void BBCALL xEntityAddDummyShape | ( | Entity * | entity ) |
Creates a dummy shape and links 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 links 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. Setting mass to zero creates a fixed (non-dynamic) rigid body.
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 links 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. Setting mass to zero creates a fixed (non-dynamic) rigid body.
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 links 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. Setting mass to zero creates a fixed (non-dynamic) rigid body.
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 links 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. Setting mass to zero creates a fixed (non-dynamic) rigid body.
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 links 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. Setting mass to zero creates a fixed (non-dynamic) rigid body.
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, |
float | mass | ||
) |
Creates a trimesh (triangle mesh) shape and links it to the entity.
Created trimesh shape is static which means that moving of vertices won't affect the shape. Setting mass to zero creates a fixed (non-dynamic) rigid body.
entity | Entity handle |
mass | Mass of the body |
BBDECL void BBCALL xEntityAddHullShape | ( | Entity * | entity, |
float | mass | ||
) |
Creates a shape of a convex hull and links it to the entity.
The convex hull works much faster than the trimesh. That's why the use of the convex hull is more preferable if it fits your needs. Setting mass to zero creates a fixed (non-dynamic) rigid body.
entity | Entity handle |
mass | Mass of the body |
BBDECL void BBCALL xWorldGravity | ( | float | x, |
float | y, | ||
float | z, | ||
xWorld * | world = NULL |
||
) |
Sets the vector of the gravity in the given world.
Default values are (0.0; -9.81; 0.0) . If the world is not specified, the gravity of the active world will be changed.
x | X-component of the gravity vector |
y | Y-component of the gravity vector |
z | Z-component of the gravity vector |
world | World handle |
BBDECL float BBCALL xWorldGravityX | ( | xWorld * | world = NULL ) |
Returns the X-component of the gravity vector in the given world.
If the world is not specified, the gravity of the active world will be returned.
world | World handle |
BBDECL float BBCALL xWorldGravityY | ( | xWorld * | world = NULL ) |
Returns the Y-component of the gravity vector in the given world.
If the world is not specified, the gravity of the active world will be returned.
world | World handle |
BBDECL float BBCALL xWorldGravityZ | ( | xWorld * | world = NULL ) |
Returns the Z-component of the gravity vector in the given world.
If the world is not specified, the gravity of the active world will be returned.
world | World handle |
BBDECL void BBCALL xWorldFrequency | ( | float | frequency, |
xWorld * | world = NULL |
||
) |
Sets the world's physics simulation frequency.
frequency | Physics simulation frequency (60 fps by default) |
world | World handle |
BBDECL void BBCALL xEntityApplyCentralForce | ( | Entity * | entity, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Applies a force to the center of mass of the entity's body.
entity | Entity handle |
x | X-component of the force vector |
y | Y-component of the force vector |
z | Z-component of the force vector |
BBDECL void BBCALL xEntityApplyCentralImpulse | ( | Entity * | entity, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Applies an impulse to the center of mass of the entity's body.
entity | Entity handle |
x | X-component of the impulse vector |
y | Y-component of the impulse vector |
z | Z-component of the impulse vector |
BBDECL void BBCALL xEntityApplyTorque | ( | Entity * | entity, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Applies a torque to the entity's body.
entity | Entity handle |
x | X-component of the torque vector |
y | Y-component of the torque vector |
z | Z-component of the torque vector |
BBDECL void BBCALL xEntityApplyTorqueImpulse | ( | Entity * | entity, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Applies a torque impulse to the entity's body.
entity | Entity handle |
x | X-component of the torque impulse vector |
y | Y-component of the torque impulse vector |
z | Z-component of the torque impulse vector |
BBDECL void BBCALL xEntityApplyForce | ( | Entity * | entity, |
float | x, | ||
float | y, | ||
float | z, | ||
float | pointx, | ||
float | pointy, | ||
float | pointz | ||
) |
Applies a force to the entity's body at the specific point relative to the center of this body.
entity | Entity handle |
x | X-component of the force vector |
y | Y-component of the force vector |
z | Z-component of the force vector |
pointx | X-coordinate of the point |
pointy | Y-coordinate of the point |
pointz | Z-coordinate of the point |
BBDECL void BBCALL xEntityApplyImpulse | ( | Entity * | entity, |
float | x, | ||
float | y, | ||
float | z, | ||
float | pointx, | ||
float | pointy, | ||
float | pointz | ||
) |
Applies an impulse to the entity's body at the specific point relative to the center of this body.
entity | Entity handle |
x | X-component of the impulse vector |
y | Y-component of the impulse vector |
z | Z-component of the impulse vector |
pointx | X-coordinate of the point |
pointy | Y-coordinate of the point |
pointz | Z-coordinate of the point |
BBDECL void BBCALL xEntityReleaseForces | ( | Entity * | entity ) |
Releases all the forces which were applied to the entity's body.
Linear and angular velocities are set to zero values.
entity | Entity handle |
BBDECL void BBCALL xEntityDamping | ( | Entity * | entity, |
float | linear, | ||
float | angular | ||
) |
Sets the linear and angular damping of the entity's body.
The values of linear and angular damping are clamped to [0.0; 1.0].
entity | Entity handle |
linear | The coefficient of the linear damping |
angular | The coefficient of the angular damping |
BBDECL float BBCALL xGetEntityLinearDamping | ( | Entity * | entity ) |
Returns the coefficient of the linear damping of the entity's body.
entity | Entity handle |
BBDECL float BBCALL xGetEntityAngularDamping | ( | Entity * | entity ) |
Returns the coefficient of the angular damping of the entity's body.
entity | Entity handle |
BBDECL void BBCALL xEntityFriction | ( | Entity * | entity, |
float | friction | ||
) |
Sets the friction of the entity's body.
entity | Entity handle |
friction | The coefficient of the friction |
BBDECL float BBCALL xGetEntityFriction | ( | Entity * | entity ) |
Returns the friction of the entity's body.
entity | Entity handle |
BBDECL float BBCALL xEntityForceX | ( | Entity * | entity ) |
Returns the x-component of the force acting on the entity's body.
entity | Entity handle |
BBDECL float BBCALL xEntityForceY | ( | Entity * | entity ) |
Returns the y-component of the force acting on the entity's body.
entity | Entity handle |
BBDECL float BBCALL xEntityForceZ | ( | Entity * | entity ) |
Returns the z-component of the force acting on the entity's body.
entity | Entity handle |
BBDECL float BBCALL xEntityTorqueX | ( | Entity * | entity ) |
Returns the x-component of the torque acting on the entity's body.
entity | Entity handle |
BBDECL float BBCALL xEntityTorqueY | ( | Entity * | entity ) |
Returns the y-component of the torque acting on the entity's body.
entity | Entity handle |
BBDECL float BBCALL xEntityTorqueZ | ( | Entity * | entity ) |
Returns the z-component of the torque acting on the entity's body.
entity | Entity handle |
BBDECL void BBCALL xFreeEntityShapes | ( | Entity * | entity ) |
Frees the shape and the body of an entity.
entity | Entity handle |
BBDECL int BBCALL xCountContacts | ( | Entity * | entity ) |
Returns the number of contacts of the entity's body.
entity | Entity handle |
BBDECL float BBCALL xEntityContactX | ( | Entity * | entity, |
int | index | ||
) |
Returns the world x coordinate of a particular contact.
entity | Entity handle |
index | Index of contact in range [0; xCountContacts(entity)] |
BBDECL float BBCALL xEntityContactY | ( | Entity * | entity, |
int | index | ||
) |
Returns the world y coordinate of a particular contact.
entity | Entity handle |
index | Index of contact in range [0; xCountContacts(entity)] |
BBDECL float BBCALL xEntityContactZ | ( | Entity * | entity, |
int | index | ||
) |
Returns the world z coordinate of a particular contact.
entity | Entity handle |
index | Index of contact in range [0; xCountContacts(entity)] |
BBDECL float BBCALL xEntityContactNX | ( | Entity * | entity, |
int | index | ||
) |
Returns the x component of the nornal of a particular contact.
entity | Entity handle |
index | Index of contact in range [0; xCountContacts(entity)] |
BBDECL float BBCALL xEntityContactNY | ( | Entity * | entity, |
int | index | ||
) |
Returns the y component of the nornal of a particular contact.
entity | Entity handle |
index | Index of contact in range [0; xCountContacts(entity)] |
BBDECL float BBCALL xEntityContactNZ | ( | Entity * | entity, |
int | index | ||
) |
Returns the z component of the nornal of a particular contact.
entity | Entity handle |
index | Index of contact in range [0; xCountContacts(entity)] |
BBDECL float BBCALL xEntityContactDistance | ( | Entity * | entity, |
int | index | ||
) |
Returns the distance of a particular contact.
Sometimes you need to ignore the contacts whose distance is less than some threshold.
entity | Entity handle |
index | Index of contact in range [0; xCountContacts(entity)] |
BBDECL Entity* BBCALL xContactEntity | ( | Entity * | entity, |
int | index | ||
) |
Returns an entity which has a contact with a given entity.
entity | Entity handle |
index | Index of contact in range [0; xCountContacts(entity)] |
BBDECL IJoint* BBCALL xCreateJoint | ( | int | jointType, |
Entity * | firstBody, | ||
Entity * | secondBody | ||
) |
Creates a joint between to bodies and returns its handle.
jointType | The type of the joint. See 'Joint types' for more information about each type of joint |
firstBody | The handle of the first entity |
secondBody | The handle of the second entity |
BBDECL void BBCALL xFreeJoint | ( | IJoint * | joint ) |
Frees a joint.
joint | Joint handle |
BBDECL void BBCALL xJointPivotA | ( | IJoint * | joint, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Sets the coordinates of the pivot A of the 'point to point' joint.
Pivot A is a pivot of the first body connected to the second body by the given joint.
joint | Joint handle |
x | Local x-coordinate |
y | Local y-coordinate |
z | Local z-coordinate |
BBDECL void BBCALL xJointPivotB | ( | IJoint * | joint, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Sets the coordinates of the pivot B of the 'point to point' joint.
Pivot B is a pivot of the second body connected to the first body by the given joint.
joint | Joint handle |
x | Local x-coordinate |
y | Local y-coordinate |
z | Local z-coordinate |
BBDECL float BBCALL xJointPivotAX | ( | IJoint * | joint ) |
Returns the local x-coodinate of the pivot A of the 'point to point' joint.
joint | Joint handle |
BBDECL float BBCALL xJointPivotAY | ( | IJoint * | joint ) |
Returns the local y-coodinate of the pivot A of the 'point to point' joint.
joint | Joint handle |
BBDECL float BBCALL xJointPivotAZ | ( | IJoint * | joint ) |
Returns the local z-coodinate of the pivot A of the 'point to point' joint.
joint | Joint handle |
BBDECL float BBCALL xJointPivotBX | ( | IJoint * | joint ) |
Returns the local x-coodinate of the pivot B of the 'point to point' joint.
joint | Joint handle |
BBDECL float BBCALL xJointPivotBY | ( | IJoint * | joint ) |
Returns the local y-coodinate of the pivot B of the 'point to point' joint.
joint | Joint handle |
BBDECL float BBCALL xJointPivotBZ | ( | IJoint * | joint ) |
Returns the local z-coodinate of the pivot B of the 'point to point' joint.
joint | Joint handle |
BBDECL void BBCALL xJointLinearLimits | ( | IJoint * | joint, |
float | lowerX, | ||
float | lowerY, | ||
float | lowerZ, | ||
float | upperX, | ||
float | upperY, | ||
float | upperZ | ||
) |
Sets the linear limits of '6dof' and '6dofSpring' joints.
joint | Joint handle |
lowerX | The lower linear limit of the X axis |
lowerY | The lower linear limit of the Y axis |
lowerZ | The lower linear limit of the Z axis |
upperX | The upper linear limit of the X axis |
upperY | The upper linear limit of the Y axis |
upperZ | The upper linear limit of the Z axis |
BBDECL void BBCALL xJointAngularLimits | ( | IJoint * | joint, |
float | lowerX, | ||
float | lowerY, | ||
float | lowerZ, | ||
float | upperX, | ||
float | upperY, | ||
float | upperZ | ||
) |
Sets the angular limits of '6dof' and '6dofSpring' joints.
joint | Joint handle |
lowerX | The lower angular limit of the X axis |
lowerY | The lower angular limit of the Y axis |
lowerZ | The lower angular limit of the Z axis |
upperX | The upper angular limit of the X axis |
upperY | The upper angular limit of the Y axis |
upperZ | The upper angular limit of the Z axis |
BBDECL float BBCALL xJointLinearLowerX | ( | IJoint * | joint ) |
Returns the lower linear limit of the X axis of '6dof' and '6dofSpring' joints.
joint | Joint handle |
BBDECL float BBCALL xJointLinearLowerY | ( | IJoint * | joint ) |
Returns the lower linear limit of the Y axis of '6dof' and '6dofSpring' joints.
joint | Joint handle |
BBDECL float BBCALL xJointLinearLowerZ | ( | IJoint * | joint ) |
Returns the lower linear limit of the Z axis of '6dof' and '6dofSpring' joints.
joint | Joint handle |
BBDECL float BBCALL xJointLinearUpperX | ( | IJoint * | joint ) |
Returns the upper linear limit of the X axis of '6dof' and '6dofSpring' joints.
joint | Joint handle |
BBDECL float BBCALL xJointLinearUpperY | ( | IJoint * | joint ) |
Returns the upper linear limit of the Y axis of '6dof' and '6dofSpring' joints.
joint | Joint handle |
BBDECL float BBCALL xJointLinearUpperZ | ( | IJoint * | joint ) |
Returns the upper linear limit of the Z axis of '6dof' and '6dofSpring' joints.
joint | Joint handle |
BBDECL float BBCALL xJointAngularLowerX | ( | IJoint * | joint ) |
Returns the lower angular limit of the X axis of '6dof' and '6dofSpring' joints.
joint | Joint handle |
BBDECL float BBCALL xJointAngularLowerY | ( | IJoint * | joint ) |
Returns the lower angular limit of the Y axis of '6dof' and '6dofSpring' joints.
joint | Joint handle |
BBDECL float BBCALL xJointAngularLowerZ | ( | IJoint * | joint ) |
Returns the lower angular limit of the Z axis of '6dof' and '6dofSpring' joints.
joint | Joint handle |
BBDECL float BBCALL xJointAngularUpperX | ( | IJoint * | joint ) |
Returns the upper angular limit of the X axis of '6dof' and '6dofSpring' joints.
joint | Joint handle |
BBDECL float BBCALL xJointAngularUpperY | ( | IJoint * | joint ) |
Returns the upper angular limit of the Y axis of '6dof' and '6dofSpring' joints.
joint | Joint handle |
BBDECL float BBCALL xJointAngularUpperZ | ( | IJoint * | joint ) |
Returns the upper angular limit of the Z axis of '6dof' and '6dofSpring' joints.
joint | Joint handle |
BBDECL void BBCALL xJoint6dofSpringParam | ( | IJoint * | joint, |
int | index, | ||
bool | enabled, | ||
float | damping = 1.0f , |
||
float | stiffness = 1.0f |
||
) |
Enables or disables a spring on the specific DOF of '6dofSpring' joint.
If spring is enabled, the coefficients of damping and stiffness can be set.
joint | Joint handle |
index | DOF index (see 'Joint types') |
enabled | Enable or disable the spring |
damping | The coefficient of damping |
stiffness | The coefficient of stiffness |
BBDECL void BBCALL xJointHingeAxis | ( | IJoint * | joint, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Sets the axis of the hinge joint.
joint | Joint handle |
x | X-component of the axis vector |
y | Y-component of the axis vector |
z | Z-component of the axis vector |
BBDECL void BBCALL xJointHingeLimit | ( | IJoint * | joint, |
float | lowerLimit, | ||
float | upperLimit, | ||
float | softness = 0.9f , |
||
float | biasFactor = 0.3f , |
||
float | relaxationFactor = 1.0f |
||
) |
Sets the limits and other parameters of the hinge joint.
Sets the lower and upper limits, the softness, the bias factor and the relaxation factor of the hinge joint.
joint | Joint handle |
lowerLimit | The lower limit |
upperLimit | The upper limit |
softness | The coefficient of softness |
biasFactor | The bias factor |
relaxationFactor | The relaxation factor |
BBDECL float BBCALL xJointHingeLowerLimit | ( | IJoint * | joint ) |
Returns the lower limit of the hinge joint.
joint | Joint handle |
BBDECL float BBCALL xJointHingeUpperLimit | ( | IJoint * | joint ) |
Returns the upper limit of the hinge joint.
joint | Joint handle |
BBDECL void BBCALL xJointEnableMotor | ( | IJoint * | joint, |
bool | enabled, | ||
float | targetVelocity, | ||
float | maxForce, | ||
int | index = 0 |
||
) |
Enables a motor of the specific dof of '6dof' or '6dofSpring' joints or the hinge joint.
The last parameter 'index' is used only for '6dof' or '6dofSpring' joints. See 'Joint types'.
joint | Joint handle |
enabled | Enable or disable the motor |
targetVelocity | The target angular velocity |
maxForce | The maximum force of the motor |
index | DOF index (see 'Joint types') |
BBDECL void BBCALL xJointHingeMotorTarget | ( | IJoint * | joint, |
float | targetAngle, | ||
float | deltaTime | ||
) |
Sets the motor target of the hinge joint.
xJointHingeMotorTarget sets target angular velocity ( (targetAngle - currentAngle) / deltaTime ) under the hood.
joint | Joint handle |
targetAngle | The target angle |
deltaTime | The delta time |
BBDECL void BBCALL xEntityLinearFactor | ( | Entity * | entity, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Sets the linear factor of the entity's body.
This could be useful for locking the motion along one or more world axis. For instance. If you're making a 2d game it would be useful to lock the motion in the XY plane and allow rotation around the Z axis. It could be done in a such way: xEntityLinearFactor(ent, 1.0, 1.0, 0.0); xEntityAngularFactor(ent, 0.0, 0.0, 1.0);
entity | Entity handle |
x | The linear factor along the X axis |
y | The linear factor along the Y axis |
z | The linear factor along the Z axis |
BBDECL float BBCALL xEntityLinearFactorX | ( | Entity * | entity ) |
Returns the linear factor of the entity's body along the X axis.
entity | Entity handle |
BBDECL float BBCALL xEntityLinearFactorY | ( | Entity * | entity ) |
Returns the linear factor of the entity's body along the Y axis.
entity | Entity handle |
BBDECL float BBCALL xEntityLinearFactorZ | ( | Entity * | entity ) |
Returns the linear factor of the entity's body along the Z axis.
entity | Entity handle |
BBDECL void BBCALL xEntityAngularFactor | ( | Entity * | entity, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Sets the angular factor of the entity's body.
This could be useful for locking the rotation around one or more world axis. For instance. If you're making a 2d game it would be useful to lock the motion in the XY plane and allow rotation around the Z axis. It could be done in a such way: xEntityLinearFactor(ent, 1.0, 1.0, 0.0); xEntityAngularFactor(ent, 0.0, 0.0, 1.0);
entity | Entity handle |
x | The angular factor around the X axis |
y | The angular factor around the Y axis |
z | The angular factor around the Z axis |
BBDECL float BBCALL xEntityAngularFactorX | ( | Entity * | entity ) |
Returns the angular factor of the entity's body around the X axis.
entity | Entity handle |
BBDECL float BBCALL xEntityAngularFactorY | ( | Entity * | entity ) |
Returns the angular factor of the entity's body around the Y axis.
entity | Entity handle |
BBDECL float BBCALL xEntityAngularFactorZ | ( | Entity * | entity ) |
Returns the angular factor of the entity's body around the Z axis.
entity | Entity handle |
BBDECL void BBCALL xEntityGravity | ( | Entity * | entity, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Sets the vector of the gravity for the given entity.
Default values for newly created bodies are (0.0; -9.81; 0.0) .
entity | Entity handle |
x | X-component of the gravity vector |
y | Y-component of the gravity vector |
z | Z-component of the gravity vector |
BBDECL float BBCALL xEntityGravityX | ( | Entity * | entity ) |
Returns the X-component of the gravity vector for the given entity.
entity | Entity handle |
BBDECL float BBCALL xEntityGravityY | ( | Entity * | entity ) |
Returns the Y-component of the gravity vector for the given entity.
entity | Entity handle |
BBDECL float BBCALL xEntityGravityZ | ( | Entity * | entity ) |
Returns the Z-component of the gravity vector for the given entity.
entity | Entity handle |
BBDECL void BBCALL xPhysicsDebugRender | ( | bool | state ) |
Enables or disables debug rendering for physics.
state | Debug render state |