21 #ifndef HX3D_ECS_SCENEGRAPH 22 #define HX3D_ECS_SCENEGRAPH 24 #include "hx3d/utils/ptr.hpp" 25 #include "hx3d/graphics/base_batch.hpp" 26 #include "hx3d/ecs/engine.hpp" 55 template <
class T,
class... Args>
66 template <
class T,
class... Args>
74 void remove(
const std::string path);
117 void update(
const float delta);
167 template <
class T,
class... Args>
174 #include "hx3d/ecs/_inline/scene_graph.inl.hpp" void showIndices()
Show the graph indices.
void setEntityMode(bool enabled)
Activate/Deactivate the entity management mode.
Ptr< T > createNodeChild(const Ptr< Node > &container, Args...args)
Create a child for a container Node.
Manages entity in a world.
Ptr< T > create(const std::string path, Args...args)
Create a game object at a path.
std::map< std::string, Ptr< Node > > _indices
Node indices.
Ptr< Node > _root
Graph root.
void addIndex(const Ptr< Node > &object)
Add an index to the graph.
void internalRemove(const Ptr< Node > &node)
Remove a node.
Node management in hierarchy.
Ptr< Node > pathExists(const std::string path)
Test if the path exists and returns the node.
Ptr< Node > getRoot()
Get the root.
bool _entityEnabled
Is entity management enabled ?
Ptr< T > fetch(const std::string path)
Fetch a game object from a path.
void draw(graphics::BaseBatch &batch)
Draw the nodes.
unsigned int getNodeCount()
Get the number of nodes.
Draw meshes and texts on screen.
Ptr< T > createAtRoot(Args...args)
Create a game object at the root.
Engine _engine
Engine for entity management.
void update(const float delta)
Update the nodes.
std::shared_ptr< T > Ptr
Quick-typing shared ptr.