Xors3d Engine
Force and impulse

Functions

BBDECL void BBCALL xEntityApplyCentralForce (Entity *entity, float x, float y, float z, bool isGlobal=true)
 Applies a force to the center of mass of the entity's body.
BBDECL void BBCALL xEntityApplyCentralImpulse (Entity *entity, float x, float y, float z, bool isGlobal=true)
 Applies an impulse to the center of mass of the entity's body.
BBDECL void BBCALL xEntityApplyForce (Entity *entity, float x, float y, float z, float pointx, float pointy, float pointz, bool isGlobal=true, bool globalPoint=true)
 Applies a force to the entity's body at a particular point relative to the center of this body.
BBDECL void BBCALL xEntityApplyImpulse (Entity *entity, float x, float y, float z, float pointx, float pointy, float pointz, bool isGlobal=true, bool globalPoint=true)
 Applies an impulse to the entity's body at a particular point relative to the center of this body.
BBDECL void BBCALL xEntityApplyTorque (Entity *entity, float x, float y, float z, bool isGlobal=true)
 Applies a torque to the entity's body.
BBDECL void BBCALL xEntityApplyTorqueImpulse (Entity *entity, float x, float y, float z, bool isGlobal=true)
 Applies a torque impulse to the entity's body.
BBDECL void BBCALL xEntityReleaseForces (Entity *entity)
 Returns the x-component of the force acting on the entity's body.

Function Documentation

BBDECL void BBCALL xEntityApplyCentralForce ( Entity *  entity,
float  x,
float  y,
float  z,
bool  isGlobal = true 
)

Applies a force to the center of mass of the entity's body.

Parameters:
entityEntity handle
xX-component of the force vector
yY-component of the force vector
zZ-component of the force vector
isGlobalTrue to apply a force in global coordinates. False - in local coordinates. Default value is true.
BBDECL void BBCALL xEntityApplyCentralImpulse ( Entity *  entity,
float  x,
float  y,
float  z,
bool  isGlobal = true 
)

Applies an impulse to the center of mass of the entity's body.

Parameters:
entityEntity handle
xX-component of the impulse vector
yY-component of the impulse vector
zZ-component of the impulse vector
isGlobalTrue to apply an impulse in global coordinates. False - in local coordinates. Default value is true.
BBDECL void BBCALL xEntityApplyTorque ( Entity *  entity,
float  x,
float  y,
float  z,
bool  isGlobal = true 
)

Applies a torque to the entity's body.

Parameters:
entityEntity handle
xX-component of the torque vector
yY-component of the torque vector
zZ-component of the torque vector
isGlobalTrue to apply a torque in global coordinates. False - in local coordinates. Default value is true.
BBDECL void BBCALL xEntityApplyTorqueImpulse ( Entity *  entity,
float  x,
float  y,
float  z,
bool  isGlobal = true 
)

Applies a torque impulse to the entity's body.

Parameters:
entityEntity handle
xX-component of the torque impulse vector
yY-component of the torque impulse vector
zZ-component of the torque impulse vector
isGlobalTrue to apply a torque impulse in global coordinates. False - in local coordinates. Default value is true.
BBDECL void BBCALL xEntityApplyForce ( Entity *  entity,
float  x,
float  y,
float  z,
float  pointx,
float  pointy,
float  pointz,
bool  isGlobal = true,
bool  globalPoint = true 
)

Applies a force to the entity's body at a particular point relative to the center of this body.

Parameters:
entityEntity handle
xX-component of the force vector
yY-component of the force vector
zZ-component of the force vector
pointxX-coordinate of the point
pointyY-coordinate of the point
pointzZ-coordinate of the point
isGlobalTrue to apply a force in global coordinates. False - in local coordinates. Default value is true.
globalPointTrue if a particular point is in global coordinates. False - in local coordinates. Default value is true.
BBDECL void BBCALL xEntityApplyImpulse ( Entity *  entity,
float  x,
float  y,
float  z,
float  pointx,
float  pointy,
float  pointz,
bool  isGlobal = true,
bool  globalPoint = true 
)

Applies an impulse to the entity's body at a particular point relative to the center of this body.

Parameters:
entityEntity handle
xX-component of the impulse vector
yY-component of the impulse vector
zZ-component of the impulse vector
pointxX-coordinate of the point
pointyY-coordinate of the point
pointzZ-coordinate of the point
isGlobalTrue to apply an impulse in global coordinates. False - in local coordinates. Default value is true.
globalPointTrue if a particular point is in global coordinates. False - in local coordinates. Default value is true.
BBDECL void BBCALL xEntityReleaseForces ( Entity *  entity)

Returns the x-component of the force acting on the entity's body.

Parameters:
entityEntity handleReturns the y-component of the force acting on the entity's body.
entityEntity handleReturns the z-component of the force acting on the entity's body.
entityEntity handleReturns the x-component of the torque acting on the entity's body.
entityEntity handleReturns the y-component of the torque acting on the entity's body.
entityEntity handleReturns the z-component of the torque acting on the entity's body.
entityEntity handleReleases all the forces which were applied to the entity's body.

Linear and angular velocities are set to zero values.

Parameters:
entityEntity handle