This class contains utilities and functions to allow the manipulation of the Graphical scene, rather then the physics inside, or the object inside. More...
#include <scenemanager.h>
Public Types | |
typedef ProxyContainer::const_iterator | ConstProxyIterator |
Const Iterator type for RenderableProxy instances stored by this class. | |
typedef std::vector < RenderableProxy * > | ProxyContainer |
Basic container type for RenderableProxy storage by this class. | |
typedef ProxyContainer::iterator | ProxyIterator |
Iterator type for RenderableProxy instances stored by this class. | |
enum | SceneShadowTechnique { SST_None = 0, SST_Stencil_Modulative = 1, SST_Stencil_Additive = 2, SST_Texture_Modulative = 11, SST_Texture_Additive = 12, SST_Texture_Additive_Integrated = 13, SST_Texture_Modulative_Integrated = 14 } |
needs to be documented More... | |
enum | SkyMethod { SkyNone = 0, SkyPlane = 1, SkyBox = 2, SkyDome = 3 } |
Used to help identify which method is used to draw the sky, if any. More... | |
Public Member Functions | |||
SceneManager (const String &InternalManagerTypeName="DefaultSceneManager") | |||
Class Constructor. More... | |||
SceneManager (XML::Node &XMLNode) | |||
XML constructor. More... | |||
virtual | ~SceneManager () | ||
Class Destructor. More... | |||
Ogre::SceneManager * | _GetGraphicsWorldPointer () const | ||
Gets the internal Ogre Scene Manager pointer. More... | |||
SceneManagerData * | _GetRawInternalDataPointer () const | ||
Gets the raw internal internal data. More... | |||
BillboardSetProxy * | CreateBillboardSetProxy (const UInt32 InitialPoolSize=20) | ||
Creates a new BillboardSetProxy. More... | |||
BillboardSetProxy * | CreateBillboardSetProxy (const XML::Node &SelfRoot) | ||
Creates a new BillboardSetProxy. More... | |||
EntityProxy * | CreateEntityProxy () | ||
Creates a new EntityProxy. More... | |||
EntityProxy * | CreateEntityProxy (Mesh *TheMesh) | ||
Creates a new EntityProxy. More... | |||
EntityProxy * | CreateEntityProxy (const String &MeshName, const String &GroupName) | ||
Creates a new EntityProxy. More... | |||
EntityProxy * | CreateEntityProxy (const XML::Node &SelfRoot) | ||
Creates a new EntityProxy. More... | |||
LightProxy * | CreateLightProxy () | ||
Creates a new LightProxy. More... | |||
LightProxy * | CreateLightProxy (const Graphics::LightType Type) | ||
Creates a new LightProxy. More... | |||
LightProxy * | CreateLightProxy (const XML::Node &SelfRoot) | ||
Creates a new LightProxy. More... | |||
ParticleSystemProxy * | CreateParticleSystemProxy (const String &Template) | ||
Creates a new ParticleSystemProxy. More... | |||
ParticleSystemProxy * | CreateParticleSystemProxy (const XML::Node &SelfRoot) | ||
Creates a new ParticleSystemProxy. More... | |||
void | CreateSkyBox (const String &Material, const String &Group, Real Distance, bool DrawFirst=true, Quaternion Orientation=Quaternion()) | ||
Creates a skybox for use in making a sky. More... | |||
void | CreateSkyDome (const String &Material, const String &Group, Real Distance, Real Curvature=10.0, Real Tiling=8.0, bool DrawFirst=true, Quaternion Orientation=Quaternion(), int XSegments=16, int YSegments=16) | ||
Creates a skydome for use in making a sky. More... | |||
void | CreateSkyPlane (const Plane &SkyPlane_, const String &Material, const String &Group, Real Scale=1000.0, Real Tiling=10.0, bool DrawFirst=true, Real Bow=0, int XSegments=1, int YSegments=1) | ||
Creates a skyplane for use in making a sky. More... | |||
virtual void | Deinitialize () | ||
Removes this manager from any necessary configuration so it can be safely disposed of. More... | |||
void | DestroyAllProxies () | ||
Deletes all stored RenderableProxy instances. | |||
void | DestroyProxy (RenderableProxy *ToBeDestroyed) | ||
Deletes a RenderableProxy. More... | |||
void | DisableSky () | ||
If any sky is active, disable it. | |||
void | DisableSkyBox () | ||
Disables the currently active skybox. More... | |||
void | DisableSkyDome () | ||
Disables the currently active skydome. More... | |||
void | DisableSkyPlane () | ||
Disables the currently active skyplane. More... | |||
ColourValue | GetAmbientLight () const | ||
Retrieve the level of the ambient light. More... | |||
virtual String | GetImplementationTypeName () const | ||
This Allows any manager name to be sent to a stream. Primarily used for logging. More... | |||
virtual ManagerType | GetInterfaceType () const | ||
This returns the type of this manager. More... | |||
ConstString & | GetName () const | ||
Gets the name of this manager. More... | |||
UInt32 | GetNumProxies () const | ||
Gets the number of RenderableProxy instances in this manager. More... | |||
RenderableProxy * | GetProxy (const UInt32 Index) const | ||
Gets a RenderableProxy instance by index. More... | |||
SceneShadowTechnique | GetSceneShadowTechnique () const | ||
Gets the currently set shadow technique. More... | |||
ColourValue | GetShadowColour () const | ||
Gets the colour being used when casting shadows. More... | |||
Real | GetShadowFarDistance () const | ||
Gets the maximum distance from the camera that shadows will be visible. More... | |||
Whole | GetShadowTextureCount () const | ||
Gets the currently set number of textures being used to make texture shadows. More... | |||
unsigned short | GetShadowTextureSize () const | ||
Retrieve the size of textures. More... | |||
virtual void | Initialize () | ||
Configures this manager for use prior to entering the main loop. More... | |||
virtual void | Pause (const UInt32 PL) | ||
Sets the pause state of this manager, or has no effect depending on the value passed in. More... | |||
void | PauseAllParticles (bool Pause) | ||
Pauses(or unpauses) all particles stored in this manager. More... | |||
void | SetAmbientLight (Real Red=1.0, Real Green=1.0, Real Blue=1.0, Real Alpha=1.0) | ||
Sets the ambient light for the scene. More... | |||
void | SetAmbientLight (const ColourValue &LightColor) | ||
Sets the ambient light for the scene, in a single value. More... | |||
void | SetSceneShadowTechnique (SceneShadowTechnique Shadows) | ||
Sets the type of shadows to be used when rendering the scene. More... | |||
void | SetShadowColour (const ColourValue &ShadowColour) | ||
Sets the colour to be used when casting shadows. More... | |||
void | SetShadowFarDistance (const Real &FarDist) | ||
Sets the maximum distance from the camera that shadows will be visible. More... | |||
void | SetShadowTextureCount (const Whole &Count) | ||
Sets the number of textures to be alloted for creating shadows. More... | |||
void | SetShadowTextureSize (unsigned short Size) | ||
Sets the size of all texture based shadows. More... | |||
SkyMethod | WhichSky () const | ||
get the kind of sy in use More... | |||
Public Member Functions inherited from Mezzanine::WorldManager | |||
WorldManager () | |||
Class constructor. | |||
virtual | ~WorldManager () | ||
Class destructor. | |||
virtual void | _SetWorld (World *Parent) | ||
Sets the world this manager belongs to.
| |||
virtual World * | GetWorld () const | ||
Gets the world this manager belongs to. More... | |||
virtual bool | IsPaused () const | ||
Gets whether or not this manager is currently paused. More... | |||
Public Member Functions inherited from Mezzanine::ManagerBase | |||
ManagerBase () | |||
Class constructor. | |||
virtual | ~ManagerBase () | ||
Class destructor. | |||
virtual String | GetInterfaceTypeAsString () const | ||
Gets a string of the interface type of this manager. More... | |||
bool | IsInitialized () const | ||
Gets whether or not this manager has been initialized. More... | |||
Protected Attributes | |
ProxyContainer | Proxies |
Container storing all of the RenderableProxy instances created by this manager. More... | |
SceneManagerData * | SMD |
Pointer to a class storing sensative internal data for the scene. More... | |
Threading::DefaultThreadSpecificStorage::Type * | ThreadResources |
Can be used for thread safe logging and other thread specific resources. More... | |
Protected Attributes inherited from Mezzanine::WorldManager | |
bool | OperationsPaused |
This stores whether or not processing for some or all objects in this manager has been paused. More... | |
World * | ParentWorld |
A pointer to the world that created this manager. More... | |
Protected Attributes inherited from Mezzanine::ManagerBase | |
bool | Initialized |
Simple bool indicating whether or not this manager has been initialized. More... | |
Entresol * | TheEntresol |
The actual pointer to the Entresol core class. More... | |
Friends | |
class | TrackingNodeUpdateWorkUnit |
Additional Inherited Members | |
Static Public Member Functions inherited from Mezzanine::ManagerBase | |
static String | GetTypeAsString (const ManagerType &ManagerType) |
Gets the string form of the type of manager. More... | |
static ManagerType | GetTypeFromString (const String &ManagerName) |
Gets the type of manager requested from a string. More... | |
This class contains utilities and functions to allow the manipulation of the Graphical scene, rather then the physics inside, or the object inside.
This class contains functions that allow the manipulation of lighting, skyboxes, internal scenemanager types, and more.
Definition at line 81 of file scenemanager.h.
needs to be documented
Definition at line 92 of file scenemanager.h.
Used to help identify which method is used to draw the sky, if any.
Definition at line 104 of file scenemanager.h.
Mezzanine::Graphics::SceneManager::SceneManager | ( | const String & | InternalManagerTypeName = "DefaultSceneManager" ) |
Class Constructor.
Standard class initialization constructor.
InternalManagerTypeName | The name of the scenemanager type to be constructed. |
Definition at line 177 of file scenemanager.cpp.
Mezzanine::Graphics::SceneManager::SceneManager | ( | XML::Node & | XMLNode) |
XML constructor.
XMLNode | The node of the xml document to construct from. |
Definition at line 187 of file scenemanager.cpp.
|
virtual |
Ogre::SceneManager * Mezzanine::Graphics::SceneManager::_GetGraphicsWorldPointer | ( | ) | const |
Gets the internal Ogre Scene Manager pointer.
Definition at line 604 of file scenemanager.cpp.
SceneManagerData * Mezzanine::Graphics::SceneManager::_GetRawInternalDataPointer | ( | ) | const |
Gets the raw internal internal data.
Definition at line 607 of file scenemanager.cpp.
BillboardSetProxy * Mezzanine::Graphics::SceneManager::CreateBillboardSetProxy | ( | const UInt32 | InitialPoolSize = 20 ) |
Creates a new BillboardSetProxy.
InitialPoolSize | The number of billboards to reserve space for. |
Definition at line 408 of file scenemanager.cpp.
BillboardSetProxy * Mezzanine::Graphics::SceneManager::CreateBillboardSetProxy | ( | const XML::Node & | SelfRoot) |
Creates a new BillboardSetProxy.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 415 of file scenemanager.cpp.
EntityProxy * Mezzanine::Graphics::SceneManager::CreateEntityProxy | ( | ) |
Creates a new EntityProxy.
Definition at line 422 of file scenemanager.cpp.
EntityProxy * Mezzanine::Graphics::SceneManager::CreateEntityProxy | ( | Mesh * | TheMesh) |
Creates a new EntityProxy.
TheMesh | A pointer to the mesh to be applied to this proxy. |
Definition at line 429 of file scenemanager.cpp.
EntityProxy * Mezzanine::Graphics::SceneManager::CreateEntityProxy | ( | const String & | MeshName, |
const String & | GroupName | ||
) |
Creates a new EntityProxy.
MeshName | The name of the mesh to be loaded and applied to this proxy. |
GroupName | The resource group name where the mesh can be found. |
Definition at line 436 of file scenemanager.cpp.
EntityProxy * Mezzanine::Graphics::SceneManager::CreateEntityProxy | ( | const XML::Node & | SelfRoot) |
Creates a new EntityProxy.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 443 of file scenemanager.cpp.
LightProxy * Mezzanine::Graphics::SceneManager::CreateLightProxy | ( | ) |
Creates a new LightProxy.
Definition at line 450 of file scenemanager.cpp.
LightProxy * Mezzanine::Graphics::SceneManager::CreateLightProxy | ( | const Graphics::LightType | Type) |
Creates a new LightProxy.
Type | The type of light this light is to be constructed as. |
Definition at line 457 of file scenemanager.cpp.
LightProxy * Mezzanine::Graphics::SceneManager::CreateLightProxy | ( | const XML::Node & | SelfRoot) |
Creates a new LightProxy.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 464 of file scenemanager.cpp.
ParticleSystemProxy * Mezzanine::Graphics::SceneManager::CreateParticleSystemProxy | ( | const String & | Template) |
Creates a new ParticleSystemProxy.
Template | Name of the particle script to be used in creating this particle effect. |
Definition at line 471 of file scenemanager.cpp.
ParticleSystemProxy * Mezzanine::Graphics::SceneManager::CreateParticleSystemProxy | ( | const XML::Node & | SelfRoot) |
Creates a new ParticleSystemProxy.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 478 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::CreateSkyBox | ( | const String & | Material, |
const String & | Group, | ||
Real | Distance, | ||
bool | DrawFirst = true , |
||
Quaternion | Orientation = Quaternion() |
||
) |
Creates a skybox for use in making a sky.
Like skyplanes, only one can exist per scene. Unlike skyplanes, skyboxes will be applied individually to each camera in the scene. The skybox will move with the camera, so as a result the camera will never be able to "touch" the sky. Skyboxes are more performance intensive then skyplanes.
Material | The name of the material to be applied to the skybox. Note: This is not referring to the filename, but the specific material script within the file. |
Group | The resource group where the material can be found. |
Distance | The distance from the camera where the skybox is found. This is in world units. |
DrawFirst | Whether or not the skybox should be the first thing rendered in the scene. Usually you will want this to be true as it'll ensure all other objects are rendered on top of it. |
Orientation | Optional quaternion to rotate the orientation of the skybox. |
Definition at line 371 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::CreateSkyDome | ( | const String & | Material, |
const String & | Group, | ||
Real | Distance, | ||
Real | Curvature = 10.0 , |
||
Real | Tiling = 8.0 , |
||
bool | DrawFirst = true , |
||
Quaternion | Orientation = Quaternion() , |
||
int | XSegments = 16 , |
||
int | YSegments = 16 |
||
) |
Creates a skydome for use in making a sky.
Like the other two types of sky's, their can be only one skydome per scene. Skydomes much like skyboxes, except they have 5 sides(the bottom side is missing), and they bow each of the sides to make the dome. In all other respects they are the same.
Material | The name of the material to be applied to the skydome. Note: This is not referring to the filename, but the specific material script within the file. |
Group | The resource group where the material can be found. |
Distance | The distance from the camera where the skydome is found. This is in world units. |
Curvature | Curvature of the dome. Usually you want this value to be between 2 and 65. |
Tiling | The number of times to tile the texture or textures listed in the material script across the skydome. |
DrawFirst | Whether or not the skybox should be the first thing rendered in the scene. Usually you will want this to be true as it'll ensure all other objects are rendered on top of it. |
Orientation | Optional quaternion to rotate the orientation of the skydome. |
XSegments | The number of segments, or boxes, the skydome consists of on the dome's X axis. |
YSegments | The number of segments, or boxes, the skydome consists of on the dome's Y axis. |
Definition at line 383 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::CreateSkyPlane | ( | const Plane & | SkyPlane_, |
const String & | Material, | ||
const String & | Group, | ||
Real | Scale = 1000.0 , |
||
Real | Tiling = 10.0 , |
||
bool | DrawFirst = true , |
||
Real | Bow = 0 , |
||
int | XSegments = 1 , |
||
int | YSegments = 1 |
||
) |
Creates a skyplane for use in making a sky.
Only one skyplane can exist in a scene. Making a new one will remove the old one. Skyplanes are flat planes that face in one direction. They are ideal for levels with surrounding mountains or anything where the horizon is not visable.
SkyPlane | The plane that will become the sky. |
Material | The name of the material to be applied to the skyplane. Note: This is not referring to the filename, but the specific material script within the file. |
Group | The resource group where the material can be found. |
Scale | The scaling to be applied to the skyplane. This may need to be tweaked based on how high you set the plane off the ground. |
Tiling | The number of times to tile the texture or textures listed in the material script across the skyplane. |
DrawFirst | Whether or not the skyplane should be the first thing rendered in the scene. Usually you will want this to be true as it'll ensure all other objects are rendered on top of it. |
Bow | This will add curvature to the skyplane if set above zero. Note: Use small numbers. A bow of 1.5 should be noticable. |
XSegments | The number of segments, or boxes, the skyplane consists of on the planes X axis. This is usful when giving the skyplane a bow. By default the skyplane is just one massive box. |
YSegments | The number of segments, or boxes, the skyplane consists of on the planes Y axis. This is usful when giving the skyplane a bow. By default the skyplane is just one massive box. |
Definition at line 359 of file scenemanager.cpp.
|
virtual |
Removes this manager from any necessary configuration so it can be safely disposed of.
Implements Mezzanine::ManagerBase.
Definition at line 576 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::DestroyProxy | ( | RenderableProxy * | ToBeDestroyed) |
Deletes a RenderableProxy.
ToBeDestroyed | A pointer to the RenderableProxy you want deleted. |
Definition at line 494 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::DisableSkyBox | ( | ) |
Disables the currently active skybox.
Using this function effectively deletes the skybox, so you will have to provide a new set of parameters if you wish to re-create the skybox.
Definition at line 378 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::DisableSkyDome | ( | ) |
Disables the currently active skydome.
Using this function effectively deletes the skydome, so you will have to provide a new set of parameters if you wish to re-create the skydome.
Definition at line 391 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::DisableSkyPlane | ( | ) |
Disables the currently active skyplane.
Using this function effectively deletes the skyplane, so you will have to provide a new set of parameters if you wish to re-create the skyplane.
Definition at line 366 of file scenemanager.cpp.
ColourValue Mezzanine::Graphics::SceneManager::GetAmbientLight | ( | ) | const |
Retrieve the level of the ambient light.
Definition at line 536 of file scenemanager.cpp.
|
virtual |
This Allows any manager name to be sent to a stream. Primarily used for logging.
Implements Mezzanine::ManagerBase.
Definition at line 598 of file scenemanager.cpp.
|
virtual |
This returns the type of this manager.
This is intended to make using and casting from Manager base easier. With this is is possible to cast from ManagerBase to the correct Manager Type.
Implements Mezzanine::ManagerBase.
Definition at line 595 of file scenemanager.cpp.
ConstString & Mezzanine::Graphics::SceneManager::GetName | ( | ) | const |
Gets the name of this manager.
Definition at line 545 of file scenemanager.cpp.
UInt32 Mezzanine::Graphics::SceneManager::GetNumProxies | ( | ) | const |
Gets the number of RenderableProxy instances in this manager.
Definition at line 491 of file scenemanager.cpp.
RenderableProxy * Mezzanine::Graphics::SceneManager::GetProxy | ( | const UInt32 | Index) | const |
Gets a RenderableProxy instance by index.
Index | The index of the RenderableProxy to be retrieved. |
Definition at line 488 of file scenemanager.cpp.
SceneManager::SceneShadowTechnique Mezzanine::Graphics::SceneManager::GetSceneShadowTechnique | ( | ) | const |
Gets the currently set shadow technique.
Definition at line 298 of file scenemanager.cpp.
ColourValue Mezzanine::Graphics::SceneManager::GetShadowColour | ( | ) | const |
Gets the colour being used when casting shadows.
Definition at line 350 of file scenemanager.cpp.
Real Mezzanine::Graphics::SceneManager::GetShadowFarDistance | ( | ) | const |
Gets the maximum distance from the camera that shadows will be visible.
Definition at line 344 of file scenemanager.cpp.
Whole Mezzanine::Graphics::SceneManager::GetShadowTextureCount | ( | ) | const |
Gets the currently set number of textures being used to make texture shadows.
Definition at line 329 of file scenemanager.cpp.
unsigned short Mezzanine::Graphics::SceneManager::GetShadowTextureSize | ( | ) | const |
Retrieve the size of textures.
Definition at line 338 of file scenemanager.cpp.
|
virtual |
Configures this manager for use prior to entering the main loop.
If | this is called while no valid world is set, this will throw an "INVALID_STATE_EXCEPTION". |
Reimplemented from Mezzanine::WorldManager.
Definition at line 560 of file scenemanager.cpp.
|
virtual |
Sets the pause state of this manager, or has no effect depending on the value passed in.
PL | A bitfield describing the pause level being assigned to the parent world of this manager. |
Implements Mezzanine::WorldManager.
Definition at line 555 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::PauseAllParticles | ( | bool | Pause) |
Pauses(or unpauses) all particles stored in this manager.
Pause | Will pause all Particles if true, unpause if false. |
Definition at line 548 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::SetAmbientLight | ( | Real | Red = 1.0 , |
Real | Green = 1.0 , |
||
Real | Blue = 1.0 , |
||
Real | Alpha = 1.0 |
||
) |
Sets the ambient light for the scene.
Not all scene's will need ambient light. Ambient light is light that hits all objects from all directions.
Red | The value representing the amount of red color in the ambient light. |
Green | The value representing the amount of green color in the ambient light. |
Blue | The value representing the amount of blue color in the ambient light. |
Alpha | The value representing the transparency of the color in the ambient light. |
Definition at line 526 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::SetAmbientLight | ( | const ColourValue & | LightColor) |
Sets the ambient light for the scene, in a single value.
Red | The value representing the amount of red color in the ambient light. |
Definition at line 531 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::SetSceneShadowTechnique | ( | SceneShadowTechnique | Shadows) |
Sets the type of shadows to be used when rendering the scene.
The scene manager defaults to no shadows.
Shadows | The technique to be applied, see SceneShadowTechnique enum for more info. |
Definition at line 269 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::SetShadowColour | ( | const ColourValue & | ShadowColour) |
Sets the colour to be used when casting shadows.
ShadowColour | The colour desired to be used when rendering shadows. |
Definition at line 347 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::SetShadowFarDistance | ( | const Real & | FarDist) |
Sets the maximum distance from the camera that shadows will be visible.
FarDist | The maximum distance from the camera shadows will be rendered. |
Definition at line 341 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::SetShadowTextureCount | ( | const Whole & | Count) |
Sets the number of textures to be alloted for creating shadows.
Defaults to 1.
Count | The amount of textures to be used for creating texture-based shadows. |
Definition at line 326 of file scenemanager.cpp.
void Mezzanine::Graphics::SceneManager::SetShadowTextureSize | ( | unsigned short | Size) |
Sets the size of all texture based shadows.
This defaults to 512. Sizes must be a power of 2.
Size | The size of all textures to be used with shadows, in KB(?). |
Definition at line 332 of file scenemanager.cpp.
SceneManager::SkyMethod Mezzanine::Graphics::SceneManager::WhichSky | ( | ) | const |
get the kind of sy in use
Definition at line 402 of file scenemanager.cpp.
|
protected |
Container storing all of the RenderableProxy instances created by this manager.
Definition at line 116 of file scenemanager.h.
|
protected |
Pointer to a class storing sensative internal data for the scene.
Definition at line 120 of file scenemanager.h.
|
protected |
Can be used for thread safe logging and other thread specific resources.
Definition at line 124 of file scenemanager.h.