Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
Node.cpp File Reference

Implementation file for the Scene Node class. More...

#include <cassert>
#include <algorithm>
#include <type_traits>
#include "aeongames/Node.hpp"
#include "aeongames/Scene.hpp"
#include "aeongames/LogLevel.hpp"
#include "Factory.h"
#include "aeongames/StringId.hpp"
#include "aeongames/ProtoBufClasses.hpp"
#include "aeongames/ProtoBufUtils.hpp"
#include "aeongames/CRC.hpp"
#include "scene.pb.h"
Include dependency graph for Node.cpp:

Go to the source code of this file.

Classes

struct  AeonGames::always_false< T >

Namespaces

namespace  AeonGames
 <- This is here just for the literals

Macros

#define LoopTraverseDFSPreOrder(...)
 Macro generating LoopTraverseDFSPreOrder implementations for const and non-const variants.

Functions

 AeonGames::LoopTraverseDFSPreOrder (const) LoopTraverseDFSPreOrder() Node *Node
 Const version generated by LoopTraverseDFSPreOrder macro.

Detailed Description

Implementation file for the Scene Node class.

Author
Rodrigo Hernandez.

Definition in file Node.cpp.

Macro Definition Documentation

◆ LoopTraverseDFSPreOrder

#define LoopTraverseDFSPreOrder ( ...)
Value:
void Node::LoopTraverseDFSPreOrder ( const std::function<void ( __VA_ARGS__ Node& ) >& aAction ) __VA_ARGS__ \
{\\
auto node = this;\
aAction ( *node );\
auto parent = GetNodePtr(mParent);\
while ( node != parent )\
{\
if ( node->mIterator < node->mNodes.size() )\
{\
auto prev = node;\
node = node->mNodes[node->mIterator].get();\
aAction ( *node );\
prev->mIterator++;\
}\
else\
{\
node->mIterator = 0; /* Reset counter for next traversal.*/\
node = GetNodePtr(node->mParent);\
}\
}\
}

Macro generating LoopTraverseDFSPreOrder implementations for const and non-const variants.

Definition at line 425 of file Node.cpp.