#include <IBody.h>
Public Member Functions | |
IBody (const float3 &position, const float3 &rotation) | |
virtual | ~IBody (void) |
Destructor. | |
virtual void | applyForce (float3 vec)=0 |
void | setPosition (const float3 &position) |
Set the position of the body. | |
void | setRotation (const float3 &rotation) |
Set the rotation of the body. | |
virtual float3 | getPosition ()=0 |
Returns the current position of this object. | |
virtual void | setGlobalPosition (float3 position)=0 |
Sets the Position of this object. | |
virtual void | stopMotion ()=0 |
Raises kinematic flag. | |
virtual void | setMass (int mass)=0 |
Sets the mass of this object. | |
virtual bool | isMoving ()=0 |
Checls if this object is in motion. | |
virtual void | slowDown ()=0 |
Slows the object down. | |
void | setRadius (float r) |
Sets the radius of this object. | |
float | getRadius () |
Returns the radius of this object. | |
void | setIdentity () |
Set the position an rotation to their identity values. | |
float4x4 & | getTransformation (void) |
Get the transformation matrix of the body. | |
Protected Attributes | |
float4x4 | transformation |
float | radius |
IBody class is used to set the position and rotation of physic objects.
Definition at line 6 of file IBody.h.
virtual void IBody::applyForce | ( | float3 | vec | ) | [pure virtual] |
Apply a force to a body. This is used to move an object without a visible event.
Implemented in Body.
virtual float3 IBody::getPosition | ( | ) | [pure virtual] |
Returns the current position of this object.
Implemented in Body.
float IBody::getRadius | ( | ) | [inline] |
float4x4& IBody::getTransformation | ( | void | ) | [inline] |
virtual bool IBody::isMoving | ( | ) | [pure virtual] |
Checls if this object is in motion.
Implemented in Body.
virtual void IBody::setGlobalPosition | ( | float3 | position | ) | [pure virtual] |
Sets the Position of this object.
Implemented in Body.
void IBody::setIdentity | ( | ) | [inline] |
virtual void IBody::setMass | ( | int | mass | ) | [pure virtual] |
Sets the mass of this object.
Implemented in Body.
void IBody::setPosition | ( | const float3 & | position | ) | [inline] |
void IBody::setRadius | ( | float | r | ) | [inline] |
void IBody::setRotation | ( | const float3 & | rotation | ) | [inline] |
virtual void IBody::slowDown | ( | ) | [pure virtual] |
Slows the object down.
Implemented in Body.
virtual void IBody::stopMotion | ( | ) | [pure virtual] |
Raises kinematic flag.
Implemented in Body.
float IBody::radius [protected] |
float4x4 IBody::transformation [protected] |