ISceneManager.h 91 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739
  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. #ifndef IRR_I_SCENE_MANAGER_H_INCLUDED
  5. #define IRR_I_SCENE_MANAGER_H_INCLUDED
  6. #include "IReferenceCounted.h"
  7. #include "irrArray.h"
  8. #include "path.h"
  9. #include "vector3d.h"
  10. #include "dimension2d.h"
  11. #include "SColor.h"
  12. #include "ETerrainElements.h"
  13. #include "ESceneNodeTypes.h"
  14. #include "ESceneNodeAnimatorTypes.h"
  15. #include "EMeshWriterEnums.h"
  16. #include "SceneParameters.h"
  17. #include "IGeometryCreator.h"
  18. #include "ISkinnedMesh.h"
  19. #include "IXMLWriter.h"
  20. namespace irr
  21. {
  22. struct SKeyMap;
  23. struct SEvent;
  24. namespace io
  25. {
  26. class IReadFile;
  27. class IAttributes;
  28. class IWriteFile;
  29. class IFileSystem;
  30. } // end namespace io
  31. namespace gui
  32. {
  33. class IGUIFont;
  34. class IGUIEnvironment;
  35. } // end namespace gui
  36. namespace video
  37. {
  38. class IVideoDriver;
  39. class SMaterial;
  40. class IImage;
  41. class ITexture;
  42. } // end namespace video
  43. namespace scene
  44. {
  45. //! Enumeration for render passes.
  46. /** A parameter passed to the registerNodeForRendering() method of the ISceneManager,
  47. specifying when the node wants to be drawn in relation to the other nodes.
  48. Note: Despite the numbering this is not used as bit-field.
  49. */
  50. enum E_SCENE_NODE_RENDER_PASS
  51. {
  52. //! No pass currently active
  53. ESNRP_NONE =0,
  54. //! Camera pass. The active view is set up here. The very first pass.
  55. ESNRP_CAMERA =1,
  56. //! In this pass, lights are transformed into camera space and added to the driver
  57. ESNRP_LIGHT =2,
  58. //! This is mostly used for sky boxes. Stage between light and solid.
  59. ESNRP_SKY_BOX =4,
  60. //! All normal objects can use this for registering themselves.
  61. /** This value will never be returned by
  62. ISceneManager::getSceneNodeRenderPass(). The scene manager
  63. will determine by itself if an object is transparent or solid
  64. and register the object as ESNRT_TRANSPARENT or ESNRP_SOLID
  65. automatically if you call registerNodeForRendering with this
  66. value (which is default). Note that it will register the node
  67. only as ONE type. If your scene node has both solid and
  68. transparent material types register it twice (one time as
  69. ESNRP_SOLID, the other time as ESNRT_TRANSPARENT) and in the
  70. render() method call getSceneNodeRenderPass() to find out the
  71. current render pass and render only the corresponding parts of
  72. the node. */
  73. ESNRP_AUTOMATIC =24,
  74. //! Solid scene nodes or special scene nodes without materials.
  75. ESNRP_SOLID =8,
  76. //! Transparent scene nodes, drawn after solid nodes. They are sorted from back to front and drawn in that order.
  77. ESNRP_TRANSPARENT =16,
  78. //! Transparent effect scene nodes, drawn after Transparent nodes. They are sorted from back to front and drawn in that order.
  79. ESNRP_TRANSPARENT_EFFECT =32,
  80. //! Drawn after the solid nodes, before the transparent nodes, the time for drawing shadow volumes
  81. ESNRP_SHADOW =64,
  82. //! Drawn after transparent effect nodes. For custom gui's. Unsorted (in order nodes registered themselves).
  83. ESNRP_GUI = 128
  84. };
  85. //! Enumeration for sorting transparent nodes
  86. /** Sorting used for nodes with ESNRP_TRANSPARENT or ESNRP_AUTOMATIC+transparency.
  87. Also used for ESNRP_TRANSPARENT_EFFECT nodes (in an independent array)
  88. Transparent nodes are always drawn back to front based on distance to camera.
  89. This enum controls which points are used for the distance. */
  90. enum E_TRANSPARENT_NODE_SORTING
  91. {
  92. //! Don't sort, but draw in the order in which nodes registered themselves for rendering
  93. //! By default this is the order in which nodes are in the scenegraph
  94. //! Which can be used to do some custom sorting via scene-graph (mainly useful if you only have to that once)
  95. ETNS_NONE,
  96. //! Distance from node origin to camera position
  97. ETNS_ORIGIN,
  98. //! Distance from node center to camera position
  99. ETNS_CENTER,
  100. //! Distance from the nearest of the 2 transformed bounding-box extend corners to camera
  101. ETNS_BBOX_EXTENTS,
  102. //! Distance from node origin to camera plane
  103. ETNS_PLANE_ORIGIN,
  104. //! Distance from node center to camera plane
  105. //! With orthographic cameras there's a high chance you might prefer this one
  106. ETNS_PLANE_CENTER,
  107. //! Default sorting Irrlicht uses currently
  108. //! This may change in the future
  109. ETNS_DEFAULT = ETNS_CENTER
  110. };
  111. class IAnimatedMesh;
  112. class IAnimatedMeshSceneNode;
  113. class IBillboardSceneNode;
  114. class IBillboardTextSceneNode;
  115. class ICameraSceneNode;
  116. class IDummyTransformationSceneNode;
  117. class ILightManager;
  118. class ILightSceneNode;
  119. class IMesh;
  120. class IMeshBuffer;
  121. class IMeshCache;
  122. class IMeshLoader;
  123. class IMeshManipulator;
  124. class IMeshSceneNode;
  125. class IMeshWriter;
  126. class IMetaTriangleSelector;
  127. class IOctreeSceneNode;
  128. class IParticleSystemSceneNode;
  129. class ISceneCollisionManager;
  130. class ISceneLoader;
  131. class ISceneNode;
  132. class ISceneNodeAnimator;
  133. class ISceneNodeAnimatorCollisionResponse;
  134. class ISceneNodeAnimatorFactory;
  135. class ISceneNodeFactory;
  136. class ISceneUserDataSerializer;
  137. class IShadowVolumeSceneNode;
  138. class ITerrainSceneNode;
  139. class ITextSceneNode;
  140. class ITriangleSelector;
  141. class IVolumeLightSceneNode;
  142. namespace quake3
  143. {
  144. struct IShader;
  145. } // end namespace quake3
  146. //! The Scene Manager manages scene nodes, mesh resources, cameras and all the other stuff.
  147. /** All Scene nodes can be created only here. There is a always growing
  148. list of scene nodes for lots of purposes: Indoor rendering scene nodes
  149. like the Octree (addOctreeSceneNode()) or the terrain renderer
  150. (addTerrainSceneNode()), different Camera scene nodes
  151. (addCameraSceneNode(), addCameraSceneNodeMaya()), scene nodes for Light
  152. (addLightSceneNode()), Billboards (addBillboardSceneNode()) and so on.
  153. A scene node is a node in the hierarchical scene graph. Every scene node
  154. may have children, which are other scene nodes. Children move relative
  155. the their parents position. If the parent of a node is not visible, its
  156. children won't be visible, too. In this way, it is for example easily
  157. possible to attach a light to a moving car or to place a walking
  158. character on a moving platform on a moving ship.
  159. The SceneManager is also able to load 3d mesh files of different
  160. formats. Take a look at getMesh() to find out what formats are
  161. supported. If these formats are not enough, use
  162. addExternalMeshLoader() to add new formats to the engine.
  163. */
  164. class ISceneManager : public virtual IReferenceCounted
  165. {
  166. public:
  167. //! Get pointer to an animatable mesh. Loads the file if not loaded already.
  168. /**
  169. * If you want to remove a loaded mesh from the cache again, use removeMesh().
  170. * Currently there are the following mesh formats supported:
  171. * <TABLE border="1" cellpadding="2" cellspacing="0">
  172. * <TR>
  173. * <TD>Format</TD>
  174. * <TD>Description</TD>
  175. * </TR>
  176. * <TR>
  177. * <TD>3D Studio (.3ds)</TD>
  178. * <TD>Loader for 3D-Studio files which lots of 3D packages
  179. * are able to export. Only static meshes are currently
  180. * supported by this importer.</TD>
  181. * </TR>
  182. * <TR>
  183. * <TD>3D World Studio (.smf)</TD>
  184. * <TD>Loader for Leadwerks SMF mesh files, a simple mesh format
  185. * containing static geometry for games. The proprietary .STF texture format
  186. * is not supported yet. This loader was originally written by Joseph Ellis. </TD>
  187. * </TR>
  188. * <TR>
  189. * <TD>Bliz Basic B3D (.b3d)</TD>
  190. * <TD>Loader for blitz basic files, developed by Mark
  191. * Sibly. This is the ideal animated mesh format for game
  192. * characters as it is both rigidly defined and widely
  193. * supported by modeling and animation software.
  194. * As this format supports skeletal animations, an
  195. * ISkinnedMesh will be returned by this importer.</TD>
  196. * </TR>
  197. * <TR>
  198. * <TD>Cartography shop 4 (.csm)</TD>
  199. * <TD>Cartography Shop is a modeling program for creating
  200. * architecture and calculating lighting. Irrlicht can
  201. * directly import .csm files thanks to the IrrCSM library
  202. * created by Saurav Mohapatra which is now integrated
  203. * directly in Irrlicht.
  204. * </TR>
  205. * <TR>
  206. * <TD>COLLADA (.dae, .xml)</TD>
  207. * <TD>COLLADA is an open Digital Asset Exchange Schema for
  208. * the interactive 3D industry. There are exporters and
  209. * importers for this format available for most of the
  210. * big 3d packagesat http://collada.org. Irrlicht can
  211. * import COLLADA files by using the
  212. * ISceneManager::getMesh() method. COLLADA files need
  213. * not contain only one single mesh but multiple meshes
  214. * and a whole scene setup with lights, cameras and mesh
  215. * instances, this loader can set up a scene as
  216. * described by the COLLADA file instead of loading and
  217. * returning one single mesh. By default, this loader
  218. * behaves like the other loaders and does not create
  219. * instances, but it can be switched into this mode by
  220. * using
  221. * SceneManager-&gt;getParameters()-&gt;setAttribute(COLLADA_CREATE_SCENE_INSTANCES, true);
  222. * Created scene nodes will be named as the names of the
  223. * nodes in the COLLADA file. The returned mesh is just
  224. * a dummy object in this mode. Meshes included in the
  225. * scene will be added into the scene manager with the
  226. * following naming scheme:
  227. * "path/to/file/file.dea#meshname". The loading of such
  228. * meshes is logged. Currently, this loader is able to
  229. * create meshes (made of only polygons), lights, and
  230. * cameras. Materials and animations are currently not
  231. * supported but this will change with future releases.
  232. * </TD>
  233. * </TR>
  234. * <TR>
  235. * <TD>Delgine DeleD (.dmf)</TD>
  236. * <TD>DeleD (delgine.com) is a 3D editor and level-editor
  237. * combined into one and is specifically designed for 3D
  238. * game-development. With this loader, it is possible to
  239. * directly load all geometry is as well as textures and
  240. * lightmaps from .dmf files. To set texture and
  241. * material paths, see scene::DMF_USE_MATERIALS_DIRS.
  242. * It is also possible to flip the alpha texture by setting
  243. * scene::DMF_FLIP_ALPHA_TEXTURES to true and to set the
  244. * material transparent reference value by setting
  245. * scene::DMF_ALPHA_CHANNEL_REF to a float between 0 and
  246. * 1. The loader is based on Salvatore Russo's .dmf
  247. * loader, I just changed some parts of it. Thanks to
  248. * Salvatore for his work and for allowing me to use his
  249. * code in Irrlicht and put it under Irrlicht's license.
  250. * For newer and more enhanced versions of the loader,
  251. * take a look at delgine.com.
  252. * </TD>
  253. * </TR>
  254. * <TR>
  255. * <TD>DirectX (.x)</TD>
  256. * <TD>Platform independent importer (so not D3D-only) for
  257. * .x files. Most 3D packages can export these natively
  258. * and there are several tools for them available, e.g.
  259. * the Maya exporter included in the DX SDK.
  260. * .x files can include skeletal animations and Irrlicht
  261. * is able to play and display them, users can manipulate
  262. * the joints via the ISkinnedMesh interface. Currently,
  263. * Irrlicht only supports uncompressed .x files.</TD>
  264. * </TR>
  265. * <TR>
  266. * <TD>Half-Life model (.mdl)</TD>
  267. * <TD>This loader opens Half-life 1 models, it was contributed
  268. * by Fabio Concas and adapted by Thomas Alten.</TD>
  269. * </TR>
  270. * <TR>
  271. * <TD>Irrlicht Mesh (.irrMesh)</TD>
  272. * <TD>This is a static mesh format written in XML, native
  273. * to Irrlicht and written by the irr mesh writer.
  274. * This format is exported by the CopperCube engine's
  275. * lightmapper.</TD>
  276. * </TR>
  277. * <TR>
  278. * <TD>LightWave (.lwo)</TD>
  279. * <TD>Native to NewTek's LightWave 3D, the LWO format is well
  280. * known and supported by many exporters. This loader will
  281. * import LWO2 models including lightmaps, bumpmaps and
  282. * reflection textures.</TD>
  283. * </TR>
  284. * <TR>
  285. * <TD>Maya (.obj)</TD>
  286. * <TD>Most 3D software can create .obj files which contain
  287. * static geometry without material data. The material
  288. * files .mtl are also supported. This importer for
  289. * Irrlicht can load them directly. </TD>
  290. * </TR>
  291. * <TR>
  292. * <TD>Milkshape (.ms3d)</TD>
  293. * <TD>.MS3D files contain models and sometimes skeletal
  294. * animations from the Milkshape 3D modeling and animation
  295. * software. Like the other skeletal mesh loaders, joints
  296. * are exposed via the ISkinnedMesh animated mesh type.</TD>
  297. * </TR>
  298. * <TR>
  299. * <TD>My3D (.my3d)</TD>
  300. * <TD>.my3D is a flexible 3D file format. The My3DTools
  301. * contains plug-ins to export .my3D files from several
  302. * 3D packages. With this built-in importer, Irrlicht
  303. * can read and display those files directly. This
  304. * loader was written by Zhuck Dimitry who also created
  305. * the whole My3DTools package.
  306. * </TD>
  307. * </TR>
  308. * <TR>
  309. * <TD>OCT (.oct)</TD>
  310. * <TD>The oct file format contains 3D geometry and
  311. * lightmaps and can be loaded directly by Irrlicht. OCT
  312. * files<br> can be created by FSRad, Paul Nette's
  313. * radiosity processor or exported from Blender using
  314. * OCTTools which can be found in the exporters/OCTTools
  315. * directory of the SDK. Thanks to Murphy McCauley for
  316. * creating all this.</TD>
  317. * </TR>
  318. * <TR>
  319. * <TD>OGRE Meshes (.mesh)</TD>
  320. * <TD>Ogre .mesh files contain 3D data for the OGRE 3D
  321. * engine. Irrlicht can read and display them directly
  322. * with this importer. To define materials for the mesh,
  323. * copy a .material file named like the corresponding
  324. * .mesh file where the .mesh file is. (For example
  325. * ogrehead.material for ogrehead.mesh). Thanks to
  326. * Christian Stehno who wrote and contributed this
  327. * loader.</TD>
  328. * </TR>
  329. * <TR>
  330. * <TD>Pulsar LMTools (.lmts)</TD>
  331. * <TD>LMTools is a set of tools (Windows &amp; Linux) for
  332. * creating lightmaps. Irrlicht can directly read .lmts
  333. * files thanks to<br> the importer created by Jonas
  334. * Petersen.
  335. * Notes for<br> this version of the loader:<br>
  336. * - It does not recognize/support user data in the
  337. * *.lmts files.<br>
  338. * - The TGAs generated by LMTools don't work in
  339. * Irrlicht for some reason (the textures are upside
  340. * down). Opening and resaving them in a graphics app
  341. * will solve the problem.</TD>
  342. * </TR>
  343. * <TR>
  344. * <TD>Quake 3 levels (.bsp)</TD>
  345. * <TD>Quake 3 is a popular game by IDSoftware, and .pk3
  346. * files contain .bsp files and textures/lightmaps
  347. * describing huge prelighted levels. Irrlicht can read
  348. * .pk3 and .bsp files directly and thus render Quake 3
  349. * levels directly. Written by Nikolaus Gebhardt
  350. * enhanced by Dean P. Macri with the curved surfaces
  351. * feature. </TD>
  352. * </TR>
  353. * <TR>
  354. * <TD>Quake 2 models (.md2)</TD>
  355. * <TD>Quake 2 models are characters with morph target
  356. * animation. Irrlicht can read, display and animate
  357. * them directly with this importer. </TD>
  358. * </TR>
  359. * <TR>
  360. * <TD>Quake 3 models (.md3)</TD>
  361. * <TD>Quake 3 models are characters with morph target
  362. * animation, they contain mount points for weapons and body
  363. * parts and are typically made of several sections which are
  364. * manually joined together.</TD>
  365. * </TR>
  366. * <TR>
  367. * <TD>Stanford Triangle (.ply)</TD>
  368. * <TD>Invented by Stanford University and known as the native
  369. * format of the infamous "Stanford Bunny" model, this is a
  370. * popular static mesh format used by 3D scanning hardware
  371. * and software. This loader supports extremely large models
  372. * in both ASCII and binary format, but only has rudimentary
  373. * material support in the form of vertex colors and texture
  374. * coordinates.</TD>
  375. * </TR>
  376. * <TR>
  377. * <TD>Stereolithography (.stl)</TD>
  378. * <TD>The STL format is used for rapid prototyping and
  379. * computer-aided manufacturing, thus has no support for
  380. * materials.</TD>
  381. * </TR>
  382. * </TABLE>
  383. *
  384. * To load and display a mesh quickly, just do this:
  385. * \code
  386. * SceneManager->addAnimatedMeshSceneNode(
  387. * SceneManager->getMesh("yourmesh.3ds"));
  388. * \endcode
  389. * If you would like to implement and add your own file format loader to Irrlicht,
  390. * see addExternalMeshLoader().
  391. * \param filename: Filename of the mesh to load.
  392. * \param alternativeCacheName: In case you want to have the mesh under another name in the cache (to create real copies)
  393. * \return Null if failed, otherwise pointer to the mesh.
  394. * This pointer should not be dropped. See IReferenceCounted::drop() for more information.
  395. **/
  396. virtual IAnimatedMesh* getMesh(const io::path& filename, const io::path& alternativeCacheName=io::path("")) = 0;
  397. //! Get pointer to an animatable mesh. Loads the file if not loaded already.
  398. /** Works just as getMesh(const char* filename). If you want to
  399. remove a loaded mesh from the cache again, use removeMesh().
  400. \param file File handle of the mesh to load.
  401. \return NULL if failed and pointer to the mesh if successful.
  402. This pointer should not be dropped. See
  403. IReferenceCounted::drop() for more information. */
  404. virtual IAnimatedMesh* getMesh(io::IReadFile* file) = 0;
  405. //! Get interface to the mesh cache which is shared between all existing scene managers.
  406. /** With this interface, it is possible to manually add new loaded
  407. meshes (if ISceneManager::getMesh() is not sufficient), to remove them and to iterate
  408. through already loaded meshes. */
  409. virtual IMeshCache* getMeshCache() = 0;
  410. //! Get the video driver.
  411. /** \return Pointer to the video Driver.
  412. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  413. virtual video::IVideoDriver* getVideoDriver() = 0;
  414. //! Get the active GUIEnvironment
  415. /** \return Pointer to the GUIEnvironment
  416. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  417. virtual gui::IGUIEnvironment* getGUIEnvironment() = 0;
  418. //! Get the active FileSystem
  419. /** \return Pointer to the FileSystem
  420. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  421. virtual io::IFileSystem* getFileSystem() = 0;
  422. //! adds Volume Lighting Scene Node.
  423. /** Example Usage:
  424. scene::IVolumeLightSceneNode * n = smgr->addVolumeLightSceneNode(0, -1,
  425. 32, 32, //Subdivide U/V
  426. video::SColor(0, 180, 180, 180), //foot color
  427. video::SColor(0, 0, 0, 0) //tail color
  428. );
  429. if (n)
  430. {
  431. n->setScale(core::vector3df(46.0f, 45.0f, 46.0f));
  432. n->getMaterial(0).setTexture(0, smgr->getVideoDriver()->getTexture("lightFalloff.png"));
  433. }
  434. \return Pointer to the volumeLight if successful, otherwise NULL.
  435. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  436. virtual IVolumeLightSceneNode* addVolumeLightSceneNode(ISceneNode* parent=0, s32 id=-1,
  437. const u32 subdivU = 32, const u32 subdivV = 32,
  438. const video::SColor foot = video::SColor(51, 0, 230, 180),
  439. const video::SColor tail = video::SColor(0, 0, 0, 0),
  440. const core::vector3df& position = core::vector3df(0,0,0),
  441. const core::vector3df& rotation = core::vector3df(0,0,0),
  442. const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
  443. //! Adds a cube scene node
  444. /** \param size: Size of the cube, uniformly in each dimension.
  445. \param parent: Parent of the scene node. Can be 0 if no parent.
  446. \param id: Id of the node. This id can be used to identify the scene node.
  447. \param position: Position of the space relative to its parent
  448. where the scene node will be placed.
  449. \param rotation: Initial rotation of the scene node.
  450. \param scale: Initial scale of the scene node.
  451. \param type: Type of cube-mesh to create. Check ECUBE_MESH_TYPE documentation for more info
  452. \return Pointer to the created test scene node. This
  453. pointer should not be dropped. See IReferenceCounted::drop()
  454. for more information. */
  455. virtual IMeshSceneNode* addCubeSceneNode(f32 size=10.0f, ISceneNode* parent=0, s32 id=-1,
  456. const core::vector3df& position = core::vector3df(0,0,0),
  457. const core::vector3df& rotation = core::vector3df(0,0,0),
  458. const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f),
  459. ECUBE_MESH_TYPE type=ECMT_1BUF_12VTX_NA) = 0;
  460. //! Adds a sphere scene node of the given radius and detail
  461. /** \param radius: Radius of the sphere.
  462. \param polyCount: The number of vertices in horizontal and
  463. vertical direction. The total polyCount of the sphere is
  464. polyCount*polyCount. This parameter must be less than 256 to
  465. stay within the 16-bit limit of the indices of a meshbuffer.
  466. \param parent: Parent of the scene node. Can be 0 if no parent.
  467. \param id: Id of the node. This id can be used to identify the scene node.
  468. \param position: Position of the space relative to its parent
  469. where the scene node will be placed.
  470. \param rotation: Initial rotation of the scene node.
  471. \param scale: Initial scale of the scene node.
  472. \return Pointer to the created test scene node. This
  473. pointer should not be dropped. See IReferenceCounted::drop()
  474. for more information. */
  475. virtual IMeshSceneNode* addSphereSceneNode(f32 radius=5.0f, s32 polyCount=16,
  476. ISceneNode* parent=0, s32 id=-1,
  477. const core::vector3df& position = core::vector3df(0,0,0),
  478. const core::vector3df& rotation = core::vector3df(0,0,0),
  479. const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
  480. //! Adds a scene node for rendering an animated mesh model.
  481. /** \param mesh: Pointer to the loaded animated mesh to be displayed.
  482. \param parent: Parent of the scene node. Can be NULL if no parent.
  483. \param id: Id of the node. This id can be used to identify the scene node.
  484. \param position: Position of the space relative to its parent where the
  485. scene node will be placed.
  486. \param rotation: Initial rotation of the scene node.
  487. \param scale: Initial scale of the scene node.
  488. \param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed.
  489. \return Pointer to the created scene node.
  490. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  491. virtual IAnimatedMeshSceneNode* addAnimatedMeshSceneNode(IAnimatedMesh* mesh,
  492. ISceneNode* parent=0, s32 id=-1,
  493. const core::vector3df& position = core::vector3df(0,0,0),
  494. const core::vector3df& rotation = core::vector3df(0,0,0),
  495. const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f),
  496. bool alsoAddIfMeshPointerZero=false) = 0;
  497. //! Adds a scene node for rendering a static mesh.
  498. /** \param mesh: Pointer to the loaded static mesh to be displayed.
  499. \param parent: Parent of the scene node. Can be NULL if no parent.
  500. \param id: Id of the node. This id can be used to identify the scene node.
  501. \param position: Position of the space relative to its parent where the
  502. scene node will be placed.
  503. \param rotation: Initial rotation of the scene node.
  504. \param scale: Initial scale of the scene node.
  505. \param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed.
  506. \return Pointer to the created scene node.
  507. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  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. //! Adds a scene node for rendering a animated water surface mesh.
  514. /** Looks really good when the Material type EMT_TRANSPARENT_REFLECTION
  515. is used.
  516. \param waveHeight: Height of the water waves.
  517. \param waveSpeed: Speed of the water waves.
  518. \param waveLength: Length of a water wave.
  519. \param mesh: Pointer to the loaded static mesh to be displayed with water waves on it.
  520. \param parent: Parent of the scene node. Can be NULL if no parent.
  521. \param id: Id of the node. This id can be used to identify the scene node.
  522. \param position: Position of the space relative to its parent where the
  523. scene node will be placed.
  524. \param rotation: Initial rotation of the scene node.
  525. \param scale: Initial scale of the scene node.
  526. \return Pointer to the created scene node.
  527. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  528. virtual ISceneNode* addWaterSurfaceSceneNode(IMesh* mesh,
  529. f32 waveHeight=2.0f, f32 waveSpeed=300.0f, f32 waveLength=10.0f,
  530. ISceneNode* parent=0, s32 id=-1,
  531. const core::vector3df& position = core::vector3df(0,0,0),
  532. const core::vector3df& rotation = core::vector3df(0,0,0),
  533. const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
  534. //! Adds a scene node for rendering using a octree to the scene graph.
  535. /** This a good method for rendering
  536. scenes with lots of geometry. The octree is built on the fly from the mesh.
  537. \param mesh: The mesh containing all geometry from which the octree will be build.
  538. If this animated mesh has more than one frames in it, the first frame is taken.
  539. \param parent: Parent node of the octree node.
  540. \param id: id of the node. This id can be used to identify the node.
  541. \param minimalPolysPerNode: Specifies the minimal polygons contained a octree node.
  542. If a node gets less polys than this value it will not be split into
  543. smaller nodes.
  544. \param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed.
  545. \return Pointer to the octree if successful, otherwise 0.
  546. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  547. virtual IOctreeSceneNode* addOctreeSceneNode(IAnimatedMesh* mesh, ISceneNode* parent=0,
  548. s32 id=-1, s32 minimalPolysPerNode=512, bool alsoAddIfMeshPointerZero=false) = 0;
  549. //! Adds a scene node for rendering using a octree to the scene graph.
  550. /** This a good method for rendering scenes with lots of
  551. geometry. The octree is built on the fly from the mesh, much
  552. faster then a bsp tree.
  553. \param mesh: The mesh containing all geometry from which the octree will be build.
  554. \param parent: Parent node of the octree node.
  555. \param id: id of the node. This id can be used to identify the node.
  556. \param minimalPolysPerNode: Specifies the minimal polygons contained a octree node.
  557. If a node gets less polys than this value it will not be split into
  558. smaller nodes.
  559. \param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed.
  560. \return Pointer to the octree if successful, otherwise 0.
  561. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  562. virtual IOctreeSceneNode* addOctreeSceneNode(IMesh* mesh, ISceneNode* parent=0,
  563. s32 id=-1, s32 minimalPolysPerNode=256, bool alsoAddIfMeshPointerZero=false) = 0;
  564. //! Adds a camera scene node to the scene graph and sets it as active camera.
  565. /** This camera does not react on user input like for example the one created with
  566. addCameraSceneNodeFPS(). If you want to move or animate it, use animators or the
  567. ISceneNode::setPosition(), ICameraSceneNode::setTarget() etc methods.
  568. By default, a camera's look at position (set with setTarget()) and its scene node
  569. rotation (set with setRotation()) are independent. If you want to be able to
  570. control the direction that the camera looks by using setRotation() then call
  571. ICameraSceneNode::bindTargetAndRotation(true) on it.
  572. \param position: Position of the space relative to its parent where the camera will be placed.
  573. \param lookat: Position where the camera will look at. Also known as target.
  574. \param parent: Parent scene node of the camera. Can be null. If the parent moves,
  575. the camera will move too.
  576. \param id: id of the camera. This id can be used to identify the camera.
  577. \param makeActive Flag whether this camera should become the active one.
  578. Make sure you always have one active camera.
  579. \return Pointer to interface to camera if successful, otherwise 0.
  580. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  581. virtual ICameraSceneNode* addCameraSceneNode(ISceneNode* parent = 0,
  582. const core::vector3df& position = core::vector3df(0,0,0),
  583. const core::vector3df& lookat = core::vector3df(0,0,100),
  584. s32 id=-1, bool makeActive=true) = 0;
  585. //! Adds a maya style user controlled camera scene node to the scene graph.
  586. /** This is a standard camera with an animator that provides mouse control similar
  587. to camera in the 3D Software Maya by Alias Wavefront.
  588. The camera does not react on setPosition anymore after applying this animator. Instead
  589. use setTarget, to fix the target the camera the camera hovers around. And setDistance
  590. to set the current distance from that target, i.e. the radius of the orbit the camera
  591. hovers on.
  592. \param parent: Parent scene node of the camera. Can be null.
  593. \param rotateSpeed: Rotation speed of the camera.
  594. \param zoomSpeed: Zoom speed of the camera.
  595. \param translationSpeed: TranslationSpeed of the camera.
  596. \param id: id of the camera. This id can be used to identify the camera.
  597. \param distance Initial distance of the camera from the object
  598. \param makeActive Flag whether this camera should become the active one.
  599. Make sure you always have one active camera.
  600. \return Returns a pointer to the interface of the camera if successful, otherwise 0.
  601. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  602. virtual ICameraSceneNode* addCameraSceneNodeMaya(ISceneNode* parent=0,
  603. f32 rotateSpeed=-1500.f, f32 zoomSpeed=200.f,
  604. f32 translationSpeed=1500.f, s32 id=-1, f32 distance=70.f,
  605. bool makeActive=true
  606. , f32 rotX = 0.f, f32 rotY = 0.f
  607. ) =0;
  608. //! Adds a camera scene node with an animator which provides mouse and keyboard control appropriate for first person shooters (FPS).
  609. /** This FPS camera is intended to provide a demonstration of a
  610. camera that behaves like a typical First Person Shooter. It is
  611. useful for simple demos and prototyping but is not intended to
  612. provide a full solution for a production quality game. It binds
  613. the camera scene node rotation to the look-at target; @see
  614. ICameraSceneNode::bindTargetAndRotation(). With this camera,
  615. you look with the mouse, and move with cursor keys. If you want
  616. to change the key layout, you can specify your own keymap. For
  617. example to make the camera be controlled by the cursor keys AND
  618. the keys W,A,S, and D, do something like this:
  619. \code
  620. SKeyMap keyMap[8];
  621. keyMap[0].Action = EKA_MOVE_FORWARD;
  622. keyMap[0].KeyCode = KEY_UP;
  623. keyMap[1].Action = EKA_MOVE_FORWARD;
  624. keyMap[1].KeyCode = KEY_KEY_W;
  625. keyMap[2].Action = EKA_MOVE_BACKWARD;
  626. keyMap[2].KeyCode = KEY_DOWN;
  627. keyMap[3].Action = EKA_MOVE_BACKWARD;
  628. keyMap[3].KeyCode = KEY_KEY_S;
  629. keyMap[4].Action = EKA_STRAFE_LEFT;
  630. keyMap[4].KeyCode = KEY_LEFT;
  631. keyMap[5].Action = EKA_STRAFE_LEFT;
  632. keyMap[5].KeyCode = KEY_KEY_A;
  633. keyMap[6].Action = EKA_STRAFE_RIGHT;
  634. keyMap[6].KeyCode = KEY_RIGHT;
  635. keyMap[7].Action = EKA_STRAFE_RIGHT;
  636. keyMap[7].KeyCode = KEY_KEY_D;
  637. camera = sceneManager->addCameraSceneNodeFPS(0, 100, 500, -1, keyMap, 8);
  638. \endcode
  639. \param parent: Parent scene node of the camera. Can be null.
  640. \param rotateSpeed: Speed in degrees with which the camera is
  641. rotated. This can be done only with the mouse.
  642. \param moveSpeed: Speed in units per millisecond with which
  643. the camera is moved. Movement is done with the cursor keys.
  644. \param id: id of the camera. This id can be used to identify
  645. the camera.
  646. \param keyMapArray: Optional pointer to an array of a keymap,
  647. specifying what keys should be used to move the camera. If this
  648. is null, the default keymap is used. You can define actions
  649. more then one time in the array, to bind multiple keys to the
  650. same action.
  651. \param keyMapSize: Amount of items in the keymap array.
  652. \param noVerticalMovement: Setting this to true makes the
  653. camera only move within a horizontal plane, and disables
  654. vertical movement as known from most ego shooters. Default is
  655. 'false', with which it is possible to fly around in space, if
  656. no gravity is there.
  657. \param jumpSpeed: Speed with which the camera is moved when
  658. jumping.
  659. \param invertMouse: Setting this to true makes the camera look
  660. up when the mouse is moved down and down when the mouse is
  661. moved up, the default is 'false' which means it will follow the
  662. movement of the mouse cursor.
  663. \param makeActive Flag whether this camera should become the active one.
  664. Make sure you always have one active camera.
  665. \return Pointer to the interface of the camera if successful,
  666. otherwise 0. This pointer should not be dropped. See
  667. IReferenceCounted::drop() for more information. */
  668. virtual ICameraSceneNode* addCameraSceneNodeFPS(ISceneNode* parent = 0,
  669. f32 rotateSpeed = 100.0f, f32 moveSpeed = 0.5f, s32 id=-1,
  670. SKeyMap* keyMapArray=0, s32 keyMapSize=0, bool noVerticalMovement=false,
  671. f32 jumpSpeed = 0.f, bool invertMouse=false,
  672. bool makeActive=true) = 0;
  673. //! Adds a dynamic light scene node to the scene graph.
  674. /** The light will cast dynamic light on all
  675. other scene nodes in the scene, which have the material flag video::MTF_LIGHTING
  676. turned on. (This is the default setting in most scene nodes).
  677. \param parent: Parent scene node of the light. Can be null. If the parent moves,
  678. the light will move too.
  679. \param position: Position of the space relative to its parent where the light will be placed.
  680. \param color: Diffuse color of the light. Ambient or Specular colors can be set manually with
  681. the ILightSceneNode::getLightData() method.
  682. \param radius: Radius of the light.
  683. \param id: id of the node. This id can be used to identify the node.
  684. \return Pointer to the interface of the light if successful, otherwise NULL.
  685. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  686. virtual ILightSceneNode* addLightSceneNode(ISceneNode* parent = 0,
  687. const core::vector3df& position = core::vector3df(0,0,0),
  688. video::SColorf color = video::SColorf(1.0f, 1.0f, 1.0f),
  689. f32 radius=100.0f, s32 id=-1) = 0;
  690. //! Adds a billboard scene node to the scene graph.
  691. /** A billboard is like a 3d sprite: A 2d element,
  692. which always looks to the camera. It is usually used for things
  693. like explosions, fire, lensflares and things like that.
  694. \param parent Parent scene node of the billboard. Can be null.
  695. If the parent moves, the billboard will move too.
  696. \param size Size of the billboard. This size is 2 dimensional
  697. because a billboard only has width and height.
  698. \param position Position of the space relative to its parent
  699. where the billboard will be placed.
  700. \param id An id of the node. This id can be used to identify
  701. the node.
  702. \param colorTop The color of the vertices at the top of the
  703. billboard (default: white).
  704. \param colorBottom The color of the vertices at the bottom of
  705. the billboard (default: white).
  706. \return Pointer to the billboard if successful, otherwise NULL.
  707. This pointer should not be dropped. See
  708. IReferenceCounted::drop() for more information. */
  709. virtual IBillboardSceneNode* addBillboardSceneNode(ISceneNode* parent = 0,
  710. const core::dimension2d<f32>& size = core::dimension2d<f32>(10.0f, 10.0f),
  711. const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1,
  712. video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0;
  713. //! Adds a skybox scene node to the scene graph.
  714. /** A skybox is a big cube with 6 textures on it and
  715. is drawn around the camera position.
  716. \param top: Texture for the top plane of the box.
  717. \param bottom: Texture for the bottom plane of the box.
  718. \param left: Texture for the left plane of the box.
  719. \param right: Texture for the right plane of the box.
  720. \param front: Texture for the front plane of the box.
  721. \param back: Texture for the back plane of the box.
  722. \param parent: Parent scene node of the skybox. A skybox usually has no parent,
  723. so this should be null. Note: If a parent is set to the skybox, the box will not
  724. change how it is drawn.
  725. \param id: An id of the node. This id can be used to identify the node.
  726. \return Pointer to the sky box if successful, otherwise NULL.
  727. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  728. virtual ISceneNode* addSkyBoxSceneNode(video::ITexture* top, video::ITexture* bottom,
  729. video::ITexture* left, video::ITexture* right, video::ITexture* front,
  730. video::ITexture* back, ISceneNode* parent = 0, s32 id=-1) = 0;
  731. //! Adds a skydome scene node to the scene graph.
  732. /** A skydome is a large (half-) sphere with a panoramic texture
  733. on the inside and is drawn around the camera position.
  734. Note: If the texture is mirrored you can use a negative scale for
  735. the texture-matrix of the node to still work with it.
  736. \param texture: Texture for the dome.
  737. \param horiRes: Number of vertices of a horizontal layer of the sphere.
  738. \param vertRes: Number of vertices of a vertical layer of the sphere.
  739. \param texturePercentage: How much of the height of the
  740. texture is used. Should be between 0 and 1.
  741. \param spherePercentage: How much of the sphere is drawn.
  742. Value should be between 0 and 2, where 1 is an exact
  743. half-sphere and 2 is a full sphere.
  744. \param radius The Radius of the sphere
  745. \param parent: Parent scene node of the dome. A dome usually has no parent,
  746. so this should be null. Note: If a parent is set, the dome will not
  747. change how it is drawn.
  748. \param id: An id of the node. This id can be used to identify the node.
  749. \return Pointer to the sky dome if successful, otherwise NULL.
  750. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  751. virtual ISceneNode* addSkyDomeSceneNode(video::ITexture* texture,
  752. u32 horiRes=16, u32 vertRes=8,
  753. f32 texturePercentage=0.9, f32 spherePercentage=2.0,f32 radius = 1000.f,
  754. ISceneNode* parent=0, s32 id=-1) = 0;
  755. //! Adds a particle system scene node to the scene graph.
  756. /** \param withDefaultEmitter: Creates a default working point emitter
  757. which emits some particles. Set this to true to see a particle system
  758. in action. If set to false, you'll have to set the emitter you want by
  759. calling IParticleSystemSceneNode::setEmitter().
  760. \param parent: Parent of the scene node. Can be NULL if no parent.
  761. \param id: Id of the node. This id can be used to identify the scene node.
  762. \param position: Position of the space relative to its parent where the
  763. scene node will be placed.
  764. \param rotation: Initial rotation of the scene node.
  765. \param scale: Initial scale of the scene node.
  766. \return Pointer to the created scene node.
  767. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  768. virtual IParticleSystemSceneNode* addParticleSystemSceneNode(
  769. bool withDefaultEmitter=true, ISceneNode* parent=0, s32 id=-1,
  770. const core::vector3df& position = core::vector3df(0,0,0),
  771. const core::vector3df& rotation = core::vector3df(0,0,0),
  772. const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)) = 0;
  773. //! Adds a terrain scene node to the scene graph.
  774. /** This node implements is a simple terrain renderer which uses
  775. a technique known as geo mip mapping
  776. for reducing the detail of triangle blocks which are far away.
  777. The code for the TerrainSceneNode is based on the terrain
  778. renderer by Soconne and the GeoMipMapSceneNode developed by
  779. Spintz. They made their code available for Irrlicht and allowed
  780. it to be distributed under this licence. I only modified some
  781. parts. A lot of thanks go to them.
  782. This scene node is capable of loading terrains and updating
  783. the indices at runtime to enable viewing very large terrains
  784. very quickly. It uses a CLOD (Continuous Level of Detail)
  785. algorithm which updates the indices for each patch based on
  786. a LOD (Level of Detail) which is determined based on a patch's
  787. distance from the camera.
  788. The patch size of the terrain must always be a size of 2^N+1,
  789. i.e. 8+1(9), 16+1(17), etc.
  790. The MaxLOD available is directly dependent on the patch size
  791. of the terrain. LOD 0 contains all of the indices to draw all
  792. the triangles at the max detail for a patch. As each LOD goes
  793. up by 1 the step taken, in generating indices increases by
  794. -2^LOD, so for LOD 1, the step taken is 2, for LOD 2, the step
  795. taken is 4, LOD 3 - 8, etc. The step can be no larger than
  796. the size of the patch, so having a LOD of 8, with a patch size
  797. of 17, is asking the algorithm to generate indices every 2^8 (
  798. 256 ) vertices, which is not possible with a patch size of 17.
  799. The maximum LOD for a patch size of 17 is 2^4 ( 16 ). So,
  800. with a MaxLOD of 5, you'll have LOD 0 ( full detail ), LOD 1 (
  801. every 2 vertices ), LOD 2 ( every 4 vertices ), LOD 3 ( every
  802. 8 vertices ) and LOD 4 ( every 16 vertices ).
  803. \param heightMapFileName: The name of the file on disk, to read vertex data from. This should
  804. be a gray scale bitmap.
  805. \param parent: Parent of the scene node. Can be 0 if no parent.
  806. \param id: Id of the node. This id can be used to identify the scene node.
  807. \param position: The absolute position of this node.
  808. \param rotation: The absolute rotation of this node. ( NOT YET IMPLEMENTED )
  809. \param scale: The scale factor for the terrain. If you're
  810. using a heightmap of size 129x129 and would like your terrain
  811. to be 12900x12900 in game units, then use a scale factor of (
  812. core::vector ( 100.0f, 100.0f, 100.0f ). If you use a Y
  813. scaling factor of 0.0f, then your terrain will be flat.
  814. \param vertexColor: The default color of all the vertices. If no texture is associated
  815. with the scene node, then all vertices will be this color. Defaults to white.
  816. \param maxLOD: The maximum LOD (level of detail) for the node. Only change if you
  817. know what you are doing, this might lead to strange behavior.
  818. \param patchSize: patch size of the terrain. Only change if you
  819. know what you are doing, this might lead to strange behavior.
  820. \param smoothFactor: The number of times the vertices are smoothed.
  821. \param addAlsoIfHeightmapEmpty: Add terrain node even with empty heightmap.
  822. \return Pointer to the created scene node. Can be null
  823. if the terrain could not be created, for example because the
  824. heightmap could not be loaded. The returned pointer should
  825. not be dropped. See IReferenceCounted::drop() for more
  826. information. */
  827. virtual ITerrainSceneNode* addTerrainSceneNode(
  828. const io::path& heightMapFileName,
  829. ISceneNode* parent=0, s32 id=-1,
  830. const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f),
  831. const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f),
  832. const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f),
  833. video::SColor vertexColor = video::SColor(255,255,255,255),
  834. s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0,
  835. bool addAlsoIfHeightmapEmpty = false) = 0;
  836. //! Adds a terrain scene node to the scene graph.
  837. /** Just like the other addTerrainSceneNode() method, but takes an IReadFile
  838. pointer as parameter for the heightmap. For more information take a look
  839. at the other function.
  840. \param heightMapFile: The file handle to read vertex data from. This should
  841. be a gray scale bitmap.
  842. \param parent: Parent of the scene node. Can be 0 if no parent.
  843. \param id: Id of the node. This id can be used to identify the scene node.
  844. \param position: The absolute position of this node.
  845. \param rotation: The absolute rotation of this node. ( NOT YET IMPLEMENTED )
  846. \param scale: The scale factor for the terrain. If you're
  847. using a heightmap of size 129x129 and would like your terrain
  848. to be 12900x12900 in game units, then use a scale factor of (
  849. core::vector ( 100.0f, 100.0f, 100.0f ). If you use a Y
  850. scaling factor of 0.0f, then your terrain will be flat.
  851. \param vertexColor: The default color of all the vertices. If no texture is associated
  852. with the scene node, then all vertices will be this color. Defaults to white.
  853. \param maxLOD: The maximum LOD (level of detail) for the node. Only change if you
  854. know what you are doing, this might lead to strange behavior.
  855. \param patchSize: patch size of the terrain. Only change if you
  856. know what you are doing, this might lead to strange behavior.
  857. \param smoothFactor: The number of times the vertices are smoothed.
  858. \param addAlsoIfHeightmapEmpty: Add terrain node even with empty heightmap.
  859. \return Pointer to the created scene node. Can be null
  860. if the terrain could not be created, for example because the
  861. heightmap could not be loaded. The returned pointer should
  862. not be dropped. See IReferenceCounted::drop() for more
  863. information. */
  864. virtual ITerrainSceneNode* addTerrainSceneNode(
  865. io::IReadFile* heightMapFile,
  866. ISceneNode* parent=0, s32 id=-1,
  867. const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f),
  868. const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f),
  869. const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f),
  870. video::SColor vertexColor = video::SColor(255,255,255,255),
  871. s32 maxLOD=5, E_TERRAIN_PATCH_SIZE patchSize=ETPS_17, s32 smoothFactor=0,
  872. bool addAlsoIfHeightmapEmpty = false) = 0;
  873. //! Adds a quake3 scene node to the scene graph.
  874. /** A Quake3 Scene renders multiple meshes for a specific HighLanguage Shader (Quake3 Style )
  875. \return Pointer to the quake3 scene node if successful, otherwise NULL.
  876. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  877. virtual IMeshSceneNode* addQuake3SceneNode(const IMeshBuffer* meshBuffer, const quake3::IShader * shader,
  878. ISceneNode* parent=0, s32 id=-1
  879. ) = 0;
  880. //! Adds an empty scene node to the scene graph.
  881. /** Can be used for doing advanced transformations
  882. or structuring the scene graph.
  883. \return Pointer to the created scene node.
  884. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  885. virtual ISceneNode* addEmptySceneNode(ISceneNode* parent=0, s32 id=-1) = 0;
  886. //! Adds a dummy transformation scene node to the scene graph.
  887. /** This scene node does not render itself, and does not respond to set/getPosition,
  888. set/getRotation and set/getScale. Its just a simple scene node that takes a
  889. matrix as relative transformation, making it possible to insert any transformation
  890. anywhere into the scene graph.
  891. \return Pointer to the created scene node.
  892. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  893. virtual IDummyTransformationSceneNode* addDummyTransformationSceneNode(
  894. ISceneNode* parent=0, s32 id=-1) = 0;
  895. //! Adds a text scene node, which is able to display 2d text at a position in three dimensional space
  896. virtual ITextSceneNode* addTextSceneNode(gui::IGUIFont* font, const wchar_t* text,
  897. video::SColor color=video::SColor(100,255,255,255),
  898. ISceneNode* parent = 0, const core::vector3df& position = core::vector3df(0,0,0),
  899. s32 id=-1) = 0;
  900. //! Adds a text scene node, which uses billboards. The node, and the text on it, will scale with distance.
  901. /**
  902. \param font The font to use on the billboard. Pass 0 to use the GUI environment's default font.
  903. \param text The text to display on the billboard.
  904. \param parent The billboard's parent. Pass 0 to use the root scene node.
  905. \param size The billboard's width and height.
  906. \param position The billboards position relative to its parent.
  907. \param id: An id of the node. This id can be used to identify the node.
  908. \param colorTop: The color of the vertices at the top of the billboard (default: white).
  909. \param colorBottom: The color of the vertices at the bottom of the billboard (default: white).
  910. \return Pointer to the billboard if successful, otherwise NULL.
  911. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  912. virtual IBillboardTextSceneNode* addBillboardTextSceneNode( gui::IGUIFont* font, const wchar_t* text,
  913. ISceneNode* parent = 0,
  914. const core::dimension2d<f32>& size = core::dimension2d<f32>(10.0f, 10.0f),
  915. const core::vector3df& position = core::vector3df(0,0,0), s32 id=-1,
  916. video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0;
  917. //! Adds a Hill Plane mesh to the mesh pool.
  918. /** The mesh is generated on the fly
  919. and looks like a plane with some hills on it. It is uses mostly for quick
  920. tests of the engine only. You can specify how many hills there should be
  921. on the plane and how high they should be. Also you must specify a name for
  922. the mesh, because the mesh is added to the mesh pool, and can be retrieved
  923. again using ISceneManager::getMesh() with the name as parameter.
  924. \param name: The name of this mesh which must be specified in order
  925. to be able to retrieve the mesh later with ISceneManager::getMesh().
  926. \param tileSize: Size of a tile of the mesh. (10.0f, 10.0f) would be a
  927. good value to start, for example.
  928. \param tileCount: Specifies how much tiles there will be. If you specify
  929. for example that a tile has the size (10.0f, 10.0f) and the tileCount is
  930. (10,10), than you get a field of 100 tiles which has the dimension 100.0f x 100.0f.
  931. \param material: Material of the hill mesh.
  932. \param hillHeight: Height of the hills. If you specify a negative value
  933. you will get holes instead of hills. If the height is 0, no hills will be
  934. created.
  935. \param countHills: Amount of hills on the plane. There will be countHills.X
  936. hills along the X axis and countHills.Y along the Y axis. So in total there
  937. will be countHills.X * countHills.Y hills.
  938. \param textureRepeatCount: Defines how often the texture will be repeated in
  939. x and y direction.
  940. return Null if the creation failed. The reason could be that you
  941. specified some invalid parameters or that a mesh with that name already
  942. exists. If successful, a pointer to the mesh is returned.
  943. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  944. virtual IAnimatedMesh* addHillPlaneMesh(const io::path& name,
  945. const core::dimension2d<f32>& tileSize, const core::dimension2d<u32>& tileCount,
  946. video::SMaterial* material = 0, f32 hillHeight = 0.0f,
  947. const core::dimension2d<f32>& countHills = core::dimension2d<f32>(0.0f, 0.0f),
  948. const core::dimension2d<f32>& textureRepeatCount = core::dimension2d<f32>(1.0f, 1.0f)) = 0;
  949. //! Adds a static terrain mesh to the mesh pool.
  950. /** The mesh is generated on the fly
  951. from a texture file and a height map file. Both files may be huge
  952. (8000x8000 pixels would be no problem) because the generator splits the
  953. files into smaller textures if necessary.
  954. You must specify a name for the mesh, because the mesh is added to the mesh pool,
  955. and can be retrieved again using ISceneManager::getMesh() with the name as parameter.
  956. \param meshname: The name of this mesh which must be specified in order
  957. to be able to retrieve the mesh later with ISceneManager::getMesh().
  958. \param texture: Texture for the terrain. Please note that this is not a
  959. hardware texture as usual (ITexture), but an IImage software texture.
  960. You can load this texture with IVideoDriver::createImageFromFile().
  961. \param heightmap: A grayscaled heightmap image. Like the texture,
  962. it can be created with IVideoDriver::createImageFromFile(). The amount
  963. of triangles created depends on the size of this texture, so use a small
  964. heightmap to increase rendering speed.
  965. \param stretchSize: Parameter defining how big a is pixel on the heightmap.
  966. \param maxHeight: Defines how high a white pixel on the heightmap is.
  967. \param defaultVertexBlockSize: Defines the initial dimension between vertices.
  968. \return Null if the creation failed. The reason could be that you
  969. specified some invalid parameters, that a mesh with that name already
  970. exists, or that a texture could not be found. If successful, a pointer to the mesh is returned.
  971. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  972. virtual IAnimatedMesh* addTerrainMesh(const io::path& meshname,
  973. video::IImage* texture, video::IImage* heightmap,
  974. const core::dimension2d<f32>& stretchSize = core::dimension2d<f32>(10.0f,10.0f),
  975. f32 maxHeight=200.0f,
  976. const core::dimension2d<u32>& defaultVertexBlockSize = core::dimension2d<u32>(64,64)) = 0;
  977. //! add a static arrow mesh to the meshpool
  978. /** \param name Name of the mesh
  979. \param vtxColorCylinder color of the cylinder
  980. \param vtxColorCone color of the cone
  981. \param tessellationCylinder Number of quads the cylinder side consists of
  982. \param tessellationCone Number of triangles the cone's roof consists of
  983. \param height Total height of the arrow
  984. \param cylinderHeight Total height of the cylinder, should be lesser than total height
  985. \param widthCylinder Diameter of the cylinder
  986. \param widthCone Diameter of the cone's base, should be not smaller than the cylinder's diameter
  987. \return Pointer to the arrow mesh if successful, otherwise 0.
  988. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  989. virtual IAnimatedMesh* addArrowMesh(const io::path& name,
  990. video::SColor vtxColorCylinder=0xFFFFFFFF,
  991. video::SColor vtxColorCone=0xFFFFFFFF,
  992. u32 tessellationCylinder=4, u32 tessellationCone=8,
  993. f32 height=1.f, f32 cylinderHeight=0.6f,
  994. f32 widthCylinder=0.05f, f32 widthCone=0.3f) = 0;
  995. //! add a static sphere mesh to the meshpool
  996. /** \param name Name of the mesh
  997. \param radius Radius of the sphere
  998. \param polyCountX Number of quads used for the horizontal tiling
  999. \param polyCountY Number of quads used for the vertical tiling
  1000. \return Pointer to the sphere mesh if successful, otherwise 0.
  1001. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1002. virtual IAnimatedMesh* addSphereMesh(const io::path& name,
  1003. f32 radius=5.f, u32 polyCountX = 16,
  1004. u32 polyCountY = 16) = 0;
  1005. //! Add a volume light mesh to the meshpool
  1006. /** \param name Name of the mesh
  1007. \param SubdivideU Horizontal subdivision count
  1008. \param SubdivideV Vertical subdivision count
  1009. \param FootColor Color of the bottom of the light
  1010. \param TailColor Color of the top of the light
  1011. \return Pointer to the volume light mesh if successful, otherwise 0.
  1012. This pointer should not be dropped. See IReferenceCounted::drop() for more information.
  1013. */
  1014. virtual IAnimatedMesh* addVolumeLightMesh(const io::path& name,
  1015. const u32 SubdivideU = 32, const u32 SubdivideV = 32,
  1016. const video::SColor FootColor = video::SColor(51, 0, 230, 180),
  1017. const video::SColor TailColor = video::SColor(0, 0, 0, 0)) = 0;
  1018. //! Gets the root scene node.
  1019. /** This is the scene node which is parent
  1020. of all scene nodes. The root scene node is a special scene node which
  1021. only exists to manage all scene nodes. It will not be rendered and cannot
  1022. be removed from the scene.
  1023. \return Pointer to the root scene node.
  1024. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1025. virtual ISceneNode* getRootSceneNode() = 0;
  1026. //! Get the first scene node with the specified id.
  1027. /** \param id: The id to search for
  1028. \param start: Scene node to start from. All children of this scene
  1029. node are searched. If null is specified, the root scene node is
  1030. taken.
  1031. \return Pointer to the first scene node with this id,
  1032. and null if no scene node could be found.
  1033. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1034. virtual ISceneNode* getSceneNodeFromId(s32 id, ISceneNode* start=0) = 0;
  1035. //! Get the first scene node with the specified name.
  1036. /** \param name: The name to search for
  1037. \param start: Scene node to start from. All children of this scene
  1038. node are searched. If null is specified, the root scene node is
  1039. taken.
  1040. \return Pointer to the first scene node with this id,
  1041. and null if no scene node could be found.
  1042. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1043. virtual ISceneNode* getSceneNodeFromName(const c8* name, ISceneNode* start=0) = 0;
  1044. //! Get the first scene node with the specified type.
  1045. /** \param type: The type to search for
  1046. \param start: Scene node to start from. All children of this scene
  1047. node are searched. If null is specified, the root scene node is
  1048. taken.
  1049. \return Pointer to the first scene node with this type,
  1050. and null if no scene node could be found.
  1051. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1052. virtual ISceneNode* getSceneNodeFromType(scene::ESCENE_NODE_TYPE type, ISceneNode* start=0) = 0;
  1053. //! Get scene nodes by type.
  1054. /** \param type: Type of scene node to find (ESNT_ANY will return all child nodes).
  1055. \param outNodes: results will be added to this array (outNodes is not cleared).
  1056. \param start: Scene node to start from. This node and all children of this scene
  1057. node are checked (recursively, so also children of children, etc). If null is specified,
  1058. the root scene node is taken as start-node. */
  1059. virtual void getSceneNodesFromType(ESCENE_NODE_TYPE type,
  1060. core::array<scene::ISceneNode*>& outNodes,
  1061. ISceneNode* start=0) = 0;
  1062. //! Get the current active camera.
  1063. /** \return The active camera is returned. Note that this can
  1064. be NULL, if there was no camera created yet.
  1065. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1066. virtual ICameraSceneNode* getActiveCamera() const =0;
  1067. //! Sets the currently active camera.
  1068. /** The previous active camera will be deactivated.
  1069. \param camera: The new camera which should be active. */
  1070. virtual void setActiveCamera(ICameraSceneNode* camera) = 0;
  1071. //! Sets the color of stencil buffers shadows drawn by the scene manager.
  1072. virtual void setShadowColor(video::SColor color = video::SColor(150,0,0,0)) = 0;
  1073. //! Get the current color of shadows.
  1074. virtual video::SColor getShadowColor() const = 0;
  1075. //! Create a shadow volume scene node to be used with custom nodes
  1076. /** Use this if you implement your own SceneNodes and need shadow volumes in them.
  1077. Otherwise you should generally use addShadowVolumeSceneNode functions from IMeshSceneNode or IAnimatedMeshSceneNode.*/
  1078. virtual IShadowVolumeSceneNode* createShadowVolumeSceneNode(const IMesh* shadowMesh, ISceneNode* parent, s32 id, bool zfailmethod, f32 infinity) = 0;
  1079. //! Registers a node for rendering it at a specific time.
  1080. /** This method should only be used by SceneNodes when they get a
  1081. ISceneNode::OnRegisterSceneNode() call.
  1082. \param node: Node to register for drawing. Usually scene nodes would set 'this'
  1083. as parameter here because they want to be drawn.
  1084. \param pass: Specifies when the node wants to be drawn in relation to the other nodes.
  1085. For example, if the node is a shadow, it usually wants to be drawn after all other nodes
  1086. and will use ESNRP_SHADOW for this. See scene::E_SCENE_NODE_RENDER_PASS for details.
  1087. Note: This is _not_ a bitfield. If you want to register a note for several render passes, then
  1088. call this function once for each pass.
  1089. \return scene will be rendered ( passed culling ) */
  1090. virtual u32 registerNodeForRendering(ISceneNode* node,
  1091. E_SCENE_NODE_RENDER_PASS pass = ESNRP_AUTOMATIC) = 0;
  1092. //! Clear all nodes which are currently registered for rendering
  1093. /** Usually you don't have to care about this as drawAll will clear nodes
  1094. after rendering them. But sometimes you might have to manually reset this.
  1095. For example when you deleted nodes between registering and rendering. */
  1096. virtual void clearAllRegisteredNodesForRendering() = 0;
  1097. //! Draws all the scene nodes.
  1098. /** This can only be invoked between
  1099. IVideoDriver::beginScene() and IVideoDriver::endScene(). Please note that
  1100. the scene is not only drawn when calling this, but also animated
  1101. by existing scene node animators, culling of scene nodes is done, etc. */
  1102. virtual void drawAll() = 0;
  1103. //! Creates a rotation animator, which rotates the attached scene node around itself.
  1104. /** \param rotationSpeed Specifies the speed of the animation in degree per 10 milliseconds.
  1105. \return The animator. Attach it to a scene node with ISceneNode::addAnimator()
  1106. and the animator will animate it.
  1107. If you no longer need the animator, you should call ISceneNodeAnimator::drop().
  1108. See IReferenceCounted::drop() for more information. */
  1109. virtual ISceneNodeAnimator* createRotationAnimator(const core::vector3df& rotationSpeed) = 0;
  1110. //! Creates a fly circle animator, which lets the attached scene node fly around a center.
  1111. /** \param center: Center of the circle.
  1112. \param radius: Radius of the circle.
  1113. \param speed: The orbital speed, in radians per millisecond.
  1114. \param direction: Specifies the upvector used for alignment of the mesh.
  1115. \param startPosition: The position on the circle where the animator will
  1116. begin. Value is in multiples of a circle, i.e. 0.5 is half way around. (phase)
  1117. \param radiusEllipsoid: if radiusEllipsoid != 0 then radius2 from a ellipsoid
  1118. begin. Value is in multiples of a circle, i.e. 0.5 is half way around. (phase)
  1119. \return The animator. Attach it to a scene node with ISceneNode::addAnimator()
  1120. and the animator will animate it.
  1121. If you no longer need the animator, you should call ISceneNodeAnimator::drop().
  1122. See IReferenceCounted::drop() for more information. */
  1123. virtual ISceneNodeAnimator* createFlyCircleAnimator(
  1124. const core::vector3df& center=core::vector3df(0.f,0.f,0.f),
  1125. f32 radius=100.f, f32 speed=0.001f,
  1126. const core::vector3df& direction=core::vector3df(0.f, 1.f, 0.f),
  1127. f32 startPosition = 0.f,
  1128. f32 radiusEllipsoid = 0.f) = 0;
  1129. //! Creates a fly straight animator, which lets the attached scene node fly or move along a line between two points.
  1130. /** \param startPoint: Start point of the line.
  1131. \param endPoint: End point of the line.
  1132. \param timeForWay: Time in milliseconds how long the node should need to
  1133. move from the start point to the end point.
  1134. \param loop: If set to false, the node stops when the end point is reached.
  1135. If loop is true, the node begins again at the start.
  1136. \param pingpong Flag to set whether the animator should fly
  1137. back from end to start again.
  1138. \return The animator. Attach it to a scene node with ISceneNode::addAnimator()
  1139. and the animator will animate it.
  1140. If you no longer need the animator, you should call ISceneNodeAnimator::drop().
  1141. See IReferenceCounted::drop() for more information. */
  1142. virtual ISceneNodeAnimator* createFlyStraightAnimator(const core::vector3df& startPoint,
  1143. const core::vector3df& endPoint, u32 timeForWay, bool loop=false, bool pingpong = false) = 0;
  1144. //! Creates a texture animator, which switches the textures of the target scene node based on a list of textures.
  1145. /** \param textures: List of textures to use.
  1146. \param timePerFrame: Time in milliseconds, how long any texture in the list
  1147. should be visible.
  1148. \param loop: If set to to false, the last texture remains set, and the animation
  1149. stops. If set to true, the animation restarts with the first texture.
  1150. \return The animator. Attach it to a scene node with ISceneNode::addAnimator()
  1151. and the animator will animate it.
  1152. If you no longer need the animator, you should call ISceneNodeAnimator::drop().
  1153. See IReferenceCounted::drop() for more information. */
  1154. virtual ISceneNodeAnimator* createTextureAnimator(const core::array<video::ITexture*>& textures,
  1155. s32 timePerFrame, bool loop=true) = 0;
  1156. //! Creates a scene node animator, which deletes the scene node after some time automatically.
  1157. /** \param timeMs: Time in milliseconds, after when the node will be deleted.
  1158. \return The animator. Attach it to a scene node with ISceneNode::addAnimator()
  1159. and the animator will animate it.
  1160. If you no longer need the animator, you should call ISceneNodeAnimator::drop().
  1161. See IReferenceCounted::drop() for more information. */
  1162. virtual ISceneNodeAnimator* createDeleteAnimator(u32 timeMs) = 0;
  1163. //! Creates a special scene node animator for doing automatic collision detection and response.
  1164. /** See ISceneNodeAnimatorCollisionResponse for details.
  1165. \param world: Triangle selector holding all triangles of the world with which
  1166. the scene node may collide. You can create a triangle selector with
  1167. ISceneManager::createTriangleSelector();
  1168. \param sceneNode: SceneNode which should be manipulated. After you added this animator
  1169. to the scene node, the scene node will not be able to move through walls and is
  1170. affected by gravity. If you need to teleport the scene node to a new position without
  1171. it being effected by the collision geometry, then call sceneNode->setPosition(); then
  1172. animator->setTargetNode(sceneNode);
  1173. \param ellipsoidRadius: Radius of the ellipsoid with which collision detection and
  1174. response is done. If you have got a scene node, and you are unsure about
  1175. how big the radius should be, you could use the following code to determine
  1176. it:
  1177. \code
  1178. const core::aabbox3d<f32>& box = yourSceneNode->getBoundingBox();
  1179. core::vector3df radius = box.MaxEdge - box.getCenter();
  1180. \endcode
  1181. \param gravityPerSecond: Sets the gravity of the environment, as an acceleration in
  1182. units per second per second. If your units are equivalent to meters, then
  1183. core::vector3df(0,-10.0f,0) would give an approximately realistic gravity.
  1184. You can disable gravity by setting it to core::vector3df(0,0,0).
  1185. \param ellipsoidTranslation: By default, the ellipsoid for collision detection is created around
  1186. the center of the scene node, which means that the ellipsoid surrounds
  1187. it completely. If this is not what you want, you may specify a translation
  1188. for the ellipsoid.
  1189. \param slidingValue: DOCUMENTATION NEEDED.
  1190. \return The animator. Attach it to a scene node with ISceneNode::addAnimator()
  1191. and the animator will cause it to do collision detection and response.
  1192. If you no longer need the animator, you should call ISceneNodeAnimator::drop().
  1193. See IReferenceCounted::drop() for more information. */
  1194. virtual ISceneNodeAnimatorCollisionResponse* createCollisionResponseAnimator(
  1195. ITriangleSelector* world, ISceneNode* sceneNode,
  1196. const core::vector3df& ellipsoidRadius = core::vector3df(30,60,30),
  1197. const core::vector3df& gravityPerSecond = core::vector3df(0,-10.0f,0),
  1198. const core::vector3df& ellipsoidTranslation = core::vector3df(0,0,0),
  1199. f32 slidingValue = 0.0005f) = 0;
  1200. //! Creates a follow spline animator.
  1201. /** The animator modifies the position of
  1202. the attached scene node to make it follow a Hermite spline.
  1203. It uses a subset of Hermite splines: either cardinal splines
  1204. (tightness != 0.5) or Catmull-Rom-splines (tightness == 0.5).
  1205. The animator moves from one control point to the next in
  1206. 1/speed seconds. This code was sent in by Matthias Gall.
  1207. If you no longer need the animator, you should call ISceneNodeAnimator::drop().
  1208. See IReferenceCounted::drop() for more information. */
  1209. virtual ISceneNodeAnimator* createFollowSplineAnimator(s32 startTime,
  1210. const core::array< core::vector3df >& points,
  1211. f32 speed = 1.0f, f32 tightness = 0.5f, bool loop=true, bool pingpong=false, bool steer=false) = 0;
  1212. //! Creates a simple ITriangleSelector, based on a mesh.
  1213. /** Triangle selectors
  1214. can be used for doing collision detection. Don't use this selector
  1215. for a huge amount of triangles like in Quake3 maps.
  1216. Instead, use for example ISceneManager::createOctreeTriangleSelector().
  1217. Please note that the created triangle selector is not automatically attached
  1218. to the scene node. You will have to call ISceneNode::setTriangleSelector()
  1219. for this. To create and attach a triangle selector is done like this:
  1220. \code
  1221. ITriangleSelector* s = sceneManager->createTriangleSelector(yourMesh,
  1222. yourSceneNode);
  1223. yourSceneNode->setTriangleSelector(s);
  1224. s->drop();
  1225. \endcode
  1226. \param mesh: Mesh of which the triangles are taken.
  1227. \param node: Scene node of which transformation is used.
  1228. \param separateMeshbuffers: When true it's possible to get information which meshbuffer
  1229. got hit in collision tests. But has a slight speed cost.
  1230. \return The selector, or null if not successful.
  1231. If you no longer need the selector, you should call ITriangleSelector::drop().
  1232. See IReferenceCounted::drop() for more information. */
  1233. virtual ITriangleSelector* createTriangleSelector(IMesh* mesh, ISceneNode* node, bool separateMeshbuffers=false) = 0;
  1234. //! Creates a simple ITriangleSelector, based on a meshbuffer.
  1235. /**
  1236. This is a static selector which won't update when the mesh changes.
  1237. \param meshBuffer Triangles of that meshbuffer are used
  1238. \param materialIndex If you pass a material index that index can be returned by the triangle selector.
  1239. \para node: Scene node of which transformation is used.
  1240. */
  1241. virtual ITriangleSelector* createTriangleSelector(const IMeshBuffer* meshBuffer, irr::u32 materialIndex, ISceneNode* node) = 0;
  1242. //! Creates a simple ITriangleSelector, based on an animated mesh scene node.
  1243. /** Details of the mesh associated with the node will be extracted internally.
  1244. \param node The animated mesh scene node from which to build the selector
  1245. \param separateMeshbuffers: When true it's possible to get information which meshbuffer
  1246. got hit in collision tests. But has a slight speed cost.
  1247. */
  1248. virtual ITriangleSelector* createTriangleSelector(IAnimatedMeshSceneNode* node, bool separateMeshbuffers=false) = 0;
  1249. //! Creates a simple dynamic ITriangleSelector, based on a axis aligned bounding box.
  1250. /** Triangle selectors
  1251. can be used for doing collision detection. Every time when triangles are
  1252. queried, the triangle selector gets the bounding box of the scene node,
  1253. an creates new triangles. In this way, it works good with animated scene nodes.
  1254. \param node: Scene node of which the bounding box, visibility and transformation is used.
  1255. \return The selector, or null if not successful.
  1256. If you no longer need the selector, you should call ITriangleSelector::drop().
  1257. See IReferenceCounted::drop() for more information. */
  1258. virtual ITriangleSelector* createTriangleSelectorFromBoundingBox(ISceneNode* node) = 0;
  1259. //! Creates a Triangle Selector, optimized by an octree.
  1260. /** Triangle selectors
  1261. can be used for doing collision detection. This triangle selector is
  1262. optimized for huge amounts of triangle, it organizes them in an octree.
  1263. Please note that the created triangle selector is not automatically attached
  1264. to the scene node. You will have to call ISceneNode::setTriangleSelector()
  1265. for this. To create and attach a triangle selector is done like this:
  1266. \code
  1267. ITriangleSelector* s = sceneManager->createOctreeTriangleSelector(yourMesh,
  1268. yourSceneNode);
  1269. yourSceneNode->setTriangleSelector(s);
  1270. s->drop();
  1271. \endcode
  1272. For more information and examples on this, take a look at the collision
  1273. tutorial in the SDK.
  1274. \param mesh: Mesh of which the triangles are taken.
  1275. \param node: Scene node of which visibility and transformation is used.
  1276. \param minimalPolysPerNode: Specifies the minimal polygons contained a octree node.
  1277. If a node gets less polys than this value, it will not be split into
  1278. smaller nodes.
  1279. \return The selector, or null if not successful.
  1280. If you no longer need the selector, you should call ITriangleSelector::drop().
  1281. See IReferenceCounted::drop() for more information. */
  1282. virtual ITriangleSelector* createOctreeTriangleSelector(IMesh* mesh,
  1283. ISceneNode* node, s32 minimalPolysPerNode=32) = 0;
  1284. //! Creates a Triangle Selector for a single meshbuffer, optimized by an octree.
  1285. /** Triangle selectors
  1286. can be used for doing collision detection. This triangle selector is
  1287. optimized for huge amounts of triangle, it organizes them in an octree.
  1288. Please note that the created triangle selector is not automatically attached
  1289. to the scene node. You will have to call ISceneNode::setTriangleSelector()
  1290. for this. To create and attach a triangle selector is done like this:
  1291. \code
  1292. ITriangleSelector* s = sceneManager->createOctreeTriangleSelector(yourMesh,
  1293. yourSceneNode);
  1294. yourSceneNode->setTriangleSelector(s);
  1295. s->drop();
  1296. \endcode
  1297. For more information and examples on this, take a look at the collision
  1298. tutorial in the SDK.
  1299. \param meshBuffer: Meshbuffer of which the triangles are taken.
  1300. \param materialIndex: Setting this value allows the triangle selector to return the material index
  1301. \param node: Scene node of which visibility and transformation is used.
  1302. \param minimalPolysPerNode: Specifies the minimal polygons contained a octree node.
  1303. If a node gets less polys than this value, it will not be split into
  1304. smaller nodes.
  1305. \return The selector, or null if not successful.
  1306. If you no longer need the selector, you should call ITriangleSelector::drop().
  1307. See IReferenceCounted::drop() for more information. */
  1308. virtual ITriangleSelector* createOctreeTriangleSelector(IMeshBuffer* meshBuffer, irr::u32 materialIndex,
  1309. ISceneNode* node, s32 minimalPolysPerNode=32) = 0;
  1310. //! //! Creates a Triangle Selector, optimized by an octree.
  1311. /** \deprecated Use createOctreeTriangleSelector instead. This method may be removed by Irrlicht 1.9. */
  1312. IRR_DEPRECATED ITriangleSelector* createOctTreeTriangleSelector(IMesh* mesh,
  1313. ISceneNode* node, s32 minimalPolysPerNode=32)
  1314. {
  1315. return createOctreeTriangleSelector(mesh, node, minimalPolysPerNode);
  1316. }
  1317. //! Creates a meta triangle selector.
  1318. /** A meta triangle selector is nothing more than a
  1319. collection of one or more triangle selectors providing together
  1320. the interface of one triangle selector. In this way,
  1321. collision tests can be done with different triangle soups in one pass.
  1322. \return The selector, or null if not successful.
  1323. If you no longer need the selector, you should call ITriangleSelector::drop().
  1324. See IReferenceCounted::drop() for more information. */
  1325. virtual IMetaTriangleSelector* createMetaTriangleSelector() = 0;
  1326. //! Creates a triangle selector which can select triangles from a terrain scene node.
  1327. /** \param node: Pointer to the created terrain scene node
  1328. \param LOD: Level of detail, 0 for highest detail.
  1329. \return The selector, or null if not successful.
  1330. If you no longer need the selector, you should call ITriangleSelector::drop().
  1331. See IReferenceCounted::drop() for more information. */
  1332. virtual ITriangleSelector* createTerrainTriangleSelector(
  1333. ITerrainSceneNode* node, s32 LOD=0) = 0;
  1334. //! Adds an external mesh loader for extending the engine with new file formats.
  1335. /** If you want the engine to be extended with
  1336. file formats it currently is not able to load (e.g. .cob), just implement
  1337. the IMeshLoader interface in your loading class and add it with this method.
  1338. Using this method it is also possible to override built-in mesh loaders with
  1339. newer or updated versions without the need to recompile the engine.
  1340. \param externalLoader: Implementation of a new mesh loader. */
  1341. virtual void addExternalMeshLoader(IMeshLoader* externalLoader) = 0;
  1342. //! Returns the number of mesh loaders supported by Irrlicht at this time
  1343. virtual u32 getMeshLoaderCount() const = 0;
  1344. //! Retrieve the given mesh loader
  1345. /** \param index The index of the loader to retrieve. This parameter is an 0-based
  1346. array index.
  1347. \return A pointer to the specified loader, 0 if the index is incorrect. */
  1348. virtual IMeshLoader* getMeshLoader(u32 index) const = 0;
  1349. //! Adds an external scene loader for extending the engine with new file formats.
  1350. /** If you want the engine to be extended with
  1351. file formats it currently is not able to load (e.g. .vrml), just implement
  1352. the ISceneLoader interface in your loading class and add it with this method.
  1353. Using this method it is also possible to override the built-in scene loaders
  1354. with newer or updated versions without the need to recompile the engine.
  1355. \param externalLoader: Implementation of a new mesh loader. */
  1356. virtual void addExternalSceneLoader(ISceneLoader* externalLoader) = 0;
  1357. //! Returns the number of scene loaders supported by Irrlicht at this time
  1358. virtual u32 getSceneLoaderCount() const = 0;
  1359. //! Retrieve the given scene loader
  1360. /** \param index The index of the loader to retrieve. This parameter is an 0-based
  1361. array index.
  1362. \return A pointer to the specified loader, 0 if the index is incorrect. */
  1363. virtual ISceneLoader* getSceneLoader(u32 index) const = 0;
  1364. //! Get pointer to the scene collision manager.
  1365. /** \return Pointer to the collision manager
  1366. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1367. virtual ISceneCollisionManager* getSceneCollisionManager() = 0;
  1368. //! Get pointer to the mesh manipulator.
  1369. /** \return Pointer to the mesh manipulator
  1370. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1371. virtual IMeshManipulator* getMeshManipulator() = 0;
  1372. //! Adds a scene node to the deletion queue.
  1373. /** The scene node is immediately
  1374. deleted when it's secure. Which means when the scene node does not
  1375. execute animators and things like that. This method is for example
  1376. used for deleting scene nodes by their scene node animators. In
  1377. most other cases, a ISceneNode::remove() call is enough, using this
  1378. deletion queue is not necessary.
  1379. See ISceneManager::createDeleteAnimator() for details.
  1380. \param node: Node to delete. */
  1381. virtual void addToDeletionQueue(ISceneNode* node) = 0;
  1382. //! Posts an input event to the environment.
  1383. /** Usually you do not have to
  1384. use this method, it is used by the internal engine. */
  1385. virtual bool postEventFromUser(const SEvent& event) = 0;
  1386. //! Clears the whole scene.
  1387. /** All scene nodes are removed. */
  1388. virtual void clear() = 0;
  1389. //! Get interface to the parameters set in this scene.
  1390. /** String parameters can be used by plugins and mesh loaders.
  1391. See COLLADA_CREATE_SCENE_INSTANCES and DMF_USE_MATERIALS_DIRS */
  1392. virtual io::IAttributes* getParameters() = 0;
  1393. //! Get current render pass.
  1394. /** All scene nodes are being rendered in a specific order.
  1395. First lights, cameras, sky boxes, solid geometry, and then transparent
  1396. stuff. During the rendering process, scene nodes may want to know what the scene
  1397. manager is rendering currently, because for example they registered for rendering
  1398. twice, once for transparent geometry and once for solid. When knowing what rendering
  1399. pass currently is active they can render the correct part of their geometry. */
  1400. virtual E_SCENE_NODE_RENDER_PASS getSceneNodeRenderPass() const = 0;
  1401. //! Get the default scene node factory which can create all built in scene nodes
  1402. /** \return Pointer to the default scene node factory
  1403. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1404. virtual ISceneNodeFactory* getDefaultSceneNodeFactory() = 0;
  1405. //! Adds a scene node factory to the scene manager.
  1406. /** Use this to extend the scene manager with new scene node types which it should be
  1407. able to create automatically, for example when loading data from xml files. */
  1408. virtual void registerSceneNodeFactory(ISceneNodeFactory* factoryToAdd) = 0;
  1409. //! Get amount of registered scene node factories.
  1410. virtual u32 getRegisteredSceneNodeFactoryCount() const = 0;
  1411. //! Get a scene node factory by index
  1412. /** \return Pointer to the requested scene node factory, or 0 if it does not exist.
  1413. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1414. virtual ISceneNodeFactory* getSceneNodeFactory(u32 index) = 0;
  1415. //! Get the default scene node animator factory which can create all built-in scene node animators
  1416. /** \return Pointer to the default scene node animator factory
  1417. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1418. virtual ISceneNodeAnimatorFactory* getDefaultSceneNodeAnimatorFactory() = 0;
  1419. //! Adds a scene node animator factory to the scene manager.
  1420. /** Use this to extend the scene manager with new scene node animator types which it should be
  1421. able to create automatically, for example when loading data from xml files. */
  1422. virtual void registerSceneNodeAnimatorFactory(ISceneNodeAnimatorFactory* factoryToAdd) = 0;
  1423. //! Get amount of registered scene node animator factories.
  1424. virtual u32 getRegisteredSceneNodeAnimatorFactoryCount() const = 0;
  1425. //! Get scene node animator factory by index
  1426. /** \return Pointer to the requested scene node animator factory, or 0 if it does not exist.
  1427. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1428. virtual ISceneNodeAnimatorFactory* getSceneNodeAnimatorFactory(u32 index) = 0;
  1429. //! Get typename from a scene node type or null if not found
  1430. virtual const c8* getSceneNodeTypeName(ESCENE_NODE_TYPE type) = 0;
  1431. //! Returns a typename from a scene node animator type or null if not found
  1432. virtual const c8* getAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) = 0;
  1433. //! Adds a scene node to the scene by name
  1434. /** \return Pointer to the scene node added by a factory
  1435. This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
  1436. virtual ISceneNode* addSceneNode(const char* sceneNodeTypeName, ISceneNode* parent=0) = 0;
  1437. //! creates a scene node animator based on its type name
  1438. /** \param typeName: Type of the scene node animator to add.
  1439. \param target: Target scene node of the new animator.
  1440. \return Returns pointer to the new scene node animator or null if not successful. You need to
  1441. drop this pointer after calling this, see IReferenceCounted::drop() for details. */
  1442. virtual ISceneNodeAnimator* createSceneNodeAnimator(const char* typeName, ISceneNode* target=0) = 0;
  1443. //! Creates a new scene manager.
  1444. /** This can be used to easily draw and/or store two
  1445. independent scenes at the same time. The mesh cache will be
  1446. shared between all existing scene managers, which means if you
  1447. load a mesh in the original scene manager using for example
  1448. getMesh(), the mesh will be available in all other scene
  1449. managers too, without loading.
  1450. The original/main scene manager will still be there and
  1451. accessible via IrrlichtDevice::getSceneManager(). If you need
  1452. input event in this new scene manager, for example for FPS
  1453. cameras, you'll need to forward input to this manually: Just
  1454. implement an IEventReceiver and call
  1455. yourNewSceneManager->postEventFromUser(), and return true so
  1456. that the original scene manager doesn't get the event.
  1457. Otherwise, all input will go to the main scene manager
  1458. automatically.
  1459. If you no longer need the new scene manager, you should call
  1460. ISceneManager::drop().
  1461. See IReferenceCounted::drop() for more information. */
  1462. virtual ISceneManager* createNewSceneManager(bool cloneContent=false) = 0;
  1463. //! Saves the current scene into a file.
  1464. /** Scene nodes with the option isDebugObject set to true are
  1465. not being saved. The scene is usually written to an .irr file,
  1466. an xml based format. .irr files can Be edited with the Irrlicht
  1467. Engine Editor, irrEdit (http://www.ambiera.com/irredit/). To
  1468. load .irr files again, see ISceneManager::loadScene().
  1469. \param filename Name of the file.
  1470. \param userDataSerializer If you want to save some user data
  1471. for every scene node into the file, implement the
  1472. ISceneUserDataSerializer interface and provide it as parameter
  1473. here. Otherwise, simply specify 0 as this parameter.
  1474. \param node Node which is taken as the top node of the scene.
  1475. This node and all of its descendants are saved into the scene
  1476. file. Pass 0 or the scene manager to save the full scene (which
  1477. is also the default).
  1478. \return True if successful. */
  1479. virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0;
  1480. //! Saves the current scene into a file.
  1481. /** Scene nodes with the option isDebugObject set to true are
  1482. not being saved. The scene is usually written to an .irr file,
  1483. an xml based format. .irr files can Be edited with the Irrlicht
  1484. Engine Editor, irrEdit (http://www.ambiera.com/irredit/). To
  1485. load .irr files again, see ISceneManager::loadScene().
  1486. \param file File where the scene is saved into.
  1487. \param userDataSerializer If you want to save some user data
  1488. for every scene node into the file, implement the
  1489. ISceneUserDataSerializer interface and provide it as parameter
  1490. here. Otherwise, simply specify 0 as this parameter.
  1491. \param node Node which is taken as the top node of the scene.
  1492. This node and all of its descendants are saved into the scene
  1493. file. Pass 0 or the scene manager to save the full scene (which
  1494. is also the default).
  1495. \return True if successful. */
  1496. virtual bool saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0;
  1497. //! Saves the current scene into a file.
  1498. /** Scene nodes with the option isDebugObject set to true are
  1499. not being saved. The scene is usually written to an .irr file,
  1500. an xml based format. .irr files can Be edited with the Irrlicht
  1501. Engine Editor, irrEdit (http://www.ambiera.com/irredit/). To
  1502. load .irr files again, see ISceneManager::loadScene().
  1503. \param writer XMLWriter with which the scene is saved.
  1504. \param currentPath Path which is used for relative file names.
  1505. Usually the directory of the file written into.
  1506. \param userDataSerializer If you want to save some user data
  1507. for every scene node into the file, implement the
  1508. ISceneUserDataSerializer interface and provide it as parameter
  1509. here. Otherwise, simply specify 0 as this parameter.
  1510. \param node Node which is taken as the top node of the scene.
  1511. This node and all of its descendants are saved into the scene
  1512. file. Pass 0 or the scene manager to save the full scene (which
  1513. is also the default).
  1514. \return True if successful. */
  1515. virtual bool saveScene(io::IXMLWriter* writer, const io::path& currentPath, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* node=0) = 0;
  1516. //! Loads a scene. Note that the current scene is not cleared before.
  1517. /** The scene is usually loaded from an .irr file, an xml based
  1518. format, but other scene formats can be added to the engine via
  1519. ISceneManager::addExternalSceneLoader. .irr files can Be edited
  1520. with the Irrlicht Engine Editor, irrEdit
  1521. (http://www.ambiera.com/irredit/) or saved directly by the engine
  1522. using ISceneManager::saveScene().
  1523. \param filename Name of the file to load from.
  1524. \param userDataSerializer If you want to load user data
  1525. possibily saved in that file for some scene nodes in the file,
  1526. implement the ISceneUserDataSerializer interface and provide it
  1527. as parameter here. Otherwise, simply specify 0 as this
  1528. parameter.
  1529. \param rootNode Node which is taken as the root node of the
  1530. scene. Pass 0 to add the scene directly to the scene manager
  1531. (which is also the default).
  1532. \return True if successful. */
  1533. virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0) = 0;
  1534. //! Loads a scene. Note that the current scene is not cleared before.
  1535. /** The scene is usually loaded from an .irr file, an xml based
  1536. format, but other scene formats can be added to the engine via
  1537. ISceneManager::addExternalSceneLoader. .irr files can Be edited
  1538. with the Irrlicht Engine Editor, irrEdit
  1539. (http://www.ambiera.com/irredit/) or saved directly by the engine
  1540. using ISceneManager::saveScene().
  1541. \param file File where the scene is loaded from.
  1542. \param userDataSerializer If you want to load user data
  1543. saved in that file for some scene nodes in the file,
  1544. implement the ISceneUserDataSerializer interface and provide it
  1545. as parameter here. Otherwise, simply specify 0 as this
  1546. parameter.
  1547. \param rootNode Node which is taken as the root node of the
  1548. scene. Pass 0 to add the scene directly to the scene manager
  1549. (which is also the default).
  1550. \return True if successful. */
  1551. virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, ISceneNode* rootNode=0) = 0;
  1552. //! Get a mesh writer implementation if available
  1553. /** Note: You need to drop() the pointer after use again, see IReferenceCounted::drop()
  1554. for details. */
  1555. virtual IMeshWriter* createMeshWriter(EMESH_WRITER_TYPE type) = 0;
  1556. //! Get a skinned mesh, which is not available as header-only code
  1557. /** Note: You need to drop() the pointer after use again, see IReferenceCounted::drop()
  1558. for details. */
  1559. virtual ISkinnedMesh* createSkinnedMesh() = 0;
  1560. //! Sets ambient color of the scene
  1561. virtual void setAmbientLight(const video::SColorf &ambientColor) = 0;
  1562. //! Get ambient color of the scene
  1563. virtual const video::SColorf& getAmbientLight() const = 0;
  1564. //! Register a custom callbacks manager which gets callbacks during scene rendering.
  1565. /** \param[in] lightManager: the new callbacks manager. You may pass 0 to remove the
  1566. current callbacks manager and restore the default behavior. */
  1567. virtual void setLightManager(ILightManager* lightManager) = 0;
  1568. //! Get current render pass.
  1569. virtual E_SCENE_NODE_RENDER_PASS getCurrentRenderPass() const =0;
  1570. //! Set current render pass.
  1571. virtual void setCurrentRenderPass(E_SCENE_NODE_RENDER_PASS nextPass) =0;
  1572. //! Get current node sorting algorithm used for transparent nodes
  1573. virtual E_TRANSPARENT_NODE_SORTING getTransparentNodeSorting() const = 0;
  1574. //! Set the node sorting algorithm used for transparent nodes
  1575. virtual void setTransparentNodeSorting(E_TRANSPARENT_NODE_SORTING sorting) = 0;
  1576. //! Get an instance of a geometry creator.
  1577. /** The geometry creator provides some helper methods to create various types of
  1578. basic geometry. This can be useful for custom scene nodes. */
  1579. virtual const IGeometryCreator* getGeometryCreator(void) const = 0;
  1580. //! Check if node is culled in current view frustum
  1581. /** Please note that depending on the used culling method this
  1582. check can be rather coarse, or slow. A positive result is
  1583. correct, though, i.e. if this method returns true the node is
  1584. positively not visible. The node might still be invisible even
  1585. if this method returns false.
  1586. \param node The scene node which is checked for culling.
  1587. \return True if node is not visible in the current scene, else
  1588. false. */
  1589. virtual bool isCulled(const ISceneNode* node) const =0;
  1590. };
  1591. } // end namespace scene
  1592. } // end namespace irr
  1593. #endif