#include <src/orxonox/objects/Scene.h>
Public Member Functions | |
void | addPhysicalObject (WorldEntity *object) |
const ColourValue & | getAmbientLight () const |
const Vector3 & | getGravity () const |
const Vector3 & | getNegativeWorldRange () const |
const Vector3 & | getPositiveWorldRange () const |
Ogre::SceneNode * | getRootSceneNode () const |
Ogre::SceneManager * | getSceneManager () const |
bool | getShadow () const |
const std::string & | getSkybox () const |
bool | hasPhysics () |
void | registerVariables () |
void | removePhysicalObject (WorldEntity *object) |
Scene (BaseObject *creator) | |
void | setAmbientLight (const ColourValue &colour) |
void | setGravity (const Vector3 &gravity) |
void | setNegativeWorldRange (const Vector3 &range) |
void | setPhysicalWorld (bool wantsPhysics) |
void | setPositiveWorldRange (const Vector3 &range) |
void | setShadow (bool bShadow) |
void | setSkybox (const std::string &skybox) |
virtual void | tick (float dt) |
Gets called every frame. | |
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode) |
XML loading and saving. | |
virtual | ~Scene () |
Private Member Functions | |
void | addObject (BaseObject *object) |
BaseObject * | getObject (unsigned int index) const |
void | networkcallback_applyAmbientLight () |
void | networkcallback_applyShadows () |
void | networkcallback_applySkybox () |
void | networkcallback_gravity () |
void | networkcallback_hasPhysics () |
void | networkcallback_negativeWorldRange () |
void | networkcallback_positiveWorldRange () |
Static Private Member Functions | |
static bool | collisionCallback (btManifoldPoint &cp, const btCollisionObject *colObj0, int partId0, int index0, const btCollisionObject *colObj1, int partId1, int index1) |
Private Attributes | |
ColourValue | ambientLight_ |
bool | bHasPhysics_ |
bt32BitAxisSweep3 * | broadphase_ |
bool | bShadows_ |
btDefaultCollisionConfiguration * | collisionConfig_ |
btCollisionDispatcher * | dispatcher_ |
Vector3 | gravity_ |
Vector3 | negativeWorldRange_ |
std::list< BaseObject * > | objects_ |
std::set< WorldEntity * > | physicalObjectQueue_ |
std::set< WorldEntity * > | physicalObjects_ |
btDiscreteDynamicsWorld * | physicalWorld_ |
Vector3 | positiveWorldRange_ |
Ogre::SceneNode * | rootSceneNode_ |
Ogre::SceneManager * | sceneManager_ |
std::string | skybox_ |
btSequentialImpulseConstraintSolver * | solver_ |
orxonox::Scene::Scene | ( | BaseObject * | creator | ) |
orxonox::Scene::~Scene | ( | ) | [virtual] |
void orxonox::Scene::addObject | ( | BaseObject * | object | ) | [private] |
void orxonox::Scene::addPhysicalObject | ( | WorldEntity * | object | ) |
References physicalObjectQueue_, and physicalObjects_.
Referenced by orxonox::WorldEntity::activatePhysics().
bool orxonox::Scene::collisionCallback | ( | btManifoldPoint & | cp, | |
const btCollisionObject * | colObj0, | |||
int | partId0, | |||
int | index0, | |||
const btCollisionObject * | colObj1, | |||
int | partId1, | |||
int | index1 | |||
) | [static, private] |
References orxonox::WorldEntity::collidesAgainst(), and orxonox::WorldEntity::isCollisionCallbackActive().
Referenced by setPhysicalWorld().
const ColourValue& orxonox::Scene::getAmbientLight | ( | ) | const [inline] |
Referenced by XMLPort().
const Vector3& orxonox::Scene::getGravity | ( | ) | const [inline] |
Referenced by XMLPort().
const Vector3& orxonox::Scene::getNegativeWorldRange | ( | ) | const [inline] |
Referenced by XMLPort().
BaseObject * orxonox::Scene::getObject | ( | unsigned int | index | ) | const [private] |
const Vector3& orxonox::Scene::getPositiveWorldRange | ( | ) | const [inline] |
Referenced by XMLPort().
Ogre::SceneNode* orxonox::Scene::getRootSceneNode | ( | ) | const [inline] |
Referenced by orxonox::Backlight::Backlight(), orxonox::Camera::Camera(), and orxonox::WorldEntity::WorldEntity().
Ogre::SceneManager* orxonox::Scene::getSceneManager | ( | ) | const [inline] |
Referenced by orxonox::GSMainMenu::activate(), orxonox::Backlight::Backlight(), orxonox::Camera::Camera(), orxonox::GSMainMenu::deactivate(), orxonox::Light::Light(), orxonox::CameraManager::releaseFocus(), orxonox::Engine::tick(), orxonox::Backlight::~Backlight(), orxonox::Camera::~Camera(), orxonox::ControllableEntity::~ControllableEntity(), orxonox::Light::~Light(), and orxonox::WorldEntity::~WorldEntity().
bool orxonox::Scene::getShadow | ( | ) | const [inline] |
Referenced by XMLPort().
const std::string& orxonox::Scene::getSkybox | ( | ) | const [inline] |
Referenced by XMLPort().
bool orxonox::Scene::hasPhysics | ( | ) | [inline] |
Referenced by removePhysicalObject(), setGravity(), setNegativeWorldRange(), setPhysicalWorld(), setPositiveWorldRange(), tick(), and XMLPort().
void orxonox::Scene::networkcallback_applyAmbientLight | ( | ) | [inline, private] |
Referenced by registerVariables().
void orxonox::Scene::networkcallback_applyShadows | ( | ) | [inline, private] |
Referenced by registerVariables().
void orxonox::Scene::networkcallback_applySkybox | ( | ) | [inline, private] |
Referenced by registerVariables().
void orxonox::Scene::networkcallback_gravity | ( | ) | [inline, private] |
Referenced by registerVariables().
void orxonox::Scene::networkcallback_hasPhysics | ( | ) | [inline, private] |
Referenced by registerVariables().
void orxonox::Scene::networkcallback_negativeWorldRange | ( | ) | [inline, private] |
Referenced by registerVariables().
void orxonox::Scene::networkcallback_positiveWorldRange | ( | ) | [inline, private] |
Referenced by registerVariables().
void orxonox::Scene::registerVariables | ( | ) |
References ambientLight_, bHasPhysics_, bShadows_, gravity_, negativeWorldRange_, networkcallback_applyAmbientLight(), networkcallback_applyShadows(), networkcallback_applySkybox(), networkcallback_gravity(), networkcallback_hasPhysics(), networkcallback_negativeWorldRange(), networkcallback_positiveWorldRange(), positiveWorldRange_, orxonox::Synchronisable::registerVariable(), skybox_, and orxonox::VariableDirection::ToClient.
Referenced by Scene().
void orxonox::Scene::removePhysicalObject | ( | WorldEntity * | object | ) |
References hasPhysics(), orxonox::WorldEntity::physicalBody_, physicalObjectQueue_, physicalObjects_, and physicalWorld_.
Referenced by orxonox::WorldEntity::deactivatePhysics().
void orxonox::Scene::setAmbientLight | ( | const ColourValue & | colour | ) |
References ambientLight_, sceneManager_, and orxonox::GameMode::showsGraphics().
Referenced by XMLPort().
void orxonox::Scene::setGravity | ( | const Vector3 & | gravity | ) |
void orxonox::Scene::setNegativeWorldRange | ( | const Vector3 & | range | ) |
References CCOUT, hasPhysics(), orxonox::multi_cast(), negativeWorldRange_, and setPhysicalWorld().
Referenced by XMLPort().
void orxonox::Scene::setPhysicalWorld | ( | bool | wantsPhysics | ) |
References bHasPhysics_, broadphase_, collisionCallback(), collisionConfig_, dispatcher_, gravity_, hasPhysics(), negativeWorldRange_, physicalObjectQueue_, physicalObjects_, physicalWorld_, positiveWorldRange_, and solver_.
Referenced by setNegativeWorldRange(), setPositiveWorldRange(), XMLPort(), and ~Scene().
void orxonox::Scene::setPositiveWorldRange | ( | const Vector3 & | range | ) |
References CCOUT, hasPhysics(), orxonox::multi_cast(), positiveWorldRange_, and setPhysicalWorld().
Referenced by XMLPort().
void orxonox::Scene::setShadow | ( | bool | bShadow | ) |
References bShadows_, sceneManager_, and orxonox::GameMode::showsGraphics().
Referenced by XMLPort().
void orxonox::Scene::setSkybox | ( | const std::string & | skybox | ) |
void orxonox::Scene::tick | ( | float | dt | ) | [virtual] |
Gets called every frame.
dt | The time since the last frame in seconds |
Implements orxonox::Tickable.
References hasPhysics(), physicalObjectQueue_, physicalObjects_, physicalWorld_, rootSceneNode_, and orxonox::GameMode::showsGraphics().
void orxonox::Scene::XMLPort | ( | Element & | xmlelement, | |
XMLPort::Mode | mode | |||
) | [virtual] |
XML loading and saving.
xmlelement | The XML-element | |
loading | Loading (true) or saving (false) |
Reimplemented from orxonox::BaseObject.
References addObject(), orxonox::MT_Type::ColourValue, getAmbientLight(), getGravity(), getNegativeWorldRange(), getObject(), getPositiveWorldRange(), getShadow(), getSkybox(), hasPhysics(), setAmbientLight(), setGravity(), setNegativeWorldRange(), setPhysicalWorld(), setPositiveWorldRange(), setShadow(), setSkybox(), SUPER, XMLPortObjectExtended, and XMLPortParam.
ColourValue orxonox::Scene::ambientLight_ [private] |
Referenced by registerVariables(), and setAmbientLight().
bool orxonox::Scene::bHasPhysics_ [private] |
Referenced by registerVariables(), and setPhysicalWorld().
bt32BitAxisSweep3* orxonox::Scene::broadphase_ [private] |
Referenced by Scene(), and setPhysicalWorld().
bool orxonox::Scene::bShadows_ [private] |
Referenced by registerVariables(), Scene(), and setShadow().
btDefaultCollisionConfiguration* orxonox::Scene::collisionConfig_ [private] |
Referenced by Scene(), and setPhysicalWorld().
btCollisionDispatcher* orxonox::Scene::dispatcher_ [private] |
Referenced by Scene(), and setPhysicalWorld().
Vector3 orxonox::Scene::gravity_ [private] |
Referenced by registerVariables(), Scene(), setGravity(), and setPhysicalWorld().
Vector3 orxonox::Scene::negativeWorldRange_ [private] |
Referenced by registerVariables(), Scene(), setNegativeWorldRange(), and setPhysicalWorld().
std::list<BaseObject*> orxonox::Scene::objects_ [private] |
Referenced by addObject(), and getObject().
std::set<WorldEntity*> orxonox::Scene::physicalObjectQueue_ [private] |
Referenced by addPhysicalObject(), removePhysicalObject(), setPhysicalWorld(), and tick().
std::set<WorldEntity*> orxonox::Scene::physicalObjects_ [private] |
Referenced by addPhysicalObject(), removePhysicalObject(), setPhysicalWorld(), and tick().
btDiscreteDynamicsWorld* orxonox::Scene::physicalWorld_ [private] |
Referenced by removePhysicalObject(), Scene(), setGravity(), setPhysicalWorld(), and tick().
Vector3 orxonox::Scene::positiveWorldRange_ [private] |
Referenced by registerVariables(), Scene(), setPhysicalWorld(), and setPositiveWorldRange().
Ogre::SceneNode* orxonox::Scene::rootSceneNode_ [private] |
Ogre::SceneManager* orxonox::Scene::sceneManager_ [private] |
Referenced by Scene(), setAmbientLight(), setShadow(), setSkybox(), and ~Scene().
std::string orxonox::Scene::skybox_ [private] |
Referenced by registerVariables(), and setSkybox().
btSequentialImpulseConstraintSolver* orxonox::Scene::solver_ [private] |
Referenced by Scene(), and setPhysicalWorld().