orxonox::MobileEntity Class Reference

#include <src/orxonox/objects/worldentities/MobileEntity.h>

Inheritance diagram for orxonox::MobileEntity:

orxonox::WorldEntity orxonox::Tickable orxonox::BaseObject orxonox::Synchronisable orxonox::OrxonoxClass orxonox::OrxonoxClass orxonox::OrxonoxClass orxonox::ControllableEntity orxonox::MovableEntity orxonox::Pawn orxonox::PongBat orxonox::Spectator orxonox::BigExplosion orxonox::ExplosionChunk orxonox::Planet orxonox::PongBall orxonox::Projectile

List of all members.

Public Member Functions

void applyCentralForce (float x, float y, float z)
void applyCentralForce (const Vector3 &force)
const Vector3 & getAcceleration () const
const Vector3 & getAngularAcceleration () const
const Vector3 & getAngularVelocity () const
Vector3 getLocalVelocity () const
Vector3 getRotationAxis () const
Degree getRotationRate () const
const Vector3 & getVelocity () const
 MobileEntity (BaseObject *creator)
void setAcceleration (float x, float y, float z)
void setAcceleration (const Vector3 &acceleration)
void setAngularAcceleration (float x, float y, float z)
void setAngularAcceleration (const Vector3 &acceleration)
void setAngularVelocity (float x, float y, float z)
virtual void setAngularVelocity (const Vector3 &velocity)
virtual void setOrientation (const Quaternion &orientation)
virtual void setPosition (const Vector3 &position)
void setRotationAxis (const Vector3 &axis)
void setRotationRate (Degree rate)
void setVelocity (float x, float y, float z)
virtual void setVelocity (const Vector3 &velocity)
virtual void tick (float dt)
 Gets called every frame.
virtual void XMLPort (Element &xmlelement, XMLPort::Mode mode)
 XML loading and saving.
virtual ~MobileEntity ()

Protected Member Functions

void getWorldTransform (btTransform &worldTrans) const
virtual void setWorldTransform (const btTransform &worldTrans)

Protected Attributes

Vector3 angularAcceleration_
Vector3 angularVelocity_
Vector3 linearAcceleration_
Vector3 linearVelocity_

Private Member Functions

virtual bool isCollisionTypeLegal (WorldEntity::CollisionType type) const
 Function checks whether the requested collision type is legal to this object.


Constructor & Destructor Documentation

orxonox::MobileEntity::MobileEntity ( BaseObject creator  ) 

orxonox::MobileEntity::~MobileEntity (  )  [virtual]


Member Function Documentation

void orxonox::MobileEntity::applyCentralForce ( float  x,
float  y,
float  z 
) [inline]

void orxonox::MobileEntity::applyCentralForce ( const Vector3 &  force  ) 

const Vector3& orxonox::MobileEntity::getAcceleration (  )  const [inline]

const Vector3& orxonox::MobileEntity::getAngularAcceleration (  )  const [inline]

const Vector3& orxonox::MobileEntity::getAngularVelocity (  )  const [inline]

Vector3 orxonox::MobileEntity::getLocalVelocity (  )  const [inline]

Vector3 orxonox::MobileEntity::getRotationAxis (  )  const [inline]

Referenced by XMLPort().

Degree orxonox::MobileEntity::getRotationRate (  )  const [inline]

References orxonox::MT_Type::Degree.

Referenced by XMLPort().

const Vector3& orxonox::MobileEntity::getVelocity (  )  const [inline, virtual]

void orxonox::MobileEntity::getWorldTransform ( btTransform &  worldTrans  )  const [protected]

bool orxonox::MobileEntity::isCollisionTypeLegal ( WorldEntity::CollisionType  type  )  const [private, virtual]

Function checks whether the requested collision type is legal to this object.

You can override this function in a derived class to constrain the collision to e.g. None or Dynamic. A projectile may not prove very useful if there is no physical body. Simply set the CollisionType in its constructor and override this method. But be careful that a derived classe's virtual functions don't yet exist in the constructor if a base class.

Implements orxonox::WorldEntity.

Reimplemented in orxonox::SpaceShip.

References CCOUT, and orxonox::WorldEntity::Static.

void orxonox::MobileEntity::setAcceleration ( float  x,
float  y,
float  z 
) [inline]

void orxonox::MobileEntity::setAcceleration ( const Vector3 &  acceleration  ) 

void orxonox::MobileEntity::setAngularAcceleration ( float  x,
float  y,
float  z 
) [inline]

void orxonox::MobileEntity::setAngularAcceleration ( const Vector3 &  acceleration  ) 

void orxonox::MobileEntity::setAngularVelocity ( float  x,
float  y,
float  z 
) [inline]

void orxonox::MobileEntity::setAngularVelocity ( const Vector3 &  velocity  )  [virtual]

void orxonox::MobileEntity::setOrientation ( const Quaternion &  orientation  )  [virtual]

void orxonox::MobileEntity::setPosition ( const Vector3 &  position  )  [virtual]

void orxonox::MobileEntity::setRotationAxis ( const Vector3 &  axis  )  [inline]

void orxonox::MobileEntity::setRotationRate ( Degree  rate  )  [inline]

void orxonox::MobileEntity::setVelocity ( float  x,
float  y,
float  z 
) [inline]

void orxonox::MobileEntity::setVelocity ( const Vector3 &  velocity  )  [virtual]

void orxonox::MobileEntity::setWorldTransform ( const btTransform &  worldTrans  )  [protected, virtual]

void orxonox::MobileEntity::tick ( float  dt  )  [virtual]

void orxonox::MobileEntity::XMLPort ( Element &  xmlelement,
XMLPort::Mode  mode 
) [virtual]

XML loading and saving.

Parameters:
xmlelement The XML-element
loading Loading (true) or saving (false)
Returns:
The XML-element

Reimplemented from orxonox::WorldEntity.

Reimplemented in orxonox::ControllableEntity, orxonox::MovableEntity, orxonox::Pawn, orxonox::SpaceShip, and orxonox::Planet.

References orxonox::MT_Type::Degree, getRotationAxis(), getRotationRate(), getVelocity(), orxonox::XMLPort::LoadObject, setAngularVelocity(), setVelocity(), SUPER, orxonox::MT_Type::Vector3, XMLPortParamTemplate, and XMLPortParamVariable.


Member Data Documentation

Referenced by MobileEntity(), setAcceleration(), and tick().


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

Generated on Tue Jul 28 16:22:43 2009 for Orxonox by  doxygen 1.5.6