An entity subject to the laws of physics.
More...
#include <physics_entity.h>
An entity subject to the laws of physics.
PhysicsEntity is a base class for all objects in a scene that respond to forces and other physical phenomenon
PhysicsEntity::PhysicsEntity |
( |
| ) |
|
|
protected |
Creates an instance of PhysicsEntity centered at the origin, zero velocity, and unit mass
PhysicsEntity::PhysicsEntity |
( |
Vector3Gf |
position, |
|
|
Vector3Gf |
velocity, |
|
|
GLfloat |
mass, |
|
|
Quaternion |
orientation, |
|
|
Vector3Gf |
angular_velocity |
|
) |
| |
|
protected |
Creates an instance of PhysicsEntity centered at the provided position with the provided velocity and mass
- Parameters
-
position | position of center of mass in world coordinates |
velocity | velocity of the entity in world coordinates |
mass | mass of the entity |
orientation | orientation of the entity |
angular_velocity | angular velocity of the entity |
virtual PhysicsEntity::~PhysicsEntity |
( |
| ) |
|
|
inlineprotectedvirtual |
Vector3Gf PhysicsEntity::GetAngularVelocity |
( |
| ) |
|
- Returns
- the angular velocity for this entity
GLint PhysicsEntity::GetId |
( |
| ) |
const |
Returns the unique id for this entity
GLfloat PhysicsEntity::GetMass |
( |
| ) |
|
- Returns
- Mass of this entity
Vector3Gf PhysicsEntity::GetNextAngularVelocity |
( |
| ) |
|
Gets the angular velocity for the next time step.
Gets the orientation for the next time step.
Vector3Gf PhysicsEntity::GetNextPosition |
( |
| ) |
|
- Returns
- position for next time step
Vector3Gf PhysicsEntity::GetNextVelocity |
( |
| ) |
|
- Returns
- velocity for next time step
- Returns
- the orientaiton for this entity
Vector3Gf PhysicsEntity::GetPosition |
( |
| ) |
|
- Returns
- Spatial position for this entity
Vector3Gf PhysicsEntity::GetVelocity |
( |
| ) |
|
- Returns
- Spatial velocity for this entity
void PhysicsEntity::SetAngularVelocity |
( |
Vector3Gf |
w | ) |
|
Sets the angular velocity for the entity
- Parameters
-
w | new angular velocity for this entity |
void PhysicsEntity::SetNextAngularVelocity |
( |
Vector3Gf |
w | ) |
|
Sets the next orientation for the entity. This DOES NOT update the angular velocity until UpdateFromBuffers() is called
- Parameters
-
w | next angular velocity for this entity |
void PhysicsEntity::SetNextOrientation |
( |
Quaternion |
q | ) |
|
Sets the next orientation for the entity. This DOES NOT update the orientation until UpdateFromBuffers() is called
- Parameters
-
q | next orientation for this entity |
void PhysicsEntity::SetNextPosition |
( |
Vector3Gf |
x | ) |
|
Sets the next position buffer for this entity. This DOES NOT update the position until UpdateFromBuffers() is called.
- Parameters
-
x | new position for this entity |
void PhysicsEntity::SetNextVelocity |
( |
Vector3Gf |
v | ) |
|
Sets the next velocity buffer for the entity. This DOES NOT update the velocity until UpdateFromBuffers() is called.
- Parameters
-
v | Next velocity for this entity |
void PhysicsEntity::SetOrientation |
( |
Quaternion |
q | ) |
|
Sets the orientaiton for the entity
- Parameters
-
q | new orientation for this entity |
void PhysicsEntity::SetPosition |
( |
Vector3Gf |
x | ) |
|
Sets the position for this entity. If possible use SetNextPosition instead
- Parameters
-
x | Next position for this entity |
void PhysicsEntity::SetVelocity |
( |
Vector3Gf |
v | ) |
|
Sets the velocity for this entity. If possible use SetNextPosition instead
- Parameters
-
v | new velocity for this entity |
void PhysicsEntity::UpdateFromBuffers |
( |
| ) |
|
Updates internal state from buffers. This will load the next position and velocity from their corresponding buffers
Vector3Gf PhysicsEntity::m_angular_velocity |
|
protected |
The angular velocity of this entity
GLuint PhysicsEntity::m_id |
|
protected |
Unique id for this entity in world coordinates
GLfloat PhysicsEntity::m_mass |
|
protected |
Vector3Gf PhysicsEntity::m_next_angular_velocity |
|
protected |
the next predicted angular velocity in world coordinates
The next predicted orientation of the entity in world coordinates
Vector3Gf PhysicsEntity::m_next_position |
|
protected |
The next predicted position of this entity in world coordinates.
Vector3Gf PhysicsEntity::m_next_velocity |
|
protected |
The next predicted velocity of this entity in world coordiantes
The orientation of this entity
Vector3Gf PhysicsEntity::m_position |
|
protected |
The position of this entity in word coordinates
Vector3Gf PhysicsEntity::m_velocity |
|
protected |
The velocity of this entity in world coordinates
The documentation for this class was generated from the following files: