]> git.lizzy.rs Git - irrlicht.git/blob - include/ISceneNode.h
Avoid warnings when working with CMatrix4<f64>
[irrlicht.git] / include / ISceneNode.h
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt\r
2 // This file is part of the "Irrlicht Engine".\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h\r
4 \r
5 #ifndef __I_SCENE_NODE_H_INCLUDED__\r
6 #define __I_SCENE_NODE_H_INCLUDED__\r
7 \r
8 #include "IReferenceCounted.h"\r
9 #include "ESceneNodeTypes.h"\r
10 #include "ECullingTypes.h"\r
11 #include "EDebugSceneTypes.h"\r
12 #include "SMaterial.h"\r
13 #include "irrString.h"\r
14 #include "aabbox3d.h"\r
15 #include "matrix4.h"\r
16 #include "IAttributes.h"\r
17 #include <list>\r
18 \r
19 namespace irr\r
20 {\r
21 namespace scene\r
22 {\r
23         class ISceneNode;\r
24         class ISceneManager;\r
25 \r
26         //! Typedef for list of scene nodes\r
27         typedef std::list<ISceneNode*> ISceneNodeList;\r
28 \r
29         //! Scene node interface.\r
30         /** A scene node is a node in the hierarchical scene graph. Every scene\r
31         node may have children, which are also scene nodes. Children move\r
32         relative to their parent's position. If the parent of a node is not\r
33         visible, its children won't be visible either. In this way, it is for\r
34         example easily possible to attach a light to a moving car, or to place\r
35         a walking character on a moving platform on a moving ship.\r
36         */\r
37         class ISceneNode : virtual public IReferenceCounted\r
38         {\r
39         public:\r
40 \r
41                 //! Constructor\r
42                 ISceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1,\r
43                                 const core::vector3df& position = core::vector3df(0,0,0),\r
44                                 const core::vector3df& rotation = core::vector3df(0,0,0),\r
45                                 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f))\r
46                         : RelativeTranslation(position), RelativeRotation(rotation), RelativeScale(scale),\r
47                                 Parent(0), SceneManager(mgr), ID(id),\r
48                                 AutomaticCullingState(EAC_BOX), DebugDataVisible(EDS_OFF),\r
49                                 IsVisible(true), IsDebugObject(false)\r
50                 {\r
51                         if (parent)\r
52                                 parent->addChild(this);\r
53 \r
54                         updateAbsolutePosition();\r
55                 }\r
56 \r
57 \r
58                 //! Destructor\r
59                 virtual ~ISceneNode()\r
60                 {\r
61                         // delete all children\r
62                         removeAll();\r
63                 }\r
64 \r
65 \r
66                 //! This method is called just before the rendering process of the whole scene.\r
67                 /** Nodes may register themselves in the render pipeline during this call,\r
68                 precalculate the geometry which should be renderered, and prevent their\r
69                 children from being able to register themselves if they are clipped by simply\r
70                 not calling their OnRegisterSceneNode method.\r
71                 If you are implementing your own scene node, you should overwrite this method\r
72                 with an implementation code looking like this:\r
73                 \code\r
74                 if (IsVisible)\r
75                         SceneManager->registerNodeForRendering(this);\r
76 \r
77                 ISceneNode::OnRegisterSceneNode();\r
78                 \endcode\r
79                 */\r
80                 virtual void OnRegisterSceneNode()\r
81                 {\r
82                         if (IsVisible)\r
83                         {\r
84                                 ISceneNodeList::iterator it = Children.begin();\r
85                                 for (; it != Children.end(); ++it)\r
86                                         (*it)->OnRegisterSceneNode();\r
87                         }\r
88                 }\r
89 \r
90 \r
91                 //! OnAnimate() is called just before rendering the whole scene.\r
92                 /** Nodes may calculate or store animations here, and may do other useful things,\r
93                 depending on what they are. Also, OnAnimate() should be called for all\r
94                 child scene nodes here. This method will be called once per frame, independent\r
95                 of whether the scene node is visible or not.\r
96                 \param timeMs Current time in milliseconds. */\r
97                 virtual void OnAnimate(u32 timeMs)\r
98                 {\r
99                         if (IsVisible)\r
100                         {\r
101                                 // update absolute position\r
102                                 updateAbsolutePosition();\r
103 \r
104                                 // perform the post render process on all children\r
105 \r
106                                 ISceneNodeList::iterator it = Children.begin();\r
107                                 for (; it != Children.end(); ++it)\r
108                                         (*it)->OnAnimate(timeMs);\r
109                         }\r
110                 }\r
111 \r
112 \r
113                 //! Renders the node.\r
114                 virtual void render() = 0;\r
115 \r
116 \r
117                 //! Returns the name of the node.\r
118                 /** \return Name as character string. */\r
119                 virtual const c8* getName() const\r
120                 {\r
121                         return Name.c_str();\r
122                 }\r
123 \r
124 \r
125                 //! Sets the name of the node.\r
126                 /** \param name New name of the scene node. */\r
127                 virtual void setName(const c8* name)\r
128                 {\r
129                         Name = name;\r
130                 }\r
131 \r
132 \r
133                 //! Sets the name of the node.\r
134                 /** \param name New name of the scene node. */\r
135                 virtual void setName(const core::stringc& name)\r
136                 {\r
137                         Name = name;\r
138                 }\r
139 \r
140 \r
141                 //! Get the axis aligned, not transformed bounding box of this node.\r
142                 /** This means that if this node is an animated 3d character,\r
143                 moving in a room, the bounding box will always be around the\r
144                 origin. To get the box in real world coordinates, just\r
145                 transform it with the matrix you receive with\r
146                 getAbsoluteTransformation() or simply use\r
147                 getTransformedBoundingBox(), which does the same.\r
148                 \return The non-transformed bounding box. */\r
149                 virtual const core::aabbox3d<f32>& getBoundingBox() const = 0;\r
150 \r
151 \r
152                 //! Get the axis aligned, transformed and animated absolute bounding box of this node.\r
153                 /** Note: The result is still an axis-aligned bounding box, so it's size\r
154                 changes with rotation.\r
155                 \return The transformed bounding box. */\r
156                 virtual const core::aabbox3d<f32> getTransformedBoundingBox() const\r
157                 {\r
158                         core::aabbox3d<f32> box = getBoundingBox();\r
159                         AbsoluteTransformation.transformBoxEx(box);\r
160                         return box;\r
161                 }\r
162 \r
163                 //! Get a the 8 corners of the original bounding box transformed and\r
164                 //! animated by the absolute transformation.\r
165                 /** Note: The result is _not_ identical to getTransformedBoundingBox().getEdges(),\r
166                 but getting an aabbox3d of these edges would then be identical.\r
167                 \param edges Receives an array with the transformed edges */\r
168                 virtual void getTransformedBoundingBoxEdges(core::array< core::vector3d<f32> >& edges) const\r
169                 {\r
170                         edges.set_used(8);\r
171                         getBoundingBox().getEdges( edges.pointer() );\r
172                         for ( u32 i=0; i<8; ++i )\r
173                                 AbsoluteTransformation.transformVect( edges[i] );\r
174                 }\r
175 \r
176                 //! Get the absolute transformation of the node. Is recalculated every OnAnimate()-call.\r
177                 /** NOTE: For speed reasons the absolute transformation is not\r
178                 automatically recalculated on each change of the relative\r
179                 transformation or by a transformation change of an parent. Instead the\r
180                 update usually happens once per frame in OnAnimate. You can enforce\r
181                 an update with updateAbsolutePosition().\r
182                 \return The absolute transformation matrix. */\r
183                 virtual const core::matrix4& getAbsoluteTransformation() const\r
184                 {\r
185                         return AbsoluteTransformation;\r
186                 }\r
187 \r
188 \r
189                 //! Returns the relative transformation of the scene node.\r
190                 /** The relative transformation is stored internally as 3\r
191                 vectors: translation, rotation and scale. To get the relative\r
192                 transformation matrix, it is calculated from these values.\r
193                 \return The relative transformation matrix. */\r
194                 virtual core::matrix4 getRelativeTransformation() const\r
195                 {\r
196                         core::matrix4 mat;\r
197                         mat.setRotationDegrees(RelativeRotation);\r
198                         mat.setTranslation(RelativeTranslation);\r
199 \r
200                         if (RelativeScale != core::vector3df(1.f,1.f,1.f))\r
201                         {\r
202                                 core::matrix4 smat;\r
203                                 smat.setScale(RelativeScale);\r
204                                 mat *= smat;\r
205                         }\r
206 \r
207                         return mat;\r
208                 }\r
209 \r
210 \r
211                 //! Returns whether the node should be visible (if all of its parents are visible).\r
212                 /** This is only an option set by the user, but has nothing to\r
213                 do with geometry culling\r
214                 \return The requested visibility of the node, true means\r
215                 visible (if all parents are also visible). */\r
216                 virtual bool isVisible() const\r
217                 {\r
218                         return IsVisible;\r
219                 }\r
220 \r
221                 //! Check whether the node is truly visible, taking into accounts its parents' visibility\r
222                 /** \return true if the node and all its parents are visible,\r
223                 false if this or any parent node is invisible. */\r
224                 virtual bool isTrulyVisible() const\r
225                 {\r
226                         if(!IsVisible)\r
227                                 return false;\r
228 \r
229                         if(!Parent)\r
230                                 return true;\r
231 \r
232                         return Parent->isTrulyVisible();\r
233                 }\r
234 \r
235                 //! Sets if the node should be visible or not.\r
236                 /** All children of this node won't be visible either, when set\r
237                 to false. Invisible nodes are not valid candidates for selection by\r
238                 collision manager bounding box methods.\r
239                 \param isVisible If the node shall be visible. */\r
240                 virtual void setVisible(bool isVisible)\r
241                 {\r
242                         IsVisible = isVisible;\r
243                 }\r
244 \r
245 \r
246                 //! Get the id of the scene node.\r
247                 /** This id can be used to identify the node.\r
248                 \return The id. */\r
249                 virtual s32 getID() const\r
250                 {\r
251                         return ID;\r
252                 }\r
253 \r
254 \r
255                 //! Sets the id of the scene node.\r
256                 /** This id can be used to identify the node.\r
257                 \param id The new id. */\r
258                 virtual void setID(s32 id)\r
259                 {\r
260                         ID = id;\r
261                 }\r
262 \r
263 \r
264                 //! Adds a child to this scene node.\r
265                 /** If the scene node already has a parent it is first removed\r
266                 from the other parent.\r
267                 \param child A pointer to the new child. */\r
268                 virtual void addChild(ISceneNode* child)\r
269                 {\r
270                         if (child && (child != this))\r
271                         {\r
272                                 // Change scene manager?\r
273                                 if (SceneManager != child->SceneManager)\r
274                                         child->setSceneManager(SceneManager);\r
275 \r
276                                 child->grab();\r
277                                 child->remove(); // remove from old parent\r
278                                 Children.push_back(child);\r
279                                 child->Parent = this;\r
280                         }\r
281                 }\r
282 \r
283 \r
284                 //! Removes a child from this scene node.\r
285                 /** If found in the children list, the child pointer is also\r
286                 dropped and might be deleted if no other grab exists.\r
287                 \param child A pointer to the child which shall be removed.\r
288                 \return True if the child was removed, and false if not,\r
289                 e.g. because it couldn't be found in the children list. */\r
290                 virtual bool removeChild(ISceneNode* child)\r
291                 {\r
292                         ISceneNodeList::iterator it = Children.begin();\r
293                         for (; it != Children.end(); ++it)\r
294                                 if ((*it) == child)\r
295                                 {\r
296                                         (*it)->Parent = 0;\r
297                                         (*it)->drop();\r
298                                         Children.erase(it);\r
299                                         return true;\r
300                                 }\r
301 \r
302                         return false;\r
303                 }\r
304 \r
305 \r
306                 //! Removes all children of this scene node\r
307                 /** The scene nodes found in the children list are also dropped\r
308                 and might be deleted if no other grab exists on them.\r
309                 */\r
310                 virtual void removeAll()\r
311                 {\r
312                         ISceneNodeList::iterator it = Children.begin();\r
313                         for (; it != Children.end(); ++it)\r
314                         {\r
315                                 (*it)->Parent = 0;\r
316                                 (*it)->drop();\r
317                         }\r
318 \r
319                         Children.clear();\r
320                 }\r
321 \r
322 \r
323                 //! Removes this scene node from the scene\r
324                 /** If no other grab exists for this node, it will be deleted.\r
325                 */\r
326                 virtual void remove()\r
327                 {\r
328                         if (Parent)\r
329                                 Parent->removeChild(this);\r
330                 }\r
331 \r
332 \r
333                 //! Returns the material based on the zero based index i.\r
334                 /** To get the amount of materials used by this scene node, use\r
335                 getMaterialCount(). This function is needed for inserting the\r
336                 node into the scene hierarchy at an optimal position for\r
337                 minimizing renderstate changes, but can also be used to\r
338                 directly modify the material of a scene node.\r
339                 \param num Zero based index. The maximal value is getMaterialCount() - 1.\r
340                 \return The material at that index. */\r
341                 virtual video::SMaterial& getMaterial(u32 num)\r
342                 {\r
343                         return video::IdentityMaterial;\r
344                 }\r
345 \r
346 \r
347                 //! Get amount of materials used by this scene node.\r
348                 /** \return Current amount of materials of this scene node. */\r
349                 virtual u32 getMaterialCount() const\r
350                 {\r
351                         return 0;\r
352                 }\r
353 \r
354 \r
355                 //! Sets all material flags at once to a new value.\r
356                 /** Useful, for example, if you want the whole mesh to be\r
357                 affected by light.\r
358                 \param flag Which flag of all materials to be set.\r
359                 \param newvalue New value of that flag. */\r
360                 void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)\r
361                 {\r
362                         for (u32 i=0; i<getMaterialCount(); ++i)\r
363                                 getMaterial(i).setFlag(flag, newvalue);\r
364                 }\r
365 \r
366 \r
367                 //! Sets the texture of the specified layer in all materials of this scene node to the new texture.\r
368                 /** \param textureLayer Layer of texture to be set. Must be a\r
369                 value smaller than MATERIAL_MAX_TEXTURES.\r
370                 \param texture New texture to be used. */\r
371                 void setMaterialTexture(u32 textureLayer, video::ITexture* texture)\r
372                 {\r
373                         if (textureLayer >= video::MATERIAL_MAX_TEXTURES)\r
374                                 return;\r
375 \r
376                         for (u32 i=0; i<getMaterialCount(); ++i)\r
377                                 getMaterial(i).setTexture(textureLayer, texture);\r
378                 }\r
379 \r
380 \r
381                 //! Sets the material type of all materials in this scene node to a new material type.\r
382                 /** \param newType New type of material to be set. */\r
383                 void setMaterialType(video::E_MATERIAL_TYPE newType)\r
384                 {\r
385                         for (u32 i=0; i<getMaterialCount(); ++i)\r
386                                 getMaterial(i).MaterialType = newType;\r
387                 }\r
388 \r
389 \r
390                 //! Gets the scale of the scene node relative to its parent.\r
391                 /** This is the scale of this node relative to its parent.\r
392                 If you want the absolute scale, use\r
393                 getAbsoluteTransformation().getScale()\r
394                 \return The scale of the scene node. */\r
395                 virtual const core::vector3df& getScale() const\r
396                 {\r
397                         return RelativeScale;\r
398                 }\r
399 \r
400 \r
401                 //! Sets the relative scale of the scene node.\r
402                 /** \param scale New scale of the node, relative to its parent. */\r
403                 virtual void setScale(const core::vector3df& scale)\r
404                 {\r
405                         RelativeScale = scale;\r
406                 }\r
407 \r
408 \r
409                 //! Gets the rotation of the node relative to its parent.\r
410                 /** Note that this is the relative rotation of the node.\r
411                 If you want the absolute rotation, use\r
412                 getAbsoluteTransformation().getRotation()\r
413                 \return Current relative rotation of the scene node. */\r
414                 virtual const core::vector3df& getRotation() const\r
415                 {\r
416                         return RelativeRotation;\r
417                 }\r
418 \r
419 \r
420                 //! Sets the rotation of the node relative to its parent.\r
421                 /** This only modifies the relative rotation of the node.\r
422                 \param rotation New rotation of the node in degrees. */\r
423                 virtual void setRotation(const core::vector3df& rotation)\r
424                 {\r
425                         RelativeRotation = rotation;\r
426                 }\r
427 \r
428 \r
429                 //! Gets the position of the node relative to its parent.\r
430                 /** Note that the position is relative to the parent. If you want\r
431                 the position in world coordinates, use getAbsolutePosition() instead.\r
432                 \return The current position of the node relative to the parent. */\r
433                 virtual const core::vector3df& getPosition() const\r
434                 {\r
435                         return RelativeTranslation;\r
436                 }\r
437 \r
438 \r
439                 //! Sets the position of the node relative to its parent.\r
440                 /** Note that the position is relative to the parent.\r
441                 \param newpos New relative position of the scene node. */\r
442                 virtual void setPosition(const core::vector3df& newpos)\r
443                 {\r
444                         RelativeTranslation = newpos;\r
445                 }\r
446 \r
447 \r
448                 //! Gets the absolute position of the node in world coordinates.\r
449                 /** If you want the position of the node relative to its parent,\r
450                 use getPosition() instead.\r
451                 NOTE: For speed reasons the absolute position is not\r
452                 automatically recalculated on each change of the relative\r
453                 position or by a position change of an parent. Instead the\r
454                 update usually happens once per frame in OnAnimate. You can enforce\r
455                 an update with updateAbsolutePosition().\r
456                 \return The current absolute position of the scene node (updated on last call of updateAbsolutePosition). */\r
457                 virtual core::vector3df getAbsolutePosition() const\r
458                 {\r
459                         return AbsoluteTransformation.getTranslation();\r
460                 }\r
461 \r
462 \r
463                 //! Set a culling style or disable culling completely.\r
464                 /** Box cullling (EAC_BOX) is set by default. Note that not\r
465                 all SceneNodes support culling and that some nodes always cull\r
466                 their geometry because it is their only reason for existence,\r
467                 for example the OctreeSceneNode.\r
468                 \param state The culling state to be used. Check E_CULLING_TYPE for possible values.*/\r
469                 void setAutomaticCulling( u32 state)\r
470                 {\r
471                         AutomaticCullingState = state;\r
472                 }\r
473 \r
474 \r
475                 //! Gets the automatic culling state.\r
476                 /** \return The automatic culling state. */\r
477                 u32 getAutomaticCulling() const\r
478                 {\r
479                         return AutomaticCullingState;\r
480                 }\r
481 \r
482 \r
483                 //! Sets if debug data like bounding boxes should be drawn.\r
484                 /** A bitwise OR of the types from @ref irr::scene::E_DEBUG_SCENE_TYPE.\r
485                 Please note that not all scene nodes support all debug data types.\r
486                 \param state The debug data visibility state to be used. */\r
487                 virtual void setDebugDataVisible(u32 state)\r
488                 {\r
489                         DebugDataVisible = state;\r
490                 }\r
491 \r
492                 //! Returns if debug data like bounding boxes are drawn.\r
493                 /** \return A bitwise OR of the debug data values from\r
494                 @ref irr::scene::E_DEBUG_SCENE_TYPE that are currently visible. */\r
495                 u32 isDebugDataVisible() const\r
496                 {\r
497                         return DebugDataVisible;\r
498                 }\r
499 \r
500 \r
501                 //! Sets if this scene node is a debug object.\r
502                 /** Debug objects have some special properties, for example they can be easily\r
503                 excluded from collision detection or from serialization, etc. */\r
504                 void setIsDebugObject(bool debugObject)\r
505                 {\r
506                         IsDebugObject = debugObject;\r
507                 }\r
508 \r
509 \r
510                 //! Returns if this scene node is a debug object.\r
511                 /** Debug objects have some special properties, for example they can be easily\r
512                 excluded from collision detection or from serialization, etc.\r
513                 \return If this node is a debug object, true is returned. */\r
514                 bool isDebugObject() const\r
515                 {\r
516                         return IsDebugObject;\r
517                 }\r
518 \r
519 \r
520                 //! Returns a const reference to the list of all children.\r
521                 /** \return The list of all children of this node. */\r
522                 const std::list<ISceneNode*>& getChildren() const\r
523                 {\r
524                         return Children;\r
525                 }\r
526 \r
527 \r
528                 //! Changes the parent of the scene node.\r
529                 /** \param newParent The new parent to be used. */\r
530                 virtual void setParent(ISceneNode* newParent)\r
531                 {\r
532                         grab();\r
533                         remove();\r
534 \r
535                         Parent = newParent;\r
536 \r
537                         if (Parent)\r
538                                 Parent->addChild(this);\r
539 \r
540                         drop();\r
541                 }\r
542 \r
543 \r
544                 //! Updates the absolute position based on the relative and the parents position\r
545                 /** Note: This does not recursively update the parents absolute positions, so if you have a deeper\r
546                         hierarchy you might want to update the parents first.*/\r
547                 virtual void updateAbsolutePosition()\r
548                 {\r
549                         if (Parent)\r
550                         {\r
551                                 AbsoluteTransformation =\r
552                                         Parent->getAbsoluteTransformation() * getRelativeTransformation();\r
553                         }\r
554                         else\r
555                                 AbsoluteTransformation = getRelativeTransformation();\r
556                 }\r
557 \r
558 \r
559                 //! Returns the parent of this scene node\r
560                 /** \return A pointer to the parent. */\r
561                 scene::ISceneNode* getParent() const\r
562                 {\r
563                         return Parent;\r
564                 }\r
565 \r
566 \r
567                 //! Returns type of the scene node\r
568                 /** \return The type of this node. */\r
569                 virtual ESCENE_NODE_TYPE getType() const\r
570                 {\r
571                         return ESNT_UNKNOWN;\r
572                 }\r
573 \r
574                 //! Creates a clone of this scene node and its children.\r
575                 /** \param newParent An optional new parent.\r
576                 \param newManager An optional new scene manager.\r
577                 \return The newly created clone of this node. */\r
578                 virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0)\r
579                 {\r
580                         return 0; // to be implemented by derived classes\r
581                 }\r
582 \r
583                 //! Retrieve the scene manager for this node.\r
584                 /** \return The node's scene manager. */\r
585                 virtual ISceneManager* getSceneManager(void) const { return SceneManager; }\r
586 \r
587         protected:\r
588 \r
589                 //! A clone function for the ISceneNode members.\r
590                 /** This method can be used by clone() implementations of\r
591                 derived classes\r
592                 \param toCopyFrom The node from which the values are copied\r
593                 \param newManager The new scene manager. */\r
594                 void cloneMembers(ISceneNode* toCopyFrom, ISceneManager* newManager)\r
595                 {\r
596                         Name = toCopyFrom->Name;\r
597                         AbsoluteTransformation = toCopyFrom->AbsoluteTransformation;\r
598                         RelativeTranslation = toCopyFrom->RelativeTranslation;\r
599                         RelativeRotation = toCopyFrom->RelativeRotation;\r
600                         RelativeScale = toCopyFrom->RelativeScale;\r
601                         ID = toCopyFrom->ID;\r
602                         AutomaticCullingState = toCopyFrom->AutomaticCullingState;\r
603                         DebugDataVisible = toCopyFrom->DebugDataVisible;\r
604                         IsVisible = toCopyFrom->IsVisible;\r
605                         IsDebugObject = toCopyFrom->IsDebugObject;\r
606 \r
607                         if (newManager)\r
608                                 SceneManager = newManager;\r
609                         else\r
610                                 SceneManager = toCopyFrom->SceneManager;\r
611 \r
612                         // clone children\r
613 \r
614                         ISceneNodeList::iterator it = toCopyFrom->Children.begin();\r
615                         for (; it != toCopyFrom->Children.end(); ++it)\r
616                                 (*it)->clone(this, newManager);\r
617                 }\r
618 \r
619                 //! Sets the new scene manager for this node and all children.\r
620                 //! Called by addChild when moving nodes between scene managers\r
621                 void setSceneManager(ISceneManager* newManager)\r
622                 {\r
623                         SceneManager = newManager;\r
624 \r
625                         ISceneNodeList::iterator it = Children.begin();\r
626                         for (; it != Children.end(); ++it)\r
627                                 (*it)->setSceneManager(newManager);\r
628                 }\r
629 \r
630                 //! Name of the scene node.\r
631                 core::stringc Name;\r
632 \r
633                 //! Absolute transformation of the node.\r
634                 core::matrix4 AbsoluteTransformation;\r
635 \r
636                 //! Relative translation of the scene node.\r
637                 core::vector3df RelativeTranslation;\r
638 \r
639                 //! Relative rotation of the scene node.\r
640                 core::vector3df RelativeRotation;\r
641 \r
642                 //! Relative scale of the scene node.\r
643                 core::vector3df RelativeScale;\r
644 \r
645                 //! Pointer to the parent\r
646                 ISceneNode* Parent;\r
647 \r
648                 //! List of all children of this node\r
649                 std::list<ISceneNode*> Children;\r
650 \r
651                 //! Pointer to the scene manager\r
652                 ISceneManager* SceneManager;\r
653 \r
654                 //! ID of the node.\r
655                 s32 ID;\r
656 \r
657                 //! Automatic culling state\r
658                 u32 AutomaticCullingState;\r
659 \r
660                 //! Flag if debug data should be drawn, such as Bounding Boxes.\r
661                 u32 DebugDataVisible;\r
662 \r
663                 //! Is the node visible?\r
664                 bool IsVisible;\r
665 \r
666                 //! Is debug object?\r
667                 bool IsDebugObject;\r
668         };\r
669 \r
670 \r
671 } // end namespace scene\r
672 } // end namespace irr\r
673 \r
674 #endif\r
675 \r