#include <OgreRefAppWorld.h>
Public Types | |
enum | WorldType { WT_REFAPP_GENERIC, WT_REFAPP_BSP } |
World type, you'll want to extend this for your own apps. More... | |
Public Methods | |
World (SceneManager *sceneMgr, WorldType worldType=WT_REFAPP_GENERIC) | |
Creates an instance of the world. | |
~World () | |
SceneManager * | getSceneManager (void) |
Get the scene manager for this world. | |
OgreHead * | createOgreHead (const String &name, const Vector3 &pos=Vector3::ZERO, const Quaternion &orientation=Quaternion::IDENTITY) |
Create an OGRE head object. | |
FinitePlane * | createPlane (const String &name, Real width, Real height, const Vector3 &pos=Vector3::ZERO, const Quaternion &orientation=Quaternion::IDENTITY) |
Create a plane object. | |
Ball * | createBall (const String &name, Real radius, const Vector3 &pos=Vector3::ZERO, const Quaternion &orientation=Quaternion::IDENTITY) |
Create a ball object. | |
Box * | createBox (const String &name, Real width, Real height, Real depth, const Vector3 &pos=Vector3::ZERO, const Quaternion &orientation=Quaternion::IDENTITY) |
Create a box object. | |
CollideCamera * | createCamera (const String &name, const Vector3 &pos=Vector3::ZERO, const Quaternion &orientation=Quaternion::IDENTITY) |
Create a camera which interacts with the world. | |
void | clear (void) |
Clears the scene. | |
dWorld * | getOdeWorld (void) |
dJointGroup * | getOdeContactJointGroup (void) |
void | _applyCollision (void) |
Detects all the collisions in the world and acts on them. | |
void | _applyDynamics (Real timeElapsed) |
Updates the world simulation. | |
void | _notifyDynamicsStateForObject (ApplicationObject *obj, bool dynamicsEnabled) |
Internal method for notifying the world of a change in the dynamics status of an object. | |
void | setGravity (const Vector3 &vec) |
Sets the gravity vector, units are in m/s^2. | |
const Vector3 & | getGravity (void) |
Gets the gravity vector. | |
Joint * | createJoint (const String &name, Joint::JointType jtype, ApplicationObject *obj1, ApplicationObject *obj2) |
Creates a Joint object for linking objects together in the world. | |
void | setSimulationStepSize (Real step) |
Sets the step size of the simulation. | |
Real | getSimulationStepSize (void) |
Returns the size of the simulation step. | |
void | simulationStep (Real timeElapsed) |
Performs a simulation step, ie applies collision and physics. | |
Static Public Methods | |
World & | getSingleton (void) |
Override standard Singleton retrieval. | |
World * | getSingletonPtr (void) |
Override standard Singleton retrieval. | |
Protected Types | |
typedef std::map< String, ApplicationObject * > | ObjectMap |
typedef std::map< String, Joint * > | JointMap |
typedef std::set< ApplicationObject * > | ObjectSet |
Protected Attributes | |
SceneManager * | mSceneMgr |
Pointer to OGRE's scene manager. | |
ObjectMap | mObjects |
Main list of objects. | |
JointMap | mJoints |
ObjectSet | mDynamicsObjects |
Set of dynamics objects (those to perform physics on). | |
dWorld * | mOdeWorld |
dJointGroup * | mOdeContactGroup |
Contact joint group. | |
Vector3 | mGravity |
IntersectionSceneQuery * | mIntersectionQuery |
Real | mSimulationStepSize |
The step size of the collision / physics simulation. | |
WorldType | mWorldType |
The type of world we're dealing with. |
|
Definition at line 50 of file OgreRefAppWorld.h. |
|
Definition at line 46 of file OgreRefAppWorld.h. |
|
Definition at line 53 of file OgreRefAppWorld.h. |
|
World type, you'll want to extend this for your own apps.
Definition at line 38 of file OgreRefAppWorld.h. |
|
Creates an instance of the world.
Definition at line 47 of file OgreRefAppWorld.cpp. References mIntersectionQuery, mOdeContactGroup, mOdeWorld, mSceneMgr, and mSimulationStepSize. |
|
Definition at line 69 of file OgreRefAppWorld.cpp. References clear(), mIntersectionQuery, mOdeContactGroup, and mOdeWorld. |
|
Detects all the collisions in the world and acts on them.
Definition at line 193 of file OgreRefAppWorld.cpp. References mIntersectionQuery, and OgreRefApp::ApplicationObject::testCollide(). Referenced by simulationStep(). |
|
Updates the world simulation.
Definition at line 144 of file OgreRefAppWorld.cpp. References mDynamicsObjects, mOdeContactGroup, mOdeWorld, and Ogre::Real. Referenced by simulationStep(). |
|
Internal method for notifying the world of a change in the dynamics status of an object.
Definition at line 164 of file OgreRefAppWorld.cpp. References mDynamicsObjects. |
|
Clears the scene.
Definition at line 122 of file OgreRefAppWorld.cpp. References mJoints, and mObjects. Referenced by ~World(). |
|
Create a ball object.
Definition at line 110 of file OgreRefAppWorld.cpp. References mObjects, Ogre::Real, OgreRefApp::ApplicationObject::setOrientation(), OgreRefApp::ApplicationObject::setPosition(), and Ogre::String. |
|
Create a box object.
Definition at line 308 of file OgreRefAppWorld.cpp. References mObjects, Ogre::Real, OgreRefApp::ApplicationObject::setOrientation(), OgreRefApp::ApplicationObject::setPosition(), and Ogre::String. |
|
Create a camera which interacts with the world.
Definition at line 321 of file OgreRefAppWorld.cpp. References mObjects, OgreRefApp::CollideCamera::setOrientation(), OgreRefApp::ApplicationObject::setPosition(), and Ogre::String. |
|
Creates a Joint object for linking objects together in the world.
Definition at line 249 of file OgreRefAppWorld.cpp. References mJoints, and Ogre::String. |
|
Create an OGRE head object.
Definition at line 86 of file OgreRefAppWorld.cpp. References mObjects, OgreRefApp::ApplicationObject::setOrientation(), OgreRefApp::ApplicationObject::setPosition(), and Ogre::String. |
|
Create a plane object.
Definition at line 98 of file OgreRefAppWorld.cpp. References mObjects, Ogre::Real, OgreRefApp::ApplicationObject::setOrientation(), OgreRefApp::ApplicationObject::setPosition(), and Ogre::String. |
|
Gets the gravity vector.
Definition at line 183 of file OgreRefAppWorld.cpp. References mGravity. |
|
Definition at line 188 of file OgreRefAppWorld.cpp. References mOdeContactGroup. |
|
Definition at line 139 of file OgreRefAppWorld.cpp. References mOdeWorld. |
|
Get the scene manager for this world.
Definition at line 81 of file OgreRefAppWorld.cpp. References mSceneMgr. |
|
Returns the size of the simulation step.
Definition at line 282 of file OgreRefAppWorld.cpp. References mSimulationStepSize, and Ogre::Real. |
|
Override standard Singleton retrieval.
Definition at line 39 of file OgreRefAppWorld.cpp. |
|
Override standard Singleton retrieval.
Definition at line 35 of file OgreRefAppWorld.cpp. |
|
Sets the gravity vector, units are in m/s^2.
Definition at line 177 of file OgreRefAppWorld.cpp. |
|
Sets the step size of the simulation.
Definition at line 277 of file OgreRefAppWorld.cpp. References mSimulationStepSize, and Ogre::Real. |
|
Performs a simulation step, ie applies collision and physics.
Definition at line 287 of file OgreRefAppWorld.cpp. References _applyCollision(), _applyDynamics(), mSimulationStepSize, and Ogre::Real. |
|
Set of dynamics objects (those to perform physics on).
Definition at line 55 of file OgreRefAppWorld.h. Referenced by _applyDynamics(), and _notifyDynamicsStateForObject(). |
|
Definition at line 63 of file OgreRefAppWorld.h. Referenced by getGravity(), and setGravity(). |
|
Definition at line 65 of file OgreRefAppWorld.h. Referenced by _applyCollision(), World(), and ~World(). |
|
Definition at line 51 of file OgreRefAppWorld.h. Referenced by clear(), and createJoint(). |
|
Main list of objects.
Definition at line 48 of file OgreRefAppWorld.h. Referenced by clear(), createBall(), createBox(), createCamera(), createOgreHead(), and createPlane(). |
|
Contact joint group.
Definition at line 61 of file OgreRefAppWorld.h. Referenced by _applyDynamics(), getOdeContactJointGroup(), World(), and ~World(). |
|
Definition at line 58 of file OgreRefAppWorld.h. Referenced by _applyDynamics(), getOdeWorld(), setGravity(), World(), and ~World(). |
|
Pointer to OGRE's scene manager.
Definition at line 44 of file OgreRefAppWorld.h. Referenced by getSceneManager(), and World(). |
|
The step size of the collision / physics simulation.
Definition at line 68 of file OgreRefAppWorld.h. Referenced by getSimulationStepSize(), setSimulationStepSize(), simulationStep(), and World(). |
|
The type of world we're dealing with.
Definition at line 71 of file OgreRefAppWorld.h. |
Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:59 2004