![]() |
Xors3d Engine
|
Functions | |
BBDECL float BBCALL | xEntityGetAngularDamping (Entity *entity) |
Returns the coefficient of the angular damping of the entity's body. | |
BBDECL float BBCALL | xEntityGetAngularFactorX (Entity *entity) |
Returns the angular factor of the entity's body around the X axis. | |
BBDECL float BBCALL | xEntityGetAngularFactorY (Entity *entity) |
Returns the angular factor of the entity's body around the Y axis. | |
BBDECL float BBCALL | xEntityGetAngularFactorZ (Entity *entity) |
Returns the angular factor of the entity's body around the Z axis. | |
BBDECL float BBCALL | xEntityGetAnisotropicFrictionX (Entity *entity) |
Returns an anisotropic friction coefficient of the entity's body for X axis. | |
BBDECL float BBCALL | xEntityGetAnisotropicFrictionY (Entity *entity) |
Returns an anisotropic friction coefficient of the entity's body for Y axis. | |
BBDECL float BBCALL | xEntityGetAnisotropicFrictionZ (Entity *entity) |
Returns an anisotropic friction coefficient of the entity's body for Z axis. | |
BBDECL float BBCALL | xEntityGetFriction (Entity *entity) |
Returns a friction coefficient of the entity's body. | |
BBDECL float BBCALL | xEntityGetLinearDamping (Entity *entity) |
Returns the coefficient of the linear damping of the entity's body. | |
BBDECL float BBCALL | xEntityGetLinearFactorX (Entity *entity) |
Returns the linear factor of the entity's body along the X axis. | |
BBDECL float BBCALL | xEntityGetLinearFactorY (Entity *entity) |
Returns the linear factor of the entity's body along the Y axis. | |
BBDECL float BBCALL | xEntityGetLinearFactorZ (Entity *entity) |
Returns the linear factor of the entity's body along the Z axis. | |
BBDECL float BBCALL | xEntityGetMass (Entity *entity) |
Returns a mass of the entity's body. | |
BBDECL float BBCALL | xEntityGetRestitution (Entity *entity) |
Returns the restitution of the entity's body. | |
BBDECL void BBCALL | xEntitySetAngularFactor (Entity *entity, float x, float y, float z) |
Sets the angular factor of the entity's body. | |
BBDECL void BBCALL | xEntitySetAnisotropicFriction (Entity *entity, float fx, float fy, float fz) |
Sets an anisotropic friction coefficient of the entity's body. | |
BBDECL void BBCALL | xEntitySetDamping (Entity *entity, float linear, float angular) |
Sets the linear and angular damping of the entity's body. | |
BBDECL void BBCALL | xEntitySetFriction (Entity *entity, float friction) |
Sets a friction coefficient of the entity's body. | |
BBDECL void BBCALL | xEntitySetLinearFactor (Entity *entity, float x, float y, float z) |
Sets the linear factor of the entity's body. | |
BBDECL void BBCALL | xEntitySetMass (Entity *entity, float mass) |
Sets a new mass of the entity's body. | |
BBDECL void BBCALL | xEntitySetRestitution (Entity *entity, float restitution) |
Sets the restitution of the entity's body. |
BBDECL void BBCALL xEntitySetDamping | ( | 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].
Default values of the linear and angular damping are 0.
entity | Entity handle |
linear | The coefficient of the linear damping |
angular | The coefficient of the angular damping |
BBDECL float BBCALL xEntityGetLinearDamping | ( | Entity * | entity | ) |
Returns the coefficient of the linear damping of the entity's body.
entity | Entity handle |
BBDECL float BBCALL xEntityGetAngularDamping | ( | Entity * | entity | ) |
Returns the coefficient of the angular damping of the entity's body.
entity | Entity handle |
BBDECL void BBCALL xEntitySetFriction | ( | Entity * | entity, |
float | friction | ||
) |
Sets a friction coefficient of the entity's body.
Default value of the friction is 0.5.
entity | Entity handle |
friction | The coefficient of the friction |
BBDECL float BBCALL xEntityGetFriction | ( | Entity * | entity | ) |
Returns a friction coefficient of the entity's body.
entity | Entity handle |
BBDECL void BBCALL xEntitySetAnisotropicFriction | ( | Entity * | entity, |
float | fx, | ||
float | fy, | ||
float | fz | ||
) |
Sets an anisotropic friction coefficient of the entity's body.
Anisotropic frisction has different values for different directions. Default value of the friction is (0.5; 0.5; 0.5).
entity | Entity handle |
fx | The coefficient of the friction for the X axis |
fy | The coefficient of the friction for the Y axis |
fz | The coefficient of the friction for the Z axis |
BBDECL float BBCALL xEntityGetAnisotropicFrictionX | ( | Entity * | entity | ) |
Returns an anisotropic friction coefficient of the entity's body for X axis.
entity | Entity handle |
BBDECL float BBCALL xEntityGetAnisotropicFrictionY | ( | Entity * | entity | ) |
Returns an anisotropic friction coefficient of the entity's body for Y axis.
entity | Entity handle |
BBDECL float BBCALL xEntityGetAnisotropicFrictionZ | ( | Entity * | entity | ) |
Returns an anisotropic friction coefficient of the entity's body for Z axis.
entity | Entity handle |
BBDECL void BBCALL xEntitySetLinearFactor | ( | 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);
Default value is (1.0, 1.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 xEntityGetLinearFactorX | ( | Entity * | entity | ) |
Returns the linear factor of the entity's body along the X axis.
entity | Entity handle |
BBDECL float BBCALL xEntityGetLinearFactorY | ( | Entity * | entity | ) |
Returns the linear factor of the entity's body along the Y axis.
entity | Entity handle |
BBDECL float BBCALL xEntityGetLinearFactorZ | ( | Entity * | entity | ) |
Returns the linear factor of the entity's body along the Z axis.
entity | Entity handle |
BBDECL void BBCALL xEntitySetAngularFactor | ( | 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);
Default value is (1.0, 1.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 xEntityGetAngularFactorX | ( | Entity * | entity | ) |
Returns the angular factor of the entity's body around the X axis.
entity | Entity handle |
BBDECL float BBCALL xEntityGetAngularFactorY | ( | Entity * | entity | ) |
Returns the angular factor of the entity's body around the Y axis.
entity | Entity handle |
BBDECL float BBCALL xEntityGetAngularFactorZ | ( | Entity * | entity | ) |
Returns the angular factor of the entity's body around the Z axis.
entity | Entity handle |
BBDECL void BBCALL xEntitySetRestitution | ( | Entity * | entity, |
float | restitution | ||
) |
Sets the restitution of the entity's body.
. The default value of restitution is 0.0.
If a restitution of the first object is 1.0 and a restitution of the second one is 0.0 then their resulting restitution is 0.0 (product).
Normally restitution changes from 0.0 to 1.0. However you may experiment with unnatural values.
0.0 means inelastic collision (no bounce). 1.0 means elastic collision (no enegry lost).
entity | Entity handle |
restitution | The coefficient of the restitution. |
BBDECL float BBCALL xEntityGetRestitution | ( | Entity * | entity | ) |
Returns the restitution of the entity's body.
entity | Entity handle |
BBDECL void BBCALL xEntitySetMass | ( | Entity * | entity, |
float | mass | ||
) |
Sets a new mass of the entity's body.
entity | Entity handle |
mass | Mass |
BBDECL float BBCALL xEntityGetMass | ( | Entity * | entity | ) |
Returns a mass of the entity's body.
entity | Entity handle |