Represents a rigid body, holding a void pointer to an underlying implementation.
More...
#include <physenv.h>
|
| | RigidBody (std::string name, void *body) |
| | Constructor.
|
| |
| | ~RigidBody () |
| |
| yourgame::math::Trafo | getTrafo () |
| | Get transform (Trafo) calculated from rigid body.
|
| |
| void | setTrafo (yourgame::math::Trafo trafo) |
| | Set transform (Trafo) of rigid body.
|
| |
| void | setRestitution (float restitution) |
| | Set the restitution of the rigid body.
|
| |
| void | setFriction (float friction) |
| | Set the friction of the rigid body.
|
| |
| void | setSleepingThresholds (float linear, float angular) |
| | Set the Sleeping Thresholds of the rigid body.
|
| |
| void | setLinearFactors (float x, float y, float z) |
| | Set the Linear Factors (x,y,z) of the rigid body.
|
| |
| void | setAngularFactor (float angFac) |
| | Set the Angular Factor of the rigid body.
|
| |
| void | setAngularFactors (float x, float y, float z) |
| | Set the Angular Factors (x,y,z) of the rigid body.
|
| |
| void | applyCentralForce (float x, float y, float z) |
| | Apply central force to the rigid body.
|
| |
| void | applyCentralImpulse (float x, float y, float z) |
| | Apply central impulse to the rigid body.
|
| |
Represents a rigid body, holding a void pointer to an underlying implementation.
◆ RigidBody()
| yourgame::util::RigidBody::RigidBody |
( |
std::string |
name, |
|
|
void * |
body |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| name | name of the rigid body |
| body | pointer to the underlying implementation |
◆ ~RigidBody()
| yourgame::util::RigidBody::~RigidBody |
( |
| ) |
|
◆ applyCentralForce()
| void yourgame::util::RigidBody::applyCentralForce |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Apply central force to the rigid body.
- Parameters
-
| x | x-component of force vector |
| y | y-component of force vector |
| z | z-component of force vector |
◆ applyCentralImpulse()
| void yourgame::util::RigidBody::applyCentralImpulse |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Apply central impulse to the rigid body.
- Parameters
-
| x | x-component of impulse vector |
| y | y-component of impulse vector |
| z | z-component of impulse vector |
◆ getTrafo()
Get transform (Trafo) calculated from rigid body.
- Returns
- Trafo object
◆ setAngularFactor()
| void yourgame::util::RigidBody::setAngularFactor |
( |
float |
angFac | ) |
|
Set the Angular Factor of the rigid body.
- Parameters
-
◆ setAngularFactors()
| void yourgame::util::RigidBody::setAngularFactors |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Set the Angular Factors (x,y,z) of the rigid body.
- Parameters
-
| x | Angular Factor for x coordinate |
| y | Angular Factor for y coordinate |
| z | Angular Factor for z coordinate |
◆ setFriction()
| void yourgame::util::RigidBody::setFriction |
( |
float |
friction | ) |
|
Set the friction of the rigid body.
- Parameters
-
◆ setLinearFactors()
| void yourgame::util::RigidBody::setLinearFactors |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Set the Linear Factors (x,y,z) of the rigid body.
- Parameters
-
| x | Linear Factor for x coordinate |
| y | Linear Factor for y coordinate |
| z | Linear Factor for z coordinate |
◆ setRestitution()
| void yourgame::util::RigidBody::setRestitution |
( |
float |
restitution | ) |
|
Set the restitution of the rigid body.
- Parameters
-
◆ setSleepingThresholds()
| void yourgame::util::RigidBody::setSleepingThresholds |
( |
float |
linear, |
|
|
float |
angular |
|
) |
| |
Set the Sleeping Thresholds of the rigid body.
- Parameters
-
| linear | linear sleeping threshold |
| angular | angular sleeping threshold |
◆ setTrafo()
Set transform (Trafo) of rigid body.
- Attention
- works for kinematic bodies only
- Parameters
-
◆ m_body
| void* const yourgame::util::RigidBody::m_body |
◆ m_name
| std::string yourgame::util::RigidBody::m_name |
The documentation for this class was generated from the following file:
- /code/include/toolbox/yourgame/util/physenv.h