// Copyright (C) 2002-2008 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_SCENE_MANAGER_H_INCLUDED__
#define __I_SCENE_MANAGER_H_INCLUDED__
#include "IReferenceCounted.h"
#include "irrArray.h"
#include "vector3d.h"
#include "dimension2d.h"
#include "SColor.h"
#include "ETerrainElements.h"
#include "ESceneNodeTypes.h"
#include "EMeshWriterEnums.h"
#include "SceneParameters.h"
namespace irr
{
struct SKeyMap;
struct SEvent;
namespace io
{
class IReadFile;
class IAttributes;
class IWriteFile;
} // end namespace io
namespace gui
{
class IGUIFont;
class IGUIEnvironment;
} // end namespace gui
namespace video
{
class IVideoDriver;
class SMaterial;
class IImage;
class ITexture;
} // end namespace video
namespace scene
{
class IMeshWriter;
//! Enumeration for render passes.
/** A parameter passed to the registerNodeForRendering() method of the ISceneManager,
specifying when the node wants to be drawn in relation to the other nodes. */
enum E_SCENE_NODE_RENDER_PASS
{
//! Camera pass. The active view is set up here. The very first pass.
ESNRP_CAMERA,
//! In this pass, lights are transformed into camera space and added to the driver
ESNRP_LIGHT,
//! This is used for sky boxes.
ESNRP_SKY_BOX,
//! All normal objects can use this for registering themselves.
/** This value will never be returned by
ISceneManager::getSceneNodeRenderPass(). The scene manager
will determine by itself if an object is transparent or solid
and register the object as SNRT_TRANSPARENT or SNRT_SOLD
automatically if you call registerNodeForRendering with this
value (which is default). Note that it will register the node
only as ONE type. If your scene node has both solid and
transparent material types register it twice (one time as
SNRT_SOLID, the other time as SNRT_TRANSPARENT) and in the
render() method call getSceneNodeRenderPass() to find out the
current render pass and render only the corresponding parts of
the node. */
ESNRP_AUTOMATIC,
//! Solid scene nodes or special scene nodes without materials.
ESNRP_SOLID,
//! Drawn after the transparent nodes, the time for drawing shadow volumes
ESNRP_SHADOW,
//! Transparent scene nodes, drawn after shadow nodes. They are sorted from back to front and drawn in that order.
ESNRP_TRANSPARENT,
//! Never used, value specifing how much parameters there are.
ESNRP_COUNT
};
class IMesh;
class IMeshBuffer;
class IAnimatedMesh;
class IMeshCache;
class ISceneNode;
class ICameraSceneNode;
class IAnimatedMeshSceneNode;
class ISceneNodeAnimator;
class ISceneNodeAnimatorCollisionResponse;
class ILightSceneNode;
class IBillboardSceneNode;
class ITerrainSceneNode;
class IMeshSceneNode;
class IMeshLoader;
class ISceneCollisionManager;
class IParticleSystemSceneNode;
class IDummyTransformationSceneNode;
class ITriangleSelector;
class IMetaTriangleSelector;
class IMeshManipulator;
class ITextSceneNode;
class IBillboardTextSceneNode;
class IVolumeLightSceneNode;
class ISceneNodeFactory;
class ISceneNodeAnimatorFactory;
class ISceneUserDataSerializer;
namespace quake3
{
class SShader;
} // end namespace quake3
//! The Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff.
/** All Scene nodes can be created only here. There is a always growing
list of scene nodes for lots of purposes: Indoor rendering scene nodes
like the Octree (addOctTreeSceneNode()) or the terrain renderer
(addTerrainSceneNode()), different Camera scene nodes
(addCameraSceneNode(), addCameraSceneNodeMaya()), scene nodes for Light
(addLightSceneNode()), Billboards (addBillboardSceneNode()) and so on.
A scene node is a node in the hierachical scene graph. Every scene node
may have children, which are other scene nodes. Children move relative
the their parents position. If the parent of a node is not visible, its
children won't be visible, too. In this way, it is for example easily
possible to attach a light to a moving car or to place a walking
character on a moving platform on a moving ship.
The SceneManager is also able to load 3d mesh files of different
formats. Take a look at getMesh() to find out what formats are
supported. And if these formats are not enough use
addExternalMeshLoader() to add new formats to the engine.
*/
class ISceneManager : public virtual IReferenceCounted
{
public:
//! Destructor
virtual ~ISceneManager() {}
//! Returns pointer to an animateable mesh. Loads the file if not loaded already.
/**
* If you want to remove a loaded mesh from the cache again, use removeMesh().
* Currently there are the following mesh formats supported:
*
*
* Format |
* Description |
*
*
* 3D Studio (.3ds) |
* Loader for 3D-Studio files which lots of 3D packages
* are able to export. Only static meshes are currently
* supported by this importer. |
*
*
* Bliz Basic B3D (.b3d) |
* Loader for blitz basic files, developed by Mark
* Sibly, also supports animations. |
*
*
* Cartography shop 4 (.csm) |
* Cartography Shop is a modeling program for creating
* architecture and calculating lighting. Irrlicht can
* directly import .csm files thanks to the IrrCSM library
* created by Saurav Mohapatra which is now integrated
* directly in Irrlicht. If you are using this loader,
* please note that you'll have to set the path of the
* textures before loading .csm files. You can do this
* using
* SceneManager->getParameters()->setParameter(scene::CSM_TEXTURE_PATH,
* "path/to/your/textures"); |
*
*
* COLLADA (.dae, .xml) |
* COLLADA is an open Digital Asset Exchange Schema for
* the interactive 3D industry. There are exporters and
* importers for this format available for most of the
* big 3d packagesat http://collada.org. Irrlicht can
* import COLLADA files by using the
* ISceneManager::getMesh() method. COLLADA files need
* not contain only one single mesh but multiple meshes
* and a whole scene setup with lights, cameras and mesh
* instances, this loader can set up a scene as
* described by the COLLADA file instead of loading and
* returning one single mesh. By default, this loader
* behaves like the other loaders and does not create
* instances, but it can be switched into this mode by
* using
* SceneManager->getParameters()->setParameter(COLLADA_CREATE_SCENE_INSTANCES, true);
* Created scene nodes will be named as the names of the
* nodes in the COLLADA file. The returned mesh is just
* a dummy object in this mode. Meshes included in the
* scene will be added into the scene manager with the
* following naming scheme:
* path/to/file/file.dea#meshname. The loading of such
* meshes is logged. Currently, this loader is able to
* create meshes (made of only polygons), lights, and
* cameras. Materials and animations are currently not
* supported but this will change with future releases.
* |
*
*
* Delgine DeleD (.dmf) |
* DeleD (delgine.com) is a 3D editor and level-editor
* combined into one and is specifically designed for 3D
* game-development. With this loader, it is possible to
* directly load all geometry is as well as textures and
* lightmaps from .dmf files. To set texture and
* material paths, see scene::DMF_USE_MATERIALS_DIRS and
* scene::DMF_TEXTURE_PATH. It is also possible to flip
* the alpha texture by setting
* scene::DMF_FLIP_ALPHA_TEXTURES to true and to set the
* material transparent reference value by setting
* scene::DMF_ALPHA_CHANNEL_REF to a float between 0 and
* 1. The loader is based on Salvatore Russo's .dmf
* loader, I just changed some parts of it. Thanks to
* Salvatore for his work and for allowing me to use his
* code in Irrlicht and put it under Irrlicht's license.
* For newer and more enchanced versions of the loader,
* take a look at delgine.com. |
*
*
* DirectX (.x) |
* Platform independent importer (so not D3D-only) for
* .x files. Most 3D packages can export these natively
* and there are several tools for them available, e.g.
* the Maya exporter included in the DX SDK.
* .x files can include skeletal animations and Irrlicht
* is able to play and display them. Currently, Irrlicht
* only supports uncompressed .x files. |
*
*
* Maya (.obj) |
* Most 3D software can create .obj files which contain
* static geometry without material data. The material
* files .mtl are also supported. This importer for
* Irrlicht can load them directly. |
*
*
* Milkshape (.ms3d) |
* .MS3D files contain models and sometimes skeletal
* animations from the Milkshape 3D modeling and animation
* software. This importer for Irrlicht can display and/or
* animate these files. |
*
*
* My3D (.my3d) |
* .my3D is a flexible 3D file format. The My3DTools
* contains plug-ins to export .my3D files from several
* 3D packages. With this built-in importer, Irrlicht
* can read and display those files directly. This
* loader was written by Zhuck Dimitry who also created
* the whole My3DTools package. If you are using this
* loader, please note that you can set the path of the
* textures before loading .my3d files. You can do this
* using
* SceneManager->getParameters()->setParameter(scene::MY3D_TEXTURE_PATH,
* "path/to/your/textures"); |
*
*
* OCT (.oct) |
* The oct file format contains 3D geometry and
* lightmaps and can be loaded directly by Irrlicht. OCT
* files can be created by FSRad, Paul Nette's
* radiosity processor or exported from Blender using
* OCTTools which can be found in the exporters/OCTTools
* directory of the SDK. Thanks to Murphy McCauley for
* creating all this. |
*
*
* OGRE Meshes (.mesh) |
* Ogre .mesh files contain 3D data for the OGRE 3D
* engine. Irrlicht can read and display them directly
* with this importer. To define materials for the mesh,
* copy a .material file named like the corresponding
* .mesh file where the .mesh file is. (For example
* ogrehead.material for ogrehead.mesh). Thanks to
* Christian Stehno who wrote and contributed this
* loader. |
*
*
* Pulsar LMTools (.lmts) |
* LMTools is a set of tools (Windows & Linux) for
* creating lightmaps. Irrlicht can directly read .lmts
* files thanks to the importer created by Jonas
* Petersen. If you are using this loader, please note
* that you can set the path of the textures before
* loading .lmts files. You can do this using
* SceneManager->getParameters()->setParameter(scene::LMTS_TEXTURE_PATH,
* "path/to/your/textures");
* Notes for this version of the loader:
* - It does not recognise/support user data in the
* *.lmts files.
* - The TGAs generated by LMTools don't work in
* Irrlicht for some reason (the textures are upside
* down). Opening and resaving them in a graphics app
* will solve the problem. |
*
*
* Quake 3 levels (.bsp) |
* Quake 3 is a popular game by IDSoftware, and .pk3
* files contain .bsp files and textures/lightmaps
* describing huge prelighted levels. Irrlicht can read
* .pk3 and .bsp files directly and thus render Quake 3
* levels directly. Written by Nikolaus Gebhardt
* enhanced by Dean P. Macri with the curved surfaces
* feature. |
*
*
* Quake 2 models (.md2) |
* Quake 2 models are characters with morph target
* animation. Irrlicht can read, display and animate
* them directly with this importer. |
*
*
*
* To load and display a mesh quickly, just do this:
* \code
* SceneManager->addAnimatedMeshSceneNode(
* SceneManager->getMesh("yourmesh.3ds"));
* \endcode
* If you would like to implement and add your own file format loader to Irrlicht,
* see addExternalMeshLoader().
* \param filename: Filename of the mesh to load.
* \return Returns NULL if failed and the pointer to the mesh if
* successful.
* This pointer should not be dropped. See IReferenceCounted::drop() for more information.
**/
virtual IAnimatedMesh* getMesh(const c8* filename) = 0;
//! Returns pointer to an animateable mesh. Loads the file if not loaded already.
/** Works just as getMesh(const char* filename). If you want to
remove a loaded mesh from the cache again, use removeMesh().
\param file File handle of the mesh to load.
\return 0 if failed and pointer to the mesh if successful.
This pointer should not be dropped. See
IReferenceCounted::drop() for more information. */
virtual IAnimatedMesh* getMesh(io::IReadFile* file) = 0;
//! Returns an interface to the mesh cache which is shared beween all existing scene managers.
/** With this interface, it is possible to manually add new loaded
meshes (if ISceneManager::getMesh() is not sufficient), to remove them and to iterate
through already loaded meshes. */
virtual IMeshCache* getMeshCache() = 0;
//! Returns the video driver.
/** \return Returns pointer to the video Driver.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual video::IVideoDriver* getVideoDriver() = 0;
//! Returns the active GUIEnvironment
/** \return Returns pointer to the GUIEnvironment
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual gui::IGUIEnvironment* getGUIEnvironment() = 0;
//! adds Volume Lighting Scene Node.
//! the returned pointer must not be dropped.
/** Example Usage:
scene::IVolumeLightSceneNode * n = smgr->addVolumeLightSceneNode(NULL, -1,
32, 32, //Subdivide U/V
video::SColor(0, 180, 180, 180), //foot color
video::SColor(0, 0, 0, 0) //tail color
);
if (n)
{
n->setScale(core::vector3df(46.0f, 45.0f, 46.0f));
n->getMaterial(0).setTexture(0, smgr->getVideoDriver()->getTexture("lightFalloff.png"));
}
**/
virtual IVolumeLightSceneNode* addVolumeLightSceneNode(ISceneNode* parent=0, s32 id=-1,
const u32 subdivU = 32, const u32 subdivV = 32,
const video::SColor foot = video::SColor(51, 0, 230, 180),
const video::SColor tail = video::SColor(0, 0, 0, 0),
const core::vector3df& position = core::vector3df(0,0,0),
const core::vector3df& rotation = core::vector3df(0,0,0),
const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
//! Adds a test scene node for test purposes to the scene.
/** It is a simple cube of (1,1,1) size.
\param size: Size of the cube.
\param parent: Parent of the scene node. Can be NULL if no parent.
\param id: Id of the node. This id can be used to identify the scene node.
\param position: Position of the space relative to its parent where the
scene node will be placed.
\param rotation: Initital rotation of the scene node.
\param scale: Initial scale of the scene node.
\return Returns pointer to the created test scene node. This
pointer should not be dropped. See IReferenceCounted::drop()
for more information. */
virtual IMeshSceneNode* addCubeSceneNode(f32 size=10.0f, ISceneNode* parent=0, s32 id=-1,
const core::vector3df& position = core::vector3df(0,0,0),
const core::vector3df& rotation = core::vector3df(0,0,0),
const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
//! Adds a sphere scene node for test purposes to the scene.
/** It is a simple sphere.
\param radius: Radius of the sphere.
\param polyCount: Polycount of the sphere.
\param parent: Parent of the scene node. Can be NULL if no parent.
\param id: Id of the node. This id can be used to identify the scene node.
\param position: Position of the space relative to its parent where the
scene node will be placed.
\param rotation: Initital rotation of the scene node.
\param scale: Initial scale of the scene node.
\return Returns pointer to the created test scene node. This
pointer should not be dropped. See IReferenceCounted::drop()
for more information. */
virtual IMeshSceneNode* addSphereSceneNode(f32 radius=5.0f, s32 polyCount=16,
ISceneNode* parent=0, s32 id=-1,
const core::vector3df& position = core::vector3df(0,0,0),
const core::vector3df& rotation = core::vector3df(0,0,0),
const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
//! Adds a scene node for rendering an animated mesh model.
/** \param mesh: Pointer to the loaded animated mesh to be displayed.
\param parent: Parent of the scene node. Can be NULL if no parent.
\param id: Id of the node. This id can be used to identify the scene node.
\param position: Position of the space relative to its parent where the
scene node will be placed.
\param rotation: Initital rotation of the scene node.
\param scale: Initial scale of the scene node.
\param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed.
\return Returns pointer to the created scene node.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual IAnimatedMeshSceneNode* addAnimatedMeshSceneNode(IAnimatedMesh* mesh,
ISceneNode* parent=0, s32 id=-1,
const core::vector3df& position = core::vector3df(0,0,0),
const core::vector3df& rotation = core::vector3df(0,0,0),
const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f),
bool alsoAddIfMeshPointerZero=false) = 0;
//! Adds a scene node for rendering a static mesh.
/** \param mesh: Pointer to the loaded static mesh to be displayed.
\param parent: Parent of the scene node. Can be NULL if no parent.
\param id: Id of the node. This id can be used to identify the scene node.
\param position: Position of the space relative to its parent where the
scene node will be placed.
\param rotation: Initital rotation of the scene node.
\param scale: Initial scale of the scene node.
\param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed.
\return Returns pointer to the created scene node.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual IMeshSceneNode* addMeshSceneNode(IMesh* mesh, ISceneNode* parent=0, s32 id=-1,
const core::vector3df& position = core::vector3df(0,0,0),
const core::vector3df& rotation = core::vector3df(0,0,0),
const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f),
bool alsoAddIfMeshPointerZero=false) = 0;
//! Adds a scene node for rendering a animated water surface mesh.
/** Looks really good when the Material type EMT_TRANSPARENT_REFLECTION
is used.
\param waveHeight: Height of the water waves.
\param waveSpeed: Speed of the water waves.
\param waveLength: Lenght of a water wave.
\param mesh: Pointer to the loaded static mesh to be displayed with water waves on it.
\param parent: Parent of the scene node. Can be NULL if no parent.
\param id: Id of the node. This id can be used to identify the scene node.
\param position: Position of the space relative to its parent where the
scene node will be placed.
\param rotation: Initital rotation of the scene node.
\param scale: Initial scale of the scene node.
\return Pointer to the created scene node.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual ISceneNode* addWaterSurfaceSceneNode(IMesh* mesh,
f32 waveHeight=2.0f, f32 waveSpeed=300.0f, f32 waveLength=10.0f,
ISceneNode* parent=0, s32 id=-1,
const core::vector3df& position = core::vector3df(0,0,0),
const core::vector3df& rotation = core::vector3df(0,0,0),
const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
//! Adds a scene node for rendering using a octtree to the scene graph.
/** This a good method for rendering
scenes with lots of geometry. The Octree is built on the fly from the mesh.
\param mesh: The mesh containing all geometry from which the octtree will be build.
If this animated mesh has more than one frames in it, the first frame is taken.
\param parent: Parent node of the octtree node.
\param id: id of the node. This id can be used to identify the node.
\param minimalPolysPerNode: Specifies the minimal polygons contained a octree node.
If a node gets less polys than this value it will not be split into
smaller nodes.
\param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed.
\return Pointer to the OctTree if successful, otherwise 0.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual ISceneNode* addOctTreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0,
s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) = 0;
//! Adds a scene node for rendering using a octtree to the scene graph.
/** This a good method for rendering scenes with lots of
geometry. The Octree is built on the fly from the mesh, much
faster then a bsp tree.
\param mesh: The mesh containing all geometry from which the octtree will be build.
\param parent: Parent node of the octtree node.
\param id: id of the node. This id can be used to identify the node.
\param minimalPolysPerNode: Specifies the minimal polygons contained a octree node.
If a node gets less polys than this value it will not be split into
smaller nodes.
\param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed.
\return Pointer to the octtree if successful, otherwise 0.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual ISceneNode* addOctTreeSceneNode(IMesh* mesh, ISceneNode* parent=0,
s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) = 0;
//! Adds a camera scene node to the scene graph and sets it as active camera.
/** This camera does not react on user input like for example the one created with
addCameraSceneNodeFPS(). If you want to move or animate it, use animators or the
ISceneNode::setPosition(), ICameraSceneNode::setTarget() etc methods.
\param position: Position of the space relative to its parent where the camera will be placed.
\param lookat: Position where the camera will look at. Also known as target.
\param parent: Parent scene node of the camera. Can be null. If the parent moves,
the camera will move too.
\param id: id of the camera. This id can be used to identify the camera.
\return Returns pointer to interface to camera if successful, otherwise 0.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual ICameraSceneNode* addCameraSceneNode(ISceneNode* parent = 0,
const core::vector3df& position = core::vector3df(0,0,0),
const core::vector3df& lookat = core::vector3df(0,0,100), s32 id=-1) = 0;
//! Adds a maya style user controlled camera scene node to the scene graph.
/** This is a standard camera with an animator that provides
mouse control similar to camera in the 3D Software Maya.
\param parent: Parent scene node of the camera. Can be null.
\param rotateSpeed: Rotation speed of the camera.
\param zoomSpeed: Zoom speed of the camera.
\param translationSpeed: Translation speed of the camera.
\param id: id of the camera. This id can be used to identify the camera.
\return Pointer to the interface of the camera if successful, otherwise 0.
This pointer should not be dropped. See
IReferenceCounted::drop() for more information. */
virtual ICameraSceneNode* addCameraSceneNodeMaya(ISceneNode* parent = 0,
f32 rotateSpeed = -1500.0f, f32 zoomSpeed = 200.0f,
f32 translationSpeed = 1500.0f, s32 id=-1) = 0;
//! Adds a camera scene node with an animator which provides mouse and keyboard control appropriate for first person shooters (FPS).
/** This FPS camera is intended to provide a demonstration of a
camera that behaves like a typical First Person Shooter. It is
useful for simple demos and prototyping but is not intended to
provide a full solution for a production quality game. It binds
the camera scene node rotation to the look-at target; @see
ICameraSceneNode::bindTargetAndRotation(). With this camera,
you look with the mouse, and move with cursor keys. If you want
to change the key layout, you can specify your own keymap. For
example to make the camera be controlled by the cursor keys AND
the keys W,A,S, and D, do something like this:
\code
SKeyMap keyMap[8];
keyMap[0].Action = EKA_MOVE_FORWARD;
keyMap[0].KeyCode = KEY_UP;
keyMap[1].Action = EKA_MOVE_FORWARD;
keyMap[1].KeyCode = KEY_KEY_W;
keyMap[2].Action = EKA_MOVE_BACKWARD;
keyMap[2].KeyCode = KEY_DOWN;
keyMap[3].Action = EKA_MOVE_BACKWARD;
keyMap[3].KeyCode = KEY_KEY_S;
keyMap[4].Action = EKA_STRAFE_LEFT;
keyMap[4].KeyCode = KEY_LEFT;
keyMap[5].Action = EKA_STRAFE_LEFT;
keyMap[5].KeyCode = KEY_KEY_A;
keyMap[6].Action = EKA_STRAFE_RIGHT;
keyMap[6].KeyCode = KEY_RIGHT;
keyMap[7].Action = EKA_STRAFE_RIGHT;
keyMap[7].KeyCode = KEY_KEY_D;
camera = sceneManager->addCameraSceneNodeFPS(0, 100, 500, -1, keyMap, 8);
\endcode
\param parent: Parent scene node of the camera. Can be null.
\param rotateSpeed: Speed in degress with which the camera is
rotated. This can be done only with the mouse.
\param moveSpeed: Speed in units per millisecond with which
the camera is moved. Movement is done with the cursor keys.
\param id: id of the camera. This id can be used to identify the camera.
\param keyMapArray: Optional pointer to an array of a keymap, specifying what
keys should be used to move the camera. If this is null, the default keymap
is used. You can define actions more then one time in the array, to bind
multiple keys to the same action.
\param keyMapSize: Amount of items in the keymap array.
\param noVerticalMovement: Setting this to true makes the
camera only move within a horizontal plane, and disables
vertical movement as known from most ego shooters. Default is
'false', with which it is possible to fly around in space, if
no gravity is there.
\param jumpSpeed: Speed with which the camera is moved when jumping.
\return Pointer to the interface of the camera if successful, otherwise 0.
This pointer should not be dropped. See
IReferenceCounted::drop() for more information. */
virtual ICameraSceneNode* addCameraSceneNodeFPS(ISceneNode* parent = 0,
f32 rotateSpeed = 100.0f, f32 moveSpeed = .5f, s32 id=-1,
SKeyMap* keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false,
f32 jumpSpeed = 0.f) = 0;
//! Adds a dynamic light scene node to the scene graph.
/** The light will cast dynamic light on all
other scene nodes in the scene, which have the material flag video::MTF_LIGHTING
turned on. (This is the default setting in most scene nodes).
\param parent: Parent scene node of the light. Can be null. If the parent moves,
the light will move too.
\param position: Position of the space relative to its parent where the light will be placed.
\param color: Diffuse color of the light. Ambient or Specular colors can be set manually with
the ILightSceneNode::getLightData() method.
\param radius: Radius of the light.
\param id: id of the node. This id can be used to identify the node.
\return Returns pointer to the interface of the light if successful, otherwise NULL.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual ILightSceneNode* addLightSceneNode(ISceneNode* parent = 0,
const core::vector3df& position = core::vector3df(0,0,0),
video::SColorf color = video::SColorf(1.0f, 1.0f, 1.0f),
f32 radius=100.0f, s32 id=-1) = 0;
//! Adds a billboard scene node to the scene graph.
/** A billboard is like a 3d sprite: A 2d element,
which always looks to the camera. It is usually used for things like explosions, fire,
lensflares and things like that.
\param parent: Parent scene node of the billboard. Can be null. If the parent moves,
the billboard will move too.
\param position: Position of the space relative to its parent
where the billboard will be placed.
\param size: Size of the billboard. This size is 2 dimensional because a billboard only has
width and height.
\param id: An id of the node. This id can be used to identify the node.
\param colorTop: The color of the vertices at the top of the billboard (default: white).
\param colorBottom: The color of the vertices at the bottom of the billboard (default: white).
\return Returns pointer to the billboard if successful, otherwise NULL.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual IBillboardSceneNode* addBillboardSceneNode(ISceneNode* parent = 0,
const core::dimension2d