![]() |
Xors3d Engine
|
Functions | |
| IJoint * | 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. | |
| IJoint * | 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. | |
| IJoint * | 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. | |
| IJoint * | 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. | |
| void | xFreeJoint (IJoint *joint) |
| Frees a joint. | |
| float | xJointBallGetPivotX (IJoint *joint, bool isGlobal=false) |
| Returns the X coodinate of the pivot A of the 'ball' joint. | |
| float | xJointBallGetPivotY (IJoint *joint, bool isGlobal=false) |
| Returns the Y coodinate of the pivot A of the 'ball' joint. | |
| float | xJointBallGetPivotZ (IJoint *joint, bool isGlobal=false) |
| Returns the Z coodinate of the pivot A of the 'ball' joint. | |
| void | xJointBallSetPivot (IJoint *joint, float x, float y, float z, bool isGlobal=false) |
| Sets the coordinates of the pivot of the 'ball' joint. | |
| float | xJointD6GetAngle (IJoint *joint, int axis=0) |
| Retrieves the current angle around specific axis of D6 and D6Spring joints. | |
| float | xJointD6GetAngularLowerX (IJoint *joint) |
| Returns the lower angular limit of the X axis of D6 or D6Spring joint. | |
| float | xJointD6GetAngularLowerY (IJoint *joint) |
| Returns the lower angular limit of the Y axis of D6 or D6Spring joint. | |
| float | xJointD6GetAngularLowerZ (IJoint *joint) |
| Returns the lower angular limit of the Z axis of D6 or D6Spring joint. | |
| float | xJointD6GetAngularUpperX (IJoint *joint) |
| Returns the upper angular limit of the X axis of D6 or D6Spring joint. | |
| float | xJointD6GetAngularUpperY (IJoint *joint) |
| Returns the upper angular limit of the Y axis of D6 or D6Spring joint. | |
| float | xJointD6GetAngularUpperZ (IJoint *joint) |
| Returns the upper angular limit of the Z axis of D6 or D6Spring joint. | |
| float | xJointD6GetLinearLowerX (IJoint *joint) |
| Returns the lower linear limit of the X axis of D6 or D6Spring joint. | |
| float | xJointD6GetLinearLowerY (IJoint *joint) |
| Returns the lower linear limit of the Y axis of D6 or D6Spring joint. | |
| float | xJointD6GetLinearLowerZ (IJoint *joint) |
| Returns the lower linear limit of the Z axis of D6 or D6Spring joint. | |
| float | xJointD6GetLinearUpperX (IJoint *joint) |
| Returns the upper linear limit of the X axis of D6 or D6Spring joint. | |
| float | xJointD6GetLinearUpperY (IJoint *joint) |
| Returns the upper linear limit of the Y axis of D6 or D6Spring joint. | |
| float | xJointD6GetLinearUpperZ (IJoint *joint) |
| Returns the upper linear limit of the Z axis of D6 or D6Spring joint. | |
| float | xJointD6GetPitchAngle (IJoint *joint) |
| Retrieves the current pitch angle of D6 and D6Spring joints. | |
| float | xJointD6GetRollAngle (IJoint *joint) |
| Retrieves the current roll angle of D6 and D6Spring joints. | |
| float | xJointD6GetYawAngle (IJoint *joint) |
| Retrieves the current yaw angle of D6 and D6Spring joints. | |
| void | xJointD6SetAngularLimits (IJoint *joint, float lowerX, float lowerY, float lowerZ, float upperX, float upperY, float upperZ) |
| Sets the angular limits of D6 or D6Spring joint. | |
| void | xJointD6SetLimits (IJoint *joint, int axis, float lower, float upper) |
| Sets the limits of the specific axis of D6 or D6Spring joint. | |
| void | xJointD6SetLinearLimits (IJoint *joint, float lowerX, float lowerY, float lowerZ, float upperX, float upperY, float upperZ) |
| Sets the linear limits of D6 or D6Spring joint. | |
| void | xJointD6SetLowerAngularLimits (IJoint *joint, float lowerX, float lowerY, float lowerZ) |
| Sets the lower angular limits of D6 or D6Spring joint. | |
| void | xJointD6SetLowerLinearLimits (IJoint *joint, float lowerX, float lowerY, float lowerZ) |
| Sets the lower linear limits of D6 or D6Spring joint. | |
| void | xJointD6SetUpperAngularLimits (IJoint *joint, float upperX, float upperY, float upperZ) |
| Sets the upper angular limits of D6 or D6Spring joint. | |
| void | xJointD6SetUpperLinearLimits (IJoint *joint, float upperX, float upperY, float upperZ) |
| Sets the upper limits of D6 or D6Spring joint. | |
| void | 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. | |
| void | xJointDisableCollisions (IJoint *joint, int state) |
| Disables or enables collision between two bodies connected with the joint. Initially collisions are enabled. | |
| void | xJointEnable (IJoint *joint, int state) |
| Disables or enables the joint. Initially joint is enabled. | |
| void | 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. | |
| Entity * | xJointGetEntityA (IJoint *joint) |
| Returns handle of the first entity. | |
| Entity * | xJointGetEntityB (IJoint *joint) |
| Returns handle of the second entity. | |
| float | xJointGetImpulse (IJoint *joint) |
| Retrieves an estimated total applied impulse. | |
| float | xJointHingeGetAngle (IJoint *joint) |
| Retrieves the current hinge angle. | |
| float | xJointHingeGetLowerLimit (IJoint *joint) |
| Returns the lower limit of the hinge joint. | |
| float | xJointHingeGetUpperLimit (IJoint *joint) |
| Returns the upper limit of the hinge joint. | |
| void | xJointHingeSetAxis (IJoint *joint, float x, float y, float z) |
| Sets the axis of the hinge joint. | |
| void | 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. | |
| void | xJointHingeSetMotorTarget (IJoint *joint, float targetAngle, float deltaTime) |
| Sets the motor target of the hinge joint. | |
| int | xJointIsEnabled (IJoint *joint) |
| Returns the state of the joint. | |
| IJoint* 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) |
| IJoint* 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) |
| IJoint* 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) |
| IJoint* 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) |
| float xJointHingeGetAngle | ( | IJoint * | joint | ) |
Retrieves the current hinge angle.
| joint | Joint handle |
| float xJointD6GetPitchAngle | ( | IJoint * | joint | ) |
Retrieves the current pitch angle of D6 and D6Spring joints.
| joint | Joint handle |
| float xJointD6GetYawAngle | ( | IJoint * | joint | ) |
Retrieves the current yaw angle of D6 and D6Spring joints.
| joint | Joint handle |
| float xJointD6GetRollAngle | ( | IJoint * | joint | ) |
Retrieves the current roll angle of D6 and D6Spring joints.
| joint | Joint handle |
| float 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 |
| void 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. |
| void 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. |
| int xJointIsEnabled | ( | IJoint * | joint | ) |
Returns the state of the joint.
| joint | Joint handle |
| float xJointGetImpulse | ( | IJoint * | joint | ) |
Retrieves an estimated total applied impulse.
| joint | Joint handle |
| void xFreeJoint | ( | IJoint * | joint | ) |
Frees a joint.
| joint | Joint handle |
| void 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) |
| float 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) |
| float 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) |
| float 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) |
| void 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 |
| void 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 |
| void 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 |
| void 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 |
| void 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 |
| void 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 |
| void 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 |
| float xJointD6GetLinearLowerX | ( | IJoint * | joint | ) |
Returns the lower linear limit of the X axis of D6 or D6Spring joint.
| joint | Joint handle |
| float xJointD6GetLinearLowerY | ( | IJoint * | joint | ) |
Returns the lower linear limit of the Y axis of D6 or D6Spring joint.
| joint | Joint handle |
| float xJointD6GetLinearLowerZ | ( | IJoint * | joint | ) |
Returns the lower linear limit of the Z axis of D6 or D6Spring joint.
| joint | Joint handle |
| float xJointD6GetLinearUpperX | ( | IJoint * | joint | ) |
Returns the upper linear limit of the X axis of D6 or D6Spring joint.
| joint | Joint handle |
| float xJointD6GetLinearUpperY | ( | IJoint * | joint | ) |
Returns the upper linear limit of the Y axis of D6 or D6Spring joint.
| joint | Joint handle |
| float xJointD6GetLinearUpperZ | ( | IJoint * | joint | ) |
Returns the upper linear limit of the Z axis of D6 or D6Spring joint.
| joint | Joint handle |
| float xJointD6GetAngularLowerX | ( | IJoint * | joint | ) |
Returns the lower angular limit of the X axis of D6 or D6Spring joint.
| joint | Joint handle |
| float xJointD6GetAngularLowerY | ( | IJoint * | joint | ) |
Returns the lower angular limit of the Y axis of D6 or D6Spring joint.
| joint | Joint handle |
| float xJointD6GetAngularLowerZ | ( | IJoint * | joint | ) |
Returns the lower angular limit of the Z axis of D6 or D6Spring joint.
| joint | Joint handle |
| float xJointD6GetAngularUpperX | ( | IJoint * | joint | ) |
Returns the upper angular limit of the X axis of D6 or D6Spring joint.
| joint | Joint handle |
| float xJointD6GetAngularUpperY | ( | IJoint * | joint | ) |
Returns the upper angular limit of the Y axis of D6 or D6Spring joint.
| joint | Joint handle |
| float xJointD6GetAngularUpperZ | ( | IJoint * | joint | ) |
Returns the upper angular limit of the Z axis of D6 or D6Spring joint.
| joint | Joint handle |
| void 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 |
| void 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 |
| void 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 |
| float xJointHingeGetLowerLimit | ( | IJoint * | joint | ) |
Returns the lower limit of the hinge joint.
| joint | Joint handle |
| float xJointHingeGetUpperLimit | ( | IJoint * | joint | ) |
Returns the upper limit of the hinge joint.
| joint | Joint handle |
| void 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') |
| void 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 |
| Entity* xJointGetEntityA | ( | IJoint * | joint | ) |
Returns handle of the first entity.
| joint | Joint handle |
| Entity* xJointGetEntityB | ( | IJoint * | joint | ) |
Returns handle of the second entity.
| joint | Joint handle |