![]() |
Xors3d Engine
|
Functions | |
BBDECL IJoint *BBCALL | xCreateBallJoint (Entity *firstBody, Entity *secondBody, float pivotX, float pivotY, float pivotZ, bool isGlobal=false) |
Creates a 'ball' joint between two bodies and returns its handle. See description JOINT_BALL. | |
BBDECL IJoint *BBCALL | xCreateD6Joint (Entity *firstBody, Entity *secondBody, float pivot1X, float pivot1Y, float pivot1Z, float pivot2X, float pivot2Y, float pivot2Z, bool isGlobal1=false, bool isGlobal2=false) |
Creates a 'D6' joint between two bodies and returns its handle. See description JOINT_D6. | |
BBDECL IJoint *BBCALL | xCreateD6SpringJoint (Entity *firstBody, Entity *secondBody, float pivot1X, float pivot1Y, float pivot1Z, float pivot2X, float pivot2Y, float pivot2Z, bool isGlobal1=false, bool isGlobal2=false) |
Creates a 'D6Spring' joint between two bodies and returns its handle. See description JOINT_D6SPRING. | |
BBDECL IJoint *BBCALL | xCreateHingeJoint (Entity *firstBody, Entity *secondBody, float pivotX, float pivotY, float pivotZ, float axisX, float axisY, float axisZ, bool isGlobal=false) |
Creates a 'hinge' joint between two bodies and returns its handle. See description JOINT_HINGE. | |
BBDECL void BBCALL | xFreeJoint (IJoint *joint) |
Frees a joint. | |
BBDECL float BBCALL | xJointBallGetPivotX (IJoint *joint, bool isGlobal=false) |
Returns the X coodinate of the pivot A of the 'ball' joint. | |
BBDECL float BBCALL | xJointBallGetPivotY (IJoint *joint, bool isGlobal=false) |
Returns the Y coodinate of the pivot A of the 'ball' joint. | |
BBDECL float BBCALL | xJointBallGetPivotZ (IJoint *joint, bool isGlobal=false) |
Returns the Z coodinate of the pivot A of the 'ball' joint. | |
BBDECL void BBCALL | xJointBallSetPivot (IJoint *joint, float x, float y, float z, bool isGlobal=false) |
Sets the coordinates of the pivot of the 'ball' joint. | |
BBDECL float BBCALL | xJointD6GetAngle (IJoint *joint, int axis=0) |
Retrieves the current angle around specific axis of D6 and D6Spring joints. | |
BBDECL float BBCALL | xJointD6GetAngularLowerX (IJoint *joint) |
Returns the lower angular limit of the X axis of D6 or D6Spring joint. | |
BBDECL float BBCALL | xJointD6GetAngularLowerY (IJoint *joint) |
Returns the lower angular limit of the Y axis of D6 or D6Spring joint. | |
BBDECL float BBCALL | xJointD6GetAngularLowerZ (IJoint *joint) |
Returns the lower angular limit of the Z axis of D6 or D6Spring joint. | |
BBDECL float BBCALL | xJointD6GetAngularUpperX (IJoint *joint) |
Returns the upper angular limit of the X axis of D6 or D6Spring joint. | |
BBDECL float BBCALL | xJointD6GetAngularUpperY (IJoint *joint) |
Returns the upper angular limit of the Y axis of D6 or D6Spring joint. | |
BBDECL float BBCALL | xJointD6GetAngularUpperZ (IJoint *joint) |
Returns the upper angular limit of the Z axis of D6 or D6Spring joint. | |
BBDECL float BBCALL | xJointD6GetLinearLowerX (IJoint *joint) |
Returns the lower linear limit of the X axis of D6 or D6Spring joint. | |
BBDECL float BBCALL | xJointD6GetLinearLowerY (IJoint *joint) |
Returns the lower linear limit of the Y axis of D6 or D6Spring joint. | |
BBDECL float BBCALL | xJointD6GetLinearLowerZ (IJoint *joint) |
Returns the lower linear limit of the Z axis of D6 or D6Spring joint. | |
BBDECL float BBCALL | xJointD6GetLinearUpperX (IJoint *joint) |
Returns the upper linear limit of the X axis of D6 or D6Spring joint. | |
BBDECL float BBCALL | xJointD6GetLinearUpperY (IJoint *joint) |
Returns the upper linear limit of the Y axis of D6 or D6Spring joint. | |
BBDECL float BBCALL | xJointD6GetLinearUpperZ (IJoint *joint) |
Returns the upper linear limit of the Z axis of D6 or D6Spring joint. | |
BBDECL float BBCALL | xJointD6GetPitchAngle (IJoint *joint) |
Retrieves the current pitch angle of D6 and D6Spring joints. | |
BBDECL float BBCALL | xJointD6GetRollAngle (IJoint *joint) |
Retrieves the current roll angle of D6 and D6Spring joints. | |
BBDECL float BBCALL | xJointD6GetYawAngle (IJoint *joint) |
Retrieves the current yaw angle of D6 and D6Spring joints. | |
BBDECL void BBCALL | xJointD6SetAngularLimits (IJoint *joint, float lowerX, float lowerY, float lowerZ, float upperX, float upperY, float upperZ) |
Sets the angular limits of D6 or D6Spring joint. | |
BBDECL void BBCALL | xJointD6SetLimits (IJoint *joint, int axis, float lower, float upper) |
Sets the limits of the specific axis of D6 or D6Spring joint. | |
BBDECL void BBCALL | xJointD6SetLinearLimits (IJoint *joint, float lowerX, float lowerY, float lowerZ, float upperX, float upperY, float upperZ) |
Sets the linear limits of D6 or D6Spring joint. | |
BBDECL void BBCALL | xJointD6SetLowerAngularLimits (IJoint *joint, float lowerX, float lowerY, float lowerZ) |
Sets the lower angular limits of D6 or D6Spring joint. | |
BBDECL void BBCALL | xJointD6SetLowerLinearLimits (IJoint *joint, float lowerX, float lowerY, float lowerZ) |
Sets the lower linear limits of D6 or D6Spring joint. | |
BBDECL void BBCALL | xJointD6SetUpperAngularLimits (IJoint *joint, float upperX, float upperY, float upperZ) |
Sets the upper angular limits of D6 or D6Spring joint. | |
BBDECL void BBCALL | xJointD6SetUpperLinearLimits (IJoint *joint, float upperX, float upperY, float upperZ) |
Sets the upper limits of D6 or D6Spring joint. | |
BBDECL void BBCALL | xJointD6SpringSetParam (IJoint *joint, int index, int enabled, float damping=1.0f, float stiffness=1.0f) |
Enables or disables a spring on a specific DOF of D6Spring joint. | |
BBDECL void BBCALL | xJointDisableCollisions (IJoint *joint, int state) |
Disables or enables collision between two bodies connected with the joint. Initially collisions are enabled. | |
BBDECL void BBCALL | xJointEnable (IJoint *joint, int state) |
Disables or enables the joint. Initially joint is enabled. | |
BBDECL void BBCALL | xJointEnableMotor (IJoint *joint, int enabled, float targetVelocity, float maxForce, int index=0) |
Enables a motor on a specific DOF of D6, D6Spring or hinge joints. | |
BBDECL Entity *BBCALL | xJointGetEntityA (IJoint *joint) |
Returns handle of the first entity. | |
BBDECL Entity *BBCALL | xJointGetEntityB (IJoint *joint) |
Returns handle of the second entity. | |
BBDECL float BBCALL | xJointGetImpulse (IJoint *joint) |
Retrieves an estimated total applied impulse. | |
BBDECL float BBCALL | xJointHingeGetAngle (IJoint *joint) |
Retrieves the current hinge angle. | |
BBDECL float BBCALL | xJointHingeGetLowerLimit (IJoint *joint) |
Returns the lower limit of the hinge joint. | |
BBDECL float BBCALL | xJointHingeGetUpperLimit (IJoint *joint) |
Returns the upper limit of the hinge joint. | |
BBDECL void BBCALL | xJointHingeSetAxis (IJoint *joint, float x, float y, float z) |
Sets the axis of the hinge joint. | |
BBDECL void BBCALL | xJointHingeSetLimits (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 void BBCALL | xJointHingeSetMotorTarget (IJoint *joint, float targetAngle, float deltaTime) |
Sets the motor target of the hinge joint. | |
BBDECL int BBCALL | xJointIsEnabled (IJoint *joint) |
Returns the state of the joint. |
BBDECL IJoint* BBCALL xCreateHingeJoint | ( | Entity * | firstBody, |
Entity * | secondBody, | ||
float | pivotX, | ||
float | pivotY, | ||
float | pivotZ, | ||
float | axisX, | ||
float | axisY, | ||
float | axisZ, | ||
bool | isGlobal = false |
||
) |
Creates a 'hinge' joint between two bodies and returns its handle. See description JOINT_HINGE.
One of two bodies may be zero. In this case another body will be jointed to a static world.
firstBody | The handle of the first entity |
secondBody | The handle of the second entity |
pivotX | X coordinate of the joint's pivot |
pivotY | Y coordinate of the joint's pivot |
pivotZ | Z coordinate of the joint's pivot |
axisX | X coordinate of the joint's axis |
axisY | Y coordinate of the joint's axis |
axisZ | Z coordinate of the joint's axis |
isGlobal | 1 (true) to use global pivot coodinates. 0 (false) to use local coordinates. Default is 0 (false) |
BBDECL IJoint* BBCALL xCreateBallJoint | ( | Entity * | firstBody, |
Entity * | secondBody, | ||
float | pivotX, | ||
float | pivotY, | ||
float | pivotZ, | ||
bool | isGlobal = false |
||
) |
Creates a 'ball' joint between two bodies and returns its handle. See description JOINT_BALL.
One of two bodies may be zero. In this case another body will be jointed to a static world.
firstBody | The handle of the first entity |
secondBody | The handle of the second entity |
pivotX | X coordinate of the joint's pivot |
pivotY | Y coordinate of the joint's pivot |
pivotZ | Z coordinate of the joint's pivot |
isGlobal | 1 (true) to use global pivot coodinates. 0 (false) to use local coordinates. Default is 0 (false) |
BBDECL IJoint* BBCALL xCreateD6Joint | ( | Entity * | firstBody, |
Entity * | secondBody, | ||
float | pivot1X, | ||
float | pivot1Y, | ||
float | pivot1Z, | ||
float | pivot2X, | ||
float | pivot2Y, | ||
float | pivot2Z, | ||
bool | isGlobal1 = false , |
||
bool | isGlobal2 = false |
||
) |
Creates a 'D6' joint between two bodies and returns its handle. See description JOINT_D6.
One of two bodies may be zero. In this case another body will be jointed to a static world.
firstBody | The handle of the first entity |
secondBody | The handle of the second entity |
pivot1X | X coordinate of the first joint's pivot |
pivot1Y | Y coordinate of the first joint's pivot |
pivot1Z | Z coordinate of the first joint's pivot |
pivot2X | X coordinate of the second joint's pivot |
pivot2Y | Y coordinate of the second joint's pivot |
pivot2Z | Z coordinate of the second joint's pivot |
isGlobal1 | 1 (true) to use global coodinates of the first pivot. 0 (false) to use local coordinates. Default is 0 (false) |
isGlobal2 | 1 (true) to use global coodinates of the second pivot. 0 (false) to use local coordinates. Default is 0 (false) |
BBDECL IJoint* BBCALL xCreateD6SpringJoint | ( | Entity * | firstBody, |
Entity * | secondBody, | ||
float | pivot1X, | ||
float | pivot1Y, | ||
float | pivot1Z, | ||
float | pivot2X, | ||
float | pivot2Y, | ||
float | pivot2Z, | ||
bool | isGlobal1 = false , |
||
bool | isGlobal2 = false |
||
) |
Creates a 'D6Spring' joint between two bodies and returns its handle. See description JOINT_D6SPRING.
firstBody | The handle of the first entity |
secondBody | The handle of the second entity |
pivot1X | X coordinate of the first joint's pivot |
pivot1Y | Y coordinate of the first joint's pivot |
pivot1Z | Z coordinate of the first joint's pivot |
pivot2X | X coordinate of the second joint's pivot |
pivot2Y | Y coordinate of the second joint's pivot |
pivot2Z | Z coordinate of the second joint's pivot |
isGlobal1 | 1 (true) to use global coodinates of the first pivot. 0 (false) to use local coordinates. Default is 0 (false) |
isGlobal2 | 1 (true) to use global coodinates of the second pivot. 0 (false) to use local coordinates. Default is 0 (false) |
BBDECL float BBCALL xJointHingeGetAngle | ( | IJoint * | joint | ) |
Retrieves the current hinge angle.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetPitchAngle | ( | IJoint * | joint | ) |
Retrieves the current pitch angle of D6 and D6Spring joints.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetYawAngle | ( | IJoint * | joint | ) |
Retrieves the current yaw angle of D6 and D6Spring joints.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetRollAngle | ( | IJoint * | joint | ) |
Retrieves the current roll angle of D6 and D6Spring joints.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetAngle | ( | IJoint * | joint, |
int | axis = 0 |
||
) |
Retrieves the current angle around specific axis of D6 and D6Spring joints.
joint | Joint handle |
axis | Axis. 0 - X axis 1 - Y axis 2 - Z axis Default is 0 |
BBDECL void BBCALL xJointDisableCollisions | ( | IJoint * | joint, |
int | state | ||
) |
Disables or enables collision between two bodies connected with the joint. Initially collisions are enabled.
joint | Joint handle |
state | 1 (true) to disable collision. 0 (false) to enable collision. |
BBDECL void BBCALL xJointEnable | ( | IJoint * | joint, |
int | state | ||
) |
Disables or enables the joint. Initially joint is enabled.
joint | Joint handle |
state | 1 (true) to disable joint. 0 (false) to enable joint. |
BBDECL int BBCALL xJointIsEnabled | ( | IJoint * | joint | ) |
Returns the state of the joint.
joint | Joint handle |
BBDECL float BBCALL xJointGetImpulse | ( | IJoint * | joint | ) |
Retrieves an estimated total applied impulse.
joint | Joint handle |
BBDECL void BBCALL xFreeJoint | ( | IJoint * | joint | ) |
Frees a joint.
joint | Joint handle |
BBDECL void BBCALL xJointBallSetPivot | ( | IJoint * | joint, |
float | x, | ||
float | y, | ||
float | z, | ||
bool | isGlobal = false |
||
) |
Sets the coordinates of the pivot of the 'ball' joint.
Pivot A is a pivot of the first body connected to the second body by the given joint.
joint | Joint handle |
x | X coordinate of the joint's pivot |
y | Y coordinate of the joint's pivot |
z | Z coordinate of the joint's pivot |
isGlobal | 1 (true) to use global coordinates. 0 (false) to use local coordinates. Default is 0 (false) |
BBDECL float BBCALL xJointBallGetPivotX | ( | IJoint * | joint, |
bool | isGlobal = false |
||
) |
Returns the X coodinate of the pivot A of the 'ball' joint.
joint | Joint handle |
isGlobal | 1 (true) to use global coordinates. 0 (false) to use local coordinates. Default is 0 (false) |
BBDECL float BBCALL xJointBallGetPivotY | ( | IJoint * | joint, |
bool | isGlobal = false |
||
) |
Returns the Y coodinate of the pivot A of the 'ball' joint.
joint | Joint handle |
isGlobal | 1 (true) to use global coordinates. 0 (false) to use local coordinates. Default is 0 (false) |
BBDECL float BBCALL xJointBallGetPivotZ | ( | IJoint * | joint, |
bool | isGlobal = false |
||
) |
Returns the Z coodinate of the pivot A of the 'ball' joint.
joint | Joint handle |
isGlobal | 1 (true) to use global coordinates. 0 (false) to use local coordinates. Default is 0 (false) |
BBDECL void BBCALL xJointD6SetLimits | ( | IJoint * | joint, |
int | axis, | ||
float | lower, | ||
float | upper | ||
) |
Sets the limits of the specific axis of D6 or D6Spring joint.
joint | Joint handle |
axis | Joint axis. 0 - linear X axis 1 - linear Y axis 2 - linear Z axis 3 - angular X axis 4 - angular Y axis 5 - angular Z axis |
lower | Lower limit |
upper | Upper limit |
BBDECL void BBCALL xJointD6SetLowerLinearLimits | ( | IJoint * | joint, |
float | lowerX, | ||
float | lowerY, | ||
float | lowerZ | ||
) |
Sets the lower linear limits of D6 or D6Spring joint.
joint | Joint handle |
lowerX | Lower linear limit of X axis |
lowerY | Lower linear limit of Y axis |
lowerZ | Lower linear limit of Z axis |
BBDECL void BBCALL xJointD6SetUpperLinearLimits | ( | IJoint * | joint, |
float | upperX, | ||
float | upperY, | ||
float | upperZ | ||
) |
Sets the upper limits of D6 or D6Spring joint.
joint | Joint handle |
upperX | Upper linear limit of X axis |
upperY | Upper linear limit of Y axis |
upperZ | Upper linear limit of Z axis |
BBDECL void BBCALL xJointD6SetLowerAngularLimits | ( | IJoint * | joint, |
float | lowerX, | ||
float | lowerY, | ||
float | lowerZ | ||
) |
Sets the lower angular limits of D6 or D6Spring joint.
joint | Joint handle |
lowerX | Lower angular limit of X axis |
lowerY | Lower angular limit of Y axis |
lowerZ | Lower angular limit of Z axis |
BBDECL void BBCALL xJointD6SetUpperAngularLimits | ( | IJoint * | joint, |
float | upperX, | ||
float | upperY, | ||
float | upperZ | ||
) |
Sets the upper angular limits of D6 or D6Spring joint.
joint | Joint handle |
upperX | Upper angular limit of X axis |
upperY | Upper angular limit of Y axis |
upperZ | Upper angular limit of Z axis |
BBDECL void BBCALL xJointD6SetLinearLimits | ( | IJoint * | joint, |
float | lowerX, | ||
float | lowerY, | ||
float | lowerZ, | ||
float | upperX, | ||
float | upperY, | ||
float | upperZ | ||
) |
Sets the linear limits of D6 or D6Spring joint.
joint | Joint handle |
lowerX | Lower linear limit of X axis |
lowerY | Lower linear limit of Y axis |
lowerZ | Lower linear limit of Z axis |
upperX | Upper linear limit of X axis |
upperY | Upper linear limit of Y axis |
upperZ | Upper linear limit of Z axis |
BBDECL void BBCALL xJointD6SetAngularLimits | ( | IJoint * | joint, |
float | lowerX, | ||
float | lowerY, | ||
float | lowerZ, | ||
float | upperX, | ||
float | upperY, | ||
float | upperZ | ||
) |
Sets the angular limits of D6 or D6Spring joint.
joint | Joint handle |
lowerX | Lower angular limit of X axis |
lowerY | Lower angular limit of Y axis |
lowerZ | Lower angular limit of Z axis |
upperX | Upper angular limit of X axis |
upperY | Upper angular limit of Y axis |
upperZ | Upper angular limit of Z axis |
BBDECL float BBCALL xJointD6GetLinearLowerX | ( | IJoint * | joint | ) |
Returns the lower linear limit of the X axis of D6 or D6Spring joint.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetLinearLowerY | ( | IJoint * | joint | ) |
Returns the lower linear limit of the Y axis of D6 or D6Spring joint.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetLinearLowerZ | ( | IJoint * | joint | ) |
Returns the lower linear limit of the Z axis of D6 or D6Spring joint.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetLinearUpperX | ( | IJoint * | joint | ) |
Returns the upper linear limit of the X axis of D6 or D6Spring joint.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetLinearUpperY | ( | IJoint * | joint | ) |
Returns the upper linear limit of the Y axis of D6 or D6Spring joint.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetLinearUpperZ | ( | IJoint * | joint | ) |
Returns the upper linear limit of the Z axis of D6 or D6Spring joint.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetAngularLowerX | ( | IJoint * | joint | ) |
Returns the lower angular limit of the X axis of D6 or D6Spring joint.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetAngularLowerY | ( | IJoint * | joint | ) |
Returns the lower angular limit of the Y axis of D6 or D6Spring joint.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetAngularLowerZ | ( | IJoint * | joint | ) |
Returns the lower angular limit of the Z axis of D6 or D6Spring joint.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetAngularUpperX | ( | IJoint * | joint | ) |
Returns the upper angular limit of the X axis of D6 or D6Spring joint.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetAngularUpperY | ( | IJoint * | joint | ) |
Returns the upper angular limit of the Y axis of D6 or D6Spring joint.
joint | Joint handle |
BBDECL float BBCALL xJointD6GetAngularUpperZ | ( | IJoint * | joint | ) |
Returns the upper angular limit of the Z axis of D6 or D6Spring joint.
joint | Joint handle |
BBDECL void BBCALL xJointD6SpringSetParam | ( | IJoint * | joint, |
int | index, | ||
int | enabled, | ||
float | damping = 1.0f , |
||
float | stiffness = 1.0f |
||
) |
Enables or disables a spring on a specific DOF of D6Spring 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 xJointHingeSetAxis | ( | 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 xJointHingeSetLimits | ( | 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 xJointHingeGetLowerLimit | ( | IJoint * | joint | ) |
Returns the lower limit of the hinge joint.
joint | Joint handle |
BBDECL float BBCALL xJointHingeGetUpperLimit | ( | IJoint * | joint | ) |
Returns the upper limit of the hinge joint.
joint | Joint handle |
BBDECL void BBCALL xJointEnableMotor | ( | IJoint * | joint, |
int | enabled, | ||
float | targetVelocity, | ||
float | maxForce, | ||
int | index = 0 |
||
) |
Enables a motor on a specific DOF of D6, D6Spring or hinge joints.
The last parameter 'index' is used only for D6 and D6Spring 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 xJointHingeSetMotorTarget | ( | 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 Entity* BBCALL xJointGetEntityA | ( | IJoint * | joint | ) |
Returns handle of the first entity.
joint | Joint handle |
BBDECL Entity* BBCALL xJointGetEntityB | ( | IJoint * | joint | ) |
Returns handle of the second entity.
joint | Joint handle |