#include <spSceneGraph.hpp>
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 SceneNode * | createNode () |
virtual Mesh * | createMesh () |
virtual Mesh * | createMesh (const EBasicMeshes Model, const SMeshConstruct &BuildConstruct=SMeshConstruct()) |
virtual Mesh * | createSuperShape (const f32(&ValueList)[12], s32 Detail=DEF_MESH_SEGMENTS) |
virtual Mesh * | createSkyBox (video::Texture *(&TextureList)[6], f32 Radius=50.0f) |
virtual Mesh * | createHeightField (const video::Texture *TexHeightMap, const s32 Segments=DEF_MESH_SEGMENTS) |
virtual Mesh * | createMeshList (std::list< Mesh * > MergeList, bool isOldDelete) |
Creates a mesh out of the specified meshes. | |
virtual Mesh * | createMeshSurface (Mesh *Model, u32 Surface) |
Creates a mesh out of the specified mesh's surface. | |
virtual Mesh * | loadMesh (const io::stringc &Filename, const io::stringc &TexturePath=video::TEXPATH_IGNORE, const EMeshFileFormats Format=MESHFORMAT_UNKNOWN, const s32 Flags=0) |
virtual Mesh * | getMesh (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 Mesh * | loadScene (const io::stringc &Filename, const io::stringc &TexturePath=video::TEXPATH_IGNORE, const ESceneFileFormats Format=SCENEFORMAT_UNKNOWN, const s32 Flags=DEF_SCENE_FLAGS) |
virtual Camera * | createCamera () |
virtual Light * | createLight (const ELightModels Type=LIGHT_DIRECTIONAL) |
virtual Billboard * | createBillboard (video::Texture *BaseTexture=0) |
virtual Terrain * | createTerrain (const video::SHeightMapTexture &TextureHeightMap, const dim::size2di &Resolution, s32 GeoMIPLevels=DEF_GEOMIP_LEVELS) |
virtual SceneNode * | copyNode (const SceneNode *TemplateObject) |
virtual Mesh * | copyNode (const Mesh *TemplateObject) |
virtual Light * | copyNode (const Light *TemplateObject) |
virtual Billboard * | copyNode (const Billboard *TemplateObject) |
virtual Camera * | copyNode (const Camera *TemplateObject) |
virtual Terrain * | copyNode (const Terrain *TemplateObject) |
virtual bool | deleteNode (SceneNode *Object) |
Deletes the specified scene node. | |
virtual std::list< SceneNode * > | findNodes (const io::stringc &Name) const |
virtual SceneNode * | findNode (const io::stringc &Name) const |
virtual std::vector< SceneNode * > | findChildren (const SceneNode *Parent) const |
virtual SceneNode * | findChild (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) |
Camera * | getActiveCamera () const |
void | setActiveMesh (Mesh *ActiveMesh) |
Mesh * | getActiveMesh () 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) | |
Mesh * | integrateNewMesh (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 > | |
SceneNode * | findChildInList (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 > | |
SceneNode * | findNodeInList (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_ |
Camera * | ActiveCamera_ |
Mesh * | ActiveMesh_ |
video::EWireframeTypes | WireframeFront_ |
video::EWireframeTypes | WireframeBack_ |
bool | DepthSorting_ |
Static Protected Attributes | |
static bool | ReverseDepthSorting_ = false |
Friends | |
class | SceneNode |
class | RenderNode |
class | MaterialNode |
class | Mesh |
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.
sp::scene::SceneGraph::~SceneGraph | ( | ) | [virtual] |
sp::scene::SceneGraph::SceneGraph | ( | const ESceneGraphs | Type | ) | [protected] |
void sp::scene::SceneGraph::addChildToList | ( | const Node * | ParentNode, | |
std::vector< SceneNode * > & | NodeList, | |||
const std::vector< T * > & | SearchList | |||
) | const [inline, protected] |
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] |
Reimplemented in sp::scene::SceneGraphFamilyTree, and sp::scene::SceneGraphSimpleStream.
void sp::scene::SceneGraph::addSceneNode | ( | RenderNode * | Object | ) | [virtual] |
Reimplemented in sp::scene::SceneGraphFamilyTree, and sp::scene::SceneGraphSimpleStream.
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] |
Reimplemented in sp::scene::SceneGraphFamilyTree, and sp::scene::SceneGraphSimpleStream.
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.
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.
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.
Billboard * sp::scene::SceneGraph::createBillboard | ( | video::Texture * | BaseTexture = 0 |
) | [virtual] |
Camera * sp::scene::SceneGraph::createCamera | ( | ) | [virtual] |
T* sp::scene::SceneGraph::createCamera | ( | ) | [inline] |
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.
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.
Type,: | Light's type. Supported are three types: Directional (by default), Point, Spot. Point and Spot lights can be volumetric using "Light::setVolumetric". |
Mesh * sp::scene::SceneGraph::createMesh | ( | ) | [virtual] |
Mesh * sp::scene::SceneGraph::createMesh | ( | const EBasicMeshes | Model, | |
const SMeshConstruct & | BuildConstruct = SMeshConstruct() | |||
) | [virtual] |
Creates a standard primitive.
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.
Creates a mesh out of the specified mesh's surface.
SceneNode * sp::scene::SceneGraph::createNode | ( | ) | [virtual] |
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.
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 ;-).
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.
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.
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] |
SceneNode* sp::scene::SceneGraph::findChildInList | ( | const SceneNode * | ParentNode, | |
const std::vector< T * > & | SearchList, | |||
const io::stringc & | Name | |||
) | const [inline, protected] |
SceneNode * sp::scene::SceneGraph::findNode | ( | const io::stringc & | Name | ) | const [virtual] |
Tries to find the specified node.
Name,: | Name of the wanted node. |
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.
Name,: | Name of the wanted nodes. |
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.
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::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".
[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. |
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).
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. |
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] |
Reimplemented in sp::scene::SceneGraphFamilyTree, and sp::scene::SceneGraphSimpleStream.
void sp::scene::SceneGraph::removeSceneNode | ( | RenderNode * | Object | ) | [virtual] |
Reimplemented in sp::scene::SceneGraphFamilyTree, and sp::scene::SceneGraphSimpleStream.
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] |
Reimplemented in sp::scene::SceneGraphFamilyTree, and sp::scene::SceneGraphSimpleStream.
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.
[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.
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.
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.
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.
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.
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.
[in] | Enable | Specifies whether depth sorting is to be enabled or disabled. By default true. |
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.
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.
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).
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.
[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. |
void sp::scene::SceneGraph::sortRenderList | ( | const ERenderListSortMethods | Method | ) | [virtual] |
friend class MaterialNode [friend] |
friend class Mesh [friend] |
friend class RenderNode [friend] |
friend class SceneNode [friend] |
Camera* sp::scene::SceneGraph::ActiveCamera_ [protected] |
Mesh* sp::scene::SceneGraph::ActiveMesh_ [protected] |
std::vector<Camera*> sp::scene::SceneGraph::CameraList_ [protected] |
bool sp::scene::SceneGraph::DepthSorting_ [protected] |
ESceneGraphs sp::scene::SceneGraph::GraphType_ [protected] |
bool sp::scene::SceneGraph::hasChildTree_ [protected] |
std::vector<Light*> sp::scene::SceneGraph::LightList_ [protected] |
std::vector<SceneNode*> sp::scene::SceneGraph::NodeList_ [protected] |
std::vector<RenderNode*> sp::scene::SceneGraph::RenderList_ [protected] |
bool sp::scene::SceneGraph::ReverseDepthSorting_ = false [static, protected] |