Functions

Physics
[Command reference]

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.

Function Documentation

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.

Parameters:
entityEntity 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.

Parameters:
entityEntity handle
massMass of the body
widthWidth of the body
heightHeight of the body
depthDepth 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.

Parameters:
entityEntity handle
massMass of the body
radiusRadius 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.

Parameters:
entityEntity handle
massMass of the body
radiusRadius of the body
heightHeight 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.

Parameters:
entityEntity handle
massMass of the body
radiusRadius of the body
heightHeight 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.

Parameters:
entityEntity handle
massMass of the body
widthWidth of the body
heightHeight of the body
depthDepth 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.

Parameters:
entityEntity handle
massMass 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.

Parameters:
entityEntity handle
massMass 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.

Parameters:
xX-component of the gravity vector
yY-component of the gravity vector
zZ-component of the gravity vector
worldWorld 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.

Parameters:
worldWorld 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.

Parameters:
worldWorld 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.

Parameters:
worldWorld handle
BBDECL void BBCALL xWorldFrequency ( float  frequency,
xWorld *  world = NULL 
)

Sets the world's physics simulation frequency.

Parameters:
frequencyPhysics simulation frequency (60 fps by default)
worldWorld 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.

Parameters:
entityEntity handle
xX-component of the force vector
yY-component of the force vector
zZ-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.

Parameters:
entityEntity handle
xX-component of the impulse vector
yY-component of the impulse vector
zZ-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.

Parameters:
entityEntity handle
xX-component of the torque vector
yY-component of the torque vector
zZ-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.

Parameters:
entityEntity handle
xX-component of the torque impulse vector
yY-component of the torque impulse vector
zZ-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.

Parameters:
entityEntity handle
xX-component of the force vector
yY-component of the force vector
zZ-component of the force vector
pointxX-coordinate of the point
pointyY-coordinate of the point
pointzZ-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.

Parameters:
entityEntity handle
xX-component of the impulse vector
yY-component of the impulse vector
zZ-component of the impulse vector
pointxX-coordinate of the point
pointyY-coordinate of the point
pointzZ-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.

Parameters:
entityEntity 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].

Parameters:
entityEntity handle
linearThe coefficient of the linear damping
angularThe coefficient of the angular damping
BBDECL float BBCALL xGetEntityLinearDamping ( Entity *  entity )

Returns the coefficient of the linear damping of the entity's body.

Parameters:
entityEntity handle
BBDECL float BBCALL xGetEntityAngularDamping ( Entity *  entity )

Returns the coefficient of the angular damping of the entity's body.

Parameters:
entityEntity handle
BBDECL void BBCALL xEntityFriction ( Entity *  entity,
float  friction 
)

Sets the friction of the entity's body.

Parameters:
entityEntity handle
frictionThe coefficient of the friction
BBDECL float BBCALL xGetEntityFriction ( Entity *  entity )

Returns the friction of the entity's body.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityForceX ( Entity *  entity )

Returns the x-component of the force acting on the entity's body.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityForceY ( Entity *  entity )

Returns the y-component of the force acting on the entity's body.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityForceZ ( Entity *  entity )

Returns the z-component of the force acting on the entity's body.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityTorqueX ( Entity *  entity )

Returns the x-component of the torque acting on the entity's body.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityTorqueY ( Entity *  entity )

Returns the y-component of the torque acting on the entity's body.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityTorqueZ ( Entity *  entity )

Returns the z-component of the torque acting on the entity's body.

Parameters:
entityEntity handle
BBDECL void BBCALL xFreeEntityShapes ( Entity *  entity )

Frees the shape and the body of an entity.

Parameters:
entityEntity handle
BBDECL int BBCALL xCountContacts ( Entity *  entity )

Returns the number of contacts of the entity's body.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityContactX ( Entity *  entity,
int  index 
)

Returns the world x coordinate of a particular contact.

Parameters:
entityEntity handle
indexIndex of contact in range [0; xCountContacts(entity)]
BBDECL float BBCALL xEntityContactY ( Entity *  entity,
int  index 
)

Returns the world y coordinate of a particular contact.

Parameters:
entityEntity handle
indexIndex of contact in range [0; xCountContacts(entity)]
BBDECL float BBCALL xEntityContactZ ( Entity *  entity,
int  index 
)

Returns the world z coordinate of a particular contact.

Parameters:
entityEntity handle
indexIndex 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.

Parameters:
entityEntity handle
indexIndex 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.

Parameters:
entityEntity handle
indexIndex 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.

Parameters:
entityEntity handle
indexIndex 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.

Parameters:
entityEntity handle
indexIndex 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.

Parameters:
entityEntity handle
indexIndex 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.

Parameters:
jointTypeThe type of the joint. See 'Joint types' for more information about each type of joint
firstBodyThe handle of the first entity
secondBodyThe handle of the second entity
BBDECL void BBCALL xFreeJoint ( IJoint *  joint )

Frees a joint.

Parameters:
jointJoint 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.

Parameters:
jointJoint handle
xLocal x-coordinate
yLocal y-coordinate
zLocal 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.

Parameters:
jointJoint handle
xLocal x-coordinate
yLocal y-coordinate
zLocal z-coordinate
BBDECL float BBCALL xJointPivotAX ( IJoint *  joint )

Returns the local x-coodinate of the pivot A of the 'point to point' joint.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointPivotAY ( IJoint *  joint )

Returns the local y-coodinate of the pivot A of the 'point to point' joint.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointPivotAZ ( IJoint *  joint )

Returns the local z-coodinate of the pivot A of the 'point to point' joint.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointPivotBX ( IJoint *  joint )

Returns the local x-coodinate of the pivot B of the 'point to point' joint.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointPivotBY ( IJoint *  joint )

Returns the local y-coodinate of the pivot B of the 'point to point' joint.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointPivotBZ ( IJoint *  joint )

Returns the local z-coodinate of the pivot B of the 'point to point' joint.

Parameters:
jointJoint 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.

Parameters:
jointJoint handle
lowerXThe lower linear limit of the X axis
lowerYThe lower linear limit of the Y axis
lowerZThe lower linear limit of the Z axis
upperXThe upper linear limit of the X axis
upperYThe upper linear limit of the Y axis
upperZThe 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.

Parameters:
jointJoint handle
lowerXThe lower angular limit of the X axis
lowerYThe lower angular limit of the Y axis
lowerZThe lower angular limit of the Z axis
upperXThe upper angular limit of the X axis
upperYThe upper angular limit of the Y axis
upperZThe 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.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointLinearLowerY ( IJoint *  joint )

Returns the lower linear limit of the Y axis of '6dof' and '6dofSpring' joints.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointLinearLowerZ ( IJoint *  joint )

Returns the lower linear limit of the Z axis of '6dof' and '6dofSpring' joints.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointLinearUpperX ( IJoint *  joint )

Returns the upper linear limit of the X axis of '6dof' and '6dofSpring' joints.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointLinearUpperY ( IJoint *  joint )

Returns the upper linear limit of the Y axis of '6dof' and '6dofSpring' joints.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointLinearUpperZ ( IJoint *  joint )

Returns the upper linear limit of the Z axis of '6dof' and '6dofSpring' joints.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointAngularLowerX ( IJoint *  joint )

Returns the lower angular limit of the X axis of '6dof' and '6dofSpring' joints.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointAngularLowerY ( IJoint *  joint )

Returns the lower angular limit of the Y axis of '6dof' and '6dofSpring' joints.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointAngularLowerZ ( IJoint *  joint )

Returns the lower angular limit of the Z axis of '6dof' and '6dofSpring' joints.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointAngularUpperX ( IJoint *  joint )

Returns the upper angular limit of the X axis of '6dof' and '6dofSpring' joints.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointAngularUpperY ( IJoint *  joint )

Returns the upper angular limit of the Y axis of '6dof' and '6dofSpring' joints.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointAngularUpperZ ( IJoint *  joint )

Returns the upper angular limit of the Z axis of '6dof' and '6dofSpring' joints.

Parameters:
jointJoint 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.

Parameters:
jointJoint handle
indexDOF index (see 'Joint types')
enabledEnable or disable the spring
dampingThe coefficient of damping
stiffnessThe coefficient of stiffness
BBDECL void BBCALL xJointHingeAxis ( IJoint *  joint,
float  x,
float  y,
float  z 
)

Sets the axis of the hinge joint.

Parameters:
jointJoint handle
xX-component of the axis vector
yY-component of the axis vector
zZ-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.

Parameters:
jointJoint handle
lowerLimitThe lower limit
upperLimitThe upper limit
softnessThe coefficient of softness
biasFactorThe bias factor
relaxationFactorThe relaxation factor
BBDECL float BBCALL xJointHingeLowerLimit ( IJoint *  joint )

Returns the lower limit of the hinge joint.

Parameters:
jointJoint handle
BBDECL float BBCALL xJointHingeUpperLimit ( IJoint *  joint )

Returns the upper limit of the hinge joint.

Parameters:
jointJoint 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'.

Parameters:
jointJoint handle
enabledEnable or disable the motor
targetVelocityThe target angular velocity
maxForceThe maximum force of the motor
indexDOF 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.

Parameters:
jointJoint handle
targetAngleThe target angle
deltaTimeThe 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);

Parameters:
entityEntity handle
xThe linear factor along the X axis
yThe linear factor along the Y axis
zThe 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.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityLinearFactorY ( Entity *  entity )

Returns the linear factor of the entity's body along the Y axis.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityLinearFactorZ ( Entity *  entity )

Returns the linear factor of the entity's body along the Z axis.

Parameters:
entityEntity 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);

Parameters:
entityEntity handle
xThe angular factor around the X axis
yThe angular factor around the Y axis
zThe 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.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityAngularFactorY ( Entity *  entity )

Returns the angular factor of the entity's body around the Y axis.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityAngularFactorZ ( Entity *  entity )

Returns the angular factor of the entity's body around the Z axis.

Parameters:
entityEntity 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) .

Parameters:
entityEntity handle
xX-component of the gravity vector
yY-component of the gravity vector
zZ-component of the gravity vector
BBDECL float BBCALL xEntityGravityX ( Entity *  entity )

Returns the X-component of the gravity vector for the given entity.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityGravityY ( Entity *  entity )

Returns the Y-component of the gravity vector for the given entity.

Parameters:
entityEntity handle
BBDECL float BBCALL xEntityGravityZ ( Entity *  entity )

Returns the Z-component of the gravity vector for the given entity.

Parameters:
entityEntity handle
BBDECL void BBCALL xPhysicsDebugRender ( bool  state )

Enables or disables debug rendering for physics.

Parameters:
stateDebug render state

Xors3d Engine, Copyright © 2009-2011, www.xors3d.com Generated by Doxygen