Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
ISceneManager.hpp
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 nirtcpp/nirtcpp.hpp
4
5#ifndef NIRT_I_SCENE_MANAGER_HPP_INCLUDED
6#define NIRT_I_SCENE_MANAGER_HPP_INCLUDED
7
8#include <nirtcpp/core/engine/IReferenceCounted.hpp>
9#include <nirtcpp/core/engine/irrArray.hpp>
10#include <nirtcpp/core/engine/irrString.hpp>
11#include <nirtcpp/core/engine/path.hpp>
12#include <nirtcpp/core/engine/vector3d.hpp>
13#include <nirtcpp/core/engine/dimension2d.hpp>
14#include <nirtcpp/core/engine/SColor.hpp>
15#include <nirtcpp/core/engine/ETerrainElements.hpp>
16#include <nirtcpp/core/engine/ESceneNodeTypes.hpp>
17#include <nirtcpp/core/engine/ESceneNodeAnimatorTypes.hpp>
18#include <nirtcpp/core/engine/EMeshWriterEnums.hpp>
19#include <nirtcpp/core/engine/SceneParameters.hpp>
20#include <nirtcpp/core/engine/IGeometryCreator.hpp>
21#include <nirtcpp/core/engine/ISkinnedMesh.hpp>
22#include <nirtcpp/core/engine/IXMLWriter.hpp>
23
24namespace nirt
25{
26 class SKeyMap;
27 class SEvent;
28
29namespace io
30{
31 class IReadFile;
32 class IAttributes;
33 class IWriteFile;
34 class IFileSystem;
35} // end namespace io
36
37namespace gui
38{
39 class IGUIFont;
40 class IGUIEnvironment;
41} // end namespace gui
42
43namespace video
44{
45 class IVideoDriver;
46 class SMaterial;
47 class IImage;
48 class ITexture;
49} // end namespace video
50
51namespace scene
52{
54
103
104 class IAnimatedMesh;
105 class IAnimatedMeshSceneNode;
106 class IBillboardSceneNode;
107 class IBillboardTextSceneNode;
108 class ICameraSceneNode;
109 class IDummyTransformationSceneNode;
110 class ILightManager;
111 class ILightSceneNode;
112 class IMesh;
113 class IMeshBuffer;
114 class IMeshCache;
115 class IMeshLoader;
116 class IMeshManipulator;
117 class IMeshSceneNode;
118 class IMeshWriter;
119 class IMetaTriangleSelector;
120 class IOctreeSceneNode;
121 class IParticleSystemSceneNode;
122 class ISceneCollisionManager;
123 class ISceneLoader;
124 class ISceneNode;
125 class ISceneNodeAnimator;
126 class ISceneNodeAnimatorCollisionResponse;
127 class ISceneNodeAnimatorFactory;
128 class ISceneNodeFactory;
129 class ISceneUserDataSerializer;
130 class IShadowVolumeSceneNode;
131 class ITerrainSceneNode;
132 class ITextSceneNode;
133 class ITriangleSelector;
134 class IVolumeLightSceneNode;
135
136 namespace quake3
137 {
138 class IShader;
139 } // end namespace quake3
140
142
159 class ISceneManager : public virtual IReferenceCounted
160 {
161 public:
162
164
394 virtual IAnimatedMesh* getMesh(const io::path& filename, const io::path& alternativeCacheName=io::path("")) = 0;
395
397
404
406
409 virtual IMeshCache* getMeshCache() = 0;
410
412
415
417
420
422
425
427
441 const u32 subdivU = 32, const u32 subdivV = 32,
442 const video::SColor foot = video::SColor(51, 0, 230, 180),
443 const video::SColor tail = video::SColor(0, 0, 0, 0),
444 const core::vector3df& position = core::vector3df(0,0,0),
445 const core::vector3df& rotation = core::vector3df(0,0,0),
446 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
447
449
460 virtual IMeshSceneNode* addCubeSceneNode(f32 size=10.0f, ISceneNode* parent=0, s32 id=-1,
461 const core::vector3df& position = core::vector3df(0,0,0),
462 const core::vector3df& rotation = core::vector3df(0,0,0),
463 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f),
465
467
481 virtual IMeshSceneNode* addSphereSceneNode(f32 radius=5.0f, s32 polyCount=16,
482 ISceneNode* parent=0, s32 id=-1,
483 const core::vector3df& position = core::vector3df(0,0,0),
484 const core::vector3df& rotation = core::vector3df(0,0,0),
485 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
486
488
499 ISceneNode* parent=0, s32 id=-1,
500 const core::vector3df& position = core::vector3df(0,0,0),
501 const core::vector3df& rotation = core::vector3df(0,0,0),
502 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f),
503 bool alsoAddIfMeshPointerZero=false) = 0;
504
506
516 virtual IMeshSceneNode* addMeshSceneNode(IMesh* mesh, ISceneNode* parent=0, s32 id=-1,
517 const core::vector3df& position = core::vector3df(0,0,0),
518 const core::vector3df& rotation = core::vector3df(0,0,0),
519 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f),
520 bool alsoAddIfMeshPointerZero=false) = 0;
521
523
538 f32 waveHeight=2.0f, f32 waveSpeed=300.0f, f32 waveLength=10.0f,
539 ISceneNode* parent=0, s32 id=-1,
540 const core::vector3df& position = core::vector3df(0,0,0),
541 const core::vector3df& rotation = core::vector3df(0,0,0),
542 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
543
544
546
559 s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) = 0;
560
562
575 s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) = 0;
576
578
595 const core::vector3df& position = core::vector3df(0,0,0),
596 const core::vector3df& lookat = core::vector3df(0,0,100),
597 s32 id=-1, bool makeActive=true) = 0;
598
600
617 f32 rotateSpeed=-1500.f, f32 zoomSpeed=200.f,
618 f32 translationSpeed=1500.f, s32 id=-1, f32 distance=70.f,
619 bool makeActive=true
620 , f32 rotX = 0.f, f32 rotY = 0.f
621 ) =0;
622
624
688 f32 rotateSpeed = 100.0f, f32 moveSpeed = 0.5f, s32 id=-1,
689 SKeyMap* keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false,
690 f32 jumpSpeed = 0.f, bool invertMouse=false,
691 bool makeActive=true) = 0;
692
694
707 const core::vector3df& position = core::vector3df(0,0,0),
708 video::SColorf color = video::SColorf(1.0f, 1.0f, 1.0f),
709 f32 radius=100.0f, s32 id=-1) = 0;
710
712
731 const core::dimension2d<f32>& size = core::dimension2d<f32>(10.0f, 10.0f),
732 const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1,
733 video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0;
734
736
751 video::ITexture* left, video::ITexture* right, video::ITexture* front,
752 video::ITexture* back, ISceneNode* parent = 0, s32 id=-1) = 0;
753
755
773 u32 horiRes=16, u32 vertRes=8,
774 f32 texturePercentage=0.9, f32 spherePercentage=2.0,f32 radius = 1000.f,
775 ISceneNode* parent=0, s32 id=-1) = 0;
776
778
791 bool withDefaultEmitter=true, ISceneNode* parent=0, s32 id=-1,
792 const core::vector3df& position = core::vector3df(0,0,0),
793 const core::vector3df& rotation = core::vector3df(0,0,0),
794 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
795
797
853 const io::path& heightMapFileName,
854 ISceneNode* parent=0, s32 id=-1,
855 const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f),
856 const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f),
857 const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f),
858 video::SColor vertexColor = video::SColor(255,255,255,255),
859 s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0,
860 bool addAlsoIfHeightmapEmpty = false) = 0;
861
863
891 io::IReadFile* heightMapFile,
892 ISceneNode* parent=0, s32 id=-1,
893 const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f),
894 const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f),
895 const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f),
896 video::SColor vertexColor = video::SColor(255,255,255,255),
897 s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0,
898 bool addAlsoIfHeightmapEmpty = false) = 0;
899
901
904 virtual IMeshSceneNode* addQuake3SceneNode(const IMeshBuffer* meshBuffer, const quake3::IShader * shader,
905 ISceneNode* parent=0, s32 id=-1
906 ) = 0;
907
908
910
914 virtual ISceneNode* addEmptySceneNode(ISceneNode* parent=0, s32 id=-1) = 0;
915
917
924 ISceneNode* parent=0, s32 id=-1) = 0;
925
927 virtual ITextSceneNode* addTextSceneNode(gui::IGUIFont* font, const wchar_t* text,
928 video::SColor color=video::SColor(100,255,255,255),
929 ISceneNode* parent = 0, const core::vector3df& position = core::vector3df(0,0,0),
930 s32 id=-1) = 0;
931
933
945 ISceneNode* parent = 0,
946 const core::dimension2d<f32>& size = core::dimension2d<f32>(10.0f, 10.0f),
947 const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1,
948 video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0;
949
951
978 const core::dimension2d<f32>& tileSize, const core::dimension2d<u32>& tileCount,
979 video::SMaterial* material = 0, f32 hillHeight = 0.0f,
980 const core::dimension2d<f32>& countHills = core::dimension2d<f32>(0.0f, 0.0f),
981 const core::dimension2d<f32>& textureRepeatCount = core::dimension2d<f32>(1.0f, 1.0f)) = 0;
982
984
1006 virtual IAnimatedMesh* addTerrainMesh(const io::path& meshname,
1007 video::IImage* texture, video::IImage* heightmap,
1008 const core::dimension2d<f32>& stretchSize = core::dimension2d<f32>(10.0f,10.0f),
1009 f32 maxHeight=200.0f,
1010 const core::dimension2d<u32>& defaultVertexBlockSize = core::dimension2d<u32>(64,64)) = 0;
1011
1013
1025 video::SColor vtxColorCylinder=0xFFFFFFFF,
1026 video::SColor vtxColorCone=0xFFFFFFFF,
1027 u32 tesselationCylinder=4, u32 tesselationCone=8,
1028 f32 height=1.f, f32 cylinderHeight=0.6f,
1029 f32 widthCylinder=0.05f, f32 widthCone=0.3f) = 0;
1030
1032
1039 f32 radius=5.f, u32 polyCountX = 16,
1040 u32 polyCountY = 16) = 0;
1041
1043
1052 const u32 SubdivideU = 32, const u32 SubdivideV = 32,
1053 const video::SColor FootColor = video::SColor(51, 0, 230, 180),
1054 const video::SColor TailColor = video::SColor(0, 0, 0, 0)) = 0;
1055
1057
1064
1066
1073 virtual ISceneNode* getSceneNodeFromId(s32 id, ISceneNode* start=0) = 0;
1074
1076
1083 virtual ISceneNode* getSceneNodeFromName(const c8* name, ISceneNode* start=0) = 0;
1084
1086
1094
1096
1103 ISceneNode* start=0) = 0;
1104
1106
1110
1112
1114 virtual void setActiveCamera(ICameraSceneNode* camera) = 0;
1115
1117 virtual void setShadowColor(video::SColor color = video::SColor(150,0,0,0)) = 0;
1118
1120 virtual video::SColor getShadowColor() const = 0;
1121
1123
1125 virtual IShadowVolumeSceneNode* createShadowVolumeSceneNode(const IMesh* shadowMesh, ISceneNode* parent, s32 id, bool zfailmethod, f32 infinity) = 0;
1126
1128
1140
1142
1146
1148
1152 virtual void drawAll() = 0;
1153
1155
1161
1163
1176 const core::vector3df& center=core::vector3df(0.f,0.f,0.f),
1177 f32 radius=100.f, f32 speed=0.001f,
1178 const core::vector3df& direction=core::vector3df(0.f, 1.f, 0.f),
1179 f32 startPosition = 0.f,
1180 f32 radiusEllipsoid = 0.f) = 0;
1181
1183
1196 const core::vector3df& endPoint, u32 timeForWay, bool loop=false, bool pingpong = false) = 0;
1197
1199
1209 s32 timePerFrame, bool loop=true) = 0;
1210
1212
1218
1220
1251 ITriangleSelector* world, ISceneNode* sceneNode,
1252 const core::vector3df& ellipsoidRadius = core::vector3df(30,60,30),
1253 const core::vector3df& gravityPerSecond = core::vector3df(0,-10.0f,0),
1254 const core::vector3df& ellipsoidTranslation = core::vector3df(0,0,0),
1255 f32 slidingValue = 0.0005f) = 0;
1256
1258
1267 const core::array< core::vector3df >& points,
1268 f32 speed = 1.0f, f32 tightness = 0.5f, bool loop=true, bool pingpong=false, bool steer=false) = 0;
1269
1271
1291 virtual ITriangleSelector* createTriangleSelector(IMesh* mesh, ISceneNode* node, bool separateMeshbuffers=false) = 0;
1292
1294
1300 virtual ITriangleSelector* createTriangleSelector(const IMeshBuffer* meshBuffer, nirt::u32 materialIndex, ISceneNode* node) = 0;
1301
1303
1308 virtual ITriangleSelector* createTriangleSelector(IAnimatedMeshSceneNode* node, bool separateMeshbuffers=false) = 0;
1309
1310
1312
1321
1323
1346 ISceneNode* node, s32 minimalPolysPerNode=32) = 0;
1347
1349
1373 ISceneNode* node, s32 minimalPolysPerNode=32) = 0;
1374
1376
1378 ISceneNode* node, s32 minimalPolysPerNode=32)
1379 {
1380 return createOctreeTriangleSelector(mesh, node, minimalPolysPerNode);
1381 }
1382
1384
1392
1394
1400 ITerrainSceneNode* node, s32 LOD=0) = 0;
1401
1403
1409 virtual void addExternalMeshLoader(IMeshLoader* externalLoader) = 0;
1410
1412 virtual u32 getMeshLoaderCount() const = 0;
1413
1415
1418 virtual IMeshLoader* getMeshLoader(u32 index) const = 0;
1419
1421
1427 virtual void addExternalSceneLoader(ISceneLoader* externalLoader) = 0;
1428
1430 virtual u32 getSceneLoaderCount() const = 0;
1431
1433
1436 virtual ISceneLoader* getSceneLoader(u32 index) const = 0;
1437
1439
1442
1444
1447
1449
1457 virtual void addToDeletionQueue(ISceneNode* node) = 0;
1458
1460
1462 virtual bool postEventFromUser(const SEvent& event) = 0;
1463
1465
1466 virtual void clear() = 0;
1467
1469
1472
1474
1481
1483
1486
1488
1490 virtual void registerSceneNodeFactory(ISceneNodeFactory* factoryToAdd) = 0;
1491
1494
1496
1499
1501
1504
1506
1509
1512
1514
1517
1519 virtual const c8* getSceneNodeTypeName(ESCENE_NODE_TYPE type) = 0;
1520
1523
1525
1527 virtual ISceneNode* addSceneNode(const char* sceneNodeTypeName, ISceneNode* parent=0) = 0;
1528
1530
1534 virtual ISceneNodeAnimator* createSceneNodeAnimator(const char* typeName, ISceneNode* target=0) = 0;
1535
1537
1555 virtual ISceneManager* createNewSceneManager(bool cloneContent=false) = 0;
1556
1558
1573 virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0;
1574
1576
1591 virtual bool saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0;
1592
1594
1611 virtual bool saveScene(io::IXMLWriter* writer, const io::path& currentPath, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0;
1612
1614
1630 virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0) = 0;
1631
1633
1649 virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0) = 0;
1650
1652
1655
1657
1660
1662 virtual void setAmbientLight(const video::SColorf &ambientColor) = 0;
1663
1665 virtual const video::SColorf& getAmbientLight() const = 0;
1666
1668
1670 virtual void setLightManager(ILightManager* lightManager) = 0;
1671
1674
1677
1679
1681 virtual const IGeometryCreator* getGeometryCreator(void) const = 0;
1682
1684
1692 virtual bool isCulled(const ISceneNode* node) const =0;
1693 };
1694
1695
1696} // end namespace scene
1697} // end namespace nirt
1698
1699#endif
Base class of most objects of the Nirtcpp Engine.
Definition IReferenceCounted.hpp:46
SEvents hold information about an event. See nirt::IEventReceiver for details on event handling.
Definition IEventReceiver.hpp:282
Struct storing which key belongs to which action.
Definition SKeyMap.hpp:32
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
GUI Environment. Used as factory and manager of all other GUI elements.
Definition IGUIEnvironment.hpp:73
Font interface.
Definition IGUIFont.hpp:40
Provides a generic interface for attributes and their values and the possibility to serialize them.
Definition IAttributes.hpp:42
The FileSystem manages files and archives and provides access to them.
Definition IFileSystem.hpp:33
Interface providing methods for making it easier to write XML files.
Definition irrXML.hpp:377
Interface providing read access to a file.
Definition IReadFile.hpp:19
Interface providing write access to a file.
Definition IWriteFile.hpp:18
Scene node capable of displaying an animated mesh.
Definition IAnimatedMeshSceneNode.hpp:52
Interface for an animated mesh.
Definition IAnimatedMesh.hpp:21
A billboard scene node.
Definition IBillboardSceneNode.hpp:23
A billboard text scene node.
Definition IBillboardTextSceneNode.hpp:28
Scene Node which is a (controllable) camera.
Definition ICameraSceneNode.hpp:24
Dummy scene node for adding additional transformations to the scene graph.
Definition IDummyTransformationSceneNode.hpp:24
Helper class for creating geometry on the fly.
Definition IGeometryCreator.hpp:55
ILightManager provides an interface for user applications to manipulate the list of lights in the sce...
Definition ILightManager.hpp:30
Scene node which is a dynamic light.
Definition ILightSceneNode.hpp:23
Struct for holding a mesh with a single material.
Definition IMeshBuffer.hpp:41
The mesh cache stores already loaded meshes and provides an interface to them.
Definition IMeshCache.hpp:28
Class which is able to load an animated mesh from a file.
Definition IMeshLoader.hpp:29
An interface for easy manipulation of meshes.
Definition IMeshManipulator.hpp:30
A scene node displaying a static mesh.
Definition IMeshSceneNode.hpp:21
Interface for writing meshes.
Definition IMeshWriter.hpp:24
Class which holds the geometry of an object.
Definition IMesh.hpp:72
Interface for making multiple triangle selectors work as one big selector.
Definition IMetaTriangleSelector.hpp:21
A scene node displaying a static mesh.
Definition IOctreeSceneNode.hpp:54
Definition IParticleSystemSceneNode.hpp:72
The Scene Collision Manager provides methods for performing collision tests and picking on scene node...
Definition ISceneCollisionManager.hpp:52
Class which can load a scene into the scene manager.
Definition ISceneLoader.hpp:27
The Scene Manager manages scene nodes, mesh resources, cameras and all the other stuff.
Definition ISceneManager.hpp:160
virtual ITriangleSelector * createTriangleSelector(const IMeshBuffer *meshBuffer, nirt::u32 materialIndex, ISceneNode *node)=0
Creates a simple ITriangleSelector, based on a meshbuffer.
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.
virtual void clearAllRegisteredNodesForRendering()=0
Clear all nodes which are currently registered for rendering.
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.
virtual void setAmbientLight(const video::SColorf &ambientColor)=0
Sets ambient color of the scene.
NIRT_DEPRECATED ITriangleSelector * createOctTreeTriangleSelector(IMesh *mesh, ISceneNode *node, s32 minimalPolysPerNode=32)
//! Creates a Triangle Selector, optimized by an octree.
Definition ISceneManager.hpp:1377
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 ...
virtual ITerrainSceneNode * addTerrainSceneNode(io::IReadFile *heightMapFile, 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.
virtual void drawAll()=0
Draws all the scene nodes.
virtual void clear()=0
Clears the whole scene.
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 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...
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 ISceneNode * getRootSceneNode()=0
Gets the root scene node.
virtual ITriangleSelector * createTriangleSelector(IAnimatedMeshSceneNode *node, bool separateMeshbuffers=false)=0
Creates a simple ITriangleSelector, based on an animated mesh scene node.
virtual E_SCENE_NODE_RENDER_PASS getSceneNodeRenderPass() const =0
Get current render pass.
virtual void setCurrentRenderPass(E_SCENE_NODE_RENDER_PASS nextPass)=0
Set current render pass.
virtual io::IAttributes * getParameters()=0
Get interface to the parameters set in this scene.
virtual u32 getSceneLoaderCount() const =0
Returns the number of scene loaders supported by Nirtcpp at this time.
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 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 registerSceneNodeFactory(ISceneNodeFactory *factoryToAdd)=0
Adds a scene node factory to the scene manager.
virtual ISceneNode * getSceneNodeFromId(s32 id, ISceneNode *start=0)=0
Get the first scene node with the specified id.
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 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...
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 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 bool loadScene(io::IReadFile *file, ISceneUserDataSerializer *userDataSerializer=0, ISceneNode *rootNode=0)=0
Loads a scene. Note that the current scene is not cleared before.
virtual void registerSceneNodeAnimatorFactory(ISceneNodeAnimatorFactory *factoryToAdd)=0
Adds a scene node animator factory to the scene manager.
virtual ITriangleSelector * createOctreeTriangleSelector(IMeshBuffer *meshBuffer, nirt::u32 materialIndex, ISceneNode *node, s32 minimalPolysPerNode=32)=0
Creates a Triangle Selector for a single meshbuffer, optimized by an octree.
virtual void getSceneNodesFromType(ESCENE_NODE_TYPE type, core::array< scene::ISceneNode * > &outNodes, ISceneNode *start=0)=0
Get scene nodes by type.
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.
virtual const video::SColorf & getAmbientLight() const =0
Get ambient color of the scene.
virtual IMeshWriter * createMeshWriter(EMESH_WRITER_TYPE type)=0
Get a mesh writer implementation if available.
virtual bool isCulled(const ISceneNode *node) const =0
Check if node is culled in current view frustum.
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, bool steer=false)=0
Creates a follow spline animator.
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 IMeshCache * getMeshCache()=0
Get interface to the mesh cache which is shared between all existing scene managers.
virtual bool saveScene(io::IXMLWriter *writer, const io::path &currentPath, ISceneUserDataSerializer *userDataSerializer=0, ISceneNode *node=0)=0
Saves the current scene into a file.
virtual void addToDeletionQueue(ISceneNode *node)=0
Adds a scene node to the deletion queue.
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 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 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 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.
virtual ISceneNodeAnimator * createDeleteAnimator(u32 timeMs)=0
Creates a scene node animator, which deletes the scene node after some time automatically.
virtual bool saveScene(const io::path &filename, ISceneUserDataSerializer *userDataSerializer=0, ISceneNode *node=0)=0
Saves the current scene into a file.
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 ISceneManager * createNewSceneManager(bool cloneContent=false)=0
Creates a new scene manager.
virtual gui::IGUIEnvironment * getGUIEnvironment()=0
Get the active GUIEnvironment.
virtual ICameraSceneNode * getActiveCamera() const =0
Get the current active camera.
virtual video::SColor getShadowColor() const =0
Get the current color of shadows.
virtual ITriangleSelector * createOctreeTriangleSelector(IMesh *mesh, ISceneNode *node, s32 minimalPolysPerNode=32)=0
Creates a Triangle Selector, optimized by an octree.
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, f32 rotX=0.f, f32 rotY=0.f)=0
Adds a maya style user controlled camera scene node to the scene graph.
virtual ITriangleSelector * createTerrainTriangleSelector(ITerrainSceneNode *node, s32 LOD=0)=0
Creates a triangle selector which can select triangles from a terrain scene node.
virtual u32 getRegisteredSceneNodeAnimatorFactoryCount() const =0
Get amount of registered scene node animator factories.
virtual ISceneNode * addSceneNode(const char *sceneNodeTypeName, ISceneNode *parent=0)=0
Adds a scene node to the scene by name.
virtual ISceneNodeFactory * getDefaultSceneNodeFactory()=0
Get the default scene node factory which can create all built in scene nodes.
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 void addExternalMeshLoader(IMeshLoader *externalLoader)=0
Adds an external mesh loader for extending the engine with new file formats.
virtual ISceneNodeFactory * getSceneNodeFactory(u32 index)=0
Get a scene node factory by index.
virtual ISceneNode * getSceneNodeFromType(scene::ESCENE_NODE_TYPE type, ISceneNode *start=0)=0
Get the first scene node with the specified type.
virtual bool postEventFromUser(const SEvent &event)=0
Posts an input event to the environment.
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 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 void setLightManager(ILightManager *lightManager)=0
Register a custom callbacks manager which gets callbacks during scene rendering.
virtual ISceneNodeAnimator * createRotationAnimator(const core::vector3df &rotationSpeed)=0
Creates a rotation animator, which rotates the attached scene node around itself.
virtual u32 getRegisteredSceneNodeFactoryCount() const =0
Get amount of registered scene node factories.
virtual ISceneCollisionManager * getSceneCollisionManager()=0
Get pointer to the scene collision manager.
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 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), ECUBE_MESH_TYPE type=ECMT_1BUF_12VTX_NA)=0
Adds a cube scene node.
virtual IMeshLoader * getMeshLoader(u32 index) const =0
Retrieve the given mesh loader.
virtual IOctreeSceneNode * addOctreeSceneNode(IMesh *mesh, ISceneNode *parent=0, s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false)=0
Adds a scene node for rendering using a octree to the scene graph.
virtual IMetaTriangleSelector * createMetaTriangleSelector()=0
Creates a meta triangle selector.
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.
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 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 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
virtual ISceneNodeAnimatorFactory * getSceneNodeAnimatorFactory(u32 index)=0
Get scene node animator factory by index.
virtual IDummyTransformationSceneNode * addDummyTransformationSceneNode(ISceneNode *parent=0, s32 id=-1)=0
Adds a dummy transformation scene node to the scene graph.
virtual bool saveScene(io::IWriteFile *file, ISceneUserDataSerializer *userDataSerializer=0, ISceneNode *node=0)=0
Saves the current scene into a file.
virtual video::IVideoDriver * getVideoDriver()=0
Get the video driver.
virtual ISceneLoader * getSceneLoader(u32 index) const =0
Retrieve the given scene loader.
virtual ITriangleSelector * createTriangleSelector(IMesh *mesh, ISceneNode *node, bool separateMeshbuffers=false)=0
Creates a simple ITriangleSelector, based on a mesh.
virtual ISceneNodeAnimator * createSceneNodeAnimator(const char *typeName, ISceneNode *target=0)=0
creates a scene node animator based on its type name
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.
virtual u32 getMeshLoaderCount() const =0
Returns the number of mesh loaders supported by Nirtcpp at this time.
virtual IAnimatedMesh * getMesh(io::IReadFile *file)=0
Get pointer to an animateable mesh. Loads the file if not loaded already.
virtual io::IFileSystem * getFileSystem()=0
Get the active FileSystem.
virtual ISceneNodeAnimatorFactory * getDefaultSceneNodeAnimatorFactory()=0
Get the default scene node animator factory which can create all built-in scene node animators.
virtual ITriangleSelector * createTriangleSelectorFromBoundingBox(ISceneNode *node)=0
Creates a simple dynamic ITriangleSelector, based on a axis aligned bounding box.
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 ISkinnedMesh * createSkinnedMesh()=0
Get a skinned mesh, which is not available as header-only code.
virtual const c8 * getSceneNodeTypeName(ESCENE_NODE_TYPE type)=0
Get typename from a scene node type or null if not found.
virtual void addExternalSceneLoader(ISceneLoader *externalLoader)=0
Adds an external scene loader for extending the engine with new file formats.
virtual const IGeometryCreator * getGeometryCreator(void) const =0
Get an instance of a geometry creator.
virtual ISceneNode * getSceneNodeFromName(const c8 *name, ISceneNode *start=0)=0
Get the first scene node with the specified name.
virtual ISceneNode * addEmptySceneNode(ISceneNode *parent=0, s32 id=-1)=0
Adds an empty scene node to the scene graph.
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.
virtual void setActiveCamera(ICameraSceneNode *camera)=0
Sets the currently active camera.
virtual E_SCENE_NODE_RENDER_PASS getCurrentRenderPass() const =0
Get current render pass.
virtual IMeshManipulator * getMeshManipulator()=0
Get pointer to the mesh manipulator.
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.
Special scene node animator for doing automatic collision detection and response.
Definition ISceneNodeAnimatorCollisionResponse.hpp:54
Interface for dynamic creation of scene node animators.
Definition ISceneNodeAnimatorFactory.hpp:28
Animates a scene node. Can animate position, rotation, material, and so on.
Definition ISceneNodeAnimator.hpp:32
Interface for dynamic creation of scene nodes.
Definition ISceneNodeFactory.hpp:28
Scene node interface.
Definition ISceneNode.hpp:43
Interface to read and write user data to and from .irr files.
Definition ISceneUserDataSerializer.hpp:25
Scene node for rendering a shadow volume into a stencil buffer.
Definition IShadowVolumeSceneNode.hpp:34
Interface for using some special functions of Skinned meshes.
Definition ISkinnedMesh.hpp:33
A scene node for displaying terrain using the geo mip map algorithm.
Definition ITerrainSceneNode.hpp:50
A scene node for displaying 2d text at a position in three dimensional space.
Definition ITextSceneNode.hpp:23
Interface to return triangles with specific properties.
Definition ITriangleSelector.hpp:74
Definition IVolumeLightSceneNode.hpp:19
A Parsed Shader Holding Variables ordered in Groups.
Definition IQ3Shader.hpp:652
Interface for software image data.
Definition IImage.hpp:26
Interface of a Video Driver dependent Texture.
Definition ITexture.hpp:186
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition IVideoDriver.hpp:152
Class representing a 32 bit ARGB color.
Definition SColor.hpp:317
Class representing a color with four floats.
Definition SColor.hpp:574
Struct for holding parameters for a material renderer.
Definition SMaterial.hpp:304
E_TERRAIN_PATCH_SIZE
enumeration for patch sizes specifying the size of patches in the TerrainSceneNode
Definition ETerrainElements.hpp:15
@ ETPS_17
patch size of 17, at most, use 5 levels of detail with this patch size.
Definition ETerrainElements.hpp:20
E_SCENE_NODE_RENDER_PASS
Enumeration for render passes.
Definition ISceneManager.hpp:59
@ ESNRP_TRANSPARENT
Transparent scene nodes, drawn after solid nodes. They are sorted from back to front and drawn in tha...
Definition ISceneManager.hpp:91
@ ESNRP_AUTOMATIC
All normal objects can use this for registering themselves.
Definition ISceneManager.hpp:85
@ ESNRP_GUI
Drawn after transparent effect nodes. For custom gui's. Unsorted (in order nodes registered themselve...
Definition ISceneManager.hpp:100
@ ESNRP_SKY_BOX
This is used for sky boxes.
Definition ISceneManager.hpp:70
@ ESNRP_TRANSPARENT_EFFECT
Transparent effect scene nodes, drawn after Transparent nodes. They are sorted from back to front and...
Definition ISceneManager.hpp:94
@ ESNRP_SHADOW
Drawn after the solid nodes, before the transparent nodes, the time for drawing shadow volumes.
Definition ISceneManager.hpp:97
@ ESNRP_SOLID
Solid scene nodes or special scene nodes without materials.
Definition ISceneManager.hpp:88
@ ESNRP_LIGHT
In this pass, lights are transformed into camera space and added to the driver.
Definition ISceneManager.hpp:67
@ ESNRP_CAMERA
Camera pass. The active view is set up here. The very first pass.
Definition ISceneManager.hpp:64
@ ESNRP_NONE
No pass currently active.
Definition ISceneManager.hpp:61
ESCENE_NODE_ANIMATOR_TYPE
An enumeration for all types of built-in scene node animators.
Definition ESceneNodeAnimatorTypes.hpp:15
EMESH_WRITER_TYPE
An enumeration for all supported types of built-in mesh writers.
Definition EMeshWriterEnums.hpp:20
ESCENE_NODE_TYPE
An enumeration for all types of built-in scene nodes.
Definition ESceneNodeTypes.hpp:20
ECUBE_MESH_TYPE
Definition IGeometryCreator.hpp:24
@ ECMT_1BUF_12VTX_NA
Definition IGeometryCreator.hpp:29
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64
char c8
8 bit character variable.
Definition irrTypes.hpp:37
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110

Nirtcpp    @cppfx.xyz

Utxcpp    utx::print