#include <src/orxonox/objects/worldentities/Backlight.h>
Public Member Functions | |
Backlight (BaseObject *creator) | |
virtual void | changedScale () |
virtual void | changedVisibility () |
This function gets called if the visibility of the object changes. | |
float | getLength () const |
float | getLifetime () const |
size_t | getMaxElements () const |
const std::string & | getTrailMaterial () const |
float | getWidth () const |
void | registerVariables () |
void | setLength (float length) |
void | setLifetime (float lifetime) |
void | setMaxElements (size_t maxelements) |
void | setTrailMaterial (const std::string &material) |
void | setWidth (float width) |
virtual void | tick (float dt) |
Gets called every frame. | |
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode) |
XML loading and saving. | |
virtual | ~Backlight () |
Protected Member Functions | |
virtual void | changedTimeFactor (float factor_new, float factor_old) |
Private Member Functions | |
virtual void | changedColour () |
virtual void | poststopturnonoff () |
virtual void | startturnonoff () |
virtual void | stopturnonoff () |
void | update_length () |
void | update_lifetime () |
void | update_maxelements () |
void | update_trailmaterial () |
void | update_width () |
Private Attributes | |
float | length_ |
float | lifetime_ |
size_t | maxelements_ |
Ogre::RibbonTrail * | ribbonTrail_ |
Ogre::SceneNode * | ribbonTrailNode_ |
char | tickcount_ |
std::string | trailmaterial_ |
float | width_ |
orxonox::Backlight::Backlight | ( | BaseObject * | creator | ) |
References orxonox::BaseObject::getName(), orxonox::WorldEntity::getNode(), orxonox::Scene::getRootSceneNode(), orxonox::BaseObject::getScene(), orxonox::Scene::getSceneManager(), length_, lifetime_, maxelements_, RegisterObject, registerVariables(), ribbonTrail_, ribbonTrailNode_, orxonox::GameMode::showsGraphics(), ThrowException, tickcount_, and width_.
orxonox::Backlight::~Backlight | ( | ) | [virtual] |
void orxonox::Backlight::changedColour | ( | ) | [private, virtual] |
Reimplemented from orxonox::FadingBillboard.
References orxonox::FadingBillboard::changedColour(), orxonox::FadingBillboard::getFadedColour(), ribbonTrail_, and tickcount_.
Referenced by tick().
void orxonox::Backlight::changedScale | ( | ) | [virtual] |
void orxonox::Backlight::changedTimeFactor | ( | float | factor_new, | |
float | factor_old | |||
) | [protected, virtual] |
void orxonox::Backlight::changedVisibility | ( | ) | [virtual] |
This function gets called if the visibility of the object changes.
Reimplemented from orxonox::FadingBillboard.
References orxonox::BaseObject::isVisible(), ribbonTrail_, and SUPER.
float orxonox::Backlight::getLength | ( | ) | const [inline] |
Referenced by XMLPort().
float orxonox::Backlight::getLifetime | ( | ) | const [inline] |
Referenced by XMLPort().
size_t orxonox::Backlight::getMaxElements | ( | ) | const [inline] |
Referenced by XMLPort().
const std::string& orxonox::Backlight::getTrailMaterial | ( | ) | const [inline] |
Referenced by XMLPort().
float orxonox::Backlight::getWidth | ( | void | ) | const [inline] |
Referenced by XMLPort().
void orxonox::Backlight::poststopturnonoff | ( | ) | [private, virtual] |
Reimplemented from orxonox::FadingBillboard.
References orxonox::FadingBillboard::poststopturnonoff(), and ribbonTrail_.
void orxonox::Backlight::registerVariables | ( | ) |
Reimplemented from orxonox::FadingBillboard.
References length_, lifetime_, maxelements_, orxonox::Synchronisable::registerVariable(), orxonox::VariableDirection::ToClient, trailmaterial_, update_length(), update_lifetime(), update_maxelements(), update_trailmaterial(), update_width(), and width_.
Referenced by Backlight().
void orxonox::Backlight::setLength | ( | float | length | ) | [inline] |
Referenced by XMLPort().
void orxonox::Backlight::setLifetime | ( | float | lifetime | ) | [inline] |
Referenced by XMLPort().
void orxonox::Backlight::setMaxElements | ( | size_t | maxelements | ) | [inline] |
Referenced by XMLPort().
void orxonox::Backlight::setTrailMaterial | ( | const std::string & | material | ) | [inline] |
Referenced by XMLPort().
void orxonox::Backlight::setWidth | ( | float | width | ) | [inline] |
Referenced by XMLPort().
void orxonox::Backlight::startturnonoff | ( | ) | [private, virtual] |
Reimplemented from orxonox::FadingBillboard.
References orxonox::BaseObject::isActive(), orxonox::BaseObject::isVisible(), ribbonTrail_, and orxonox::FadingBillboard::startturnonoff().
void orxonox::Backlight::stopturnonoff | ( | ) | [private, virtual] |
void orxonox::Backlight::tick | ( | float | dt | ) | [virtual] |
Gets called every frame.
dt | The time since the last frame in seconds |
Reimplemented from orxonox::FadingBillboard.
References changedColour(), orxonox::FadingBillboard::changedirection_, orxonox::MT_Type::ColourValue, orxonox::Billboard::getColour(), orxonox::WorldEntity::node_, ribbonTrail_, SUPER, tickcount_, update_length(), update_lifetime(), update_maxelements(), update_trailmaterial(), and update_width().
void orxonox::Backlight::update_length | ( | ) | [private] |
References orxonox::WorldEntity::getWorldScale(), length_, ribbonTrail_, and tickcount_.
Referenced by changedScale(), registerVariables(), and tick().
void orxonox::Backlight::update_lifetime | ( | ) | [private] |
References orxonox::TimeFactorListener::getTimeFactor(), orxonox::WorldEntity::getWorldScale(), lifetime_, ribbonTrail_, tickcount_, and width_.
Referenced by changedTimeFactor(), registerVariables(), tick(), and update_width().
void orxonox::Backlight::update_maxelements | ( | ) | [private] |
References maxelements_, ribbonTrail_, and tickcount_.
Referenced by registerVariables(), and tick().
void orxonox::Backlight::update_trailmaterial | ( | ) | [private] |
References ribbonTrail_, tickcount_, and trailmaterial_.
Referenced by registerVariables(), and tick().
void orxonox::Backlight::update_width | ( | ) | [private] |
References orxonox::WorldEntity::getWorldScale(), ribbonTrail_, tickcount_, update_lifetime(), and width_.
Referenced by changedScale(), registerVariables(), and tick().
void orxonox::Backlight::XMLPort | ( | Element & | xmlelement, | |
XMLPort::Mode | mode | |||
) | [virtual] |
XML loading and saving.
xmlelement | The XML-element | |
loading | Loading (true) or saving (false) |
Reimplemented from orxonox::FadingBillboard.
References getLength(), getLifetime(), getMaxElements(), getTrailMaterial(), getWidth(), setLength(), setLifetime(), setMaxElements(), setTrailMaterial(), setWidth(), SUPER, and XMLPortParam.
float orxonox::Backlight::length_ [private] |
Referenced by Backlight(), registerVariables(), and update_length().
float orxonox::Backlight::lifetime_ [private] |
Referenced by Backlight(), registerVariables(), stopturnonoff(), and update_lifetime().
size_t orxonox::Backlight::maxelements_ [private] |
Referenced by Backlight(), registerVariables(), and update_maxelements().
Ogre::RibbonTrail* orxonox::Backlight::ribbonTrail_ [private] |
Ogre::SceneNode* orxonox::Backlight::ribbonTrailNode_ [private] |
Referenced by Backlight(), and ~Backlight().
char orxonox::Backlight::tickcount_ [private] |
Referenced by Backlight(), changedColour(), tick(), update_length(), update_lifetime(), update_maxelements(), update_trailmaterial(), and update_width().
Referenced by registerVariables(), and update_trailmaterial().
float orxonox::Backlight::width_ [private] |
Referenced by Backlight(), registerVariables(), update_lifetime(), and update_width().