arsa  2.7
ISceneManager.h
Go to the documentation of this file.
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 "ETerrainElements.h"
16 #include "ESceneNodeTypes.h"
18 #include "EMeshWriterEnums.h"
19 #include "SceneParameters.h"
20 #include "IGeometryCreator.h"
21 #include "ISkinnedMesh.h"
22 #include "IXMLWriter.h"
23 
24 namespace irr
25 {
26  struct SKeyMap;
27  struct SEvent;
28 
29 namespace io
30 {
31  class IReadFile;
32  class IAttributes;
33  class IWriteFile;
34  class IFileSystem;
35 } // end namespace io
36 
37 namespace gui
38 {
39  class IGUIFont;
40  class IGUIEnvironment;
41 } // end namespace gui
42 
43 namespace video
44 {
45  class IVideoDriver;
46  class SMaterial;
47  class IImage;
48  class ITexture;
49 } // end namespace video
50 
51 namespace scene
52 {
54 
57  {
60 
63 
66 
69 
71 
84 
87 
90 
93 
96  };
97 
98  class IAnimatedMesh;
99  class IAnimatedMeshSceneNode;
100  class IBillboardSceneNode;
101  class IBillboardTextSceneNode;
102  class ICameraSceneNode;
103  class IDummyTransformationSceneNode;
104  class ILightManager;
105  class ILightSceneNode;
106  class IMesh;
107  class IMeshBuffer;
108  class IMeshCache;
109  class IMeshLoader;
110  class IMeshManipulator;
111  class IMeshSceneNode;
112  class IMeshWriter;
113  class IMetaTriangleSelector;
114  class IOctreeSceneNode;
115  class IParticleSystemSceneNode;
116  class ISceneCollisionManager;
117  class ISceneLoader;
118  class ISceneNode;
119  class ISceneNodeAnimator;
120  class ISceneNodeAnimatorCollisionResponse;
121  class ISceneNodeAnimatorFactory;
122  class ISceneNodeFactory;
123  class ISceneUserDataSerializer;
124  class IShadowVolumeSceneNode;
125  class ITerrainSceneNode;
126  class ITextSceneNode;
127  class ITriangleSelector;
128  class IVolumeLightSceneNode;
129 
130  namespace quake3
131  {
132  struct IShader;
133  } // end namespace quake3
134 
136 
153  class ISceneManager : public virtual IReferenceCounted
154  {
155  public:
156 
158 
388  virtual IAnimatedMesh* getMesh(const io::path& filename, const io::path& alternativeCacheName=io::path("")) = 0;
389 
391 
397  virtual IAnimatedMesh* getMesh(io::IReadFile* file) = 0;
398 
400 
403  virtual IMeshCache* getMeshCache() = 0;
404 
406 
408  virtual video::IVideoDriver* getVideoDriver() = 0;
409 
411 
414 
416 
418  virtual io::IFileSystem* getFileSystem() = 0;
419 
421 
435  const u32 subdivU = 32, const u32 subdivV = 32,
436  const video::SColor foot = video::SColor(51, 0, 230, 180),
437  const video::SColor tail = video::SColor(0, 0, 0, 0),
438  const core::vector3df& position = core::vector3df(0,0,0),
439  const core::vector3df& rotation = core::vector3df(0,0,0),
440  const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
441 
443 
453  virtual IMeshSceneNode* addCubeSceneNode(f32 size=10.0f, ISceneNode* parent=0, s32 id=-1,
454  const core::vector3df& position = core::vector3df(0,0,0),
455  const core::vector3df& rotation = core::vector3df(0,0,0),
456  const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
457 
459 
473  virtual IMeshSceneNode* addSphereSceneNode(f32 radius=5.0f, s32 polyCount=16,
474  ISceneNode* parent=0, s32 id=-1,
475  const core::vector3df& position = core::vector3df(0,0,0),
476  const core::vector3df& rotation = core::vector3df(0,0,0),
477  const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
478 
480 
491  ISceneNode* parent=0, s32 id=-1,
492  const core::vector3df& position = core::vector3df(0,0,0),
493  const core::vector3df& rotation = core::vector3df(0,0,0),
494  const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f),
495  bool alsoAddIfMeshPointerZero=false) = 0;
496 
498 
508  virtual IMeshSceneNode* addMeshSceneNode(IMesh* mesh, ISceneNode* parent=0, s32 id=-1,
509  const core::vector3df& position = core::vector3df(0,0,0),
510  const core::vector3df& rotation = core::vector3df(0,0,0),
511  const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f),
512  bool alsoAddIfMeshPointerZero=false) = 0;
513 
515 
530  f32 waveHeight=2.0f, f32 waveSpeed=300.0f, f32 waveLength=10.0f,
531  ISceneNode* parent=0, s32 id=-1,
532  const core::vector3df& position = core::vector3df(0,0,0),
533  const core::vector3df& rotation = core::vector3df(0,0,0),
534  const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
535 
536 
538 
551  s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) = 0;
552 
554 
566  virtual IOctreeSceneNode* addOctreeSceneNode(IMesh* mesh, ISceneNode* parent=0,
567  s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) = 0;
568 
570 
586  virtual ICameraSceneNode* addCameraSceneNode(ISceneNode* parent = 0,
587  const core::vector3df& position = core::vector3df(0,0,0),
588  const core::vector3df& lookat = core::vector3df(0,0,100),
589  s32 id=-1, bool makeActive=true) = 0;
590 
592 
609  f32 rotateSpeed=-1500.f, f32 zoomSpeed=200.f,
610  f32 translationSpeed=1500.f, s32 id=-1, f32 distance=70.f,
611  bool makeActive=true) =0;
612 
614 
678  f32 rotateSpeed = 100.0f, f32 moveSpeed = 0.5f, s32 id=-1,
679  SKeyMap* keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false,
680  f32 jumpSpeed = 0.f, bool invertMouse=false,
681  bool makeActive=true) = 0;
682 
684 
696  virtual ILightSceneNode* addLightSceneNode(ISceneNode* parent = 0,
697  const core::vector3df& position = core::vector3df(0,0,0),
698  video::SColorf color = video::SColorf(1.0f, 1.0f, 1.0f),
699  f32 radius=100.0f, s32 id=-1) = 0;
700 
702 
722  const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1,
723  video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0;
724 
726 
742  video::ITexture* back, ISceneNode* parent = 0, s32 id=-1) = 0;
743 
745 
763  u32 horiRes=16, u32 vertRes=8,
764  f32 texturePercentage=0.9, f32 spherePercentage=2.0,f32 radius = 1000.f,
765  ISceneNode* parent=0, s32 id=-1) = 0;
766 
768 
781  bool withDefaultEmitter=true, ISceneNode* parent=0, s32 id=-1,
782  const core::vector3df& position = core::vector3df(0,0,0),
783  const core::vector3df& rotation = core::vector3df(0,0,0),
784  const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
785 
787 
843  const io::path& heightMapFileName,
844  ISceneNode* parent=0, s32 id=-1,
845  const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f),
846  const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f),
847  const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f),
848  video::SColor vertexColor = video::SColor(255,255,255,255),
849  s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0,
850  bool addAlsoIfHeightmapEmpty = false) = 0;
851 
853 
881  io::IReadFile* heightMapFile,
882  ISceneNode* parent=0, s32 id=-1,
883  const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f),
884  const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f),
885  const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f),
886  video::SColor vertexColor = video::SColor(255,255,255,255),
887  s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0,
888  bool addAlsoIfHeightmapEmpty = false) = 0;
889 
891 
894  virtual IMeshSceneNode* addQuake3SceneNode(const IMeshBuffer* meshBuffer, const quake3::IShader * shader,
895  ISceneNode* parent=0, s32 id=-1
896  ) = 0;
897 
898 
900 
904  virtual ISceneNode* addEmptySceneNode(ISceneNode* parent=0, s32 id=-1) = 0;
905 
907 
914  ISceneNode* parent=0, s32 id=-1) = 0;
915 
917  virtual ITextSceneNode* addTextSceneNode(gui::IGUIFont* font, const wchar_t* text,
918  video::SColor color=video::SColor(100,255,255,255),
919  ISceneNode* parent = 0, const core::vector3df& position = core::vector3df(0,0,0),
920  s32 id=-1) = 0;
921 
923 
934  virtual IBillboardTextSceneNode* addBillboardTextSceneNode( gui::IGUIFont* font, const wchar_t* text,
935  ISceneNode* parent = 0,
937  const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1,
938  video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0;
939 
941 
968  const core::dimension2d<f32>& tileSize, const core::dimension2d<u32>& tileCount,
969  video::SMaterial* material = 0, f32 hillHeight = 0.0f,
970  const core::dimension2d<f32>& countHills = core::dimension2d<f32>(0.0f, 0.0f),
971  const core::dimension2d<f32>& textureRepeatCount = core::dimension2d<f32>(1.0f, 1.0f)) = 0;
972 
974 
996  virtual IAnimatedMesh* addTerrainMesh(const io::path& meshname,
997  video::IImage* texture, video::IImage* heightmap,
998  const core::dimension2d<f32>& stretchSize = core::dimension2d<f32>(10.0f,10.0f),
999  f32 maxHeight=200.0f,
1000  const core::dimension2d<u32>& defaultVertexBlockSize = core::dimension2d<u32>(64,64)) = 0;
1001 
1003 
1014  virtual IAnimatedMesh* addArrowMesh(const io::path& name,
1015  video::SColor vtxColorCylinder=0xFFFFFFFF,
1016  video::SColor vtxColorCone=0xFFFFFFFF,
1017  u32 tesselationCylinder=4, u32 tesselationCone=8,
1018  f32 height=1.f, f32 cylinderHeight=0.6f,
1019  f32 widthCylinder=0.05f, f32 widthCone=0.3f) = 0;
1020 
1022 
1028  virtual IAnimatedMesh* addSphereMesh(const io::path& name,
1029  f32 radius=5.f, u32 polyCountX = 16,
1030  u32 polyCountY = 16) = 0;
1031 
1033 
1042  const u32 SubdivideU = 32, const u32 SubdivideV = 32,
1043  const video::SColor FootColor = video::SColor(51, 0, 230, 180),
1044  const video::SColor TailColor = video::SColor(0, 0, 0, 0)) = 0;
1045 
1047 
1053  virtual ISceneNode* getRootSceneNode() = 0;
1054 
1056 
1063  virtual ISceneNode* getSceneNodeFromId(s32 id, ISceneNode* start=0) = 0;
1064 
1066 
1073  virtual ISceneNode* getSceneNodeFromName(const c8* name, ISceneNode* start=0) = 0;
1074 
1076 
1084 
1086 
1093  ISceneNode* start=0) = 0;
1094 
1096 
1099  virtual ICameraSceneNode* getActiveCamera() const =0;
1100 
1102 
1104  virtual void setActiveCamera(ICameraSceneNode* camera) = 0;
1105 
1107  virtual void setShadowColor(video::SColor color = video::SColor(150,0,0,0)) = 0;
1108 
1110  virtual video::SColor getShadowColor() const = 0;
1111 
1113 
1115  virtual IShadowVolumeSceneNode* createShadowVolumeSceneNode(const IMesh* shadowMesh, ISceneNode* parent, s32 id, bool zfailmethod, f32 infinity) = 0;
1116 
1118 
1126  virtual u32 registerNodeForRendering(ISceneNode* node,
1128 
1130 
1133  virtual void clearAllRegisteredNodesForRendering() = 0;
1134 
1136 
1140  virtual void drawAll() = 0;
1141 
1143 
1148  virtual ISceneNodeAnimator* createRotationAnimator(const core::vector3df& rotationSpeed) = 0;
1149 
1151 
1164  const core::vector3df& center=core::vector3df(0.f,0.f,0.f),
1165  f32 radius=100.f, f32 speed=0.001f,
1166  const core::vector3df& direction=core::vector3df(0.f, 1.f, 0.f),
1167  f32 startPosition = 0.f,
1168  f32 radiusEllipsoid = 0.f) = 0;
1169 
1171 
1184  const core::vector3df& endPoint, u32 timeForWay, bool loop=false, bool pingpong = false) = 0;
1185 
1187 
1197  s32 timePerFrame, bool loop=true) = 0;
1198 
1200 
1205  virtual ISceneNodeAnimator* createDeleteAnimator(u32 timeMs) = 0;
1206 
1208 
1239  ITriangleSelector* world, ISceneNode* sceneNode,
1240  const core::vector3df& ellipsoidRadius = core::vector3df(30,60,30),
1241  const core::vector3df& gravityPerSecond = core::vector3df(0,-10.0f,0),
1242  const core::vector3df& ellipsoidTranslation = core::vector3df(0,0,0),
1243  f32 slidingValue = 0.0005f) = 0;
1244 
1246 
1256  f32 speed = 1.0f, f32 tightness = 0.5f, bool loop=true, bool pingpong=false) = 0;
1257 
1259 
1279  virtual ITriangleSelector* createTriangleSelector(IMesh* mesh, ISceneNode* node, bool separateMeshbuffers=false) = 0;
1280 
1282 
1288  virtual ITriangleSelector* createTriangleSelector(const IMeshBuffer* meshBuffer, irr::u32 materialIndex, ISceneNode* node) = 0;
1289 
1291 
1296  virtual ITriangleSelector* createTriangleSelector(IAnimatedMeshSceneNode* node, bool separateMeshbuffers=false) = 0;
1297 
1298 
1300 
1309 
1311 
1334  ISceneNode* node, s32 minimalPolysPerNode=32) = 0;
1335 
1337 
1360  virtual ITriangleSelector* createOctreeTriangleSelector(IMeshBuffer* meshBuffer, irr::u32 materialIndex,
1361  ISceneNode* node, s32 minimalPolysPerNode=32) = 0;
1362 
1364 
1366  ISceneNode* node, s32 minimalPolysPerNode=32)
1367  {
1368  return createOctreeTriangleSelector(mesh, node, minimalPolysPerNode);
1369  }
1370 
1372 
1380 
1382 
1388  ITerrainSceneNode* node, s32 LOD=0) = 0;
1389 
1391 
1397  virtual void addExternalMeshLoader(IMeshLoader* externalLoader) = 0;
1398 
1400  virtual u32 getMeshLoaderCount() const = 0;
1401 
1403 
1406  virtual IMeshLoader* getMeshLoader(u32 index) const = 0;
1407 
1409 
1415  virtual void addExternalSceneLoader(ISceneLoader* externalLoader) = 0;
1416 
1418  virtual u32 getSceneLoaderCount() const = 0;
1419 
1421 
1424  virtual ISceneLoader* getSceneLoader(u32 index) const = 0;
1425 
1427 
1430 
1432 
1434  virtual IMeshManipulator* getMeshManipulator() = 0;
1435 
1437 
1445  virtual void addToDeletionQueue(ISceneNode* node) = 0;
1446 
1448 
1450  virtual bool postEventFromUser(const SEvent& event) = 0;
1451 
1453 
1454  virtual void clear() = 0;
1455 
1457 
1459  virtual io::IAttributes* getParameters() = 0;
1460 
1462 
1469 
1471 
1474 
1476 
1478  virtual void registerSceneNodeFactory(ISceneNodeFactory* factoryToAdd) = 0;
1479 
1481  virtual u32 getRegisteredSceneNodeFactoryCount() const = 0;
1482 
1484 
1487 
1489 
1492 
1494 
1496  virtual void registerSceneNodeAnimatorFactory(ISceneNodeAnimatorFactory* factoryToAdd) = 0;
1497 
1499  virtual u32 getRegisteredSceneNodeAnimatorFactoryCount() const = 0;
1500 
1502 
1505 
1507  virtual const c8* getSceneNodeTypeName(ESCENE_NODE_TYPE type) = 0;
1508 
1511 
1513 
1515  virtual ISceneNode* addSceneNode(const char* sceneNodeTypeName, ISceneNode* parent=0) = 0;
1516 
1518 
1522  virtual ISceneNodeAnimator* createSceneNodeAnimator(const char* typeName, ISceneNode* target=0) = 0;
1523 
1525 
1543  virtual ISceneManager* createNewSceneManager(bool cloneContent=false) = 0;
1544 
1546 
1561  virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0;
1562 
1564 
1579  virtual bool saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0;
1580 
1582 
1599  virtual bool saveScene(io::IXMLWriter* writer, const io::path& currentPath, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0;
1600 
1602 
1618  virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0) = 0;
1619 
1621 
1637  virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0) = 0;
1638 
1640 
1643 
1645 
1647  virtual ISkinnedMesh* createSkinnedMesh() = 0;
1648 
1650  virtual void setAmbientLight(const video::SColorf &ambientColor) = 0;
1651 
1653  virtual const video::SColorf& getAmbientLight() const = 0;
1654 
1656 
1658  virtual void setLightManager(ILightManager* lightManager) = 0;
1659 
1662 
1664  virtual void setCurrentRenderPass(E_SCENE_NODE_RENDER_PASS nextPass) =0;
1665 
1667 
1669  virtual const IGeometryCreator* getGeometryCreator(void) const = 0;
1670 
1672 
1680  virtual bool isCulled(const ISceneNode* node) const =0;
1681  };
1682 
1683 
1684 } // end namespace scene
1685 } // end namespace irr
1686 
1687 #endif
1688 
Interface for dynamic creation of scene nodes.
GLenum GLenum GLenum GLenum GLenum scale
virtual ISceneNode * getSceneNodeFromName(const c8 *name, ISceneNode *start=0)=0
Get the first scene node with the specified name.
virtual ISceneNodeFactory * getDefaultSceneNodeFactory()=0
Get the default scene node factory which can create all built in scene nodes.
The FileSystem manages files and archives and provides access to them.
Definition: IFileSystem.h:32
virtual ICameraSceneNode * addCameraSceneNodeFPS(ISceneNode *parent=0, f32 rotateSpeed=100.0f, f32 moveSpeed=0.5f, s32 id=-1, SKeyMap *keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false, f32 jumpSpeed=0.f, bool invertMouse=false, bool makeActive=true)=0
Adds a camera scene node with an animator which provides mouse and keyboard control appropriate for f...
Interface to return triangles with specific properties.
virtual const c8 * getSceneNodeTypeName(ESCENE_NODE_TYPE type)=0
Get typename from a scene node type or null if not found.
_IRR_DEPRECATED_ ITriangleSelector * createOctTreeTriangleSelector(IMesh *mesh, ISceneNode *node, s32 minimalPolysPerNode=32)
//! Creates a Triangle Selector, optimized by an octree.
Scene Node which is a (controllable) camera.
virtual IAnimatedMesh * addSphereMesh(const io::path &name, f32 radius=5.f, u32 polyCountX=16, u32 polyCountY=16)=0
add a static sphere mesh to the meshpool
Interface for dynamic creation of scene node animators.
Provides a generic interface for attributes and their values and the possibility to serialize them.
Definition: IAttributes.h:41
virtual ISceneNodeAnimator * createFlyStraightAnimator(const core::vector3df &startPoint, const core::vector3df &endPoint, u32 timeForWay, bool loop=false, bool pingpong=false)=0
Creates a fly straight animator, which lets the attached scene node fly or move along a line between ...
#define _IRR_DEPRECATED_
Defines a deprecated macro which generates a warning at compile time.
Definition: irrTypes.h:202
Struct storing which key belongs to which action.
Definition: SKeyMap.h:31
virtual void drawAll()=0
Draws all the scene nodes.
SEvents hold information about an event. See irr::IEventReceiver for details on event handling.
Transparent effect scene nodes, drawn after Transparent nodes. They are sorted from back to front and...
Definition: ISceneManager.h:92
Interface providing read access to a file.
Definition: IReadFile.h:18
virtual void addExternalSceneLoader(ISceneLoader *externalLoader)=0
Adds an external scene loader for extending the engine with new file formats.
virtual IMeshSceneNode * addQuake3SceneNode(const IMeshBuffer *meshBuffer, const quake3::IShader *shader, ISceneNode *parent=0, s32 id=-1)=0
Adds a quake3 scene node to the scene graph.
virtual u32 getSceneLoaderCount() const =0
Returns the number of scene loaders supported by Irrlicht at this time.
Camera pass. The active view is set up here. The very first pass.
Definition: ISceneManager.h:62
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.
virtual ISceneNodeAnimator * createSceneNodeAnimator(const char *typeName, ISceneNode *target=0)=0
creates a scene node animator based on its type name
float f32
32 bit floating point variable.
Definition: irrTypes.h:108
virtual u32 getRegisteredSceneNodeAnimatorFactoryCount() const =0
Get amount of registered scene node animator factories.
A scene node displaying a static mesh.
virtual bool postEventFromUser(const SEvent &event)=0
Posts an input event to the environment.
Scene node for rendering a shadow volume into a stencil buffer.
virtual void clearAllRegisteredNodesForRendering()=0
Clear all nodes which are currently registered for rendering.
virtual IAnimatedMesh * getMesh(const io::path &filename, const io::path &alternativeCacheName=io::path(""))=0
Get pointer to an animateable mesh. Loads the file if not loaded already.
virtual const c8 * getAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type)=0
Returns a typename from a scene node animator type or null if not found.
virtual void clear()=0
Clears the whole scene.
virtual ITriangleSelector * createTriangleSelectorFromBoundingBox(ISceneNode *node)=0
Creates a simple dynamic ITriangleSelector, based on a axis aligned bounding box.
virtual ISceneNodeAnimatorCollisionResponse * createCollisionResponseAnimator(ITriangleSelector *world, ISceneNode *sceneNode, const core::vector3df &ellipsoidRadius=core::vector3df(30, 60, 30), const core::vector3df &gravityPerSecond=core::vector3df(0,-10.0f, 0), const core::vector3df &ellipsoidTranslation=core::vector3df(0, 0, 0), f32 slidingValue=0.0005f)=0
Creates a special scene node animator for doing automatic collision detection and response.
virtual bool saveScene(const io::path &filename, ISceneUserDataSerializer *userDataSerializer=0, ISceneNode *node=0)=0
Saves the current scene into a file.
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 an animated mesh model.
virtual IParticleSystemSceneNode * addParticleSystemSceneNode(bool withDefaultEmitter=true, 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 particle system scene node to the scene graph.
GLenum GLenum GLuint texture
char c8
8 bit character variable.
Definition: irrTypes.h:35
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 cube scene node.
Scene node interface.
Definition: ISceneNode.h:40
virtual ISceneManager * createNewSceneManager(bool cloneContent=false)=0
Creates a new scene manager.
All normal objects can use this for registering themselves.
Definition: ISceneManager.h:83
Dummy scene node for adding additional transformations to the scene graph.
virtual void addExternalMeshLoader(IMeshLoader *externalLoader)=0
Adds an external mesh loader for extending the engine with new file formats.
virtual video::IVideoDriver * getVideoDriver()=0
Get the video driver.
virtual ITextSceneNode * addTextSceneNode(gui::IGUIFont *font, const wchar_t *text, video::SColor color=video::SColor(100, 255, 255, 255), ISceneNode *parent=0, const core::vector3df &position=core::vector3df(0, 0, 0), s32 id=-1)=0
Adds a text scene node, which is able to display 2d text at a position in three dimensional space.
virtual void setLightManager(ILightManager *lightManager)=0
Register a custom callbacks manager which gets callbacks during scene rendering.
GLuint start
Definition: SDL_opengl.h:1571
virtual ISceneNodeAnimator * createDeleteAnimator(u32 timeMs)=0
Creates a scene node animator, which deletes the scene node after some time automatically.
ILightManager provides an interface for user applications to manipulate the list of lights in the sce...
Definition: ILightManager.h:25
Animates a scene node. Can animate position, rotation, material, and so on.
virtual IMeshManipulator * getMeshManipulator()=0
Get pointer to the mesh manipulator.
Scene node which is a dynamic light.
GLuint const GLchar * name
virtual IBillboardTextSceneNode * addBillboardTextSceneNode(gui::IGUIFont *font, const wchar_t *text, ISceneNode *parent=0, const core::dimension2d< f32 > &size=core::dimension2d< f32 >(10.0f, 10.0f), const core::vector3df &position=core::vector3df(0, 0, 0), s32 id=-1, video::SColor colorTop=0xFFFFFFFF, video::SColor colorBottom=0xFFFFFFFF)=0
Adds a text scene node, which uses billboards. The node, and the text on it, will scale with distance...
Everything in the Irrlicht Engine can be found in this namespace.
Definition: CARSADPad.h:6
ESCENE_NODE_ANIMATOR_TYPE
An enumeration for all types of built-in scene node animators.
virtual IAnimatedMesh * addVolumeLightMesh(const io::path &name, const u32 SubdivideU=32, const u32 SubdivideV=32, const video::SColor FootColor=video::SColor(51, 0, 230, 180), const video::SColor TailColor=video::SColor(0, 0, 0, 0))=0
Add a volume light mesh to the meshpool.
GUI Environment. Used as factory and manager of all other GUI elements.
virtual io::IAttributes * getParameters()=0
Get interface to the parameters set in this scene.
GLsizeiptr size
Interface providing write access to a file.
Definition: IWriteFile.h:17
Specifies a 2 dimensional size.
Definition: dimension2d.h:20
virtual void getSceneNodesFromType(ESCENE_NODE_TYPE type, core::array< scene::ISceneNode * > &outNodes, ISceneNode *start=0)=0
Get scene nodes by type.
Interface for software image data.
Definition: IImage.h:25
virtual IShadowVolumeSceneNode * createShadowVolumeSceneNode(const IMesh *shadowMesh, ISceneNode *parent, s32 id, bool zfailmethod, f32 infinity)=0
Create a shadow volume scene node to be used with custom nodes.
GLint GLint bottom
GLfixed GLfixed GLint GLint GLfixed points
GLsizei GLsizei GLfloat distance
Interface for writing meshes.
Definition: IMeshWriter.h:23
virtual IMeshCache * getMeshCache()=0
Get interface to the mesh cache which is shared between all existing scene managers.
A scene node for displaying 2d text at a position in three dimensional space.
Class which holds the geometry of an object.
Definition: IMesh.h:71
virtual IOctreeSceneNode * addOctreeSceneNode(IAnimatedMesh *mesh, ISceneNode *parent=0, s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false)=0
Adds a scene node for rendering using a octree to the scene graph.
Interface for using some special functions of Skinned meshes.
Definition: ISkinnedMesh.h:32
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 dynamic light scene node to the scene graph.
virtual const video::SColorf & getAmbientLight() const =0
Get ambient color of the 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.
No pass currently active.
Definition: ISceneManager.h:59
patch size of 17, at most, use 5 levels of detail with this patch size.
virtual gui::IGUIEnvironment * getGUIEnvironment()=0
Get the active GUIEnvironment.
virtual u32 getMeshLoaderCount() const =0
Returns the number of mesh loaders supported by Irrlicht at this time.
GLsizei const GLuint * textures
In this pass, lights are transformed into camera space and added to the driver.
Definition: ISceneManager.h:65
Interface for making multiple triangle selectors work as one big selector.
Font interface.
Definition: IGUIFont.h:39
virtual ICameraSceneNode * getActiveCamera() const =0
Get the current active camera.
E_TERRAIN_PATCH_SIZE
enumeration for patch sizes specifying the size of patches in the TerrainSceneNode
Helper class for creating geometry on the fly.
virtual IMeshWriter * createMeshWriter(EMESH_WRITER_TYPE type)=0
Get a mesh writer implementation if available.
virtual void addToDeletionQueue(ISceneNode *node)=0
Adds a scene node to the deletion queue.
signed int s32
32 bit signed variable.
Definition: irrTypes.h:70
Struct for holding a mesh with a single material.
Definition: IMeshBuffer.h:39
virtual IAnimatedMesh * addArrowMesh(const io::path &name, video::SColor vtxColorCylinder=0xFFFFFFFF, video::SColor vtxColorCone=0xFFFFFFFF, u32 tesselationCylinder=4, u32 tesselationCone=8, f32 height=1.f, f32 cylinderHeight=0.6f, f32 widthCylinder=0.05f, f32 widthCone=0.3f)=0
add a static arrow mesh to the meshpool
virtual void setCurrentRenderPass(E_SCENE_NODE_RENDER_PASS nextPass)=0
Set current render pass.
virtual bool loadScene(const io::path &filename, ISceneUserDataSerializer *userDataSerializer=0, ISceneNode *rootNode=0)=0
Loads a scene. Note that the current scene is not cleared before.
Scene node capable of displaying an animated mesh.
virtual IAnimatedMesh * addTerrainMesh(const io::path &meshname, video::IImage *texture, video::IImage *heightmap, const core::dimension2d< f32 > &stretchSize=core::dimension2d< f32 >(10.0f, 10.0f), f32 maxHeight=200.0f, const core::dimension2d< u32 > &defaultVertexBlockSize=core::dimension2d< u32 >(64, 64))=0
Adds a static terrain mesh to the mesh pool.
virtual ITriangleSelector * createTerrainTriangleSelector(ITerrainSceneNode *node, s32 LOD=0)=0
Creates a triangle selector which can select triangles from a terrain scene node.
EMESH_WRITER_TYPE
An enumeration for all supported types of built-in mesh writers.
struct _cl_event * event
virtual ISceneNode * addSkyDomeSceneNode(video::ITexture *texture, u32 horiRes=16, u32 vertRes=8, f32 texturePercentage=0.9, f32 spherePercentage=2.0, f32 radius=1000.f, ISceneNode *parent=0, s32 id=-1)=0
Adds a skydome scene node to the scene graph.
GLfloat f
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:62
virtual ISkinnedMesh * createSkinnedMesh()=0
Get a skinned mesh, which is not available as header-only code.
virtual ISceneNodeAnimator * createTextureAnimator(const core::array< video::ITexture * > &textures, s32 timePerFrame, bool loop=true)=0
Creates a texture animator, which switches the textures of the target scene node based on a list of t...
virtual ISceneNode * addSkyBoxSceneNode(video::ITexture *top, video::ITexture *bottom, video::ITexture *left, video::ITexture *right, video::ITexture *front, video::ITexture *back, ISceneNode *parent=0, s32 id=-1)=0
Adds a skybox scene node to the scene graph.
virtual const IGeometryCreator * getGeometryCreator(void) const =0
Get an instance of a geometry creator.
virtual ISceneNode * addSceneNode(const char *sceneNodeTypeName, ISceneNode *parent=0)=0
Adds a scene node to the scene by name.
Drawn after the solid nodes, before the transparent nodes, the time for drawing shadow volumes.
Definition: ISceneManager.h:95
virtual video::SColor getShadowColor() const =0
Get the current color of shadows.
Solid scene nodes or special scene nodes without materials.
Definition: ISceneManager.h:86
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 sphere scene node of the given radius and detail.
Header file containing all scene parameters for modifying mesh loading etc.
virtual void setAmbientLight(const video::SColorf &ambientColor)=0
Sets ambient color of the scene.
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition: IVideoDriver.h:151
virtual ISceneNodeAnimator * createFollowSplineAnimator(s32 startTime, const core::array< core::vector3df > &points, f32 speed=1.0f, f32 tightness=0.5f, bool loop=true, bool pingpong=false)=0
Creates a follow spline animator.
ESCENE_NODE_TYPE
An enumeration for all types of built-in scene nodes.
Special scene node animator for doing automatic collision detection and response.
GLuint index
Class which is able to load an animated mesh from a file.
Definition: IMeshLoader.h:27
Class representing a 32 bit ARGB color.
Definition: SColor.h:316
Class which can load a scene into the scene manager.
Definition: ISceneLoader.h:26
GLenum target
A scene node for displaying terrain using the geo mip map algorithm.
virtual void registerSceneNodeAnimatorFactory(ISceneNodeAnimatorFactory *factoryToAdd)=0
Adds a scene node animator factory to the scene manager.
GLdouble GLdouble GLdouble GLdouble top
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 static mesh.
virtual ITriangleSelector * createOctreeTriangleSelector(IMesh *mesh, ISceneNode *node, s32 minimalPolysPerNode=32)=0
Creates a Triangle Selector, optimized by an octree.
The Scene Manager manages scene nodes, mesh resources, cameras and all the other stuff.
Interface providing methods for making it easier to write XML files.
Definition: irrXML.h:377
virtual ISceneNodeAnimatorFactory * getSceneNodeAnimatorFactory(u32 index)=0
Get scene node animator factory by index.
Self reallocating template array (like stl vector) with additional features.
Definition: irrArray.h:22
virtual ITerrainSceneNode * addTerrainSceneNode(const io::path &heightMapFileName, ISceneNode *parent=0, s32 id=-1, const core::vector3df &position=core::vector3df(0.0f, 0.0f, 0.0f), const core::vector3df &rotation=core::vector3df(0.0f, 0.0f, 0.0f), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f), video::SColor vertexColor=video::SColor(255, 255, 255, 255), s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0, bool addAlsoIfHeightmapEmpty=false)=0
Adds a terrain scene node to the scene graph.
E_SCENE_NODE_RENDER_PASS
Enumeration for render passes.
Definition: ISceneManager.h:56
virtual E_SCENE_NODE_RENDER_PASS getSceneNodeRenderPass() const =0
Get current render pass.
virtual ISceneNodeAnimator * createRotationAnimator(const core::vector3df &rotationSpeed)=0
Creates a rotation animator, which rotates the attached scene node around itself.
GLint left
A Parsed Shader Holding Variables ordered in Groups.
Definition: IQ3Shader.h:636
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 a animated water surface mesh.
virtual ISceneNodeAnimatorFactory * getDefaultSceneNodeAnimatorFactory()=0
Get the default scene node animator factory which can create all built-in scene node animators.
virtual IMetaTriangleSelector * createMetaTriangleSelector()=0
Creates a meta triangle selector.
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 IAnimatedMesh * addHillPlaneMesh(const io::path &name, const core::dimension2d< f32 > &tileSize, const core::dimension2d< u32 > &tileCount, video::SMaterial *material=0, f32 hillHeight=0.0f, const core::dimension2d< f32 > &countHills=core::dimension2d< f32 >(0.0f, 0.0f), const core::dimension2d< f32 > &textureRepeatCount=core::dimension2d< f32 >(1.0f, 1.0f))=0
Adds a Hill Plane mesh to the mesh pool.
virtual void registerSceneNodeFactory(ISceneNodeFactory *factoryToAdd)=0
Adds a scene node factory to the scene manager.
virtual IDummyTransformationSceneNode * addDummyTransformationSceneNode(ISceneNode *parent=0, s32 id=-1)=0
Adds a dummy transformation scene node to the scene graph.
GLuint color
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 Volume Lighting Scene Node.
virtual ISceneNodeAnimator * createFlyCircleAnimator(const core::vector3df &center=core::vector3df(0.f, 0.f, 0.f), f32 radius=100.f, f32 speed=0.001f, const core::vector3df &direction=core::vector3df(0.f, 1.f, 0.f), f32 startPosition=0.f, f32 radiusEllipsoid=0.f)=0
Creates a fly circle animator, which lets the attached scene node fly around a center.
virtual ISceneCollisionManager * getSceneCollisionManager()=0
Get pointer to the scene collision manager.
Interface of a Video Driver dependent Texture.
Definition: ITexture.h:177
Base class of most objects of the Irrlicht Engine.
GLuint GLuint GLsizei GLenum type
Definition: SDL_opengl.h:1571
GLdouble GLdouble right
virtual ICameraSceneNode * addCameraSceneNodeMaya(ISceneNode *parent=0, f32 rotateSpeed=-1500.f, f32 zoomSpeed=200.f, f32 translationSpeed=1500.f, s32 id=-1, f32 distance=70.f, bool makeActive=true)=0
Adds a maya style user controlled camera scene node to the scene graph.
virtual ISceneNode * getRootSceneNode()=0
Gets the root scene node.
virtual IBillboardSceneNode * addBillboardSceneNode(ISceneNode *parent=0, const core::dimension2d< f32 > &size=core::dimension2d< f32 >(10.0f, 10.0f), const core::vector3df &position=core::vector3df(0, 0, 0), s32 id=-1, video::SColor colorTop=0xFFFFFFFF, video::SColor colorBottom=0xFFFFFFFF)=0
Adds a billboard scene node to the scene graph.
virtual E_SCENE_NODE_RENDER_PASS getCurrentRenderPass() const =0
Get current render pass.
This is used for sky boxes.
Definition: ISceneManager.h:68
Interface for an animated mesh.
Definition: IAnimatedMesh.h:20
virtual ISceneLoader * getSceneLoader(u32 index) const =0
Retrieve the given scene loader.
An interface for easy manipulation of meshes.
virtual ISceneNode * addEmptySceneNode(ISceneNode *parent=0, s32 id=-1)=0
Adds an empty scene node to the scene graph.
The mesh cache stores already loaded meshes and provides an interface to them.
Definition: IMeshCache.h:27
Interface to read and write user data to and from .irr files.
virtual io::IFileSystem * getFileSystem()=0
Get the active FileSystem.
virtual u32 getRegisteredSceneNodeFactoryCount() const =0
Get amount of registered scene node factories.
virtual ITriangleSelector * createTriangleSelector(IMesh *mesh, ISceneNode *node, bool separateMeshbuffers=false)=0
Creates a simple ITriangleSelector, based on a mesh.
The Scene Collision Manager provides methods for performing collision tests and picking on scene node...
virtual bool isCulled(const ISceneNode *node) const =0
Check if node is culled in current view frustum.
virtual IMeshLoader * getMeshLoader(u32 index) const =0
Retrieve the given mesh loader.
virtual ISceneNode * getSceneNodeFromId(s32 id, ISceneNode *start=0)=0
Get the first scene node with the specified id.
Class representing a color with four floats.
Definition: SColor.h:573
Struct for holding parameters for a material renderer.
Definition: SMaterial.h:304
GLint GLint GLsizei GLsizei height
Definition: SDL_opengl.h:1572
Transparent scene nodes, drawn after solid nodes. They are sorted from back to front and drawn in tha...
Definition: ISceneManager.h:89
GLuint shader
virtual void setActiveCamera(ICameraSceneNode *camera)=0
Sets the currently active camera.
virtual ISceneNodeFactory * getSceneNodeFactory(u32 index)=0
Get a scene node factory by index.
A scene node displaying a static mesh.
virtual ISceneNode * getSceneNodeFromType(scene::ESCENE_NODE_TYPE type, ISceneNode *start=0)=0
Get the first scene node with the specified type.