Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::BspSceneManager Class Reference

Specialisation of the SceneManager class to deal with indoor scenes based on a BSP tree. More...

#include <OgreBspSceneManager.h>

Inheritance diagram for Ogre::BspSceneManager:

Inheritance graph
[legend]
Collaboration diagram for Ogre::BspSceneManager:

Collaboration graph
[legend]
List of all members.

Public Types

typedef MapIterator< SceneLightListLightIterator
typedef MapIterator< EntityListEntityIterator
typedef MapIterator< CameraListCameraIterator
typedef MapIterator< BillboardSetListBillboardSetIterator
enum  PrefabType { PT_PLANE }
 Prefab shapes available without loading a model. More...


Public Methods

 BspSceneManager ()
 ~BspSceneManager ()
void setWorldGeometry (const String &filename)
 Specialised from SceneManager to support Quake3 bsp files.

void showNodeBoxes (bool show)
 Tells the manager whether to draw the axis-aligned boxes that surround nodes in the Bsp tree.

ViewPoint getSuggestedViewpoint (bool random=false)
 Specialised to suggest viewpoints.

BspLevelgetLevel (void)
void _findVisibleObjects (Camera *cam)
 Overriden from SceneManager.

void _renderVisibleObjects (void)
 Overriden from SceneManager.

SceneNodecreateSceneNode (void)
 Creates a specialized BspSceneNode.

SceneNodecreateSceneNode (const String &name)
 Creates a specialized BspSceneNode.

void _notifyObjectMoved (const MovableObject *mov, const Vector3 &pos)
 Internal method for tagging BspNodes with objects which intersect them.

void _notifyObjectDetached (const MovableObject *mov)
 Internal method for notifying the level that an object has been detached from a node.

virtual AxisAlignedBoxSceneQuerycreateAABBQuery (const AxisAlignedBox &box, unsigned long mask=0xFFFFFFFF)
 Creates an AxisAlignedBoxSceneQuery for this scene manager.

virtual SphereSceneQuerycreateSphereQuery (const Sphere &sphere, unsigned long mask=0xFFFFFFFF)
 Creates a SphereSceneQuery for this scene manager.

virtual RaySceneQuerycreateRayQuery (const Ray &ray, unsigned long mask=0xFFFFFFFF)
 Creates a RaySceneQuery for this scene manager.

virtual IntersectionSceneQuerycreateIntersectionQuery (unsigned long mask=0xFFFFFFFF)
 Creates an IntersectionSceneQuery for this scene manager.

virtual CameracreateCamera (const String &name)
 Creates a camera to be managed by this scene manager.

virtual CameragetCamera (const String &name)
 Retrieves a pointer to the named camera.

virtual void removeCamera (Camera *cam)
 Removes a camera from the scene.

virtual void removeCamera (const String &name)
 Removes a camera from the scene.

virtual void removeAllCameras (void)
 Removes (and destroys) all cameras from the scene.

virtual LightcreateLight (const String &name)
 Creates a light for use in the scene.

virtual LightgetLight (const String &name)
 Returns a pointer to the named Light which has previously been added to the scene.

virtual void removeLight (const String &name)
 Removes the named light from the scene and destroys it.

virtual void removeLight (Light *light)
 Removes the light from the scene and destroys it based on a pointer.

virtual void removeAllLights (void)
 Removes and destroys all lights in the scene.

virtual void _populateLightList (const Vector3 &position, LightList &destList)
 Populate a light list with an ordered set of the lights which are closest to the position specified.

virtual MaterialcreateMaterial (const String &name)
 Creates a new material with default settings with the specified name.

virtual MaterialgetDefaultMaterialSettings (void)
 Returns a pointer to the default Material settings.

virtual MaterialgetMaterial (const String &name)
 Gets a reference to a named Material.

virtual MaterialgetMaterial (int handle)
 Gets a reference to a material by it's numerical handle.

virtual void destroySceneNode (const String &name)
 Destroys a SceneNode with a given name.

virtual SceneNodegetRootSceneNode (void) const
 Gets the SceneNode at the root of the scene hierarchy.

virtual SceneNodegetSceneNode (const String &name) const
 Retrieves a named SceneNode from the scene graph.

virtual EntitycreateEntity (const String &entityName, const String &meshName)
 Create an Entity (instance of a discrete mesh).

virtual EntitycreateEntity (const String &entityName, PrefabType ptype)
 Create an Entity (instance of a discrete mesh) from a range of prefab shapes.

virtual EntitygetEntity (const String &name)
 Retrieves a pointer to the named Entity.

virtual void removeEntity (Entity *ent)
 Removes & destroys an Entity from the SceneManager.

virtual void removeEntity (const String &name)
 Removes & destroys an Entity from the SceneManager by name.

virtual void removeAllEntities (void)
 Removes & destroys all Entities.

virtual void clearScene (void)
 Empties the entire scene, inluding all SceneNodes, Cameras, Entities and Lights etc.

void setAmbientLight (const ColourValue &colour)
 Sets the ambient light level to be used for the scene.

const ColourValuegetAmbientLight (void) const
 Returns the ambient light level to be used for the scene.

virtual bool setOption (const String &strKey, const void *pValue)
 Method for setting a specific option of the Scene Manager.

virtual bool getOption (const String &strKey, void *pDestValue)
 Method for getting the value of an implementation-specific Scene Manager option.

virtual bool hasOption (const String &strKey) const
 Method for verifying wether the scene manager has an implementation-specific option.

virtual bool getOptionValues (const String &strKey, std::list< SDDataChunk > &refValueList)
 Method for getting all possible values for a specific option.

virtual bool getOptionKeys (std::list< String > &refKeys)
 Method for getting all the implementation-specific options of the scene manager.

virtual void _updateSceneGraph (Camera *cam)
 Internal method for updating the scene graph ie the tree of SceneNode instances managed by this class.

virtual void _applySceneAnimations (void)
 Internal method for applying animations to scene nodes.

virtual void _renderScene (Camera *camera, Viewport *vp, bool includeOverlays)
 Prompts the class to send its contents to the renderer.

virtual void _queueSkiesForRendering (Camera *cam)
 Internal method for queueing the sky objects with the params as previously set through setSkyBox, setSkyPlane and setSkyDome.

virtual void _setDestinationRenderSystem (RenderSystem *sys)
 Notifies the scene manager of its destination render system.

virtual void setSkyPlane (bool enable, const Plane &plane, const String &materialName, Real scale=1000, Real tiling=10, bool drawFirst=true, Real bow=0)
 Enables / disables a 'sky plane' i.e.

virtual void setSkyBox (bool enable, const String &materialName, Real distance=5000, bool drawFirst=true, const Quaternion &orientation=Quaternion::IDENTITY)
 Enables / disables a 'sky box' i.e.

virtual void setSkyDome (bool enable, const String &materialName, Real curvature=10, Real tiling=8, Real distance=4000, bool drawFirst=true, const Quaternion &orientation=Quaternion::IDENTITY)
 Enables / disables a 'sky dome' i.e.

void setFog (FogMode mode=FOG_NONE, const ColourValue &colour=ColourValue::White, Real expDensity=0.001, Real linearStart=0.0, Real linearEnd=1.0)
 Sets the fogging mode applied to the scene.

virtual FogMode getFogMode (void) const
 Returns the fog mode for the scene.

virtual const ColourValuegetFogColour (void) const
 Returns the fog colour for the scene.

virtual Real getFogStart (void) const
 Returns the fog start distance for the scene.

virtual Real getFogEnd (void) const
 Returns the fog end distance for the scene.

virtual Real getFogDensity (void) const
 Returns the fog density for the scene.

virtual BillboardSetcreateBillboardSet (const String &name, unsigned int poolSize=20)
 Creates a new BillboardSet for use with this scene manager.

virtual BillboardSetgetBillboardSet (const String &name)
 Retrieves a pointer to the named BillboardSet.

virtual void removeBillboardSet (BillboardSet *set)
 Removes & destroys an BillboardSet from the SceneManager.

virtual void removeBillboardSet (const String &name)
 Removes & destroys an BillboardSet from the SceneManager by name.

virtual void setDisplaySceneNodes (bool display)
 Tells the SceneManager whether it should render the SceneNodes which make up the scene as well as the objects in the scene.

virtual AnimationcreateAnimation (const String &name, Real length)
 Creates an animation which can be used to animate scene nodes.

virtual AnimationgetAnimation (const String &name) const
 Looks up an Animation object previously created with createAnimation.

virtual void destroyAnimation (const String &name)
 Destroys an Animation.

virtual void destroyAllAnimations (void)
 Removes all animations created using this SceneManager.

virtual AnimationStatecreateAnimationState (const String &animName)
 Create an AnimationState object for managing application of animations.

virtual AnimationStategetAnimationState (const String &animName)
 Retrieves animation state as previously created using createAnimationState.

virtual void destroyAnimationState (const String &name)
 Destroys an AnimationState.

virtual void destroyAllAnimationStates (void)
 Removes all animation states created using this SceneManager.

virtual void manualRender (RenderOperation *rend, Pass *pass, Viewport *vp, const Matrix4 &worldMatrix, const Matrix4 &viewMatrix, const Matrix4 &projMatrix)
 Manual rendering method, for advanced users only.

virtual OverlaycreateOverlay (const String &name, ushort zorder=100)
 Creates a new Overlay.

virtual OverlaygetOverlay (const String &name)
 Gets a pointer to the named Overlay, previously created using createOverlay.

virtual void destroyOverlay (const String &name)
 Destroys the named Overlay.

virtual void destroyAllOverlays (void)
 Destroys all the overlays.

virtual void addRenderQueueListener (RenderQueueListener *newListener)
 Registers a new RenderQueueListener which will be notified when render queues are processed.

virtual void removeRenderQueueListener (RenderQueueListener *delListener)
 Removes a listener previously added with addRenderQueueListener.

void showBoundingBoxes (bool bShow)
 Allows all bounding boxes of scene nodes to be displayed.

bool getShowBoundingBoxes () const
 Returns if all bounding boxes of scene nodes are to be displayed.

virtual void destroyQuery (SceneQuery *query)
 Destroys a scene query of any type.

LightIterator getLightIterator (void)
 Returns a specialised MapIterator over all lights in the scene.

EntityIterator getEntityIterator (void)
 Returns a specialised MapIterator over all entities in the scene.

CameraIterator getCameraIterator (void)
 Returns a specialised MapIterator over all cameras in the scene.

BillboardSetIterator getBillboardSetIterator (void)
 Returns a specialised MapIterator over all cameras in the scene.


Protected Types

typedef std::set< int > FaceGroupSet
typedef std::map< Material *,
std::vector< StaticFaceGroup * >,
materialLess > 
MaterialFaceGroupMap
typedef std::set< const MovableObject * > MovablesForRendering
typedef std::map< std::string,
Camera *, std::less< std::string > > 
CameraList
typedef std::map< std::string,
Light *, std::less< std::string > > 
SceneLightList
typedef std::map< std::string,
Entity *, std::less< std::string > > 
EntityList
typedef std::map< std::string,
BillboardSet *, std::less<
std::string > > 
BillboardSetList
typedef std::map< String,
SceneNode * > 
SceneNodeList
typedef std::map< String,
Animation * > 
AnimationList
 Storage of animations, lookup by name.

typedef std::vector< RenderQueueListener * > RenderQueueListenerList
enum  BoxPlane {
  BP_FRONT = 0, BP_BACK = 1, BP_LEFT = 2, BP_RIGHT = 3,
  BP_UP = 4, BP_DOWN = 5
}

Protected Methods

BspNodewalkTree (Camera *camera)
 Walks the BSP tree looking for the node which the camera is in, and tags any geometry which is in a visible leaf for later processing.

void processVisibleLeaf (BspNode *leaf, Camera *cam)
 Tags geometry in the leaf specified for later rendering.

unsigned int cacheGeometry (unsigned int *pIndexes, const StaticFaceGroup *faceGroup)
 Caches a face group for imminent rendering.

void freeMemory (void)
 Frees up allocated memory for geometry caches.

void addBoundingBox (AxisAlignedBox &aab, bool visible)
 Adds a bounding box to draw if turned on.

void renderStaticGeometry (void)
 Renders the static level geometry tagged in walkTree.

void setPass (Pass *pass)
 Internal method for setting up the renderstate for a rendering pass.

MeshcreateSkyboxPlane (BoxPlane bp, Real distance, const Quaternion &orientation)
MeshcreateSkydomePlane (BoxPlane bp, Real curvature, Real tiling, Real distance, const Quaternion &orientation)
void useRenderableViewProjMode (Renderable *pRend)
 Internal method used by _renderVisibleObjects to deal with renderables which override the camera's own view / projection materices.

bool fireRenderQueueStarted (RenderQueueGroupID id)
 Internal method for firing the queue start event, returns true if queue is to be skipped.

bool fireRenderQueueEnded (RenderQueueGroupID id)
 Internal method for firing the queue end event, returns true if queue is to be repeated.

virtual void setViewport (Viewport *vp)
 Internal method for setting the destination viewport for the next render.

virtual void renderSingleObject (Renderable *rend, Pass *pass)
 Internal utility method for rendering a single object.


Protected Attributes

BspResourceManagermBspResMgr
BspLevelmLevel
FaceGroupSet mFaceGroupSet
MaterialFaceGroupMap mMatFaceGroupMap
RenderOperation mRenderOp
bool mShowNodeAABs
RenderOperation mAABGeometry
MovablesForRendering mMovablesForRendering
RenderQueue mRenderQueue
 Queue of objects for rendering.

ColourValue mAmbientLight
 Current ambient light, cached for RenderSystem.

RenderSystemmDestRenderSystem
 The rendering system to send the scene to.

CameraList mCameras
 Central list of cameras - for easy memory management and lookup.

SceneLightList mLights
 Central list of lights - for easy memory management and lookup.

EntityList mEntities
 Central list of entities - for easy memory management and lookup.

BillboardSetList mBillboardSets
 Central list of billboard sets - for easy memory management and lookup.

SceneNodeList mSceneNodes
 Central list of SceneNodes - for easy memory management.

CameramCameraInProgress
 Camera in progress.

SceneNodemSceneRoot
 Root scene node.

EntitymSkyPlaneEntity
EntitymSkyDomeEntity [5]
EntitymSkyBoxEntity [6]
SceneNodemSkyPlaneNode
SceneNodemSkyDomeNode
SceneNodemSkyBoxNode
bool mSkyPlaneEnabled
bool mSkyPlaneDrawFirst
Plane mSkyPlane
bool mSkyBoxEnabled
bool mSkyBoxDrawFirst
Quaternion mSkyBoxOrientation
bool mSkyDomeEnabled
bool mSkyDomeDrawFirst
Quaternion mSkyDomeOrientation
FogMode mFogMode
ColourValue mFogColour
Real mFogStart
Real mFogEnd
Real mFogDensity
bool mDisplayNodes
AnimationList mAnimationsList
AnimationStateSet mAnimationStates
bool mCamChanged
 Controller flag for determining if we need to set view/proj matrices.

RenderQueueListenerList mRenderQueueListeners
bool mShowBoundingBoxes
 Flag that indicates if all of the scene node's bounding boxes should be shown as a wireframe.

AutoParamDataSource mAutoParamDataSource
 Utility class for calculating automatic parameters for gpu programs.


Friends

class BspIntersectionSceneManager

Detailed Description

Specialisation of the SceneManager class to deal with indoor scenes based on a BSP tree.

This class refines the behaviour of the default SceneManager to manage a scene whose bulk of geometry is made up of an indoor environment which is organised by a Binary Space Partition (BSP) tree. A BSP tree progressively subdivides the space using planes which are the nodes of the tree. At some point we stop subdividing and everything in the remaining space is part of a 'leaf' which contains a number of polygons. Typically we traverse the tree to locate the leaf in which a point in space is (say the camera origin) and work from there. A second structure, the Potentially Visible Set, tells us which other leaves can been seen from this leaf, and we test their bounding boxes against the camera frustum to see which we need to draw. Leaves are also a good place to start for collision detection since they divide the level into discrete areas for testing. This BSP and PVS technique has been made famous by engines such as Quake and Unreal. Ogre provides support for loading Quake3 level files to populate your world through this class, by calling the BspSceneManager::setWorldGeometry. Note that this interface is made available at the top level of the SceneManager class so you don't have to write your code specifically for this class - just call Root::getSceneManager passing a SceneType of ST_INTERIOR and in the current implementation you will get a BspSceneManager silently disguised as a standard SceneManager.

Definition at line 62 of file OgreBspSceneManager.h.


Member Typedef Documentation

typedef std::map<String, Animation*> Ogre::SceneManager::AnimationList [protected, inherited]
 

Storage of animations, lookup by name.

Definition at line 206 of file OgreSceneManager.h.

typedef MapIterator<BillboardSetList> Ogre::SceneManager::BillboardSetIterator [inherited]
 

Definition at line 1141 of file OgreSceneManager.h.

typedef std::map<std::string, BillboardSet*, std::less<std::string> > Ogre::SceneManager::BillboardSetList [protected, inherited]
 

Definition at line 122 of file OgreSceneManager.h.

typedef MapIterator<CameraList> Ogre::SceneManager::CameraIterator [inherited]
 

Definition at line 1140 of file OgreSceneManager.h.

typedef std::map<std::string, Camera*, std::less<std::string> > Ogre::SceneManager::CameraList [protected, inherited]
 

Definition at line 103 of file OgreSceneManager.h.

typedef MapIterator<EntityList> Ogre::SceneManager::EntityIterator [inherited]
 

Definition at line 1139 of file OgreSceneManager.h.

typedef std::map<std::string, Entity*, std::less<std::string> > Ogre::SceneManager::EntityList [protected, inherited]
 

Definition at line 116 of file OgreSceneManager.h.

typedef std::set<int> Ogre::BspSceneManager::FaceGroupSet [protected]
 

Definition at line 75 of file OgreBspSceneManager.h.

typedef MapIterator<SceneLightList> Ogre::SceneManager::LightIterator [inherited]
 

Definition at line 1138 of file OgreSceneManager.h.

typedef std::map<Material*, std::vector<StaticFaceGroup*>, materialLess > Ogre::BspSceneManager::MaterialFaceGroupMap [protected]
 

Definition at line 78 of file OgreBspSceneManager.h.

typedef std::set<const MovableObject*> Ogre::BspSceneManager::MovablesForRendering [protected]
 

Definition at line 110 of file OgreBspSceneManager.h.

typedef std::vector<RenderQueueListener*> Ogre::SceneManager::RenderQueueListenerList [protected, inherited]
 

Definition at line 217 of file OgreSceneManager.h.

typedef std::map<std::string, Light*, std::less<std::string> > Ogre::SceneManager::SceneLightList [protected, inherited]
 

Definition at line 109 of file OgreSceneManager.h.

typedef std::map<String, SceneNode*> Ogre::SceneManager::SceneNodeList [protected, inherited]
 

Definition at line 128 of file OgreSceneManager.h.


Member Enumeration Documentation

enum Ogre::SceneManager::BoxPlane [protected, inherited]
 

Enumeration values:
BP_FRONT 
BP_BACK 
BP_LEFT 
BP_RIGHT 
BP_UP 
BP_DOWN 

Definition at line 178 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::setSkyBox(), and Ogre::SceneManager::setSkyDome().

enum Ogre::SceneManager::PrefabType [inherited]
 

Prefab shapes available without loading a model.

Note:
Minimal implementation at present.
Todo:
Add more prefabs (teapots, teapots!!!)
Enumeration values:
PT_PLANE 

Definition at line 465 of file OgreSceneManager.h.


Constructor & Destructor Documentation

Ogre::BspSceneManager::BspSceneManager  
 

Definition at line 51 of file OgreBspSceneManager.cpp.

References mBspResMgr, mLevel, mShowNodeAABs, Ogre::SceneManager::mSkyBoxEnabled, Ogre::SceneManager::mSkyDomeEnabled, and Ogre::SceneManager::mSkyPlaneEnabled.

Ogre::BspSceneManager::~BspSceneManager  
 

Definition at line 70 of file OgreBspSceneManager.cpp.

References freeMemory(), and mBspResMgr.


Member Function Documentation

void Ogre::SceneManager::_applySceneAnimations void    [virtual, inherited]
 

Internal method for applying animations to scene nodes.

Remarks:
Uses the internally stored AnimationState objects to apply animation to SceneNodes.

Definition at line 1574 of file OgreSceneManager.cpp.

References Ogre::Animation::_getTrackList(), Ogre::Animation::apply(), Ogre::SceneManager::getAnimation(), Ogre::SceneManager::mAnimationStates, and Ogre::Node::resetToInitialState().

Referenced by Ogre::SceneManager::_renderScene().

void Ogre::BspSceneManager::_findVisibleObjects Camera   cam [virtual]
 

Overriden from SceneManager.

Reimplemented from Ogre::SceneManager.

Definition at line 117 of file OgreBspSceneManager.cpp.

References mMovablesForRendering, and walkTree().

void Ogre::BspSceneManager::_notifyObjectDetached const MovableObject   mov
 

Internal method for notifying the level that an object has been detached from a node.

Definition at line 527 of file OgreBspSceneManager.cpp.

References Ogre::BspLevel::_notifyObjectDetached(), and mLevel.

void Ogre::BspSceneManager::_notifyObjectMoved const MovableObject   mov,
const Vector3   pos
 

Internal method for tagging BspNodes with objects which intersect them.

Definition at line 521 of file OgreBspSceneManager.cpp.

References Ogre::BspLevel::_notifyObjectMoved(), and mLevel.

void Ogre::SceneManager::_populateLightList const Vector3   position,
LightList   destList
[virtual, inherited]
 

Populate a light list with an ordered set of the lights which are closest to the position specified.

Remarks:
Note that since directional lights have no position, they are always considered closer than any point lights and as such will always take precedence.

Subclasses of the default SceneManager may wish to take into account other issues such as possible visibility of the light if that information is included in their data structures. This basic scenemanager simply orders by distance, eliminating those lights which are out of range.

The number of items in the list max exceed the maximum number of lights supported by the renderer, but the extraneous ones will never be used. In fact the limit will be imposed by Pass::getMaxSimultaneousLights.

Parameters:
position  The position at which to evaluate the list of lights
destList  List to be populated with ordered set of lights; will be cleared by this method before population.

Definition at line 235 of file OgreSceneManager.cpp.

References Ogre::Light::getAttenuationRange(), Ogre::Light::getDerivedPosition(), Ogre::Light::getType(), Ogre::MovableObject::isVisible(), Ogre::LightList, Ogre::SceneManager::mLights, Ogre::Real, and Ogre::Light::tempSquareDist.

Referenced by Ogre::SceneNode::getLights().

void Ogre::SceneManager::_queueSkiesForRendering Camera   cam [virtual, inherited]
 

Internal method for queueing the sky objects with the params as previously set through setSkyBox, setSkyPlane and setSkyDome.

Definition at line 1757 of file OgreSceneManager.cpp.

References Ogre::RenderQueue::addRenderable(), Ogre::Camera::getDerivedPosition(), Ogre::Entity::getSubEntity(), Ogre::SceneManager::mRenderQueue, Ogre::SceneManager::mSkyBoxDrawFirst, Ogre::SceneManager::mSkyBoxEntity, Ogre::SceneManager::mSkyBoxNode, Ogre::SceneManager::mSkyDomeDrawFirst, Ogre::SceneManager::mSkyDomeEntity, Ogre::SceneManager::mSkyDomeNode, Ogre::SceneManager::mSkyPlaneDrawFirst, Ogre::SceneManager::mSkyPlaneEntity, Ogre::SceneManager::mSkyPlaneNode, Ogre::RENDER_QUEUE_1, Ogre::RENDER_QUEUE_9, RENDERABLE_DEFAULT_PRIORITY, Ogre::RenderQueueGroupID, Ogre::Node::setPosition(), and Ogre::uint.

Referenced by Ogre::SceneManager::_renderScene().

void Ogre::SceneManager::_renderScene Camera   camera,
Viewport   vp,
bool    includeOverlays
[virtual, inherited]
 

Prompts the class to send its contents to the renderer.

Remarks:
This method prompts the scene manager to send the contents of the scene it manages to the rendering pipeline, possibly preceded by some sorting, culling or other scene management tasks. Note that this method is not normally called directly by the user application; it is called automatically by the Ogre rendering loop.
Parameters:
camera  Pointer to a camera from whose viewpoint the scene is to be rendered.
vp  The target viewport
includeOverlays  Whether or not overlay objects should be rendered

Definition at line 618 of file OgreSceneManager.cpp.

References Ogre::SceneManager::_applySceneAnimations(), Ogre::Camera::_autoTrack(), Ogre::RenderSystem::_beginFrame(), Ogre::RenderSystem::_beginGeometryCount(), Ogre::RenderSystem::_endFrame(), Ogre::SceneManager::_findVisibleObjects(), Ogre::RenderSystem::_getFaceCount(), Ogre::Camera::_notifyRenderedFaces(), Ogre::SceneManager::_queueSkiesForRendering(), Ogre::SceneManager::_renderVisibleObjects(), Ogre::RenderSystem::_setRasterisationMode(), Ogre::SceneManager::_updateSceneGraph(), Ogre::RenderQueue::clear(), Ogre::Camera::getDetailLevel(), Ogre::Viewport::getOverlaysEnabled(), Ogre::Camera::isReflected(), Ogre::SceneManager::mAmbientLight, Ogre::SceneManager::mAutoParamDataSource, Ogre::SceneManager::mCamChanged, Ogre::SceneManager::mCameraInProgress, Ogre::SceneManager::mDestRenderSystem, Ogre::SceneManager::mRenderQueue, Ogre::AutoParamDataSource::setAmbientLightColour(), Ogre::AutoParamDataSource::setCurrentCamera(), Ogre::RenderSystem::setInvertVertexWinding(), and Ogre::SceneManager::setViewport().

Referenced by Ogre::Camera::_renderScene().

void Ogre::BspSceneManager::_renderVisibleObjects void    [virtual]
 

Overriden from SceneManager.

Reimplemented from Ogre::SceneManager.

Definition at line 190 of file OgreBspSceneManager.cpp.

References renderStaticGeometry().

void Ogre::SceneManager::_setDestinationRenderSystem RenderSystem   sys [virtual, inherited]
 

Notifies the scene manager of its destination render system.

Remarks:
Called automatically by RenderSystem::addSceneManager this method simply notifies the manager of the render system to which its output must be directed.
Parameters:
sys  Pointer to the RenderSystem subclass to be used as a render target.

Definition at line 700 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mDestRenderSystem.

Referenced by Ogre::SceneManagerEnumerator::setSceneManager().

void Ogre::SceneManager::_updateSceneGraph Camera   cam [virtual, inherited]
 

Internal method for updating the scene graph ie the tree of SceneNode instances managed by this class.

Remarks:
This must be done before issuing objects to the rendering pipeline, since derived transformations from parent nodes are not updated until required. This SceneManager is a basic implementation which simply updates all nodes from the root. This ensures the scene is up to date but requires all the nodes to be updated even if they are not visible. Subclasses could trim this such that only potentially visible nodes are updated.

Reimplemented in Ogre::OctreeSceneManager, and Ogre::TerrainSceneManager.

Definition at line 1100 of file OgreSceneManager.cpp.

References Ogre::SceneNode::_update(), and Ogre::SceneManager::mSceneRoot.

Referenced by Ogre::SceneManager::_renderScene().

void Ogre::BspSceneManager::addBoundingBox AxisAlignedBox   aab,
bool    visible
[protected]
 

Adds a bounding box to draw if turned on.

Definition at line 411 of file OgreBspSceneManager.cpp.

Referenced by walkTree().

void Ogre::SceneManager::addRenderQueueListener RenderQueueListener   newListener [virtual, inherited]
 

Registers a new RenderQueueListener which will be notified when render queues are processed.

Definition at line 1811 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mRenderQueueListeners.

unsigned int Ogre::BspSceneManager::cacheGeometry unsigned int *    pIndexes,
const StaticFaceGroup   faceGroup
[protected]
 

Caches a face group for imminent rendering.

Definition at line 349 of file OgreBspSceneManager.cpp.

References Ogre::StaticFaceGroup::elementStart, Ogre::FGT_FACE_LIST, Ogre::FGT_PATCH, Ogre::StaticFaceGroup::fType, Ogre::PatchSurface::getCurrentIndexCount(), Ogre::PatchSurface::getIndexOffset(), Ogre::PatchSurface::getVertexOffset(), Ogre::StaticFaceGroup::isSky, Ogre::DefaultHardwareIndexBuffer::lock(), Ogre::BspLevel::mIndexes, mLevel, Ogre::StaticFaceGroup::numElements, Ogre::StaticFaceGroup::patchSurf, Ogre::DefaultHardwareIndexBuffer::unlock(), and Ogre::StaticFaceGroup::vertexStart.

Referenced by renderStaticGeometry().

void Ogre::SceneManager::clearScene void    [virtual, inherited]
 

Empties the entire scene, inluding all SceneNodes, Cameras, Entities and Lights etc.

Definition at line 369 of file OgreSceneManager.cpp.

References Ogre::SceneManager::destroyAllAnimations(), Ogre::SceneNode::detachAllObjects(), Ogre::SceneManager::mBillboardSets, Ogre::SceneManager::mCameras, Ogre::SceneManager::mEntities, Ogre::SceneManager::mSceneNodes, Ogre::SceneManager::mSceneRoot, Ogre::SceneManager::mSkyBoxEnabled, Ogre::SceneManager::mSkyBoxNode, Ogre::SceneManager::mSkyDomeEnabled, Ogre::SceneManager::mSkyDomeNode, Ogre::SceneManager::mSkyPlaneEnabled, Ogre::SceneManager::mSkyPlaneNode, Ogre::Node::removeAllChildren(), and Ogre::SceneManager::removeAllLights().

Referenced by Ogre::SceneManager::~SceneManager().

AxisAlignedBoxSceneQuery * Ogre::BspSceneManager::createAABBQuery const AxisAlignedBox   box,
unsigned long    mask = 0xFFFFFFFF
[virtual]
 

Creates an AxisAlignedBoxSceneQuery for this scene manager.

Remarks:
This method creates a new instance of a query object for this scene manager, for an axis aligned box region. See SceneQuery and AxisAlignedBoxSceneQuery for full details.

The instance returned from this method must be destroyed by calling SceneManager::destroyQuery when it is no longer required.

Parameters:
box  Details of the box which describes the region for this query.
mask  The query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details.

Reimplemented from Ogre::SceneManager.

Definition at line 533 of file OgreBspSceneManager.cpp.

Animation * Ogre::SceneManager::createAnimation const String   name,
Real    length
[virtual, inherited]
 

Creates an animation which can be used to animate scene nodes.

Remarks:
An animation is a collection of 'tracks' which over time change the position / orientation of Node objects. In this case, the animation will likely have tracks to modify the position / orientation of SceneNode objects, e.g. to make objects move along a path.

You don't need to use an Animation object to move objects around - you can do it yourself using the methods of the Node in your FrameListener class. However, when you need relatively complex scripted animation, this is the class to use since it will interpolate between keyframes for you and generally make the whole process easier to manage.

A single animation can affect multiple Node objects (each AnimationTrack affects a single Node). In addition, through animation blending a single Node can be affected by multiple animations, athough this is more useful when performing skeletal animation (see Skeleton::createAnimation).

Note that whilst it uses the same classes, the animations created here are kept separate from the skeletal animations of meshes (each Skeleton owns those animations).

Parameters:
name  The name of the animation, must be unique within this SceneManager.
length  The total length of the animation.

Definition at line 1454 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mAnimationsList, and Ogre::Real.

AnimationState * Ogre::SceneManager::createAnimationState const String   animName [virtual, inherited]
 

Create an AnimationState object for managing application of animations.

Remarks:
You can create Animation objects for animating SceneNode obejcts using the createAnimation method. However, in order to actually apply those animations you have to call methods on Node and Animation in a particular order (namely Node::resetToInitialState and Animation::apply). To make this easier and to help track the current time position of animations, the AnimationState object is provided. So if you don't want to control animation application manually, call this method, update the returned object as you like every frame and let SceneManager apply the animation state for you.

Remember, AnimationState objects are disabled by default at creation time. Turn them on when you want them using their setEnabled method.

Note that any SceneNode affected by this automatic animation will have it's state reset to it's initial position before application of the animation. Unless specifically modified using Node::setInitialState the Node assumes it's initial state is at the origin. If you want the base state of the SceneNode to be elsewhere, make your changes to the node using the standard transform methods, then call setInitialState to 'bake' this reference position into the node.

Parameters:
animName  The name of an animation created already with createAnimation.

Definition at line 1501 of file OgreSceneManager.cpp.

References Except, Ogre::SceneManager::getAnimation(), Ogre::Animation::getLength(), and Ogre::SceneManager::mAnimationStates.

BillboardSet * Ogre::SceneManager::createBillboardSet const String   name,
unsigned int    poolSize = 20
[virtual, inherited]
 

Creates a new BillboardSet for use with this scene manager.

Remarks:
This method creates a new BillboardSet which is registered with the SceneManager. The SceneManager will destroy this object when it shuts down or when the SceneManager::clearScene method is called, so the caller does not have to worry about destroying this object (in fact, it definitely should not do this).

See the BillboardSet documentations for full details of the returned class.

Parameters:
name  The name to give to this billboard set. Must be unique.
poolSize  The initial size of the pool of billboards (see BillboardSet for more information)
See also:
BillboardSet

Definition at line 1401 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mBillboardSets.

Camera * Ogre::SceneManager::createCamera const String   name [virtual, inherited]
 

Creates a camera to be managed by this scene manager.

Remarks:
This camera must be added to the scene at a later time using the attachObject method of the SceneNode class.
Parameters:
name  Name to give the new camera.

Reimplemented in Ogre::OctreeSceneManager.

Definition at line 101 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mCameras.

Entity * Ogre::SceneManager::createEntity const String   entityName,
PrefabType    ptype
[virtual, inherited]
 

Create an Entity (instance of a discrete mesh) from a range of prefab shapes.

Parameters:
entityName  The name to be given to the entity (must be unique).
ptype  The prefab type.

Definition at line 273 of file OgreSceneManager.cpp.

References Ogre::SceneManager::createEntity(), and Ogre::SceneManager::PT_PLANE.

Entity * Ogre::SceneManager::createEntity const String   entityName,
const String   meshName
[virtual, inherited]
 

Create an Entity (instance of a discrete mesh).

Parameters:
entityName  The name to be given to the entity (must be unique).
meshName  The name of the Mesh it is to be based on (e.g. 'knot.oof'). The mesh will be loaded if it is not already.

Definition at line 287 of file OgreSceneManager.cpp.

References Except, and Ogre::SceneManager::mEntities.

Referenced by Ogre::Entity::clone(), Ogre::SceneManager::createEntity(), Ogre::OverlayManager::parseNewMesh(), Ogre::SceneManager::setSkyBox(), Ogre::SceneManager::setSkyDome(), and Ogre::SceneManager::setSkyPlane().

IntersectionSceneQuery * Ogre::BspSceneManager::createIntersectionQuery unsigned long    mask = 0xFFFFFFFF [virtual]
 

Creates an IntersectionSceneQuery for this scene manager.

Remarks:
This method creates a new instance of a query object for locating intersecting objects. See SceneQuery and IntersectionSceneQuery for full details.

The instance returned from this method must be destroyed by calling SceneManager::destroyQuery when it is no longer required.

Parameters:
mask  The query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details.

Reimplemented from Ogre::SceneManager.

Definition at line 554 of file OgreBspSceneManager.cpp.

References Ogre::SceneQuery::setQueryMask().

Light * Ogre::SceneManager::createLight const String   name [virtual, inherited]
 

Creates a light for use in the scene.

Remarks:
Lights can either be in a fixed position and independent of the scene graph, or they can be attached to SceneNodes so they derive their position from the parent node. Either way, they are created using this method so that the SceneManager manages their existence.
Parameters:
name  The name of the new light, to identify it later.

Definition at line 167 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mLights.

Material * Ogre::SceneManager::createMaterial const String   name [virtual, inherited]
 

Creates a new material with default settings with the specified name.

See also:
SceneManager::getDefaultMaterialSettings

Definition at line 419 of file OgreSceneManager.cpp.

Referenced by Ogre::Quake3Shader::createAsMaterial(), Ogre::BspLevel::loadQuake3Level(), and Ogre::TerrainSceneManager::setWorldGeometry().

Overlay * Ogre::SceneManager::createOverlay const String   name,
ushort    zorder = 100
[virtual, inherited]
 

Creates a new Overlay.

Remarks:
Overlays can be used to render heads-up-displays (HUDs), menu systems, cockpits and any other 2D or 3D object you need to appear above the rest of the scene. See the Overlay class for more information.

NOTE: after creation, the Overlay is initially hidden. You can create as many overlays as you like ready to be displayed whenever. Just call Overlay::show to display the overlay.

Parameters:
name  The name to give the overlay, must be unique.
zorder  The zorder of the overlay relative to it's peers, higher zorders appear on top of lower ones.

Definition at line 1626 of file OgreSceneManager.cpp.

References Ogre::Overlay::setZOrder(), and Ogre::ushort.

RaySceneQuery * Ogre::BspSceneManager::createRayQuery const Ray   ray,
unsigned long    mask = 0xFFFFFFFF
[virtual]
 

Creates a RaySceneQuery for this scene manager.

Remarks:
This method creates a new instance of a query object for this scene manager, looking for objects which fall along a ray. See SceneQuery and RaySceneQuery for full details.

The instance returned from this method must be destroyed by calling SceneManager::destroyQuery when it is no longer required.

Parameters:
ray  Details of the ray which describes the region for this query.
mask  The query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details.

Reimplemented from Ogre::SceneManager.

Definition at line 547 of file OgreBspSceneManager.cpp.

SceneNode * Ogre::BspSceneManager::createSceneNode const String   name [virtual]
 

Creates a specialized BspSceneNode.

Reimplemented from Ogre::SceneManager.

Definition at line 514 of file OgreBspSceneManager.cpp.

References Ogre::Node::getName(), and Ogre::SceneManager::mSceneNodes.

SceneNode * Ogre::BspSceneManager::createSceneNode void    [virtual]
 

Creates a specialized BspSceneNode.

Reimplemented from Ogre::SceneManager.

Definition at line 507 of file OgreBspSceneManager.cpp.

References Ogre::Node::getName(), and Ogre::SceneManager::mSceneNodes.

Mesh * Ogre::SceneManager::createSkyboxPlane BoxPlane    bp,
Real    distance,
const Quaternion   orientation
[protected, inherited]
 

Definition at line 956 of file OgreSceneManager.cpp.

References Ogre::SceneManager::BP_BACK, Ogre::SceneManager::BP_DOWN, Ogre::SceneManager::BP_FRONT, Ogre::SceneManager::BP_LEFT, Ogre::SceneManager::BP_RIGHT, Ogre::SceneManager::BP_UP, Ogre::MeshManager::createPlane(), Ogre::Plane::d, Ogre::ResourceManager::getByName(), Ogre::Plane::normal, Ogre::Real, and Ogre::ResourceManager::unload().

Referenced by Ogre::SceneManager::setSkyBox().

Mesh * Ogre::SceneManager::createSkydomePlane BoxPlane    bp,
Real    curvature,
Real    tiling,
Real    distance,
const Quaternion   orientation
[protected, inherited]
 

Definition at line 1026 of file OgreSceneManager.cpp.

References Ogre::SceneManager::BP_BACK, Ogre::SceneManager::BP_DOWN, Ogre::SceneManager::BP_FRONT, Ogre::SceneManager::BP_LEFT, Ogre::SceneManager::BP_RIGHT, Ogre::SceneManager::BP_UP, Ogre::MeshManager::createCurvedIllusionPlane(), Ogre::Plane::d, Ogre::ResourceManager::getByName(), Ogre::Plane::normal, Ogre::Real, and Ogre::ResourceManager::unload().

Referenced by Ogre::SceneManager::setSkyDome().

SphereSceneQuery * Ogre::BspSceneManager::createSphereQuery const Sphere   sphere,
unsigned long    mask = 0xFFFFFFFF
[virtual]
 

Creates a SphereSceneQuery for this scene manager.

Remarks:
This method creates a new instance of a query object for this scene manager, for a spherical region. See SceneQuery and SphereSceneQuery for full details.

The instance returned from this method must be destroyed by calling SceneManager::destroyQuery when it is no longer required.

Parameters:
sphere  Details of the sphere which describes the region for this query.
mask  The query mask to apply to this query; can be used to filter out certain objects; see SceneQuery for details.

Reimplemented from Ogre::SceneManager.

Definition at line 540 of file OgreBspSceneManager.cpp.

void Ogre::SceneManager::destroyAllAnimations void    [virtual, inherited]
 

Removes all animations created using this SceneManager.

Definition at line 1490 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mAnimationsList.

Referenced by Ogre::SceneManager::clearScene().

void Ogre::SceneManager::destroyAllAnimationStates void    [virtual, inherited]
 

Removes all animation states created using this SceneManager.

Definition at line 1569 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mAnimationStates.

void Ogre::SceneManager::destroyAllOverlays void    [virtual, inherited]
 

Destroys all the overlays.

Definition at line 1702 of file OgreSceneManager.cpp.

void Ogre::SceneManager::destroyAnimation const String   name [virtual, inherited]
 

Destroys an Animation.

Remarks:
You should ensure that none of your code is referencing this animation objects since the memory will be freed.

Definition at line 1473 of file OgreSceneManager.cpp.

References Except, and Ogre::SceneManager::mAnimationsList.

void Ogre::SceneManager::destroyAnimationState const String   name [virtual, inherited]
 

Destroys an AnimationState.

Remarks:
You should ensure that none of your code is referencing this animation state object since the memory will be freed.

Definition at line 1553 of file OgreSceneManager.cpp.

References Except, and Ogre::SceneManager::mAnimationStates.

void Ogre::SceneManager::destroyOverlay const String   name [virtual, inherited]
 

Destroys the named Overlay.

Definition at line 1676 of file OgreSceneManager.cpp.

References Except.

void Ogre::SceneManager::destroyQuery SceneQuery   query [virtual, inherited]
 

Destroys a scene query of any type.

Definition at line 1906 of file OgreSceneManager.cpp.

void Ogre::SceneManager::destroySceneNode const String   name [virtual, inherited]
 

Destroys a SceneNode with a given name.

Remarks:
This allows you to physically delete an individual SceneNode if you want to. Note that this is not normally recommended, it's better to allow SceneManager to delete the nodes when the scene is cleared.

Reimplemented in Ogre::OctreeSceneManager.

Definition at line 459 of file OgreSceneManager.cpp.

References Except, and Ogre::SceneManager::mSceneNodes.

Referenced by Ogre::SceneNode::removeAndDestroyAllChildren(), and Ogre::SceneNode::removeAndDestroyChild().

bool Ogre::SceneManager::fireRenderQueueEnded RenderQueueGroupID    id [protected, inherited]
 

Internal method for firing the queue end event, returns true if queue is to be repeated.

Definition at line 1844 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mRenderQueueListeners, and Ogre::RenderQueueGroupID.

Referenced by Ogre::SceneManager::_renderVisibleObjects().

bool Ogre::SceneManager::fireRenderQueueStarted RenderQueueGroupID    id [protected, inherited]
 

Internal method for firing the queue start event, returns true if queue is to be skipped.

Definition at line 1831 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mRenderQueueListeners, and Ogre::RenderQueueGroupID.

Referenced by Ogre::SceneManager::_renderVisibleObjects().

void Ogre::BspSceneManager::freeMemory void    [protected]
 

Frees up allocated memory for geometry caches.

Definition at line 400 of file OgreBspSceneManager.cpp.

Referenced by ~BspSceneManager().

const ColourValue & Ogre::SceneManager::getAmbientLight void    const [inherited]
 

Returns the ambient light level to be used for the scene.

Definition at line 1353 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mAmbientLight.

Animation * Ogre::SceneManager::getAnimation const String   name const [virtual, inherited]
 

Looks up an Animation object previously created with createAnimation.

Definition at line 1461 of file OgreSceneManager.cpp.

References Except, and Ogre::SceneManager::mAnimationsList.

Referenced by Ogre::SceneManager::_applySceneAnimations(), and Ogre::SceneManager::createAnimationState().

AnimationState * Ogre::SceneManager::getAnimationState const String   animName [virtual, inherited]
 

Retrieves animation state as previously created using createAnimationState.

Definition at line 1538 of file OgreSceneManager.cpp.

References Except, and Ogre::SceneManager::mAnimationStates.

BillboardSet * Ogre::SceneManager::getBillboardSet const String   name [virtual, inherited]
 

Retrieves a pointer to the named BillboardSet.

Definition at line 1409 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mBillboardSets.

BillboardSetIterator Ogre::SceneManager::getBillboardSetIterator void    [inherited]
 

Returns a specialised MapIterator over all cameras in the scene.

Definition at line 1156 of file OgreSceneManager.h.

Camera * Ogre::SceneManager::getCamera const String   name [virtual, inherited]
 

Retrieves a pointer to the named camera.

Definition at line 111 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mCameras.

Referenced by Ogre::OctreeSceneManager::_findVisibleObjects().

CameraIterator Ogre::SceneManager::getCameraIterator void    [inherited]
 

Returns a specialised MapIterator over all cameras in the scene.

Definition at line 1152 of file OgreSceneManager.h.

Material * Ogre::SceneManager::getDefaultMaterialSettings void    [virtual, inherited]
 

Returns a pointer to the default Material settings.

Remarks:
Ogre comes configured with a set of defaults for newly created materials. If you wish to have a different set of defaults, simply call this method and change the returned Material's settings. All materials created from then on will be configured with the new defaults you have specified.

The default settings begin as a single Technique with a single, non-programmable Pass:

  • ambient = ColourValue::White
  • diffuse = ColourValue::White
  • specular = ColourValue::Black
  • emmissive = ColourValue::Black
  • shininess = 0
  • No texture unit settings (& hence no textures)
  • SourceBlendFactor = SBF_ONE
  • DestBlendFactor = SBF_ZERO (no blend, replace with new colour)
  • Depth buffer checking on
  • Depth buffer writing on
  • Depth buffer comparison function = CMPF_LESS_EQUAL
  • Colour buffer writing on for all channels
  • Culling mode = CULL_CLOCKWISE
  • Ambient lighting = ColourValue(0.5, 0.5, 0.5) (mid-grey)
  • Dynamic lighting enabled
  • Gourad shading mode
  • Bilinear texture filtering

Definition at line 428 of file OgreSceneManager.cpp.

Entity * Ogre::SceneManager::getEntity const String   name [virtual, inherited]
 

Retrieves a pointer to the named Entity.

Definition at line 314 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mEntities.

EntityIterator Ogre::SceneManager::getEntityIterator void    [inherited]
 

Returns a specialised MapIterator over all entities in the scene.

Definition at line 1148 of file OgreSceneManager.h.

const ColourValue & Ogre::SceneManager::getFogColour void    const [virtual, inherited]
 

Returns the fog colour for the scene.

Definition at line 1381 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mFogColour.

Real Ogre::SceneManager::getFogDensity void    const [virtual, inherited]
 

Returns the fog density for the scene.

Definition at line 1396 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mFogDensity, and Ogre::Real.

Real Ogre::SceneManager::getFogEnd void    const [virtual, inherited]
 

Returns the fog end distance for the scene.

Definition at line 1391 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mFogEnd, and Ogre::Real.

FogMode Ogre::SceneManager::getFogMode void    const [virtual, inherited]
 

Returns the fog mode for the scene.

Definition at line 1376 of file OgreSceneManager.cpp.

References Ogre::FogMode, and Ogre::SceneManager::mFogMode.

Real Ogre::SceneManager::getFogStart void    const [virtual, inherited]
 

Returns the fog start distance for the scene.

Definition at line 1386 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mFogStart, and Ogre::Real.

BspLevel* Ogre::BspSceneManager::getLevel void   
 

Definition at line 128 of file OgreBspSceneManager.h.

Light * Ogre::SceneManager::getLight const String   name [virtual, inherited]
 

Returns a pointer to the named Light which has previously been added to the scene.

Definition at line 175 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mLights.

LightIterator Ogre::SceneManager::getLightIterator void    [inherited]
 

Returns a specialised MapIterator over all lights in the scene.

Definition at line 1144 of file OgreSceneManager.h.

Material * Ogre::SceneManager::getMaterial int    handle [virtual, inherited]
 

Gets a reference to a material by it's numerical handle.

Remarks:
Numerical handles are assigned on creation of a material, or when a copy is registered with the SceneManager using the addMaterial method.

Definition at line 439 of file OgreSceneManager.cpp.

Material * Ogre::SceneManager::getMaterial const String   name [virtual, inherited]
 

Gets a reference to a named Material.

Definition at line 433 of file OgreSceneManager.cpp.

Referenced by Ogre::BspLevel::loadQuake3Level(), processVisibleLeaf(), Ogre::SceneManager::setSkyBox(), Ogre::SceneManager::setSkyDome(), and Ogre::SceneManager::setSkyPlane().

virtual bool Ogre::SceneManager::getOption const String   strKey,
void *    pDestValue
[virtual, inherited]
 

Method for getting the value of an implementation-specific Scene Manager option.

Parameters:
strKey  The name of the option
pDestValue  A pointer to a memory location where the value will be copied. Currently, the memory will be allocated by the scene manager, but this may change
Returns:
On success, true is returned and pDestValue points to the value of the given option.

On failiure, false is returned and pDestValue is set to NULL.

Reimplemented in Ogre::OctreeSceneManager.

Definition at line 593 of file OgreSceneManager.h.

virtual bool Ogre::SceneManager::getOptionKeys std::list< String > &    refKeys [virtual, inherited]
 

Method for getting all the implementation-specific options of the scene manager.

Parameters:
refKeys  A reference to a list that will be filled with all the available options.
Returns:
On success, true is returned. On failiure, false is returned.

Reimplemented in Ogre::OctreeSceneManager.

Definition at line 627 of file OgreSceneManager.h.

virtual bool Ogre::SceneManager::getOptionValues const String   strKey,
std::list< SDDataChunk > &    refValueList
[virtual, inherited]
 

Method for getting all possible values for a specific option.

When this list is too large (i.e. the option expects, for example, a float), the return value will be true, but the list will contain just one element whose size will be set to 0. Otherwise, the list will be filled with all the possible values the option can accept.

Parameters:
strKey  The name of the option to get the values for.
refValueList  A reference to a list that will be filled with the available values.
Returns:
On success (the option exists), true is returned.

On failiure, false is returned.

Reimplemented in Ogre::OctreeSceneManager.

Definition at line 619 of file OgreSceneManager.h.

Overlay * Ogre::SceneManager::getOverlay const String   name [virtual, inherited]
 

Gets a pointer to the named Overlay, previously created using createOverlay.

Definition at line 1651 of file OgreSceneManager.cpp.

References Except.

SceneNode * Ogre::SceneManager::getRootSceneNode void    const [virtual, inherited]
 

Gets the SceneNode at the root of the scene hierarchy.

Remarks:
The entire scene is held as a hierarchy of nodes, which allows things like relative transforms, general changes in rendering state etc (See the SceneNode class for more info). In this basic SceneManager class, the application using Ogre is free to structure this hierarchy however it likes, since it has no real significance apart from making transforms relative to each node (more specialised subclasses will provide utility methods for building specific node structures e.g. loading a BSP tree).

However, in all cases there is only ever one root node of the hierarchy, and this method returns a pointer to it.

Definition at line 473 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mSceneRoot.

Referenced by Ogre::TerrainSceneManager::setWorldGeometry().

SceneNode * Ogre::SceneManager::getSceneNode const String   name const [virtual, inherited]
 

Retrieves a named SceneNode from the scene graph.

Remarks:
If you chose to name a SceneNode as you created it, or if you happened to make a note of the generated name, you can look it up wherever it is in the scene graph using this method.

Definition at line 478 of file OgreSceneManager.cpp.

References Except, and Ogre::SceneManager::mSceneNodes.

Referenced by Ogre::OctreeSceneManager::destroySceneNode().

bool Ogre::SceneManager::getShowBoundingBoxes   const [inherited]
 

Returns if all bounding boxes of scene nodes are to be displayed.

Definition at line 1868 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mShowBoundingBoxes.

Referenced by Ogre::SceneNode::_findVisibleObjects().

ViewPoint Ogre::BspSceneManager::getSuggestedViewpoint bool    random = false [virtual]
 

Specialised to suggest viewpoints.

Reimplemented from Ogre::SceneManager.

Definition at line 483 of file OgreBspSceneManager.cpp.

References mLevel, and Ogre::BspLevel::mPlayerStarts.

virtual bool Ogre::SceneManager::hasOption const String   strKey const [virtual, inherited]
 

Method for verifying wether the scene manager has an implementation-specific option.

Parameters:
strKey  The name of the option to check for.
Returns:
If the scene manager contains the given option, true is returned.
Remarks:
If it does not, false is returned.

Definition at line 604 of file OgreSceneManager.h.

void Ogre::SceneManager::manualRender RenderOperation   rend,
Pass   pass,
Viewport   vp,
const Matrix4   worldMatrix,
const Matrix4   viewMatrix,
const Matrix4   projMatrix
[virtual, inherited]
 

Manual rendering method, for advanced users only.

Remarks:
This method allows you to send rendering commands through the pipeline on demand, bypassing OGRE's normal world processing. You should only use this if you really know what you're doing; OGRE does lots of things for you that you really should let it do. However, there are times where it may be useful to have this manual interface, for example overlaying something on top of the scene rendered by OGRE.

Because this is an instant rendering method, timing is important. The best time to call it is from a RenderTargetListener event handler.

Don't call this method a lot, it's designed for rare (1 or 2 times per frame) use. Calling it regularly per frame will cause frame rate drops!

Parameters:
rend  A RenderOperation object describing the rendering op
pass  The Pass to use for this render
vp  Pointer to the viewport to render to
worldMatrix  The transform to apply from object to world space
viewMatrix  The transform to apply from world to view space
projMatrix  The transform to apply from view to screen space

Definition at line 1608 of file OgreSceneManager.cpp.

References Ogre::RenderSystem::_beginFrame(), Ogre::RenderSystem::_endFrame(), Ogre::RenderSystem::_render(), Ogre::RenderSystem::_setProjectionMatrix(), Ogre::RenderSystem::_setViewMatrix(), Ogre::RenderSystem::_setViewport(), Ogre::RenderSystem::_setWorldMatrix(), Ogre::SceneManager::mDestRenderSystem, and Ogre::SceneManager::setPass().

void Ogre::BspSceneManager::processVisibleLeaf BspNode   leaf,
Camera   cam
[protected]
 

Tags geometry in the leaf specified for later rendering.

Definition at line 278 of file OgreBspSceneManager.cpp.

References Ogre::SceneNode::_addBoundingBoxToQueue(), Ogre::MovableObject::_notifyCurrentCamera(), Ogre::MovableObject::_updateRenderQueue(), Ogre::Camera::getDerivedPosition(), Ogre::Plane::getDistance(), Ogre::BspNode::getFaceGroupStart(), Ogre::Pass::getManualCullingMode(), Ogre::SceneManager::getMaterial(), Ogre::BspNode::getNumFaceGroups(), Ogre::BspNode::getObjects(), Ogre::MovableObject::getParentNode(), Ogre::Technique::getPass(), Ogre::SceneNode::getShowBoundingBox(), Ogre::Material::getTechnique(), Ogre::MovableObject::getWorldBoundingBox(), Ogre::Camera::isVisible(), Ogre::MovableObject::isVisible(), Ogre::MANUAL_CULL_BACK, Ogre::MANUAL_CULL_FRONT, Ogre::MANUAL_CULL_NONE, Ogre::ManualCullingMode, Ogre::StaticFaceGroup::materialHandle, Ogre::BspLevel::mFaceGroups, mFaceGroupSet, Ogre::BspLevel::mLeafFaceGroups, mLevel, mMatFaceGroupMap, mMovablesForRendering, Ogre::SceneManager::mRenderQueue, Ogre::SceneManager::mShowBoundingBoxes, Ogre::StaticFaceGroup::plane, and Ogre::Real.

Referenced by walkTree().

void Ogre::SceneManager::removeAllCameras void    [virtual, inherited]
 

Removes (and destroys) all cameras from the scene.

Definition at line 155 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mCameras.

void Ogre::SceneManager::removeAllEntities void    [virtual, inherited]
 

Removes & destroys all Entities.

Warning:
Again, use caution since no Entity must be referred to elsewhere e.g. attached to a SceneNode otherwise a crash is likely. Use clearScene if you are unsure (it clears SceneNode entries too.)
See also:
SceneManager::clearScene

Definition at line 358 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mEntities.

void Ogre::SceneManager::removeAllLights void    [virtual, inherited]
 

Removes and destroys all lights in the scene.

Definition at line 219 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mLights.

Referenced by Ogre::SceneManager::clearScene().

void Ogre::SceneManager::removeBillboardSet const String   name [virtual, inherited]
 

Removes & destroys an BillboardSet from the SceneManager by name.

Warning:
Must only be done if the BillboardSet is not attached to a SceneNode. It may be safer to wait to clear the whole scene. If you are unsure, use clearScene.

Definition at line 1438 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mBillboardSets.

void Ogre::SceneManager::removeBillboardSet BillboardSet   set [virtual, inherited]
 

Removes & destroys an BillboardSet from the SceneManager.

Warning:
Must only be done if the BillboardSet is not attached to a SceneNode. It may be safer to wait to clear the whole scene. If you are unsure, use clearScene.

Definition at line 1422 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mBillboardSets.

void Ogre::SceneManager::removeCamera const String   name [virtual, inherited]
 

Removes a camera from the scene.

Remarks:
This method removes an camera from the scene based on the camera's name rather than a pointer.

Definition at line 142 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mCameras.

void Ogre::SceneManager::removeCamera Camera   cam [virtual, inherited]
 

Removes a camera from the scene.

Remarks:
This method removes a previously added camera from the scene. The camera is deleted so the caller must ensure no references to it's previous instance (e.g. in a SceneNode) are used.
Parameters:
cam  Pointer to the camera to remove

Definition at line 125 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mCameras.

void Ogre::SceneManager::removeEntity const String   name [virtual, inherited]
 

Removes & destroys an Entity from the SceneManager by name.

Warning:
Must only be done if the Entity is not attached to a SceneNode. It may be safer to wait to clear the whole scene if you are unsure use clearScene.
See also:
SceneManager::clearScene

Definition at line 345 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mEntities.

void Ogre::SceneManager::removeEntity Entity   ent [virtual, inherited]
 

Removes & destroys an Entity from the SceneManager.

Warning:
Must only be done if the Entity is not attached to a SceneNode. It may be safer to wait to clear the whole scene if you are unsure use clearScene.
See also:
SceneManager::clearScene

Definition at line 328 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mEntities.

Referenced by Ogre::SceneManager::setSkyBox(), Ogre::SceneManager::setSkyDome(), and Ogre::SceneManager::setSkyPlane().

void Ogre::SceneManager::removeLight Light   light [virtual, inherited]
 

Removes the light from the scene and destroys it based on a pointer.

Remarks:
Any pointers held to this light after calling this method will be invalid.

Definition at line 189 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mLights.

void Ogre::SceneManager::removeLight const String   name [virtual, inherited]
 

Removes the named light from the scene and destroys it.

Remarks:
Any pointers held to this light after calling this method will be invalid.

Definition at line 206 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mLights.

void Ogre::SceneManager::removeRenderQueueListener RenderQueueListener   delListener [virtual, inherited]
 

Removes a listener previously added with addRenderQueueListener.

Definition at line 1816 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mRenderQueueListeners.

void Ogre::SceneManager::renderSingleObject Renderable   rend,
Pass   pass
[protected, virtual, inherited]
 

Internal utility method for rendering a single object.

Remarks:
Assumes that the pass has already bee set up.

Definition at line 1207 of file OgreSceneManager.cpp.

References Ogre::RenderSystem::_render(), Ogre::RenderSystem::_setRasterisationMode(), Ogre::RenderSystem::_setTextureUnitSettings(), Ogre::RenderSystem::_setWorldMatrices(), Ogre::RenderSystem::_setWorldMatrix(), Ogre::Pass::_updateAutoParamsLightsOnly(), Ogre::Pass::_updateAutoParamsNoLights(), Ogre::RenderSystem::_useLights(), Ogre::RenderSystem::bindGpuProgramParameters(), Ogre::Camera::getDetailLevel(), Ogre::Pass::getFragmentProgramParameters(), Ogre::Pass::getLightingEnabled(), Ogre::Renderable::getLights(), Ogre::Pass::getMaxSimultaneousLights(), Ogre::Renderable::getNormaliseNormals(), Ogre::Renderable::getNumWorldTransforms(), Ogre::Pass::getOnlyLightType(), Ogre::Renderable::getRenderDetail(), Ogre::Renderable::getRenderOperation(), Ogre::Pass::getRunOncePerLight(), Ogre::Pass::getRunOnlyForOneLightType(), Ogre::Pass::getTextureUnitStateIterator(), Ogre::Pass::getVertexProgramParameters(), Ogre::Renderable::getWorldTransforms(), Ogre::GPT_FRAGMENT_PROGRAM, Ogre::GPT_VERTEX_PROGRAM, Ogre::Pass::hasFragmentProgram(), Ogre::Pass::hasVertexProgram(), Ogre::TextureUnitState::hasViewRelativeTextureCoordinateGeneration(), Ogre::Pass::isProgrammable(), Ogre::LightList, Ogre::SceneManager::mAutoParamDataSource, Ogre::SceneManager::mCameraInProgress, Ogre::SceneManager::mDestRenderSystem, Ogre::SceneDetailLevel, Ogre::AutoParamDataSource::setCurrentLightList(), Ogre::AutoParamDataSource::setCurrentRenderable(), Ogre::RenderSystem::setNormaliseNormals(), Ogre::RenderOperation::srcRenderable, and Ogre::SceneManager::useRenderableViewProjMode().

Referenced by Ogre::SceneManager::_renderVisibleObjects().

void Ogre::BspSceneManager::renderStaticGeometry void    [protected]
 

Renders the static level geometry tagged in walkTree.

Definition at line 128 of file OgreBspSceneManager.cpp.

References Ogre::RenderSystem::_render(), Ogre::RenderSystem::_setProjectionMatrix(), Ogre::RenderSystem::_setViewMatrix(), Ogre::RenderSystem::_setWorldMatrix(), cacheGeometry(), Ogre::Technique::getPassIterator(), Ogre::Camera::getProjectionMatrix(), Ogre::Material::getTechnique(), Ogre::Camera::getViewMatrix(), Ogre::IndexData::indexBuffer, Ogre::IndexData::indexCount, Ogre::RenderOperation::indexData, Ogre::SceneManager::mCameraInProgress, Ogre::SceneManager::mDestRenderSystem, mMatFaceGroupMap, mRenderOp, and Ogre::SceneManager::setPass().

Referenced by _renderVisibleObjects().

void Ogre::SceneManager::setAmbientLight const ColourValue   colour [inherited]
 

Sets the ambient light level to be used for the scene.

Remarks:
This sets the colour and intensity of the ambient light in the scene, i.e. the light which is 'sourceless' and illuminates all objects equally. The colour of an object is affected by a combination of the light in the scene, and the amount of light that object reflects (in this case based on the Material::ambient property).
By default the ambient light in the scene is ColourValue::Black, i.e. no ambient light. This means that any objects rendered with a Material which has lighting enabled (see Material::setLightingEnabled) will not be visible unless you have some dynamic lights in your scene.

Definition at line 1347 of file OgreSceneManager.cpp.

References Ogre::ColourValue::b, Ogre::ColourValue::g, Ogre::SceneManager::mAmbientLight, Ogre::SceneManager::mDestRenderSystem, Ogre::ColourValue::r, and Ogre::RenderSystem::setAmbientLight().

void Ogre::SceneManager::setDisplaySceneNodes bool    display [virtual, inherited]
 

Tells the SceneManager whether it should render the SceneNodes which make up the scene as well as the objects in the scene.

Remarks:
This method is mainly for debugging purposes. If you set this to 'true', each node will be rendered as a set of 3 axes to allow you to easily see the orientation of the nodes.

Definition at line 1449 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mDisplayNodes.

void Ogre::SceneManager::setFog FogMode    mode = FOG_NONE,
const ColourValue   colour = ColourValue::White,
Real    expDensity = 0.001,
Real    linearStart = 0.0,
Real    linearEnd = 1.0
[inherited]
 

Sets the fogging mode applied to the scene.

Remarks:
This method sets up the scene-wide fogging effect. These settings apply to all geometry rendered, UNLESS the material with which it is rendered has it's own fog settings (see Material::setFog).
Parameters:
mode  Set up the mode of fog as described in the FogMode enum, or set to FOG_NONE to turn off.
colour  The colour of the fog. Either set this to the same as your viewport background colour, or to blend in with a skydome or skybox.
expDensity  The density of the fog in FOG_EXP or FOG_EXP2 mode, as a value between 0 and 1. The default is 0.001.
linearStart  Distance in world units at which linear fog starts to encroach. Only applicable if mode is FOG_LINEAR.
linearEnd  Distance in world units at which linear fog becomes completely opaque. Only applicable if mode is FOG_LINEAR.

Definition at line 1367 of file OgreSceneManager.cpp.

References Ogre::FogMode, Ogre::SceneManager::mFogColour, Ogre::SceneManager::mFogDensity, Ogre::SceneManager::mFogEnd, Ogre::SceneManager::mFogMode, Ogre::SceneManager::mFogStart, and Ogre::Real.

virtual bool Ogre::SceneManager::setOption const String   strKey,
const void *    pValue
[virtual, inherited]
 

Method for setting a specific option of the Scene Manager.

These options are usually specific for a certain implemntation of the Scene Manager class, and may (and probably will) not exist across different implementations.

Parameters:
strKey  The name of the option to set
pValue  A pointer to the value - the size should be calculated by the scene manager based on the key
Returns:
On success, true is returned.

On failiure, false is returned.

Reimplemented in Ogre::OctreeSceneManager.

Definition at line 578 of file OgreSceneManager.h.

void Ogre::SceneManager::setPass Pass   pass [protected, inherited]
 

Internal method for setting up the renderstate for a rendering pass.

Parameters:
pass  The Pass details to set.

Definition at line 492 of file OgreSceneManager.cpp.

References Ogre::RenderSystem::_disableTextureUnitsFrom(), Ogre::GpuProgram::_getBindingDelegate(), Ogre::RenderSystem::_setColourBufferWriteEnabled(), Ogre::RenderSystem::_setCullingMode(), Ogre::RenderSystem::_setDepthBias(), Ogre::RenderSystem::_setDepthBufferCheckEnabled(), Ogre::RenderSystem::_setDepthBufferFunction(), Ogre::RenderSystem::_setDepthBufferWriteEnabled(), Ogre::RenderSystem::_setFog(), Ogre::RenderSystem::_setSceneBlending(), Ogre::RenderSystem::_setSurfaceParams(), Ogre::RenderSystem::_setTextureUnitSettings(), Ogre::RenderSystem::bindGpuProgram(), Ogre::FogMode, Ogre::Pass::getAmbient(), Ogre::Pass::getColourWriteEnabled(), Ogre::Pass::getCullingMode(), Ogre::Pass::getDepthBias(), Ogre::Pass::getDepthCheckEnabled(), Ogre::Pass::getDepthFunction(), Ogre::Pass::getDepthWriteEnabled(), Ogre::Pass::getDestBlendFactor(), Ogre::Pass::getDiffuse(), Ogre::Pass::getFogColour(), Ogre::Pass::getFogDensity(), Ogre::Pass::getFogEnd(), Ogre::Pass::getFogMode(), Ogre::Pass::getFogOverride(), Ogre::Pass::getFogStart(), Ogre::Pass::getFragmentProgram(), Ogre::Pass::getLightingEnabled(), Ogre::Pass::getNumTextureUnitStates(), Ogre::Pass::getSelfIllumination(), Ogre::Pass::getShadingMode(), Ogre::Pass::getShininess(), Ogre::Pass::getSourceBlendFactor(), Ogre::Pass::getSpecular(), Ogre::Pass::getTextureUnitStateIterator(), Ogre::Pass::getVertexProgram(), Ogre::GPT_FRAGMENT_PROGRAM, Ogre::GPT_VERTEX_PROGRAM, Ogre::Pass::hasFragmentProgram(), Ogre::Pass::hasVertexProgram(), Ogre::SceneManager::mDestRenderSystem, Ogre::SceneManager::mFogColour, Ogre::SceneManager::mFogDensity, Ogre::SceneManager::mFogEnd, Ogre::SceneManager::mFogMode, Ogre::SceneManager::mFogStart, Ogre::Real, Ogre::RenderSystem::setLightingEnabled(), Ogre::RenderSystem::setShadingType(), and Ogre::RenderSystem::unbindGpuProgram().

Referenced by Ogre::SceneManager::_renderVisibleObjects(), Ogre::SceneManager::manualRender(), and renderStaticGeometry().

void Ogre::SceneManager::setSkyBox bool    enable,
const String   materialName,
Real    distance = 5000,
bool    drawFirst = true,
const Quaternion   orientation = Quaternion::IDENTITY
[virtual, inherited]
 

Enables / disables a 'sky box' i.e.

a 6-sided box at constant distance from the camera representing the sky.

Remarks:
You could create a sky box yourself using the standard mesh and entity methods, but this creates a plane which the camera can never get closer or further away from - it moves with the camera. (NB you could create this effect by creating a world box which was attached to the same SceneNode as the Camera too, but this would only apply to a single camera whereas this skybox applies to any camera using this scene manager).

The material you use for the skybox can either contain layers which are single textures, or they can be cubic textures, i.e. made up of 6 images, one for each plane of the cube. See the TextureUnitState class for more information.

Parameters:
enable  True to enable the skybox, false to disable it
materialName  The name of the material the box will use
distance  Distance in world coorinates from the camera to each plane of the box. The default is normally OK.
drawFirst  If true, the box is drawn before all other geometry in the scene, without updating the depth buffer. This is the safest rendering method since all other objects will always appear in front of the sky. However this is not the most efficient way if most of the sky is often occluded by other objects. If this is the case, you can set this parameter to false meaning it draws after all other geometry which can be an optimisation - however you must ensure that the distance value is large enough that no objects will 'poke through' the sky box when it is rendered.
orientation  Optional parameter to specify the orientation of the box. By default the 'top' of the box is deemed to be in the +y direction, and the 'front' at the -z direction. You can use this parameter to rotate the sky if you want.

Definition at line 816 of file OgreSceneManager.cpp.

References Ogre::SceneNode::attachObject(), Ogre::SceneManager::BoxPlane, Ogre::Material::clone(), Ogre::Material::copyDetailsTo(), Ogre::SceneManager::createEntity(), Ogre::SceneManager::createSceneNode(), Ogre::SceneManager::createSkyboxPlane(), Ogre::SceneNode::detachAllObjects(), Except, Ogre::Material::getBestTechnique(), Ogre::ResourceManager::getByName(), Ogre::SceneManager::getMaterial(), Ogre::Material::getName(), Ogre::Resource::getName(), Ogre::Technique::getPass(), Ogre::Pass::getTextureUnitState(), Ogre::Material::load(), Ogre::SceneManager::mSkyBoxDrawFirst, Ogre::SceneManager::mSkyBoxEnabled, Ogre::SceneManager::mSkyBoxEntity, Ogre::SceneManager::mSkyBoxNode, Ogre::Real, Ogre::SceneManager::removeEntity(), Ogre::TextureUnitState::setCurrentFrame(), Ogre::Material::setDepthWriteEnabled(), Ogre::Entity::setMaterialName(), and Ogre::TextureUnitState::setTextureAddressingMode().

void Ogre::SceneManager::setSkyDome bool    enable,
const String   materialName,
Real    curvature = 10,
Real    tiling = 8,
Real    distance = 4000,
bool    drawFirst = true,
const Quaternion   orientation = Quaternion::IDENTITY
[virtual, inherited]
 

Enables / disables a 'sky dome' i.e.

an illusion of a curved sky.

Remarks:
A sky dome is actually formed by 5 sides of a cube, but with texture coordinates generated such that the surface appears curved like a dome. Sky domes are appropriate where you need a realistic looking sky where the scene is not going to be 'fogged', and there is always a 'floor' of some sort to prevent the viewer looking below the horizon (the distortion effect below the horizon can be pretty horrible, and there is never anyhting directly below the viewer). If you need a complete wrap-around background, use the setSkyBox method instead. You can actually combine a sky box and a sky dome if you want, to give a positional backdrop with an overlayed curved cloud layer.

Sky domes work well with 2D repeating textures like clouds. You can change the apparant 'curvature' of the sky depending on how your scene is viewed - lower curvatures are better for 'open' scenes like landscapes, whilst higher curvatures are better for say FPS levels where you don't see a lot of the sky at once and the exaggerated curve looks good.

Parameters:
enable  True to enable the skydome, false to disable it
materialName  The name of the material the dome will use
curvature  The curvature of the dome. Good values are between 2 and 65. Higher values are more curved leading to a smoother effect, lower values are less curved meaning more distortion at the horizons but a better distance effect.
tiling  How many times to tile the texture(s) across the dome.
distance  Distance in world coorinates from the camera to each plane of the box the dome is rendered on. The default is normally OK.
drawFirst  If true, the dome is drawn before all other geometry in the scene, without updating the depth buffer. This is the safest rendering method since all other objects will always appear in front of the sky. However this is not the most efficient way if most of the sky is often occluded by other objects. If this is the case, you can set this parameter to false meaning it draws after all other geometry which can be an optimisation - however you must ensure that the distance value is large enough that no objects will 'poke through' the sky when it is rendered.
orientation  Optional parameter to specify the orientation of the dome. By default the 'top' of the dome is deemed to be in the +y direction, and the 'front' at the -z direction. You can use this parameter to rotate the sky if you want.

Definition at line 897 of file OgreSceneManager.cpp.

References Ogre::SceneNode::attachObject(), Ogre::SceneManager::BoxPlane, Ogre::SceneManager::createEntity(), Ogre::SceneManager::createSceneNode(), Ogre::SceneManager::createSkydomePlane(), Ogre::SceneNode::detachAllObjects(), Except, Ogre::SceneManager::getMaterial(), Ogre::Material::getName(), Ogre::Resource::getName(), Ogre::Material::load(), Ogre::SceneManager::mSkyDomeDrawFirst, Ogre::SceneManager::mSkyDomeEnabled, Ogre::SceneManager::mSkyDomeEntity, Ogre::SceneManager::mSkyDomeNode, Ogre::Real, Ogre::SceneManager::removeEntity(), Ogre::Material::setDepthWriteEnabled(), and Ogre::Entity::setMaterialName().

Referenced by Ogre::Quake3Shader::createAsMaterial().

void Ogre::SceneManager::setSkyPlane bool    enable,
const Plane   plane,
const String   materialName,
Real    scale = 1000,
Real    tiling = 10,
bool    drawFirst = true,
Real    bow = 0
[virtual, inherited]
 

Enables / disables a 'sky plane' i.e.

a plane at constant distance from the camera representing the sky.

Remarks:
You can create sky planes yourself using the standard mesh and entity methods, but this creates a plane which the camera can never get closer or further away from - it moves with the camera. (NB you could create this effect by creating a world plane which was attached to the same SceneNode as the Camera too, but this would only apply to a single camera whereas this plane applies to any camera using this scene manager).
Note:
To apply scaling, scrolls etc to the sky texture(s) you should use the TextureUnitState class methods.
Parameters:
enable  True to enable the plane, false to disable it
plane  Details of the plane, i.e. it's normal and it's distance from the camera.
materialName  The name of the material the plane will use
scale  The scaling applied to the sky plane - higher values mean a bigger sky plane - you may want to tweak this depending on the size of plane.d and the other characteristics of your scene
tiling  How many times to tile the texture across the sky. Applies to all texture layers. If you need finer control use the TextureUnitState texture coordinate transformation methods.
drawFirst  If true, the plane is drawn before all other geometry in the scene, without updating the depth buffer. This is the safest rendering method since all other objects will always appear in front of the sky. However this is not the most efficient way if most of the sky is often occluded by other objects. If this is the case, you can set this parameter to false meaning it draws after all other geometry which can be an optimisation - however you must ensure that the plane.d value is large enough that no objects will 'poke through' the sky plane when it is rendered.
bow  If zero, the plane will be completely flat (like previous versions. If above zero, the plane will be curved, allowing the sky to appear below camera level. Curved sky planes are simular to skydomes, but are more compatable with fog.

Definition at line 738 of file OgreSceneManager.cpp.

References Ogre::SceneNode::attachObject(), Ogre::SceneManager::createEntity(), Ogre::SceneManager::createSceneNode(), Ogre::Vector3::crossProduct(), Ogre::SceneNode::detachAllObjects(), Except, Ogre::SceneManager::getMaterial(), Ogre::Material::load(), Ogre::SceneManager::mSkyPlane, Ogre::SceneManager::mSkyPlaneDrawFirst, Ogre::SceneManager::mSkyPlaneEnabled, Ogre::SceneManager::mSkyPlaneEntity, Ogre::SceneManager::mSkyPlaneNode, Ogre::Plane::normal, Ogre::Real, Ogre::SceneManager::removeEntity(), Ogre::Material::setDepthWriteEnabled(), and Ogre::Entity::setMaterialName().

void Ogre::SceneManager::setViewport Viewport   vp [protected, virtual, inherited]
 

Internal method for setting the destination viewport for the next render.

Definition at line 1857 of file OgreSceneManager.cpp.

References Ogre::RenderSystem::_setViewport(), and Ogre::SceneManager::mDestRenderSystem.

Referenced by Ogre::SceneManager::_renderScene().

void Ogre::BspSceneManager::setWorldGeometry const String   filename [virtual]
 

Specialised from SceneManager to support Quake3 bsp files.

Reimplemented from Ogre::SceneManager.

Definition at line 77 of file OgreBspSceneManager.cpp.

References Except, Ogre::IndexData::indexBuffer, Ogre::IndexData::indexCount, Ogre::RenderOperation::indexData, Ogre::IndexData::indexStart, Ogre::BspLevel::load(), mLevel, Ogre::BspLevel::mNumIndexes, mRenderOp, Ogre::BspLevel::mVertexData, Ogre::RenderOperation::operationType, stricmp, Ogre::RenderOperation::useIndexes, and Ogre::RenderOperation::vertexData.

void Ogre::SceneManager::showBoundingBoxes bool    bShow [inherited]
 

Allows all bounding boxes of scene nodes to be displayed.

Definition at line 1863 of file OgreSceneManager.cpp.

References Ogre::SceneManager::mShowBoundingBoxes.

void Ogre::BspSceneManager::showNodeBoxes bool    show
 

Tells the manager whether to draw the axis-aligned boxes that surround nodes in the Bsp tree.

For debugging purposes.

Definition at line 406 of file OgreBspSceneManager.cpp.

References mShowNodeAABs.

void Ogre::SceneManager::useRenderableViewProjMode Renderable   pRend [protected, inherited]
 

Internal method used by _renderVisibleObjects to deal with renderables which override the camera's own view / projection materices.

Definition at line 1718 of file OgreSceneManager.cpp.

References Ogre::RenderSystem::_setProjectionMatrix(), Ogre::RenderSystem::_setViewMatrix(), Ogre::Camera::getProjectionMatrix(), Ogre::Camera::getViewMatrix(), Ogre::SceneManager::mCamChanged, Ogre::SceneManager::mCameraInProgress, Ogre::SceneManager::mDestRenderSystem, Ogre::Renderable::useIdentityProjection(), and Ogre::Renderable::useIdentityView().

Referenced by Ogre::SceneManager::renderSingleObject().

BspNode * Ogre::BspSceneManager::walkTree Camera   camera [protected]
 

Walks the BSP tree looking for the node which the camera is in, and tags any geometry which is in a visible leaf for later processing.

Parameters:
camera  Pointer to the viewpoint.
Returns:
The BSP node the camera was found in, for info.

Definition at line 209 of file OgreBspSceneManager.cpp.

References addBoundingBox(), Ogre::BspLevel::findLeaf(), Ogre::FrustumPlane, Ogre::BspNode::getBoundingBox(), Ogre::Camera::getDerivedPosition(), Ogre::BspLevel::isLeafVisible(), Ogre::Camera::isVisible(), mFaceGroupSet, Ogre::BspLevel::mLeafStart, mLevel, mMatFaceGroupMap, Ogre::BspLevel::mNumNodes, Ogre::BspLevel::mRootNode, and processVisibleLeaf().

Referenced by _findVisibleObjects().


Friends And Related Function Documentation

friend class BspIntersectionSceneManager [friend]
 

Definition at line 64 of file OgreBspSceneManager.h.


Member Data Documentation

RenderOperation Ogre::BspSceneManager::mAABGeometry [protected]
 

Definition at line 85 of file OgreBspSceneManager.h.

ColourValue Ogre::SceneManager::mAmbientLight [protected, inherited]
 

Current ambient light, cached for RenderSystem.

Definition at line 98 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_renderScene(), Ogre::SceneManager::getAmbientLight(), and Ogre::SceneManager::setAmbientLight().

AnimationList Ogre::SceneManager::mAnimationsList [protected, inherited]
 

Definition at line 207 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::createAnimation(), Ogre::SceneManager::destroyAllAnimations(), Ogre::SceneManager::destroyAnimation(), and Ogre::SceneManager::getAnimation().

AnimationStateSet Ogre::SceneManager::mAnimationStates [protected, inherited]
 

Definition at line 208 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_applySceneAnimations(), Ogre::SceneManager::createAnimationState(), Ogre::SceneManager::destroyAllAnimationStates(), Ogre::SceneManager::destroyAnimationState(), and Ogre::SceneManager::getAnimationState().

AutoParamDataSource Ogre::SceneManager::mAutoParamDataSource [protected, inherited]
 

Utility class for calculating automatic parameters for gpu programs.

Definition at line 238 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_renderScene(), and Ogre::SceneManager::renderSingleObject().

BillboardSetList Ogre::SceneManager::mBillboardSets [protected, inherited]
 

Central list of billboard sets - for easy memory management and lookup.

Definition at line 126 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::clearScene(), Ogre::SceneManager::createBillboardSet(), Ogre::SceneManager::getBillboardSet(), and Ogre::SceneManager::removeBillboardSet().

BspResourceManager* Ogre::BspSceneManager::mBspResMgr [protected]
 

Definition at line 68 of file OgreBspSceneManager.h.

Referenced by BspSceneManager(), and ~BspSceneManager().

bool Ogre::SceneManager::mCamChanged [protected, inherited]
 

Controller flag for determining if we need to set view/proj matrices.

Definition at line 215 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_renderScene(), and Ogre::SceneManager::useRenderableViewProjMode().

Camera* Ogre::SceneManager::mCameraInProgress [protected, inherited]
 

Camera in progress.

Definition at line 139 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_renderScene(), Ogre::SceneManager::_renderVisibleObjects(), Ogre::SceneManager::renderSingleObject(), renderStaticGeometry(), and Ogre::SceneManager::useRenderableViewProjMode().

CameraList Ogre::SceneManager::mCameras [protected, inherited]
 

Central list of cameras - for easy memory management and lookup.

Definition at line 107 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::clearScene(), Ogre::SceneManager::createCamera(), Ogre::OctreeSceneManager::createCamera(), Ogre::SceneManager::getCamera(), Ogre::SceneManager::removeAllCameras(), and Ogre::SceneManager::removeCamera().

RenderSystem* Ogre::SceneManager::mDestRenderSystem [protected, inherited]
 

The rendering system to send the scene to.

Definition at line 101 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_renderScene(), Ogre::TerrainSceneManager::_renderVisibleObjects(), Ogre::SceneManager::_setDestinationRenderSystem(), Ogre::SceneManager::manualRender(), Ogre::SceneManager::renderSingleObject(), renderStaticGeometry(), Ogre::SceneManager::setAmbientLight(), Ogre::SceneManager::setPass(), Ogre::SceneManager::setViewport(), and Ogre::SceneManager::useRenderableViewProjMode().

bool Ogre::SceneManager::mDisplayNodes [protected, inherited]
 

Definition at line 203 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_findVisibleObjects(), Ogre::SceneManager::SceneManager(), and Ogre::SceneManager::setDisplaySceneNodes().

EntityList Ogre::SceneManager::mEntities [protected, inherited]
 

Central list of entities - for easy memory management and lookup.

Definition at line 120 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::clearScene(), Ogre::SceneManager::createEntity(), Ogre::DefaultSphereSceneQuery::execute(), Ogre::DefaultRaySceneQuery::execute(), Ogre::DefaultAxisAlignedBoxSceneQuery::execute(), Ogre::DefaultIntersectionSceneQuery::execute(), Ogre::SceneManager::getEntity(), Ogre::SceneManager::removeAllEntities(), and Ogre::SceneManager::removeEntity().

FaceGroupSet Ogre::BspSceneManager::mFaceGroupSet [protected]
 

Definition at line 76 of file OgreBspSceneManager.h.

Referenced by processVisibleLeaf(), and walkTree().

ColourValue Ogre::SceneManager::mFogColour [protected, inherited]
 

Definition at line 167 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::getFogColour(), Ogre::SceneManager::setFog(), and Ogre::SceneManager::setPass().

Real Ogre::SceneManager::mFogDensity [protected, inherited]
 

Definition at line 170 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::getFogDensity(), Ogre::SceneManager::setFog(), and Ogre::SceneManager::setPass().

Real Ogre::SceneManager::mFogEnd [protected, inherited]
 

Definition at line 169 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::getFogEnd(), Ogre::SceneManager::setFog(), and Ogre::SceneManager::setPass().

FogMode Ogre::SceneManager::mFogMode [protected, inherited]
 

Definition at line 166 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::getFogMode(), Ogre::SceneManager::SceneManager(), Ogre::SceneManager::setFog(), and Ogre::SceneManager::setPass().

Real Ogre::SceneManager::mFogStart [protected, inherited]
 

Definition at line 168 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::getFogStart(), Ogre::SceneManager::setFog(), and Ogre::SceneManager::setPass().

BspLevel* Ogre::BspSceneManager::mLevel [protected]
 

Definition at line 71 of file OgreBspSceneManager.h.

Referenced by _notifyObjectDetached(), _notifyObjectMoved(), BspSceneManager(), cacheGeometry(), getSuggestedViewpoint(), processVisibleLeaf(), setWorldGeometry(), and walkTree().

SceneLightList Ogre::SceneManager::mLights [protected, inherited]
 

Central list of lights - for easy memory management and lookup.

Definition at line 113 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_populateLightList(), Ogre::SceneManager::createLight(), Ogre::SceneManager::getLight(), Ogre::SceneManager::removeAllLights(), and Ogre::SceneManager::removeLight().

MaterialFaceGroupMap Ogre::BspSceneManager::mMatFaceGroupMap [protected]
 

Definition at line 79 of file OgreBspSceneManager.h.

Referenced by processVisibleLeaf(), renderStaticGeometry(), and walkTree().

MovablesForRendering Ogre::BspSceneManager::mMovablesForRendering [protected]
 

Definition at line 111 of file OgreBspSceneManager.h.

Referenced by _findVisibleObjects(), and processVisibleLeaf().

RenderOperation Ogre::BspSceneManager::mRenderOp [protected]
 

Definition at line 81 of file OgreBspSceneManager.h.

Referenced by renderStaticGeometry(), and setWorldGeometry().

RenderQueue Ogre::SceneManager::mRenderQueue [protected, inherited]
 

Queue of objects for rendering.

Definition at line 95 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_findVisibleObjects(), Ogre::OctreeSceneManager::_findVisibleObjects(), Ogre::SceneManager::_queueSkiesForRendering(), Ogre::SceneManager::_renderScene(), Ogre::SceneManager::_renderVisibleObjects(), and processVisibleLeaf().

RenderQueueListenerList Ogre::SceneManager::mRenderQueueListeners [protected, inherited]
 

Definition at line 218 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::addRenderQueueListener(), Ogre::SceneManager::fireRenderQueueEnded(), Ogre::SceneManager::fireRenderQueueStarted(), and Ogre::SceneManager::removeRenderQueueListener().

SceneNodeList Ogre::SceneManager::mSceneNodes [protected, inherited]
 

Central list of SceneNodes - for easy memory management.

Note:
Note that this list is used only for memory management; the structure of the scene is held using the hierarchy of SceneNodes starting with the root node. However you can look up nodes this way.

Definition at line 136 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::clearScene(), Ogre::SceneManager::createSceneNode(), Ogre::OctreeSceneManager::createSceneNode(), createSceneNode(), Ogre::SceneManager::destroySceneNode(), and Ogre::SceneManager::getSceneNode().

SceneNode* Ogre::SceneManager::mSceneRoot [protected, inherited]
 

Root scene node.

Definition at line 142 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_findVisibleObjects(), Ogre::SceneManager::_updateSceneGraph(), Ogre::SceneManager::clearScene(), Ogre::SceneManager::getRootSceneNode(), Ogre::OctreeSceneManager::init(), Ogre::SceneManager::SceneManager(), and Ogre::SceneManager::~SceneManager().

bool Ogre::SceneManager::mShowBoundingBoxes [protected, inherited]
 

Flag that indicates if all of the scene node's bounding boxes should be shown as a wireframe.

Definition at line 229 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::getShowBoundingBoxes(), processVisibleLeaf(), Ogre::SceneManager::SceneManager(), Ogre::SceneManager::showBoundingBoxes(), and Ogre::OctreeSceneManager::walkOctree().

bool Ogre::BspSceneManager::mShowNodeAABs [protected]
 

Definition at line 84 of file OgreBspSceneManager.h.

Referenced by BspSceneManager(), and showNodeBoxes().

bool Ogre::SceneManager::mSkyBoxDrawFirst [protected, inherited]
 

Definition at line 159 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_queueSkiesForRendering(), and Ogre::SceneManager::setSkyBox().

bool Ogre::SceneManager::mSkyBoxEnabled [protected, inherited]
 

Definition at line 158 of file OgreSceneManager.h.

Referenced by BspSceneManager(), Ogre::SceneManager::clearScene(), Ogre::SceneManager::SceneManager(), and Ogre::SceneManager::setSkyBox().

Entity* Ogre::SceneManager::mSkyBoxEntity[6] [protected, inherited]
 

Definition at line 148 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_queueSkiesForRendering(), Ogre::SceneManager::SceneManager(), and Ogre::SceneManager::setSkyBox().

SceneNode* Ogre::SceneManager::mSkyBoxNode [protected, inherited]
 

Definition at line 152 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_queueSkiesForRendering(), Ogre::SceneManager::clearScene(), Ogre::SceneManager::SceneManager(), and Ogre::SceneManager::setSkyBox().

Quaternion Ogre::SceneManager::mSkyBoxOrientation [protected, inherited]
 

Definition at line 160 of file OgreSceneManager.h.

bool Ogre::SceneManager::mSkyDomeDrawFirst [protected, inherited]
 

Definition at line 163 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_queueSkiesForRendering(), and Ogre::SceneManager::setSkyDome().

bool Ogre::SceneManager::mSkyDomeEnabled [protected, inherited]
 

Definition at line 162 of file OgreSceneManager.h.

Referenced by BspSceneManager(), Ogre::SceneManager::clearScene(), Ogre::SceneManager::SceneManager(), and Ogre::SceneManager::setSkyDome().

Entity* Ogre::SceneManager::mSkyDomeEntity[5] [protected, inherited]
 

Definition at line 147 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_queueSkiesForRendering(), Ogre::SceneManager::SceneManager(), and Ogre::SceneManager::setSkyDome().

SceneNode* Ogre::SceneManager::mSkyDomeNode [protected, inherited]
 

Definition at line 151 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_queueSkiesForRendering(), Ogre::SceneManager::clearScene(), Ogre::SceneManager::SceneManager(), and Ogre::SceneManager::setSkyDome().

Quaternion Ogre::SceneManager::mSkyDomeOrientation [protected, inherited]
 

Definition at line 164 of file OgreSceneManager.h.

Plane Ogre::SceneManager::mSkyPlane [protected, inherited]
 

Definition at line 156 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::setSkyPlane().

bool Ogre::SceneManager::mSkyPlaneDrawFirst [protected, inherited]
 

Definition at line 155 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_queueSkiesForRendering(), and Ogre::SceneManager::setSkyPlane().

bool Ogre::SceneManager::mSkyPlaneEnabled [protected, inherited]
 

Definition at line 154 of file OgreSceneManager.h.

Referenced by BspSceneManager(), Ogre::SceneManager::clearScene(), Ogre::SceneManager::SceneManager(), and Ogre::SceneManager::setSkyPlane().

Entity* Ogre::SceneManager::mSkyPlaneEntity [protected, inherited]
 

Definition at line 146 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_queueSkiesForRendering(), Ogre::SceneManager::SceneManager(), and Ogre::SceneManager::setSkyPlane().

SceneNode* Ogre::SceneManager::mSkyPlaneNode [protected, inherited]
 

Definition at line 150 of file OgreSceneManager.h.

Referenced by Ogre::SceneManager::_queueSkiesForRendering(), Ogre::SceneManager::clearScene(), Ogre::SceneManager::SceneManager(), and Ogre::SceneManager::setSkyPlane().


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

Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:11:32 2004