Public Member Functions | Protected Attributes

IBody Class Reference

#include <IBody.h>

Inheritance diagram for IBody:
Body

List of all members.

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.
float4x4getTransformation (void)
 Get the transformation matrix of the body.

Protected Attributes

float4x4 transformation
float radius

Detailed Description

IBody class is used to set the position and rotation of physic objects.

Definition at line 6 of file IBody.h.


Constructor & Destructor Documentation

IBody::IBody ( const float3 position,
const float3 rotation 
) [inline]

Contructor to set the initial position and rotation of the body.

Definition at line 11 of file IBody.h.

virtual IBody::~IBody ( void   )  [inline, virtual]

Destructor.

Definition at line 20 of file IBody.h.


Member Function Documentation

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]

Returns the radius of this object.

Definition at line 73 of file IBody.h.

float4x4& IBody::getTransformation ( void   )  [inline]

Get the transformation matrix of the body.

Definition at line 82 of file IBody.h.

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]

Set the position an rotation to their identity values.

Definition at line 76 of file IBody.h.

virtual void IBody::setMass ( int  mass  )  [pure virtual]

Sets the mass of this object.

Implemented in Body.

void IBody::setPosition ( const float3 position  )  [inline]

Set the position of the body.

Definition at line 27 of file IBody.h.

void IBody::setRadius ( float  r  )  [inline]

Sets the radius of this object.

Definition at line 70 of file IBody.h.

void IBody::setRotation ( const float3 rotation  )  [inline]

Set the rotation of the body.

Definition at line 35 of file IBody.h.

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.


Member Data Documentation

float IBody::radius [protected]

Definition at line 89 of file IBody.h.

Definition at line 88 of file IBody.h.


The documentation for this class was generated from the following file: