Skylicht Engine
Loading...
Searching...
No Matches
ISceneManager.h
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __I_SCENE_MANAGER_H_INCLUDED__
6#define __I_SCENE_MANAGER_H_INCLUDED__
7
8#include "IReferenceCounted.h"
9#include "irrArray.h"
10#include "irrString.h"
11#include "path.h"
12#include "vector3d.h"
13#include "dimension2d.h"
14#include "SColor.h"
15#include "ESceneNodeTypes.h"
16#include "ESceneNodeAnimatorTypes.h"
17#include "SceneParameters.h"
18#include "IGeometryCreator.h"
19#include "IMeshManipulator.h"
20#include "CMeshBuffer.h"
21
22namespace irr
23{
24 struct SKeyMap;
25 struct SEvent;
26
27namespace io
28{
29 class IReadFile;
30 class IAttributes;
31 class IWriteFile;
32 class IFileSystem;
33} // end namespace io
34
35namespace gui
36{
37 class IGUIFont;
38 class IGUIEnvironment;
39} // end namespace gui
40
41namespace video
42{
43 class IVideoDriver;
44 class SMaterial;
45 class IImage;
46 class ITexture;
47} // end namespace video
48
49namespace scene
50{
52
98
99 class ICameraSceneNode;
100 class ILightSceneNode;
101 class IMesh;
102 class IMeshBuffer;
103 class IMeshSceneNode;
104 class IMetaTriangleSelector;
105 class IParticleSystemSceneNode;
106 class ISceneCollisionManager;
107 class ISceneNode;
108 class ISceneNodeAnimator;
109 class ISceneNodeAnimatorCollisionResponse;
110 class ISceneNodeAnimatorFactory;
111 class ISceneNodeFactory;
112 class ISceneUserDataSerializer;
113
114 class ITriangleSelector;
115
117
134 class ISceneManager : public virtual IReferenceCounted
135 {
136 public:
137
139
142
144
146 virtual gui::IGUIEnvironment* getGUIEnvironment() = 0;
147
149
152
154
171 const core::vector3df& position = core::vector3df(0,0,0),
172 const core::vector3df& lookat = core::vector3df(0,0,100),
173 s32 id=-1, bool makeActive=true) = 0;
174
176
180 virtual ISceneNode* addEmptySceneNode(ISceneNode* parent=0, s32 id=-1) = 0;
181
183
190
192
199 virtual ISceneNode* getSceneNodeFromId(s32 id, ISceneNode* start=0) = 0;
200
202
209 virtual ISceneNode* getSceneNodeFromName(const c8* name, ISceneNode* start=0) = 0;
210
212
220
222
229 ISceneNode* start=0) = 0;
230
232
236
238
240 virtual void setActiveCamera(ICameraSceneNode* camera) = 0;
241
243 virtual void setShadowColor(video::SColor color = video::SColor(150,0,0,0)) = 0;
244
246 virtual video::SColor getShadowColor() const = 0;
247
249
259
261
265 virtual void drawAll() = 0;
266
267 virtual void update() = 0;
268 virtual void draw() = 0;
269 virtual void draw(E_SCENE_NODE_RENDER_PASS renderPass) = 0;
270
272
291
292
294
303
305
328 ISceneNode* node, s32 minimalPolysPerNode=32) = 0;
329
331
333 ISceneNode* node, s32 minimalPolysPerNode=32)
334 {
335 return createOctreeTriangleSelector(mesh, node, minimalPolysPerNode);
336 }
337
339
347
349
352
355
357
365 virtual void addToDeletionQueue(ISceneNode* node) = 0;
366
368
370 virtual bool postEventFromUser(const SEvent& event) = 0;
371
373
374 virtual void clear() = 0;
375
377
383
385
392
394
412 virtual ISceneManager* createNewSceneManager(bool cloneContent=false) = 0;
413
415 virtual void setAmbientLight(const video::SColorf &ambientColor) = 0;
416
418 virtual const video::SColorf& getAmbientLight() const = 0;
419
421
423 virtual const IGeometryCreator* getGeometryCreator(void) const = 0;
424
426
434 virtual bool isCulled(const ISceneNode* node) const =0;
435
436 };
437
438
439} // end namespace scene
440} // end namespace irr
441
442#endif
Header file containing all scene parameters for modifying mesh loading etc.
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:50
Self reallocating template array (like stl vector) with additional features.
Definition irrArray.h:23
Provides a generic interface for attributes and their values and the possiblity to serialize them.
Definition IAttributes.h:42
The FileSystem manages files and archives and provides access to them.
Definition IFileSystem.h:33
Interface providing read acess to a file.
Definition IReadFile.h:18
Interface providing write access to a file.
Definition IWriteFile.h:18
Scene Node which is a (controlable) camera.
Definition ICameraSceneNode.h:24
Helper class for creating geometry on the fly.
Definition IGeometryCreator.h:26
Class which holds the geometry of an object.
Definition IMesh.h:24
An interface for easy manipulation of meshes.
Definition IMeshManipulator.h:26
Interface for making multiple triangle selectors work as one big selector.
Definition IMetaTriangleSelector.h:21
The Scene Collision Manager provides methods for performing collision tests and picking on scene node...
Definition ISceneCollisionManager.h:25
The Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff.
Definition ISceneManager.h:135
virtual ITriangleSelector * createTriangleSelector(IMesh *mesh, ISceneNode *node)=0
Creates a simple ITriangleSelector, based on a mesh.
virtual void drawAll()=0
Draws all the scene nodes.
virtual void setShadowColor(video::SColor color=video::SColor(150, 0, 0, 0))=0
Sets the color of stencil buffers shadows drawn by the scene manager.
_IRR_DEPRECATED_ ITriangleSelector * createOctTreeTriangleSelector(IMesh *mesh, ISceneNode *node, s32 minimalPolysPerNode=32)
//! Creates a Triangle Selector, optimized by an octree.
Definition ISceneManager.h:332
virtual void addToDeletionQueue(ISceneNode *node)=0
Adds a scene node to the deletion queue.
virtual ISceneNode * getSceneNodeFromName(const c8 *name, ISceneNode *start=0)=0
Get the first scene node with the specified name.
virtual E_SCENE_NODE_RENDER_PASS getSceneNodeRenderPass() const =0
Get current render pass.
virtual ISceneCollisionManager * getSceneCollisionManager()=0
Get pointer to the scene collision manager.
virtual ISceneNode * getSceneNodeFromId(s32 id, ISceneNode *start=0)=0
Get the first scene node with the specified id.
virtual ITriangleSelector * createTriangleSelectorFromBoundingBox(ISceneNode *node)=0
Creates a simple dynamic ITriangleSelector, based on a axis aligned bounding box.
virtual ICameraSceneNode * getActiveCamera() const =0
Get the current active camera.
virtual video::IVideoDriver * getVideoDriver()=0
Get the video driver.
virtual void setActiveCamera(ICameraSceneNode *camera)=0
Sets the currently active camera.
virtual ISceneNode * getSceneNodeFromType(scene::ESCENE_NODE_TYPE type, ISceneNode *start=0)=0
Get the first scene node with the specified type.
virtual ISceneNode * getRootSceneNode()=0
Gets the root scene node.
virtual IMetaTriangleSelector * createMetaTriangleSelector()=0
Creates a meta triangle selector.
virtual ITriangleSelector * createOctreeTriangleSelector(IMesh *mesh, ISceneNode *node, s32 minimalPolysPerNode=32)=0
Creates a Triangle Selector, optimized by an octree.
virtual void setAmbientLight(const video::SColorf &ambientColor)=0
Sets ambient color of the scene.
virtual io::IFileSystem * getFileSystem()=0
Get the active FileSystem.
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, bool makeActive=true)=0
Adds a camera scene node to the scene graph and sets it as active camera.
virtual ISceneNode * addEmptySceneNode(ISceneNode *parent=0, s32 id=-1)=0
Adds an empty scene node to the scene graph.
virtual void getSceneNodesFromType(ESCENE_NODE_TYPE type, core::array< scene::ISceneNode * > &outNodes, ISceneNode *start=0)=0
Get scene nodes by type.
virtual ISceneManager * createNewSceneManager(bool cloneContent=false)=0
Creates a new scene manager.
virtual io::IAttributes * getParameters()=0
Get interface to the parameters set in this scene.
virtual u32 registerNodeForRendering(ISceneNode *node, E_SCENE_NODE_RENDER_PASS pass=ESNRP_AUTOMATIC)=0
Registers a node for rendering it at a specific time.
virtual IMeshManipulator * getMeshManipulator()=0
Returns a pointer to the mesh manipulator.
virtual void clear()=0
Clears the whole scene.
virtual gui::IGUIEnvironment * getGUIEnvironment()=0
Get the active GUIEnvironment.
virtual video::SColor getShadowColor() const =0
Get the current color of shadows.
virtual bool postEventFromUser(const SEvent &event)=0
Posts an input event to the environment.
virtual const IGeometryCreator * getGeometryCreator(void) const =0
Get an instance of a geometry creator.
virtual const video::SColorf & getAmbientLight() const =0
Get ambient color of the scene.
virtual bool isCulled(const ISceneNode *node) const =0
Check if node is culled in current view frustum.
Scene node interface.
Definition ISceneNode.h:41
Interface to return triangles with specific properties.
Definition ITriangleSelector.h:29
Interface for software image data.
Definition IImage.h:23
Interface of a Video Driver dependent Texture.
Definition ITexture.h:119
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition IVideoDriver.h:388
Class representing a 32 bit ARGB color.
Definition SColor.h:285
Class representing a color with four floats.
Definition SColor.h:542
Struct for holding parameters for a material renderer.
Definition SMaterial.h:255
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
The gui namespace contains useful classes for easy creation of a graphical user interface.
Definition ICursorControl.h:15
This namespace provides interfaces for input/output: Reading and writing files, accessing zip archive...
Definition EAttributes.h:11
All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees a...
Definition CIndexBuffer.h:13
E_SCENE_NODE_RENDER_PASS
Enumeration for render passes.
Definition ISceneManager.h:55
@ ESNRP_LIGHT
In this pass, lights are transformed into camera space and added to the driver.
Definition ISceneManager.h:63
@ ESNRP_NONE
No pass currently active.
Definition ISceneManager.h:57
@ ESNRP_CAMERA
Camera pass. The active view is set up here. The very first pass.
Definition ISceneManager.h:60
@ ESNRP_TRANSPARENT_EFFECT
Transparent effect scene nodes, drawn after Transparent nodes. They are sorted from back to front and...
Definition ISceneManager.h:90
@ ESNRP_CUBE_REFLECT
Skylicht engine cube reflect.
Definition ISceneManager.h:96
@ ESNRP_AUTOMATIC
All normal objects can use this for registering themselves.
Definition ISceneManager.h:81
@ ESNRP_SKY_BOX
This is used for sky boxes.
Definition ISceneManager.h:66
@ ESNRP_SOLID
Solid scene nodes or special scene nodes without materials.
Definition ISceneManager.h:84
@ ESNRP_TRANSPARENT
Transparent scene nodes, drawn after solid nodes. They are sorted from back to front and drawn in tha...
Definition ISceneManager.h:87
@ ESNRP_SHADOW
Drawn after the solid nodes, before the transparent nodes, the time for drawing shadow volumes.
Definition ISceneManager.h:93
ESCENE_NODE_TYPE
An enumeration for all types of built-in scene nodes.
Definition ESceneNodeTypes.h:20
The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done ...
Definition EDriverFeatures.h:11
Everything in the Irrlicht Engine can be found in this namespace.
Definition Skylicht.h:33
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
char c8
8 bit character variable.
Definition irrTypes.h:31
signed int s32
32 bit signed variable.
Definition irrTypes.h:66
SEvents hold information about an event. See irr::IEventReceiver for details on event handling.
Definition IEventReceiver.h:273
Struct storing which key belongs to which action.
Definition SKeyMap.h:30