Orxonox: orxonox::MovableEntity Class Reference

# orxonox::MovableEntity Class Reference

`#include <src/orxonox/objects/worldentities/MovableEntity.h>`

Inheritance diagram for orxonox::MovableEntity:

List of all members.

## Public Member Functions

virtual bool | collidesAgainst (WorldEntity *otherObject, btManifoldPoint &contactPoint)
| Virtual function that gets called when this object collides with another.
float | getCollisionDamage ()
bool | getEnableCollisionDamage ()
Pawn * | getOwner () const
| MovableEntity (BaseObject *creator)
void | registerVariables ()
void | setCollisionDamage (float c)
void | setEnableCollisionDamage (bool c)
void | setOrientation (const Quaternion &orientation)
void | setOwner (Pawn *owner)
void | setPosition (const Vector3 &position)
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| XML loading and saving.
virtual | ~MovableEntity ()

## Private Member Functions

void | clientConnected (unsigned int clientID)
void | clientDisconnected (unsigned int clientID)
void | overwriteOrientation ()
void | overwritePosition ()
void | processAngularVelocity ()
void | processLinearVelocity ()
void | resynchronize ()

## Private Attributes

float | collisionDamage_
Timer< MovableEntity > * | continuousResynchroTimer_
bool | enableCollisionDamage_
Quaternion | overwrite_orientation_
Vector3 | overwrite_position_
Pawn * | owner_
Timer< MovableEntity > | resynchronizeTimer_

## Constructor & Destructor Documentation

orxonox::MovableEntity::MovableEntity | ( | BaseObject * | creator | ) |

References continuousResynchroTimer_, orxonox::Priority::Low, overwrite_orientation_, overwrite_position_, RegisterObject, registerVariables(), and orxonox::Synchronisable::setPriority().

orxonox::MovableEntity::~MovableEntity | ( |  | ) | `[virtual]`

References continuousResynchroTimer_, and orxonox::BaseObject::isInitialized().

## Member Function Documentation

void orxonox::MovableEntity::clientConnected | ( | unsigned int | clientID | ) | `[private, virtual]`

Implements orxonox::ClientConnectionListener.

References orxonox::createExecutor(), orxonox::MAX_RESYNCHRONIZE_TIME, resynchronize(), resynchronizeTimer_, and orxonox::rnd().

void orxonox::MovableEntity::clientDisconnected | ( | unsigned int | clientID | ) | `[private, virtual]`

Implements orxonox::ClientConnectionListener.

bool orxonox::MovableEntity::collidesAgainst | ( | WorldEntity * | otherObject,
|  | btManifoldPoint & | contactPoint |
| ) |  |  | `[virtual]`

Virtual function that gets called when this object collides with another.

Parameters:

  | otherObject | The object this one has collided into. contactPoint Contact point provided by Bullet. Holds more information and can me modified. See return value. Returning false means that no modification to the contactPoint has been made. Return true otherwise! Condition is that enableCollisionCallback() was called.

Reimplemented from orxonox::WorldEntity.

Reimplemented in orxonox::Projectile.

References collisionDamage_, orxonox::Pawn::damage(), enableCollisionDamage_, orxonox::MobileEntity::getVelocity(), and orxonox::GameMode::isMaster().

float orxonox::MovableEntity::getCollisionDamage | ( |  | ) | `[inline]`

Referenced by XMLPort().

bool orxonox::MovableEntity::getEnableCollisionDamage | ( |  | ) | `[inline]`

Referenced by XMLPort().

Pawn* orxonox::MovableEntity::getOwner | ( |  | ) | const`[inline]`

Reimplemented in orxonox::Projectile.

void orxonox::MovableEntity::overwriteOrientation | ( |  | ) | `[inline, private]`

Referenced by registerVariables().

void orxonox::MovableEntity::overwritePosition | ( |  | ) | `[inline, private]`

Referenced by registerVariables().

void orxonox::MovableEntity::processAngularVelocity | ( |  | ) | `[inline, private]`

Referenced by registerVariables().

void orxonox::MovableEntity::processLinearVelocity | ( |  | ) | `[inline, private]`

Referenced by registerVariables().

void orxonox::MovableEntity::registerVariables | ( |  | ) |

Reimplemented from orxonox::WorldEntity.

Reimplemented in orxonox::LightningGunProjectile, orxonox::BigExplosion, orxonox::ExplosionChunk, orxonox::Planet, and orxonox::PongBall.

References orxonox::MobileEntity::angularVelocity_, orxonox::MobileEntity::linearVelocity_, overwrite_orientation_, overwrite_position_, overwriteOrientation(), overwritePosition(), processAngularVelocity(), processLinearVelocity(), orxonox::Synchronisable::registerVariable(), and orxonox::VariableDirection::ToClient.

Referenced by MovableEntity().

void orxonox::MovableEntity::resynchronize | ( |  | ) | `[private]`

References orxonox::CONTINUOUS_SYNCHRONIZATION_TIME, continuousResynchroTimer_, orxonox::createExecutor(), orxonox::WorldEntity::getOrientation(), orxonox::WorldEntity::getPosition(), orxonox::GameMode::isMaster(), overwrite_orientation_, overwrite_position_, and orxonox::rnd().

Referenced by clientConnected().

void orxonox::MovableEntity::setCollisionDamage | ( | float | c | ) | `[inline]`

Referenced by XMLPort().

void orxonox::MovableEntity::setEnableCollisionDamage | ( | bool | c | ) | `[inline]`

Referenced by XMLPort().

void orxonox::MovableEntity::setOrientation | ( | const Quaternion & | orientation | ) | `[inline, virtual]`

Reimplemented from orxonox::MobileEntity.

References orxonox::MobileEntity::setOrientation().

Referenced by orxonox::LightningGun::fire(), orxonox::LaserFire::fire(), orxonox::FusionFire::fire(), orxonox::HsW01::shot(), and orxonox::EnergyDrink::shot().

void orxonox::MovableEntity::setOwner | ( | Pawn * | owner | ) | `[inline]`

Reimplemented in orxonox::Projectile.

void orxonox::MovableEntity::setPosition | ( | const Vector3 & | position | ) | `[inline, virtual]`

Reimplemented from orxonox::MobileEntity.

References orxonox::MobileEntity::setPosition().

Referenced by orxonox::Pawn::deatheffect(), orxonox::LightningGun::fire(), orxonox::LaserFire::fire(), orxonox::FusionFire::fire(), orxonox::Pawn::goWithStyle(), orxonox::Pong::playerScored(), orxonox::HsW01::shot(), orxonox::EnergyDrink::shot(), orxonox::Pong::start(), and orxonox::PongBall::tick().

void orxonox::MovableEntity::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::MobileEntity.

Reimplemented in orxonox::Planet.

References getCollisionDamage(), getEnableCollisionDamage(), setCollisionDamage(), setEnableCollisionDamage(), SUPER, and XMLPortParam.

## Member Data Documentation

float orxonox::MovableEntity::collisionDamage_`[private]`

Referenced by collidesAgainst().

Timer<MovableEntity>* orxonox::MovableEntity::continuousResynchroTimer_`[private]`

Referenced by MovableEntity(), resynchronize(), and ~MovableEntity().

bool orxonox::MovableEntity::enableCollisionDamage_`[private]`

Referenced by collidesAgainst().

Quaternion orxonox::MovableEntity::overwrite_orientation_`[private]`

Referenced by MovableEntity(), registerVariables(), and resynchronize().

Vector3 orxonox::MovableEntity::overwrite_position_`[private]`

Referenced by MovableEntity(), registerVariables(), and resynchronize().

Pawn* orxonox::MovableEntity::owner_`[private]`

Reimplemented in orxonox::Projectile.

Timer<MovableEntity> orxonox::MovableEntity::resynchronizeTimer_`[private]`

Referenced by clientConnected().

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

- src/orxonox/objects/worldentities/MovableEntity.h
- src/orxonox/objects/worldentities/MovableEntity.cc