#include <src/orxonox/objects/worldentities/pawns/SpaceShip.h>
Public Member Functions | |
virtual void | boost () |
virtual void | fire () |
bool | getBoost () const |
Engine * | getEngine () const |
const std::string & | getEngineTemplate () const |
bool | getPermanentBoost () const |
const Vector3 & | getSteeringDirection () const |
virtual void | moveFrontBack (const Vector2 &value) |
virtual void | moveRightLeft (const Vector2 &value) |
virtual void | moveUpDown (const Vector2 &value) |
void | registerVariables () |
virtual void | rotatePitch (const Vector2 &value) |
virtual void | rotateRoll (const Vector2 &value) |
virtual void | rotateYaw (const Vector2 &value) |
void | setBoost (bool bBoost) |
void | setConfigValues () |
Function to collect the SetConfigValue-macro calls. | |
void | setEngine (Engine *engine) |
void | setEngineTemplate (const std::string &temp) |
void | setPermanentBoost (bool bPermanent) |
void | setSteeringDirection (const Vector3 &direction) |
SpaceShip (BaseObject *creator) | |
virtual void | tick (float dt) |
Gets called every frame. | |
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode) |
XML loading and saving. | |
virtual | ~SpaceShip () |
Protected Attributes | |
float | auxilaryThrust_ |
bool | bBoost_ |
bool | bInvertYAxis_ |
bool | bPermanentBoost_ |
btVector3 | localAngularAcceleration_ |
btVector3 | localLinearAcceleration_ |
float | primaryThrust_ |
float | rotationThrust_ |
Vector3 | steering_ |
Private Member Functions | |
virtual bool | isCollisionTypeLegal (WorldEntity::CollisionType type) const |
Function checks whether the requested collision type is legal to this object. | |
void | loadEngineTemplate () |
Private Attributes | |
Engine * | engine_ |
std::string | enginetemplate_ |
orxonox::SpaceShip::SpaceShip | ( | BaseObject * | creator | ) |
References auxilaryThrust_, bBoost_, bInvertYAxis_, bPermanentBoost_, orxonox::WorldEntity::Dynamic, orxonox::WorldEntity::enableCollisionCallback(), engine_, localAngularAcceleration_, localLinearAcceleration_, primaryThrust_, RegisterObject, registerVariables(), rotationThrust_, orxonox::WorldEntity::setCollisionType(), setConfigValues(), orxonox::ControllableEntity::setDestroyWhenPlayerLeft(), and steering_.
orxonox::SpaceShip::~SpaceShip | ( | ) | [virtual] |
References engine_, and orxonox::BaseObject::isInitialized().
void orxonox::SpaceShip::boost | ( | ) | [virtual] |
void orxonox::SpaceShip::fire | ( | ) | [virtual] |
bool orxonox::SpaceShip::getBoost | ( | ) | const [inline] |
Referenced by orxonox::MultiStateEngine::tick(), and orxonox::Engine::tick().
Engine* orxonox::SpaceShip::getEngine | ( | ) | const [inline] |
Referenced by orxonox::Engine::addToSpaceShip(), and orxonox::HUDSpeedBar::tick().
const std::string& orxonox::SpaceShip::getEngineTemplate | ( | ) | const [inline] |
Referenced by XMLPort().
bool orxonox::SpaceShip::getPermanentBoost | ( | ) | const [inline] |
Referenced by orxonox::Engine::tick().
const Vector3& orxonox::SpaceShip::getSteeringDirection | ( | ) | const [inline] |
Referenced by orxonox::Engine::getDirection().
bool orxonox::SpaceShip::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.
Reimplemented from orxonox::MobileEntity.
References CCOUT, and orxonox::WorldEntity::Dynamic.
void orxonox::SpaceShip::loadEngineTemplate | ( | ) | [private] |
void orxonox::SpaceShip::moveFrontBack | ( | const Vector2 & | value | ) | [virtual] |
void orxonox::SpaceShip::moveRightLeft | ( | const Vector2 & | value | ) | [virtual] |
void orxonox::SpaceShip::moveUpDown | ( | const Vector2 & | value | ) | [virtual] |
void orxonox::SpaceShip::registerVariables | ( | ) |
Reimplemented from orxonox::Pawn.
References auxilaryThrust_, primaryThrust_, orxonox::Synchronisable::registerVariable(), rotationThrust_, and orxonox::VariableDirection::ToClient.
Referenced by SpaceShip().
void orxonox::SpaceShip::rotatePitch | ( | const Vector2 & | value | ) | [virtual] |
Reimplemented from orxonox::ControllableEntity.
References localAngularAcceleration_, and orxonox::ControllableEntity::rotatePitch().
void orxonox::SpaceShip::rotateRoll | ( | const Vector2 & | value | ) | [virtual] |
Reimplemented from orxonox::ControllableEntity.
References localAngularAcceleration_, and orxonox::ControllableEntity::rotateRoll().
void orxonox::SpaceShip::rotateYaw | ( | const Vector2 & | value | ) | [virtual] |
Reimplemented from orxonox::ControllableEntity.
References localAngularAcceleration_, and orxonox::ControllableEntity::rotateYaw().
void orxonox::SpaceShip::setBoost | ( | bool | bBoost | ) | [inline] |
Referenced by orxonox::Engine::tick().
void orxonox::SpaceShip::setConfigValues | ( | ) |
Function to collect the SetConfigValue-macro calls.
Reimplemented from orxonox::ControllableEntity.
References bInvertYAxis_, and SetConfigValue.
Referenced by SpaceShip().
void orxonox::SpaceShip::setEngine | ( | Engine * | engine | ) |
References orxonox::Engine::addToSpaceShip(), engine_, and orxonox::Engine::getShip().
Referenced by orxonox::Engine::addToSpaceShip(), and orxonox::Engine::~Engine().
void orxonox::SpaceShip::setEngineTemplate | ( | const std::string & | temp | ) | [inline] |
Referenced by XMLPort().
void orxonox::SpaceShip::setPermanentBoost | ( | bool | bPermanent | ) | [inline] |
void orxonox::SpaceShip::setSteeringDirection | ( | const Vector3 & | direction | ) | [inline] |
Referenced by orxonox::Engine::tick().
void orxonox::SpaceShip::tick | ( | float | dt | ) | [virtual] |
Gets called every frame.
dt | The time since the last frame in seconds |
Reimplemented from orxonox::Pawn.
References orxonox::WorldEntity::getLocalInertia(), orxonox::ControllableEntity::hasLocalController(), orxonox::ControllableEntity::isInMouseLook(), localAngularAcceleration_, orxonox::WorldEntity::physicalBody_, rotationThrust_, and SUPER.
void orxonox::SpaceShip::XMLPort | ( | Element & | xmlelement, | |
XMLPort::Mode | mode | |||
) | [virtual] |
XML loading and saving.
xmlelement | The XML-element | |
loading | Loading (true) or saving (false) |
Reimplemented from orxonox::Pawn.
References auxilaryThrust_, getEngineTemplate(), primaryThrust_, rotationThrust_, setEngineTemplate(), SUPER, XMLPortParam, and XMLPortParamVariable.
float orxonox::SpaceShip::auxilaryThrust_ [protected] |
Referenced by registerVariables(), SpaceShip(), and XMLPort().
bool orxonox::SpaceShip::bBoost_ [protected] |
Referenced by boost(), and SpaceShip().
bool orxonox::SpaceShip::bInvertYAxis_ [protected] |
Referenced by setConfigValues(), and SpaceShip().
bool orxonox::SpaceShip::bPermanentBoost_ [protected] |
Referenced by SpaceShip().
Engine* orxonox::SpaceShip::engine_ [private] |
Referenced by loadEngineTemplate(), setEngine(), SpaceShip(), and ~SpaceShip().
Referenced by loadEngineTemplate().
btVector3 orxonox::SpaceShip::localAngularAcceleration_ [protected] |
Referenced by rotatePitch(), rotateRoll(), rotateYaw(), SpaceShip(), and tick().
btVector3 orxonox::SpaceShip::localLinearAcceleration_ [protected] |
Referenced by moveFrontBack(), moveRightLeft(), moveUpDown(), and SpaceShip().
float orxonox::SpaceShip::primaryThrust_ [protected] |
Referenced by registerVariables(), SpaceShip(), and XMLPort().
float orxonox::SpaceShip::rotationThrust_ [protected] |
Referenced by registerVariables(), SpaceShip(), tick(), and XMLPort().
Vector3 orxonox::SpaceShip::steering_ [protected] |
Referenced by moveFrontBack(), moveRightLeft(), moveUpDown(), and SpaceShip().