Xors3d Engine
Parameters

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.

Function Documentation

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.

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

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

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

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

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

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

Returns a friction coefficient of the entity's body.

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

Parameters:
entityEntity handle
fxThe coefficient of the friction for the X axis
fyThe coefficient of the friction for the Y axis
fzThe 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.

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

Returns an anisotropic friction coefficient of the entity's body for Y axis.

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

Returns an anisotropic friction coefficient of the entity's body for Z axis.

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

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 xEntityGetLinearFactorX ( Entity *  entity)

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

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

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

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

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

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

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 xEntityGetAngularFactorX ( Entity *  entity)

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

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

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

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

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

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

Parameters:
entityEntity handle
restitutionThe coefficient of the restitution.
BBDECL float BBCALL xEntityGetRestitution ( Entity *  entity)

Returns the restitution of the entity's body.

Parameters:
entityEntity handle
BBDECL void BBCALL xEntitySetMass ( Entity *  entity,
float  mass 
)

Sets a new mass of the entity's body.

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

Returns a mass of the entity's body.

Parameters:
entityEntity handle