Orxonox: orxonox::Planet Class Reference

# orxonox::Planet Class Reference

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

Inheritance diagram for orxonox::Planet:

List of all members.

## Public Member Functions

virtual void | changedVisibility ()
| This function gets called if the visibility of the object changes.
const std::string & | getAtmosphere ()
float | getAtmosphereSize ()
bool | getCastShadows () const
float | getImageSize ()
const std::string & | getMesh () const
const std::string & | getMeshSource () const
void | init ()
| Planet (BaseObject *creator)
| Constructor.
void | setAtmosphere (const std::string &atmosphere)
void | setAtmosphereSize (float size)
void | setCastShadows (bool bCastShadows)
void | setImageSize (float size)
void | setMeshSource (const std::string &meshname)
virtual void | tick (float dt)
| Gets called every frame.
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| XML loading and saving.
virtual | ~Planet ()
| Destructor.

## Protected Member Functions

void | registerVariables ()

## Private Member Functions

void | changedMesh ()
void | changedShadows ()

## Private Attributes

std::string | atmosphere_
float | atmosphereSize
bool | bCastShadows_
BillboardSet | billboard_
std::vector< float > | distList
float | imageSize
Mesh | mesh_
std::string | meshSrc_

## Constructor & Destructor Documentation

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

Constructor.

References RegisterObject, and registerVariables().

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

Destructor.

References orxonox::WorldEntity::detachOgreObject(), orxonox::Mesh::getEntity(), orxonox::BaseObject::isInitialized(), and mesh_.

## Member Function Documentation

void orxonox::Planet::changedMesh | ( |  | ) | `[private]`

References orxonox::WorldEntity::attachOgreObject(), bCastShadows_, orxonox::WorldEntity::detachOgreObject(), orxonox::Mesh::getEntity(), orxonox::BaseObject::getScene(), init(), orxonox::BaseObject::isVisible(), mesh_, meshSrc_, orxonox::Mesh::setMeshSource(), and orxonox::Mesh::setVisible().

Referenced by registerVariables().

void orxonox::Planet::changedShadows | ( |  | ) | `[private]`

References bCastShadows_, mesh_, and orxonox::Mesh::setCastShadows().

Referenced by registerVariables().

void orxonox::Planet::changedVisibility | ( |  | ) | `[virtual]`

This function gets called if the visibility of the object changes.

Reimplemented from orxonox::BaseObject.

References billboard_, orxonox::BaseObject::isInitialized(), orxonox::BaseObject::isVisible(), mesh_, orxonox::BillboardSet::setVisible(), orxonox::Mesh::setVisible(), and SUPER.

const std::string& orxonox::Planet::getAtmosphere | ( |  | ) | `[inline]`

Referenced by XMLPort().

float orxonox::Planet::getAtmosphereSize | ( |  | ) | `[inline]`

Referenced by XMLPort().

bool orxonox::Planet::getCastShadows | ( |  | ) | const`[inline]`

Referenced by XMLPort().

float orxonox::Planet::getImageSize | ( |  | ) | `[inline]`

Referenced by XMLPort().

const std::string& orxonox::Planet::getMesh | ( |  | ) | const`[inline]`

const std::string& orxonox::Planet::getMeshSource | ( |  | ) | const`[inline]`

Referenced by XMLPort().

void orxonox::Planet::init | ( |  | ) |

References atmosphere_, orxonox::WorldEntity::attachOgreObject(), billboard_, distList, orxonox::BillboardSet::getBillboardSet(), orxonox::Mesh::getEntity(), orxonox::WorldEntity::getScale(), orxonox::BaseObject::getScene(), mesh_, orxonox::BillboardSet::setBillboardSet(), orxonox::Mesh::setCastShadows(), setCastShadows(), and orxonox::MT_Type::Vector3.

Referenced by changedMesh().

void orxonox::Planet::registerVariables | ( |  | ) | `[protected]`

Reimplemented from orxonox::MovableEntity.

References atmosphere_, atmosphereSize, bCastShadows_, changedMesh(), changedShadows(), imageSize, meshSrc_, orxonox::Synchronisable::registerVariable(), and orxonox::VariableDirection::ToClient.

Referenced by Planet().

void orxonox::Planet::setAtmosphere | ( | const std::string & | atmosphere | ) | `[inline]`

Referenced by XMLPort().

void orxonox::Planet::setAtmosphereSize | ( | float | size | ) | `[inline]`

Referenced by XMLPort().

void orxonox::Planet::setCastShadows | ( | bool | bCastShadows | ) | `[inline]`

Referenced by init(), and XMLPort().

void orxonox::Planet::setImageSize | ( | float | size | ) | `[inline]`

Referenced by XMLPort().

void orxonox::Planet::setMeshSource | ( | const std::string & | meshname | ) | `[inline]`

Referenced by XMLPort().

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

Gets called every frame.

Parameters:

  | dt | The time since the last frame in seconds

Reimplemented from orxonox::MobileEntity.

References atmosphereSize, billboard_, orxonox::CameraManager::getActiveCamera(), orxonox::BillboardSet::getBillboardSet(), orxonox::CameraManager::getInstance(), orxonox::WorldEntity::getPosition(), orxonox::WorldEntity::getScale(), orxonox::WorldEntity::getWorldPosition(), imageSize, orxonox::BaseObject::isVisible(), orxonox::GameMode::showsGraphics(), and SUPER.

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

References getAtmosphere(), getAtmosphereSize(), getCastShadows(), getImageSize(), getMeshSource(), setAtmosphere(), setAtmosphereSize(), setCastShadows(), setImageSize(), setMeshSource(), orxonox::GameMode::showsGraphics(), SUPER, and XMLPortParam.

## Member Data Documentation

std::string orxonox::Planet::atmosphere_`[private]`

Referenced by init(), and registerVariables().

float orxonox::Planet::atmosphereSize`[private]`

Referenced by registerVariables(), and tick().

bool orxonox::Planet::bCastShadows_`[private]`

Referenced by changedMesh(), changedShadows(), and registerVariables().

BillboardSet orxonox::Planet::billboard_`[private]`

Referenced by changedVisibility(), init(), and tick().

std::vector<float> orxonox::Planet::distList`[private]`

Referenced by init().

float orxonox::Planet::imageSize`[private]`

Referenced by registerVariables(), and tick().

Mesh orxonox::Planet::mesh_`[private]`

Referenced by changedMesh(), changedShadows(), changedVisibility(), init(), and ~Planet().

std::string orxonox::Planet::meshSrc_`[private]`

Referenced by changedMesh(), and registerVariables().

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

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