Orxonox: orxonox::Model Class Reference

# orxonox::Model Class Reference

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

Inheritance diagram for orxonox::Model:

List of all members.

## Public Member Functions

virtual void | changedVisibility ()
| This function gets called if the visibility of the object changes.
bool | getCastShadows () const
const Mesh & | getMesh () const
const std::string & | getMeshSource () const
| Model (BaseObject *creator)
void | registerVariables ()
void | setCastShadows (bool bCastShadows)
void | setMeshSource (const std::string &meshname)
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| XML loading and saving.
virtual | ~Model ()

## Private Member Functions

void | changedMesh ()
void | changedShadows ()

## Private Attributes

bool | bCastShadows_
Mesh | mesh_
std::string | meshSrc_

## Constructor & Destructor Documentation

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

References bCastShadows_, RegisterObject, and registerVariables().

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

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

## Member Function Documentation

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

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

Referenced by registerVariables().

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

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

Referenced by registerVariables().

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

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

Reimplemented from orxonox::BaseObject.

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

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

Referenced by XMLPort().

const Mesh& orxonox::Model::getMesh | ( |  | ) | const`[inline]`

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

Referenced by XMLPort().

void orxonox::Model::registerVariables | ( |  | ) |

Reimplemented from orxonox::StaticEntity.

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

Referenced by Model().

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

Referenced by orxonox::HsW01::shot(), orxonox::EnergyDrink::shot(), and XMLPort().

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

Referenced by orxonox::DroppedItem::createDefaultDrop(), orxonox::BigExplosion::init(), orxonox::HsW01::shot(), orxonox::EnergyDrink::shot(), and XMLPort().

void orxonox::Model::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::WorldEntity.

References getCastShadows(), getMeshSource(), setCastShadows(), setMeshSource(), SUPER, and XMLPortParam.

## Member Data Documentation

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

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

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

Referenced by changedMesh(), changedShadows(), changedVisibility(), and ~Model().

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

Referenced by changedMesh(), and registerVariables().

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

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