21 #include "hx3d/ecs/scene_graph.hpp" 26 template <
class T,
class... Args>
28 return sg.template createNodeChild<T>(this->shared_from_this(), name, args...);
35 if (obj->_name == name) {
36 return std::dynamic_pointer_cast<T>(obj);
40 Log.
Error(
"Node: child `%s` does not exists.", name.c_str());
std::vector< Ptr< Node > > _children
Children nodes.
Node management in hierarchy.
void Error(const std::string fmt,...)
Write an error message.
static hx3d::LogImpl Log
Current log implementation.
Ptr< T > createChild(SceneGraph &sg, const std::string name, Args...args)
Create a new child Node, using the SceneGraph.
Ptr< T > getChild(const std::string name)
Get one child.
std::shared_ptr< T > Ptr
Quick-typing shared ptr.