Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
ISceneNode.hpp
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in nirtcpp/nirtcpp.hpp
4
5#ifndef NIRT_I_SCENE_NODE_HPP_INCLUDED
6#define NIRT_I_SCENE_NODE_HPP_INCLUDED
7
8#include <nirtcpp/core/engine/IAttributeExchangingObject.hpp>
9#include <nirtcpp/core/engine/ESceneNodeTypes.hpp>
10#include <nirtcpp/core/engine/ESceneNodeUpdateAbs.hpp>
11#include <nirtcpp/core/engine/ECullingTypes.hpp>
12#include <nirtcpp/core/engine/EDebugSceneTypes.hpp>
13#include <nirtcpp/core/engine/ISceneNodeAnimator.hpp>
14#include <nirtcpp/core/engine/ITriangleSelector.hpp>
15#include <nirtcpp/core/engine/SMaterial.hpp>
16#include <nirtcpp/core/engine/irrString.hpp>
17#include <nirtcpp/core/engine/aabbox3d.hpp>
18#include <nirtcpp/core/engine/matrix4.hpp>
19#include <nirtcpp/core/engine/irrList.hpp>
20#include <nirtcpp/core/engine/IAttributes.hpp>
21
22namespace nirt
23{
24namespace scene
25{
26 class ISceneManager;
27
32
33
35
43 {
44 public:
45
47 ISceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1,
48 const core::vector3df& position = core::vector3df(0,0,0),
49 const core::vector3df& rotation = core::vector3df(0,0,0),
50 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f))
51 : RelativeTranslation(position), RelativeRotation(rotation), RelativeScale(scale),
52 Parent(0), SceneManager(mgr), TriangleSelector(0), ID(id),
55 IsVisible(true), IsDebugObject(false)
56 {
57 if (parent)
58 parent->addChild(this);
59
61 }
62
63
65 virtual ~ISceneNode()
66 {
67 // delete all children
68 removeAll();
69
70 // delete all animators
71 ISceneNodeAnimatorList::Iterator ait = Animators.begin();
72 for (; ait != Animators.end(); ++ait)
73 (*ait)->drop();
74
77 }
78
79
81
94 virtual void OnRegisterSceneNode()
95 {
96 if (IsVisible)
97 {
98 ISceneNodeList::Iterator it = Children.begin();
99 for (; it != Children.end(); ++it)
100 (*it)->OnRegisterSceneNode();
101 }
102 }
103
104
106
111 virtual void OnAnimate(u32 timeMs)
112 {
113 if (IsVisible)
114 {
115 // animate this node with all animators
116
117 ISceneNodeAnimatorList::Iterator ait = Animators.begin();
118 while (ait != Animators.end())
119 {
120 // continue to the next node before calling animateNode()
121 // so that the animator may remove itself from the scene
122 // node without the iterator becoming invalid
123 ISceneNodeAnimator* anim = *ait;
124 ++ait;
125 if ( anim->isEnabled() )
126 {
127 anim->animateNode(this, timeMs);
128 }
129 }
130
131 // update absolute position
133
134 // perform the post render process on all children
135
136 ISceneNodeList::Iterator it = Children.begin();
137 for (; it != Children.end(); ++it)
138 (*it)->OnAnimate(timeMs);
139 }
140 }
141
142
144 virtual void render() = 0;
145
146
148
149 virtual const c8* getName() const
150 {
151 return Name.data();
152 }
153
154
156
157 virtual void setName(const c8* name)
158 {
159 Name = name;
160 }
161
162
164
165 virtual void setName(const core::stringc& name)
166 {
167 Name = name;
168 }
169
170
172
179 virtual const core::aabbox3d<f32>& getBoundingBox() const = 0;
180
181
183
187 {
190 return box;
191 }
192
195
199 {
200 edges.set_used(8);
201 getBoundingBox().getEdges( edges.pointer() );
202 for ( u32 i=0; i<8; ++i )
204 }
205
207
214 {
216 }
217
218
220
225 {
226 core::matrix4 mat;
229
230 if (RelativeScale != core::vector3df(1.f,1.f,1.f))
231 {
232 core::matrix4 smat;
234 mat *= smat;
235 }
236
237 return mat;
238 }
239
240
242
246 virtual bool isVisible() const
247 {
248 return IsVisible;
249 }
250
252
254 virtual bool isTrulyVisible() const
255 {
256 if(!IsVisible)
257 return false;
258
259 if(!Parent)
260 return true;
261
262 return Parent->isTrulyVisible();
263 }
264
266
270 virtual void setVisible(bool isVisible)
271 {
273 }
274
275
277
279 virtual s32 getID() const
280 {
281 return ID;
282 }
283
284
286
288 virtual void setID(s32 id)
289 {
290 ID = id;
291 }
292
293
295
298 virtual void addChild(ISceneNode* child)
299 {
300 if (child && (child != this))
301 {
302 // Change scene manager?
303 if (SceneManager != child->SceneManager)
305
306 child->grab();
307 child->remove(); // remove from old parent
308 Children.push_back(child);
309 child->Parent = this;
310 }
311 }
312
313
315
320 virtual bool removeChild(ISceneNode* child)
321 {
322 ISceneNodeList::Iterator it = Children.begin();
323 for (; it != Children.end(); ++it)
324 if ((*it) == child)
325 {
326 (*it)->Parent = 0;
327 (*it)->drop();
328 Children.erase(it);
329 return true;
330 }
331
332 return false;
333 }
334
335
337
340 virtual void removeAll()
341 {
342 ISceneNodeList::Iterator it = Children.begin();
343 for (; it != Children.end(); ++it)
344 {
345 (*it)->Parent = 0;
346 (*it)->drop();
347 }
348
349 Children.clear();
350 }
351
352
354
356 virtual void remove()
357 {
358 if (Parent)
359 Parent->removeChild(this);
360 }
361
362
364
365 virtual void addAnimator(ISceneNodeAnimator* animator)
366 {
367 if (animator)
368 {
369 Animators.push_back(animator);
370 animator->grab();
371 }
372 }
373
374
376
378 {
379 return Animators;
380 }
381
382
384
387 virtual void removeAnimator(ISceneNodeAnimator* animator)
388 {
389 ISceneNodeAnimatorList::Iterator it = Animators.begin();
390 for (; it != Animators.end(); ++it)
391 {
392 if ((*it) == animator)
393 {
394 (*it)->drop();
395 Animators.erase(it);
396 return;
397 }
398 }
399 }
400
401
403
405 virtual void removeAnimators()
406 {
407 ISceneNodeAnimatorList::Iterator it = Animators.begin();
408 for (; it != Animators.end(); ++it)
409 (*it)->drop();
410
411 Animators.clear();
412 }
413
414
416
424 {
426 }
427
428
430
431 virtual u32 getMaterialCount() const
432 {
433 return 0;
434 }
435
436
438
442 void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)
443 {
444 for (u32 i=0; i<getMaterialCount(); ++i)
445 getMaterial(i).setFlag(flag, newvalue);
446 }
447
448
450
453 void setMaterialTexture(u32 textureLayer, video::ITexture* texture)
454 {
455 if (textureLayer >= video::MATERIAL_MAX_TEXTURES)
456 return;
457
458 for (u32 i=0; i<getMaterialCount(); ++i)
459 getMaterial(i).setTexture(textureLayer, texture);
460 }
461
462
464
466 {
467 for (u32 i=0; i<getMaterialCount(); ++i)
468 getMaterial(i).MaterialType = newType;
469 }
470
471
473
477 virtual const core::vector3df& getScale() const
478 {
479 return RelativeScale;
480 }
481
482
484
485 virtual void setScale(const core::vector3df& scale)
486 {
487 RelativeScale = scale;
488 }
489
490
492
496 virtual const core::vector3df& getRotation() const
497 {
498 return RelativeRotation;
499 }
500
501
503
505 virtual void setRotation(const core::vector3df& rotation)
506 {
507 RelativeRotation = rotation;
508 }
509
510
512
515 virtual const core::vector3df& getPosition() const
516 {
517 return RelativeTranslation;
518 }
519
520
522
524 virtual void setPosition(const core::vector3df& newpos)
525 {
526 RelativeTranslation = newpos;
527 }
528
529
531
543
544
546
552 {
553 AutomaticCullingState = state;
554 }
555
556
558
560 {
562 }
563
569
575
576
578
581 virtual void setDebugDataVisible(u32 state)
582 {
583 DebugDataVisible = state;
584 }
585
587
590 {
591 return DebugDataVisible;
592 }
593
594
596
598 void setIsDebugObject(bool debugObject)
599 {
600 IsDebugObject = debugObject;
601 }
602
603
605
608 bool isDebugObject() const
609 {
610 return IsDebugObject;
611 }
612
613
615
617 {
618 return Children;
619 }
620
621
623
624 virtual void setParent(ISceneNode* newParent)
625 {
626 grab();
627 remove();
628
629 Parent = newParent;
630
631 if (Parent)
632 Parent->addChild(this);
633
634 drop();
635 }
636
637
639
649 {
650 return TriangleSelector;
651 }
652
653
655
664 {
665 if (TriangleSelector != selector)
666 {
669
670 TriangleSelector = selector;
673 }
674 }
675
676
678
699
700
702
704 {
705 return Parent;
706 }
707
708
710
711 virtual ESCENE_NODE_TYPE getType() const
712 {
713 return ESNT_UNKNOWN;
714 }
715
716
718
724 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const override
725 {
726 if (!out)
727 return;
728 out->addString("Name", Name.data());
729 out->addInt("Id", ID );
730
731 out->addVector3d("Position", getPosition() );
732 out->addVector3d("Rotation", getRotation() );
733 out->addVector3d("Scale", getScale() );
734
735 out->addBool("Visible", IsVisible );
737 out->addInt("AutomaticCulling", AutomaticCullingState);
738 out->addInt("DebugDataVisible", DebugDataVisible );
739 out->addBool("IsDebugObject", IsDebugObject );
740 }
741
742
744
751 {
752 if (!in)
753 return;
754 Name = in->getAttributeAsString("Name", Name);
755 ID = in->getAttributeAsInt("Id", ID);
756
760
761 IsVisible = in->getAttributeAsBool("Visible", IsVisible);
762
764
765 if (in->existsAttribute("AutomaticCulling"))
766 {
767 // compatibility for older version, new one uses int's
768 const s32 tmpState = in->getAttributeAsEnumeration("AutomaticCulling",
770 if (tmpState != -1)
771 AutomaticCullingState = (u32)tmpState;
772 else
773 AutomaticCullingState = in->getAttributeAsInt("AutomaticCulling");
774 }
775
776 DebugDataVisible = in->getAttributeAsInt("DebugDataVisible", DebugDataVisible);
777 IsDebugObject = in->getAttributeAsBool("IsDebugObject", IsDebugObject);
778
780 }
781
783
786 virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0)
787 {
788 return 0; // to be implemented by derived classes
789 }
790
792
793 virtual ISceneManager* getSceneManager(void) const { return SceneManager; }
794
795 protected:
796
798
802 void cloneMembers(ISceneNode* toCopyFrom, ISceneManager* newManager)
803 {
804 Name = toCopyFrom->Name;
808 RelativeScale = toCopyFrom->RelativeScale;
809 ID = toCopyFrom->ID;
814 IsVisible = toCopyFrom->IsVisible;
815 IsDebugObject = toCopyFrom->IsDebugObject;
816
817 if (newManager)
818 SceneManager = newManager;
819 else
820 SceneManager = toCopyFrom->SceneManager;
821
822 // clone children
823
824 ISceneNodeList::Iterator it = toCopyFrom->Children.begin();
825 for (; it != toCopyFrom->Children.end(); ++it)
826 (*it)->clone(this, newManager);
827
828 // clone animators
829
830 ISceneNodeAnimatorList::Iterator ait = toCopyFrom->Animators.begin();
831 for (; ait != toCopyFrom->Animators.end(); ++ait)
832 {
833 ISceneNodeAnimator* anim = (*ait)->createClone(this, SceneManager);
834 if (anim)
835 {
836 addAnimator(anim);
837 anim->drop();
838 }
839 }
840 }
841
845 {
846 SceneManager = newManager;
847
848 ISceneNodeList::Iterator it = Children.begin();
849 for (; it != Children.end(); ++it)
850 (*it)->setSceneManager(newManager);
851 }
852
855
858
861
864
867
870
873
876
879
882
885
888
891
894
897
900 };
901
902
903} // end namespace scene
904} // end namespace nirt
905
906#endif
bool drop() const
Drops the object. Decrements the reference counter by one.
Definition IReferenceCounted.hpp:126
void grab() const
Grabs the object. Increments the reference counter by one.
Definition IReferenceCounted.hpp:96
4x4 matrix. Mostly used as transformation matrix for 3d calculations.
Definition matrix4.hpp:49
vector3d< T > getTranslation() const
Gets the current translation.
Definition matrix4.hpp:814
CMatrix4< T > & setTranslation(const vector3d< T > &translation)
Set the translation of the current matrix. Will erase any previous values.
Definition matrix4.hpp:821
void transformBoxEx(core::aabbox3d< f32 > &box) const
Transforms a axis aligned bounding box.
Definition matrix4.hpp:1314
void transformVect(vector3df &vect) const
Transforms the vector by this matrix.
Definition matrix4.hpp:1224
CMatrix4< T > & setRotationDegrees(const vector3d< T > &rotation)
Make a rotation matrix from Euler angles. The 4th row and column are unmodified.
Definition matrix4.hpp:881
CMatrix4< T > & setScale(const vector3d< T > &scale)
Set Scale.
Definition matrix4.hpp:845
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
void getEdges(vector3d< T > *edges) const
Stores all 8 edges of the box into an array.
Definition aabbox3d.hpp:150
Self reallocating template array (like stl vector) with additional features.
Definition irrArray.hpp:23
An object which is able to serialize and deserialize its attributes into an attributes object.
Definition IAttributeExchangingObject.hpp:54
Provides a generic interface for attributes and their values and the possibility to serialize them.
Definition IAttributes.hpp:42
virtual s32 getAttributeAsInt(const c8 *attributeName, nirt::s32 defaultNotFound=0) const =0
virtual bool existsAttribute(const c8 *attributeName) const =0
Returns if an attribute with a name exists.
virtual void addString(const c8 *attributeName, const c8 *value)=0
Adds an attribute as string.
virtual bool getAttributeAsBool(const c8 *attributeName, bool defaultNotFound=false) const =0
virtual void addEnum(const c8 *attributeName, const c8 *enumValue, const c8 *const *enumerationLiterals)=0
Adds an attribute as enum.
virtual core::stringc getAttributeAsString(const c8 *attributeName, const core::stringc &defaultNotFound=core::stringc()) const =0
virtual void addVector3d(const c8 *attributeName, const core::vector3df &value)=0
Adds an attribute as 3d vector.
virtual void addBool(const c8 *attributeName, bool value)=0
Adds an attribute as bool.
virtual const c8 * getAttributeAsEnumeration(const c8 *attributeName, const c8 *defaultNotFound=0) const =0
virtual void addInt(const c8 *attributeName, s32 value)=0
Adds an attribute as integer.
virtual core::vector3df getAttributeAsVector3d(const c8 *attributeName, const core::vector3df &defaultNotFound=core::vector3df(0, 0, 0)) const =0
struct holding data describing options
Definition IAttributeExchangingObject.hpp:35
The Scene Manager manages scene nodes, mesh resources, cameras and all the other stuff.
Definition ISceneManager.hpp:160
Animates a scene node. Can animate position, rotation, material, and so on.
Definition ISceneNodeAnimator.hpp:32
virtual void animateNode(ISceneNode *node, u32 timeMs)=0
Animates a scene node.
virtual ISceneNodeAnimator * createClone(ISceneNode *node, ISceneManager *newManager=0)=0
Creates a clone of this animator.
Scene node interface.
Definition ISceneNode.hpp:43
virtual void removeAll()
Removes all children of this scene node.
Definition ISceneNode.hpp:340
const core::list< ISceneNodeAnimator * > & getAnimators() const
Get a list of all scene node animators.
Definition ISceneNode.hpp:377
u32 DebugDataVisible
Flag if debug data should be drawn, such as Bounding Boxes.
Definition ISceneNode.hpp:893
u32 AutomaticCullingState
Automatic culling state.
Definition ISceneNode.hpp:890
bool IsVisible
Is the node visible?
Definition ISceneNode.hpp:896
virtual const core::vector3df & getScale() const
Gets the scale of the scene node relative to its parent.
Definition ISceneNode.hpp:477
virtual u32 getMaterialCount() const
Get amount of materials used by this scene node.
Definition ISceneNode.hpp:431
virtual ISceneNode * clone(ISceneNode *newParent=0, ISceneManager *newManager=0)
Creates a clone of this scene node and its children.
Definition ISceneNode.hpp:786
virtual ISceneManager * getSceneManager(void) const
Retrieve the scene manager for this node.
Definition ISceneNode.hpp:793
core::vector3df RelativeTranslation
Relative translation of the scene node.
Definition ISceneNode.hpp:860
void setAutomaticCulling(u32 state)
Set a culling style or disable culling completely.
Definition ISceneNode.hpp:551
virtual core::vector3df getAbsolutePosition() const
Gets the absolute position of the node in world coordinates.
Definition ISceneNode.hpp:539
ESCENE_NODE_UPDATE_ABS UpdateAbsolutePosBehavior
How updateAbsolutePosition calculates AbsoluteTransformation.
Definition ISceneNode.hpp:887
void setUpdateAbsolutePosBehavior(ESCENE_NODE_UPDATE_ABS behavior)
Set how updateAbsolutePosition calculates the absolute transformation matrix.
Definition ISceneNode.hpp:565
virtual const core::vector3df & getRotation() const
Gets the rotation of the node relative to its parent.
Definition ISceneNode.hpp:496
virtual void setName(const c8 *name)
Sets the name of the node.
Definition ISceneNode.hpp:157
virtual const core::aabbox3d< f32 > & getBoundingBox() const =0
Get the axis aligned, not transformed bounding box of this node.
ISceneManager * SceneManager
Pointer to the scene manager.
Definition ISceneNode.hpp:878
void cloneMembers(ISceneNode *toCopyFrom, ISceneManager *newManager)
A clone function for the ISceneNode members.
Definition ISceneNode.hpp:802
ISceneNode * Parent
Pointer to the parent.
Definition ISceneNode.hpp:869
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))
Constructor.
Definition ISceneNode.hpp:47
virtual void render()=0
Renders the node.
const core::list< ISceneNode * > & getChildren() const
Returns a const reference to the list of all children.
Definition ISceneNode.hpp:616
void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)
Sets all material flags at once to a new value.
Definition ISceneNode.hpp:442
virtual void setScale(const core::vector3df &scale)
Sets the relative scale of the scene node.
Definition ISceneNode.hpp:485
core::vector3df RelativeRotation
Relative rotation of the scene node.
Definition ISceneNode.hpp:863
virtual void setParent(ISceneNode *newParent)
Changes the parent of the scene node.
Definition ISceneNode.hpp:624
virtual bool removeChild(ISceneNode *child)
Removes a child from this scene node.
Definition ISceneNode.hpp:320
virtual void OnRegisterSceneNode()
This method is called just before the rendering process of the whole scene.
Definition ISceneNode.hpp:94
virtual void addAnimator(ISceneNodeAnimator *animator)
Adds an animator which should animate this node.
Definition ISceneNode.hpp:365
ESCENE_NODE_UPDATE_ABS getUpdateAbsolutePosBehavior() const
Get how updateAbsolutePosition calculates the absolute transformation matrix.
Definition ISceneNode.hpp:571
virtual void removeAnimator(ISceneNodeAnimator *animator)
Removes an animator from this scene node.
Definition ISceneNode.hpp:387
virtual void addChild(ISceneNode *child)
Adds a child to this scene node.
Definition ISceneNode.hpp:298
virtual s32 getID() const
Get the id of the scene node.
Definition ISceneNode.hpp:279
virtual void remove()
Removes this scene node from the scene.
Definition ISceneNode.hpp:356
virtual video::SMaterial & getMaterial(u32 num)
Returns the material based on the zero based index i.
Definition ISceneNode.hpp:423
core::list< ISceneNode * > Children
List of all children of this node.
Definition ISceneNode.hpp:872
virtual const core::vector3df & getPosition() const
Gets the position of the node relative to its parent.
Definition ISceneNode.hpp:515
virtual bool isTrulyVisible() const
Check whether the node is truly visible, taking into accounts its parents' visibility.
Definition ISceneNode.hpp:254
core::vector3df RelativeScale
Relative scale of the scene node.
Definition ISceneNode.hpp:866
s32 ID
ID of the node.
Definition ISceneNode.hpp:884
bool isDebugObject() const
Returns if this scene node is a debug object.
Definition ISceneNode.hpp:608
virtual const core::aabbox3d< f32 > getTransformedBoundingBox() const
Get the axis aligned, transformed and animated absolute bounding box of this node.
Definition ISceneNode.hpp:186
virtual void setPosition(const core::vector3df &newpos)
Sets the position of the node relative to its parent.
Definition ISceneNode.hpp:524
virtual void deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0) override
Reads attributes of the scene node.
Definition ISceneNode.hpp:750
virtual ESCENE_NODE_TYPE getType() const
Returns type of the scene node.
Definition ISceneNode.hpp:711
u32 getAutomaticCulling() const
Gets the automatic culling state.
Definition ISceneNode.hpp:559
virtual core::matrix4 getRelativeTransformation() const
Returns the relative transformation of the scene node.
Definition ISceneNode.hpp:224
core::stringc Name
Name of the scene node.
Definition ISceneNode.hpp:854
virtual void setDebugDataVisible(u32 state)
Sets if debug data like bounding boxes should be drawn.
Definition ISceneNode.hpp:581
virtual void getTransformedBoundingBoxEdges(core::array< core::vector3d< f32 > > &edges) const
Definition ISceneNode.hpp:198
ITriangleSelector * TriangleSelector
Pointer to the triangle selector.
Definition ISceneNode.hpp:881
virtual void setRotation(const core::vector3df &rotation)
Sets the rotation of the node relative to its parent.
Definition ISceneNode.hpp:505
virtual void updateAbsolutePosition()
Updates the absolute tranformation or position based on the relative and the parents transformation.
Definition ISceneNode.hpp:681
virtual ITriangleSelector * getTriangleSelector() const
Returns the triangle selector attached to this scene node.
Definition ISceneNode.hpp:648
core::list< ISceneNodeAnimator * > Animators
List of all animator nodes.
Definition ISceneNode.hpp:875
virtual ~ISceneNode()
Destructor.
Definition ISceneNode.hpp:65
virtual void setID(s32 id)
Sets the id of the scene node.
Definition ISceneNode.hpp:288
virtual const c8 * getName() const
Returns the name of the node.
Definition ISceneNode.hpp:149
void setSceneManager(ISceneManager *newManager)
Definition ISceneNode.hpp:844
virtual const core::matrix4 & getAbsoluteTransformation() const
Get the absolute transformation of the node. Is recalculated every OnAnimate()-call.
Definition ISceneNode.hpp:213
void setIsDebugObject(bool debugObject)
Sets if this scene node is a debug object.
Definition ISceneNode.hpp:598
scene::ISceneNode * getParent() const
Returns the parent of this scene node.
Definition ISceneNode.hpp:703
virtual bool isVisible() const
Returns whether the node should be visible (if all of its parents are visible).
Definition ISceneNode.hpp:246
virtual void setName(const core::stringc &name)
Sets the name of the node.
Definition ISceneNode.hpp:165
virtual void setTriangleSelector(ITriangleSelector *selector)
Sets the triangle selector of the scene node.
Definition ISceneNode.hpp:663
u32 isDebugDataVisible() const
Returns if debug data like bounding boxes are drawn.
Definition ISceneNode.hpp:589
virtual void serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const override
Writes attributes of the scene node.
Definition ISceneNode.hpp:724
virtual void OnAnimate(u32 timeMs)
OnAnimate() is called just before rendering the whole scene.
Definition ISceneNode.hpp:111
bool IsDebugObject
Is debug object?
Definition ISceneNode.hpp:899
core::matrix4 AbsoluteTransformation
Absolute transformation of the node.
Definition ISceneNode.hpp:857
void setMaterialType(video::E_MATERIAL_TYPE newType)
Sets the material type of all materials in this scene node to a new material type.
Definition ISceneNode.hpp:465
virtual void setVisible(bool isVisible)
Sets if the node should be visible or not.
Definition ISceneNode.hpp:270
void setMaterialTexture(u32 textureLayer, video::ITexture *texture)
Sets the texture of the specified layer in all materials of this scene node to the new texture.
Definition ISceneNode.hpp:453
virtual void removeAnimators()
Removes all animators from this scene node.
Definition ISceneNode.hpp:405
Interface to return triangles with specific properties.
Definition ITriangleSelector.hpp:74
Interface of a Video Driver dependent Texture.
Definition ITexture.hpp:186
Struct for holding parameters for a material renderer.
Definition SMaterial.hpp:304
void setFlag(E_MATERIAL_FLAG flag, bool value)
Sets the Material flag to the given value.
Definition SMaterial.hpp:548
void setTexture(u32 i, ITexture *tex)
Sets the i-th texture.
Definition SMaterial.hpp:538
E_MATERIAL_TYPE MaterialType
Type of the material. Specifies how everything is blended together.
Definition SMaterial.hpp:324
ESCENE_NODE_UPDATE_ABS
Options how ISceneNode::updateAbsolutePosition calculates the AbsoluteTransformation.
Definition ESceneNodeUpdateAbs.hpp:13
@ ESNUA_TRANSFORM_MATRIX
Node and parent transformation matrices are multiplied (default)
Definition ESceneNodeUpdateAbs.hpp:15
@ ESNUA_TRANSFORM_POSITION
Definition ESceneNodeUpdateAbs.hpp:20
@ EDS_OFF
No Debug Data ( Default )
Definition EDebugSceneTypes.hpp:17
const c8 *const SceneNodeUpdateAbsNames[]
Names for culling type.
Definition ESceneNodeUpdateAbs.hpp:24
ESCENE_NODE_TYPE
An enumeration for all types of built-in scene nodes.
Definition ESceneNodeTypes.hpp:20
@ ESNT_UNKNOWN
Unknown scene node.
Definition ESceneNodeTypes.hpp:96
const c8 *const AutomaticCullingNames[]
Names for culling type.
Definition ECullingTypes.hpp:26
E_MATERIAL_FLAG
Material flags.
Definition EMaterialFlags.hpp:15
NIRTCPP_API SMaterial IdentityMaterial
global const identity Material
const u32 MATERIAL_MAX_TEXTURES
Maximum number of texture an SMaterial can have.
Definition SMaterial.hpp:283
E_MATERIAL_TYPE
Abstracted and easy to use fixed function/programmable pipeline material modes.
Definition EMaterialTypes.hpp:15
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64
char c8
8 bit character variable.
Definition irrTypes.hpp:37

Nirtcpp    @cppfx.xyz

Utxcpp    utx::print