Xors3d Engine
Gravity

Functions

BBDECL float BBCALL xEntityGetGravityX (Entity *entity)
 Returns the X-component of the gravity vector for the given entity.
BBDECL float BBCALL xEntityGetGravityY (Entity *entity)
 Returns the Y-component of the gravity vector for the given entity.
BBDECL float BBCALL xEntityGetGravityZ (Entity *entity)
 Returns the Z-component of the gravity vector for the given entity.
BBDECL void BBCALL xEntitySetGravity (Entity *entity, float x, float y, float z)
 Sets the vector of the gravity for the given entity.
BBDECL float BBCALL xWorldGetGravityX (xWorld *world=NULL)
 Returns the X-component of the gravity vector in the given world.
BBDECL float BBCALL xWorldGetGravityY (xWorld *world=NULL)
 Returns the Y-component of the gravity vector in the given world.
BBDECL float BBCALL xWorldGetGravityZ (xWorld *world=NULL)
 Returns the Z-component of the gravity vector in the given world.
BBDECL void BBCALL xWorldSetGravity (float x, float y, float z, xWorld *world=NULL)
 Sets the vector of the gravity in the given world.

Function Documentation

BBDECL void BBCALL xWorldSetGravity ( 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 xWorldGetGravityX ( 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 xWorldGetGravityY ( 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 xWorldGetGravityZ ( 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 xEntitySetGravity ( 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 xEntityGetGravityX ( Entity *  entity)

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

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

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

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

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

Parameters:
entityEntity handle