Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends

sp::scene::SceneGraph Class Reference
[Scene Management]

#include <spSceneGraph.hpp>

Inheritance diagram for sp::scene::SceneGraph:
sp::scene::RenderNode sp::scene::SceneNode sp::Node sp::BaseObject sp::scene::SceneGraphFamilyTree sp::scene::SceneGraphPortalBased sp::scene::SceneGraphSimple sp::scene::SceneGraphSimpleStream

List of all members.

Public Member Functions

virtual ~SceneGraph ()
virtual void addSceneNode (SceneNode *Object)
 Adds the sepcified node to the scene node list.
virtual void addSceneNode (Camera *Object)
virtual void addSceneNode (Light *Object)
virtual void addSceneNode (RenderNode *Object)
virtual void removeSceneNode (SceneNode *Object)
 Removes the sepcified node from the scene node list.
virtual void removeSceneNode (Camera *Object)
virtual void removeSceneNode (Light *Object)
virtual void removeSceneNode (RenderNode *Object)
virtual void addRootNode (SceneNode *Object)
 Adds a root SceneNode object. This is basically used for child tree scene managers.
virtual void removeRootNode (SceneNode *Object)
 Removes a root SceneNode object. This is basically used for child tree scene managers.
virtual SceneNodecreateNode ()
virtual MeshcreateMesh ()
virtual MeshcreateMesh (const EBasicMeshes Model, const SMeshConstruct &BuildConstruct=SMeshConstruct())
virtual MeshcreateSuperShape (const f32(&ValueList)[12], s32 Detail=DEF_MESH_SEGMENTS)
virtual MeshcreateSkyBox (video::Texture *(&TextureList)[6], f32 Radius=50.0f)
virtual MeshcreateHeightField (const video::Texture *TexHeightMap, const s32 Segments=DEF_MESH_SEGMENTS)
virtual MeshcreateMeshList (std::list< Mesh * > MergeList, bool isOldDelete)
 Creates a mesh out of the specified meshes.
virtual MeshcreateMeshSurface (Mesh *Model, u32 Surface)
 Creates a mesh out of the specified mesh's surface.
virtual MeshloadMesh (const io::stringc &Filename, const io::stringc &TexturePath=video::TEXPATH_IGNORE, const EMeshFileFormats Format=MESHFORMAT_UNKNOWN, const s32 Flags=0)
virtual MeshgetMesh (const io::stringc &Filename, const io::stringc &TexturePath=video::TEXPATH_IGNORE, const EMeshFileFormats Format=MESHFORMAT_UNKNOWN)
virtual bool saveMesh (Mesh *Model, const io::stringc &Filename, const EMeshFileFormats Format=MESHFORMAT_UNKNOWN)
virtual MeshloadScene (const io::stringc &Filename, const io::stringc &TexturePath=video::TEXPATH_IGNORE, const ESceneFileFormats Format=SCENEFORMAT_UNKNOWN, const s32 Flags=DEF_SCENE_FLAGS)
virtual CameracreateCamera ()
virtual LightcreateLight (const ELightModels Type=LIGHT_DIRECTIONAL)
virtual BillboardcreateBillboard (video::Texture *BaseTexture=0)
virtual TerraincreateTerrain (const video::SHeightMapTexture &TextureHeightMap, const dim::size2di &Resolution, s32 GeoMIPLevels=DEF_GEOMIP_LEVELS)
virtual SceneNodecopyNode (const SceneNode *TemplateObject)
virtual MeshcopyNode (const Mesh *TemplateObject)
virtual LightcopyNode (const Light *TemplateObject)
virtual BillboardcopyNode (const Billboard *TemplateObject)
virtual CameracopyNode (const Camera *TemplateObject)
virtual TerraincopyNode (const Terrain *TemplateObject)
virtual bool deleteNode (SceneNode *Object)
 Deletes the specified scene node.
virtual std::list< SceneNode * > findNodes (const io::stringc &Name) const
virtual SceneNodefindNode (const io::stringc &Name) const
virtual std::vector< SceneNode * > findChildren (const SceneNode *Parent) const
virtual SceneNodefindChild (const SceneNode *Parent, const io::stringc &Name) const
virtual void render ()=0
virtual void renderScene (Camera *ActiveCamera)
virtual void renderScene ()
 Renders the whole scene for each camera with their specified viewports.
virtual void renderScenePlain (Camera *ActiveCamera)
 Renders the whole scene plain. This is used to render shadow maps.
virtual void renderSceneStereoImage (Camera *ActiveCamera, f32 CamDegree, f32 CamDist=0.25f)
virtual void clearScene (bool isRemoveNodes=true, bool isRemoveMeshes=true, bool isRemoveCameras=true, bool isRemoveLights=true, bool isRemoveBillboards=true, bool isRemoveTerrains=true)
 Clears the whole scene from the specified objects. To delete all these objects use the SceneManager class.
virtual void setWireframe (const video::EWireframeTypes Type)
virtual void setWireframe (const video::EWireframeTypes TypeFront, const video::EWireframeTypes TypeBack)
virtual void setRenderFace (const video::EFaceTypes Face)
virtual void setLighting (bool isLighting=true)
virtual bool getLighting () const
virtual std::list< Mesh * > getMeshList () const
virtual std::list< Billboard * > getBillboardList () const
virtual std::list< Terrain * > getTerrainList () const
virtual u32 getSceneMeshBufferCount () const
 Returns count of mesh buffers in the whole scene. Only Mesh objects are included.
virtual u32 getSceneVertexCount () const
 Returns count of vertices in the whole scene. Only Mesh objects are included.
virtual u32 getSceneTriangleCount () const
 Returns count of triangles in the whole scene. Only Mesh objects are included.
virtual u32 getSceneObjectsCount () const
 Returns count of objects in the whole scene. Each kind of Node objects are included.
virtual void sortRenderList (const ERenderListSortMethods Method, std::vector< RenderNode * > &ObjectList)
virtual void sortRenderList (const ERenderListSortMethods Method)
template<class T >
T * createCamera ()
ESceneGraphs getGraphType () const
 Returns the type of the scene graph.
bool hasChildTree () const
const std::vector< RenderNode * > & getRenderList () const
const std::vector< Light * > & getLightList () const
const std::vector< Camera * > & getCameraList () const
const std::vector< SceneNode * > & getNodeList () const
void setActiveCamera (Camera *ActiveCamera)
CameragetActiveCamera () const
void setActiveMesh (Mesh *ActiveMesh)
MeshgetActiveMesh () const
void setDepthSorting (bool Enable)
bool getDepthSorting () const
 Returns true if depth sorting is enabled. By default enabled.

Static Public Member Functions

static void setReverseDepthSorting (bool Enable)
static bool getReverseDepthSorting ()

Protected Member Functions

 SceneGraph (const ESceneGraphs Type)
MeshintegrateNewMesh (Mesh *NewMesh)
void arrangeRenderList (std::vector< RenderNode * > &ObjectList, const dim::matrix4f &BaseMatrix)
void arrangeLightList (std::vector< Light * > &ObjectList)
void renderLightsDefault (const dim::matrix4f &BaseMatrix, bool RenderFixedFunctionOnly=true)
template<class T >
void clearRenderObjectList (const ENodeTypes Type, std::vector< RenderNode * > &ObjectList)
template<class T >
bool removeObjectFromList (SceneNode *Object, std::vector< T * > &SearchList)
template<class T >
void addChildToList (const Node *ParentNode, std::vector< SceneNode * > &NodeList, const std::vector< T * > &SearchList) const
template<class T >
SceneNodefindChildInList (const SceneNode *ParentNode, const std::vector< T * > &SearchList, const io::stringc &Name) const
template<class T , class L >
void addNodeToList (const io::stringc &Name, std::list< SceneNode * > &NodeList, const std::vector< L * > &SearchList) const
template<class T >
SceneNodefindNodeInList (const io::stringc &Name, const std::vector< T * > &SearchList) const
template<class T >
std::list< T * > filterRenderNodeList (const ENodeTypes Type) const

Static Protected Member Functions

static void finishRenderScene ()

Protected Attributes

ESceneGraphs GraphType_
bool hasChildTree_
std::vector< SceneNode * > NodeList_
std::vector< Camera * > CameraList_
std::vector< Light * > LightList_
std::vector< RenderNode * > RenderList_
CameraActiveCamera_
MeshActiveMesh_
video::EWireframeTypes WireframeFront_
video::EWireframeTypes WireframeBack_
bool DepthSorting_

Static Protected Attributes

static bool ReverseDepthSorting_ = false

Friends

class SceneNode
class RenderNode
class MaterialNode
class Mesh

Detailed Description

This is the basic scene manager with all the basic functions like loading meshes, creating cameras and other objects. To render a scene you will need one of the abstract scene manager classes like "SimpleSceneManager" or "ExpansiveSceneManager". To know which type is the best for you take a look at their documentation sites. You also can create your own scene manager by abstracting it from this class. Then you can handle scene rendering by yourself.

Since:
Version 3.0

Constructor & Destructor Documentation

sp::scene::SceneGraph::~SceneGraph (  )  [virtual]
sp::scene::SceneGraph::SceneGraph ( const ESceneGraphs  Type  )  [protected]

Member Function Documentation

template<class T >
void sp::scene::SceneGraph::addChildToList ( const Node ParentNode,
std::vector< SceneNode * > &  NodeList,
const std::vector< T * > &  SearchList 
) const [inline, protected]
template<class T , class L >
void sp::scene::SceneGraph::addNodeToList ( const io::stringc Name,
std::list< SceneNode * > &  NodeList,
const std::vector< L * > &  SearchList 
) const [inline, protected]
void sp::scene::SceneGraph::addRootNode ( SceneNode Object  )  [virtual]

Adds a root SceneNode object. This is basically used for child tree scene managers.

Reimplemented in sp::scene::SceneGraphFamilyTree.

void sp::scene::SceneGraph::addSceneNode ( Camera Object  )  [virtual]
void sp::scene::SceneGraph::addSceneNode ( RenderNode Object  )  [virtual]
void sp::scene::SceneGraph::addSceneNode ( SceneNode Object  )  [virtual]

Adds the sepcified node to the scene node list.

Reimplemented in sp::scene::SceneGraphFamilyTree, and sp::scene::SceneGraphSimpleStream.

void sp::scene::SceneGraph::addSceneNode ( Light Object  )  [virtual]
void sp::scene::SceneGraph::arrangeLightList ( std::vector< Light * > &  ObjectList  )  [protected]

Arranges the list of all light sources, i.e. the list will be sorted so that the nearest lights to the view camera are visible and the farthest away are invisible.

void sp::scene::SceneGraph::arrangeRenderList ( std::vector< RenderNode * > &  ObjectList,
const dim::matrix4f BaseMatrix 
) [protected]

Arranges the list of all renderable scene nodes, i.e. the objects will be transformed with the active view matrix and the list will be sorted if depth-sorting is enabled. This should be called before all renderable scene nodes will be rendered.

template<class T >
void sp::scene::SceneGraph::clearRenderObjectList ( const ENodeTypes  Type,
std::vector< RenderNode * > &  ObjectList 
) [inline, protected]
void sp::scene::SceneGraph::clearScene ( bool  isRemoveNodes = true,
bool  isRemoveMeshes = true,
bool  isRemoveCameras = true,
bool  isRemoveLights = true,
bool  isRemoveBillboards = true,
bool  isRemoveTerrains = true 
) [virtual]

Clears the whole scene from the specified objects. To delete all these objects use the SceneManager class.

Terrain * sp::scene::SceneGraph::copyNode ( const Terrain TemplateObject  )  [virtual]
SceneNode * sp::scene::SceneGraph::copyNode ( const SceneNode TemplateObject  )  [virtual]

Copies the specified scene node and returns a pointer to the new object or a null pointer if the template object was specified as a null pointer.

See also:
SceneManager::copyNode
Mesh * sp::scene::SceneGraph::copyNode ( const Mesh TemplateObject  )  [virtual]
Light * sp::scene::SceneGraph::copyNode ( const Light TemplateObject  )  [virtual]
Billboard * sp::scene::SceneGraph::copyNode ( const Billboard TemplateObject  )  [virtual]
Camera * sp::scene::SceneGraph::copyNode ( const Camera TemplateObject  )  [virtual]
Billboard * sp::scene::SceneGraph::createBillboard ( video::Texture BaseTexture = 0  )  [virtual]

Creates a Billboard. Billboards (or Sprites) are mostly used for effects like Fire, Sparks, Lense flares etc.

Parameters:
hTexture,: Billboard's base texture. 0 is also allowed but then you only have a white quad.
Returns:
Pointer to a Billboard object.
Camera * sp::scene::SceneGraph::createCamera (  )  [virtual]

Creates a Camera. Without cameras you cannot see the scene which shall be rendered.

Returns:
Pointer to a Camera object.
template<class T >
T* sp::scene::SceneGraph::createCamera (  )  [inline]

Creates a Camera. Without cameras you cannot see the scene which shall be rendered.

Returns:
Pointer to the specified Camera or Camera derived class object.
Mesh * sp::scene::SceneGraph::createHeightField ( const video::Texture TexHeightMap,
const s32  Segments = DEF_MESH_SEGMENTS 
) [virtual]

Creates a height field. It is an alternate to a dynamic terrain.

Parameters:
HeightMapTexture,: Texture which holds the height-map data
Detail,: Segments for the height-field to be created
Light * sp::scene::SceneGraph::createLight ( const ELightModels  Type = LIGHT_DIRECTIONAL  )  [virtual]

Creates a dynamic light source.

Parameters:
Type,: Light's type. Supported are three types: Directional (by default), Point, Spot. Point and Spot lights can be volumetric using "Light::setVolumetric".
Returns:
Pointer to a Light object.
Mesh * sp::scene::SceneGraph::createMesh (  )  [virtual]

Creates an empty Mesh object. With this you can build your own 3d models at the beginning. Look at the "Mesh" class reference to learn more about building models.

Returns:
Pointer to an Mesh object which represents the 3D models.
Mesh * sp::scene::SceneGraph::createMesh ( const EBasicMeshes  Model,
const SMeshConstruct BuildConstruct = SMeshConstruct() 
) [virtual]

Creates a standard primitive.

Parameters:
Type,: Type of the standard primitve (e.g. Cube, Sphere etc.).
BuildContruct,: Structure which holds the model contrstruction data (e.g. Segments, Radius etc.).
Mesh * sp::scene::SceneGraph::createMeshList ( std::list< Mesh * >  MergeList,
bool  isOldDelete 
) [virtual]

Creates a mesh out of the specified meshes.

Mesh * sp::scene::SceneGraph::createMeshSurface ( Mesh Model,
u32  Surface 
) [virtual]

Creates a mesh out of the specified mesh's surface.

SceneNode * sp::scene::SceneGraph::createNode (  )  [virtual]

Creates a simple Node.

Returns:
Pointer to a SceneNode object.
Mesh * sp::scene::SceneGraph::createSkyBox ( video::Texture *(&)  TextureList[6],
f32  Radius = 50.0f 
) [virtual]

Creates a skybox with 6 surfaces. For more information take a look at the "MeshGenerator" class.

See also:
MeshGenerator
MeshGenerator::createSkyBox
Mesh * sp::scene::SceneGraph::createSuperShape ( const f32(&)  ValueList[12],
s32  Detail = DEF_MESH_SEGMENTS 
) [virtual]

Creates a "SuperShape". This is a 'sphere-like' model which can look very strange with the right parameter values ;-).

Parameters:
ValueList,: List of the 12 values which describe the construction of the super-shape. Play with it to learn how the values affect the final model.
Detail,: Segments which defines the detail of the model.
Terrain * sp::scene::SceneGraph::createTerrain ( const video::SHeightMapTexture TextureHeightMap,
const dim::size2di Resolution,
s32  GeoMIPLevels = DEF_GEOMIP_LEVELS 
) [virtual]

Creates a Terrain. Terrains are mostly used for mountains and large areas. These terrains can be used only for height-fields. Voxels are not supported.

Parameters:
TextureHeightMap,: Heightmap data object. You can also use a normal Texture because the SHeightMapData structure accepts this parameter. But if you want to create a height field with more detail (e.g. 32 bit height data) you can create a height field using floating-point arrays. With this feature you can save and load your own height-field texture data file formats. i.e. when using a 16 bit height field data type you can save memory and anyhow you have much more precise for your terrain.
Resolution,: Specifies the grid resolution for the terrain. If the resolution is e.g. 8*8 each quad-tree-node will have a mesh with 8*8*2 triangles (or 8*8 quads).
GeoMIPLevels,: Count of levels for geo-MIP-mapping which specifies the forks count of the quad-tree.
bool sp::scene::SceneGraph::deleteNode ( SceneNode Object  )  [virtual]

Deletes the specified scene node.

template<class T >
std::list<T*> sp::scene::SceneGraph::filterRenderNodeList ( const ENodeTypes  Type  )  const [inline, protected]
SceneNode * sp::scene::SceneGraph::findChild ( const SceneNode Parent,
const io::stringc Name 
) const [virtual]

Tries to find the specified child of the specified parent.

Parameters:
ParentNode,: Pointer to the Node object which is the parent of the wanted child.
Name,: Name of the wanted child.
Returns:
Pointer to the child Node object if the search was successful. Otherwise 0.
template<class T >
SceneNode* sp::scene::SceneGraph::findChildInList ( const SceneNode ParentNode,
const std::vector< T * > &  SearchList,
const io::stringc Name 
) const [inline, protected]
std::vector< SceneNode * > sp::scene::SceneGraph::findChildren ( const SceneNode Parent  )  const [virtual]

Tries to find each child of the specified parent.

Parameters:
ParentNode,: Pointer to the Node object which is the parent of the wanted children.
Returns:
List with each Node object which could found.
SceneNode * sp::scene::SceneGraph::findNode ( const io::stringc Name  )  const [virtual]

Tries to find the specified node.

Parameters:
Name,: Name of the wanted node.
Returns:
Pointer to the Node object which could found. If no object could found the return value is 0.
template<class T >
SceneNode* sp::scene::SceneGraph::findNodeInList ( const io::stringc Name,
const std::vector< T * > &  SearchList 
) const [inline, protected]
std::list< SceneNode * > sp::scene::SceneGraph::findNodes ( const io::stringc Name  )  const [virtual]

Tries to find each node with the specified name.

Parameters:
Name,: Name of the wanted nodes.
Returns:
List with each Node object which could found.
void sp::scene::SceneGraph::finishRenderScene (  )  [static, protected]
Camera* sp::scene::SceneGraph::getActiveCamera (  )  const [inline]
Mesh* sp::scene::SceneGraph::getActiveMesh (  )  const [inline]
std::list< Billboard * > sp::scene::SceneGraph::getBillboardList (  )  const [virtual]
const std::vector<Camera*>& sp::scene::SceneGraph::getCameraList (  )  const [inline]
bool sp::scene::SceneGraph::getDepthSorting (  )  const [inline]

Returns true if depth sorting is enabled. By default enabled.

ESceneGraphs sp::scene::SceneGraph::getGraphType (  )  const [inline]

Returns the type of the scene graph.

bool sp::scene::SceneGraph::getLighting (  )  const [virtual]
const std::vector<Light*>& sp::scene::SceneGraph::getLightList (  )  const [inline]
Mesh * sp::scene::SceneGraph::getMesh ( const io::stringc Filename,
const io::stringc TexturePath = video::TEXPATH_IGNORE,
const EMeshFileFormats  Format = MESHFORMAT_UNKNOWN 
) [virtual]

Loads a model or instanciates it when it has already been loaded.

See also:
SceneGraph::loadMesh
Note:
When the root mesh will be deleted you also need to delete all derived meshes, too!
std::list< Mesh * > sp::scene::SceneGraph::getMeshList (  )  const [virtual]
const std::vector<SceneNode*>& sp::scene::SceneGraph::getNodeList (  )  const [inline]
const std::vector<RenderNode*>& sp::scene::SceneGraph::getRenderList (  )  const [inline]
bool sp::scene::SceneGraph::getReverseDepthSorting (  )  [static]
u32 sp::scene::SceneGraph::getSceneMeshBufferCount (  )  const [virtual]

Returns count of mesh buffers in the whole scene. Only Mesh objects are included.

u32 sp::scene::SceneGraph::getSceneObjectsCount (  )  const [virtual]

Returns count of objects in the whole scene. Each kind of Node objects are included.

u32 sp::scene::SceneGraph::getSceneTriangleCount (  )  const [virtual]

Returns count of triangles in the whole scene. Only Mesh objects are included.

u32 sp::scene::SceneGraph::getSceneVertexCount (  )  const [virtual]

Returns count of vertices in the whole scene. Only Mesh objects are included.

std::list< Terrain * > sp::scene::SceneGraph::getTerrainList (  )  const [virtual]
bool sp::scene::SceneGraph::hasChildTree (  )  const [inline]
Mesh * sp::scene::SceneGraph::integrateNewMesh ( Mesh NewMesh  )  [protected]
Mesh * sp::scene::SceneGraph::loadMesh ( const io::stringc Filename,
const io::stringc TexturePath = video::TEXPATH_IGNORE,
const EMeshFileFormats  Format = MESHFORMAT_UNKNOWN,
const s32  Flags = 0 
) [virtual]

Loads a 3D model from file. The supported file formats are listed in the "EModelTypes" enumeration and at the "SoftPixel Engine"'s homepage under "features".

Parameters:
[in] Filename Specifies the model filename which is to be loaded.
[in] TexturePath Specifies the directory path where the model's textures are stored. When a texture filename is saved in the model file (e.g. "Texture1.bmp") the "TexturePath" is pushed to the front and loaded. e.g. [TexturePath + "Texture1.bmp"]. By default the path where the model is saved is used.
[in] Format Specifies which file format the model has. By default the format will be determined automatically.
[in] Flags Specifies the loading flags. This can be a combination of the EMeshLoaderFlags enumeration values.
See also:
EMeshLoaderFlags
Mesh * sp::scene::SceneGraph::loadScene ( const io::stringc Filename,
const io::stringc TexturePath = video::TEXPATH_IGNORE,
const ESceneFileFormats  Format = SCENEFORMAT_UNKNOWN,
const s32  Flags = DEF_SCENE_FLAGS 
) [virtual]

Loads a scene (or rather game map).

Parameters:
Filename,: Filename/ path of the scene to be loaded.
TexturePath,: Directory path in which the scene's textures are stored. When loading a BSP1 (Quake 1/ Half-Life 1) map file you can set the WAD (texture storage file) file directly.
FileType,: Specifies which file format the scene has. By default the engine can determine it self.
Flags,: Specifies some possible options. This has been added particular for the SPSB (SoftPixel Sandbox Scene) file format which has been integrated since version 3.1.
Returns:
Pointer to the main Mesh object and 0 (Null) when loading an SPSB file (SoftPixel Sandbox Scene).
Note:
When loading an SPSB file (SoftPixel Sandbox Scene) the return value is always 0 (Null). It is anyway the best idea to write an own class and derive from the SceneLoaderSPSB class to have more access of how the scene will be loaded.
See also:
ESceneLoaderFlags
template<class T >
bool sp::scene::SceneGraph::removeObjectFromList ( SceneNode Object,
std::vector< T * > &  SearchList 
) [inline, protected]
void sp::scene::SceneGraph::removeRootNode ( SceneNode Object  )  [virtual]

Removes a root SceneNode object. This is basically used for child tree scene managers.

Reimplemented in sp::scene::SceneGraphFamilyTree.

void sp::scene::SceneGraph::removeSceneNode ( Camera Object  )  [virtual]
void sp::scene::SceneGraph::removeSceneNode ( RenderNode Object  )  [virtual]
void sp::scene::SceneGraph::removeSceneNode ( SceneNode Object  )  [virtual]

Removes the sepcified node from the scene node list.

Reimplemented in sp::scene::SceneGraphFamilyTree, and sp::scene::SceneGraphSimpleStream.

void sp::scene::SceneGraph::removeSceneNode ( Light Object  )  [virtual]
virtual void sp::scene::SceneGraph::render (  )  [pure virtual]

Renders the whole scene without using a camera object. This is particular used when a scene manager is a child of another one.

Implements sp::scene::RenderNode.

Implemented in sp::scene::SceneGraphFamilyTree, sp::scene::SceneGraphPortalBased, sp::scene::SceneGraphSimple, and sp::scene::SceneGraphSimpleStream.

void sp::scene::SceneGraph::renderLightsDefault ( const dim::matrix4f BaseMatrix,
bool  RenderFixedFunctionOnly = true 
) [protected]

Renders all (but maximal 8) fixed-function light sources. First "arrangeLightList" is called and then the "updateLight" function is called for each light source.

Parameters:
[in] BaseMatrix Specifies the base matrix transformation for the light sources. Use the scene-graphs's transformation matrix.
[in] RenderFixedFunctionOnly Specifies whether the "updateLight" function is only to be called if no global shader-class is set in the render sytsem. By default true.
void sp::scene::SceneGraph::renderScene ( Camera ActiveCamera  )  [virtual]

Renders the whole scene for the specified camera.

Parameters:
ActiveCamera,: Pointer to the camera object which gets the views location, projection etc.
void sp::scene::SceneGraph::renderScene (  )  [virtual]

Renders the whole scene for each camera with their specified viewports.

void sp::scene::SceneGraph::renderScenePlain ( Camera ActiveCamera  )  [virtual]

Renders the whole scene plain. This is used to render shadow maps.

Reimplemented in sp::scene::SceneGraphSimple.

void sp::scene::SceneGraph::renderSceneStereoImage ( Camera ActiveCamera,
f32  CamDegree,
f32  CamDist = 0.25f 
) [virtual]

Renders the scene as a stero image. Use 3D glasses (red and green) to see the effect correctly.

Parameters:
hCamera,: Pointer to the camera object which gets the views location, projection etc.
CamDegree,: Degree or angle between to two points of view. With this parameter you can set the angle to concentrate the two eyes on a special point.
CamDist,: Distance between the two points of view or the two eyes.
bool sp::scene::SceneGraph::saveMesh ( Mesh Model,
const io::stringc Filename,
const EMeshFileFormats  Format = MESHFORMAT_UNKNOWN 
) [virtual]

Saves a model to the disk.

Parameters:
Model,: 3D model which is to be saved.
Filename,: Filename/ path where the file shall be created.
FileType,: Specifies which file format the file shall get. By default the engine can decide it by the filename's extension
void sp::scene::SceneGraph::setActiveCamera ( Camera ActiveCamera  )  [inline]

Sets the current active camera.

Parameters:
ActiveCamera,: Camera which is to be set to the current active one. This is used in all 3D drawing functions such as "draw3DLine", "draw3DTriangle" etc. in the VideoDriver.
void sp::scene::SceneGraph::setActiveMesh ( Mesh ActiveMesh  )  [inline]

Sets the current active mesh.

Parameters:
ActiveMesh,: Mesh which is to be set to the current active one. This is set before a mesh is rendered. Particular used for the default basic shader for the Direct3D11 video driver.
void sp::scene::SceneGraph::setDepthSorting ( bool  Enable  )  [inline]

Enables or disables the sorting for renderable nodes in by their depth distance to the view camera.

Parameters:
[in] Enable Specifies whether depth sorting is to be enabled or disabled. By default true.
Note:
Depth sorting is important for scenes with lots of transparent objects. If you are using a deferred renderer and/or you don't have transparent objects, disable this feature to increase your performance while rendering the scene.
void sp::scene::SceneGraph::setLighting ( bool  isLighting = true  )  [virtual]

Enables or disables the lighting system. By default lighting is disabled. If lighting is disbaled the whole scene is full bright and now shadows (or better no shading) is proceeded.

Parameters:
isLighting,: Specifies if lighting shall be enabled or disabled (true/false)

TODO! -> make this a member variable and not a global state

void sp::scene::SceneGraph::setRenderFace ( const video::EFaceTypes  Face  )  [virtual]
void sp::scene::SceneGraph::setReverseDepthSorting ( bool  Enable  )  [static]

Enables or disables reverse depth sorting used for early-z-culling.

Todo:
This should be redesigned that the client programmer has more options about sorting the scene nodes.
void sp::scene::SceneGraph::setWireframe ( const video::EWireframeTypes  Type  )  [virtual]

Sets the wireframe mode of each "Mesh" and "Terrain" object (Billboards does not have wireframe mode yet).

Parameters:
Type,: Wireframe mode/ type (supported are: Solid, Lines, Points).
void sp::scene::SceneGraph::setWireframe ( const video::EWireframeTypes  TypeFront,
const video::EWireframeTypes  TypeBack 
) [virtual]
void sp::scene::SceneGraph::sortRenderList ( const ERenderListSortMethods  Method,
std::vector< RenderNode * > &  ObjectList 
) [virtual]

Sorts the list of renderable scene nodes.

Parameters:
[in] Method Specifies the sorting method. If 'depth-sorting' is enabled every time the scene graph is rendered this function will be called with the parameter RENDERLIST_SORT_DEPTHDISTANCE.
See also:
ERenderListSortMethods
void sp::scene::SceneGraph::sortRenderList ( const ERenderListSortMethods  Method  )  [virtual]

Friends And Related Function Documentation

friend class MaterialNode [friend]
friend class Mesh [friend]
friend class RenderNode [friend]
friend class SceneNode [friend]

Member Data Documentation

std::vector<Camera*> sp::scene::SceneGraph::CameraList_ [protected]
Todo:
Rename this to "Cameras_".
std::vector<Light*> sp::scene::SceneGraph::LightList_ [protected]
Todo:
Rename this to "LightSources_".
std::vector<SceneNode*> sp::scene::SceneGraph::NodeList_ [protected]
Todo:
Rename this to "SceneNodes_".
Todo:
Rename this to "RenderNodes_".
bool sp::scene::SceneGraph::ReverseDepthSorting_ = false [static, protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines