Orxonox: orxonox::Backlight Class Reference

# orxonox::Backlight Class Reference

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

Inheritance diagram for orxonox::Backlight:

List of all members.

## 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_

## Constructor & Destructor Documentation

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]`

References orxonox::BaseObject::getScene(), orxonox::Scene::getSceneManager(), orxonox::BaseObject::isInitialized(), ribbonTrail_, and ribbonTrailNode_.

## Member Function Documentation

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]`

Reimplemented from orxonox::WorldEntity.

References SUPER, update_length(), and update_width().

void orxonox::Backlight::changedTimeFactor | ( | float | factor_new,
|  | float | factor_old |
| ) |  |  | `[protected, virtual]`

Reimplemented from orxonox::TimeFactorListener.

References update_lifetime().

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]`

Reimplemented from orxonox::FadingBillboard.

References orxonox::FadingBillboard::getFadedColour(), lifetime_, orxonox::FadingBillboard::postprocessingtime_, ribbonTrail_, orxonox::FadingBillboard::stopturnonoff(), and orxonox::FadingBillboard::turnofftime_.

void orxonox::Backlight::tick | ( | float | dt | ) | `[virtual]`

Gets called every frame.

Parameters:

  | 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.

Parameters:

  | xmlelement | The XML-element
  | loading | Loading (true) or saving (false)

Returns:
  The XML-element

Reimplemented from orxonox::FadingBillboard.

References getLength(), getLifetime(), getMaxElements(), getTrailMaterial(), getWidth(), setLength(), setLifetime(), setMaxElements(), setTrailMaterial(), setWidth(), SUPER, and XMLPortParam.

## Member Data Documentation

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]`

Referenced by Backlight(), changedColour(), changedVisibility(), poststopturnonoff(), startturnonoff(), stopturnonoff(), tick(), update_length(), update_lifetime(), update_maxelements(), update_trailmaterial(), update_width(), and ~Backlight().

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().

std::string orxonox::Backlight::trailmaterial_`[private]`

Referenced by registerVariables(), and update_trailmaterial().

float orxonox::Backlight::width_`[private]`

Referenced by Backlight(), registerVariables(), update_lifetime(), and update_width().

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

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