33#ifndef DVD_SCENE_GRAPH_NODE_INL_
34#define DVD_SCENE_GRAPH_NODE_INL_
41 template<
class T,
typename... Args>
44 node->template AddSGNComponent<T>(
FWD(args)...);
50 node->template RemoveSGNComponent<T>();
55 return _nodeFlags &
to_base(flag);
76 template<
typename T>
requires std::is_base_of_v<SceneNode, T>
84 template<
typename T>
requires std::is_base_of_v<SceneNode, T>
90 ret._handle._data = handle.
_data;
91 ret._nodePtr =
Get( handle );
97 template<
bool checkInternalNode>
106 if constexpr(checkInternalNode)
108 const U64 cmpHash =
_ID(child->
getNode().resourceName().c_str());
109 if (cmpHash == nameHash)
116 if (child->nameHash() == nameHash)
126 if (recChild !=
nullptr)
137 template<
bool checkInternalNode>
145 if constexpr(checkInternalNode)
147 if (child->
getNode().getGUID() == GUID)
162 if (recChild !=
nullptr)
FORCE_INLINE I64 getGUID() const noexcept
struct Divide::SceneGraphNode::hacks Hacks
bool hasFlag(const Flags flag) const noexcept
Returns true only if the current node has the specified flag. Does not check children!
SceneGraphNode * findChildInternal(U64 nameHash, bool recursive=false) const
Handle console commands that start with a forward slash.
FORCE_INLINE void DestroyResource(Handle< T > &handle, const bool immediate=false)
std::shared_lock< mutex > SharedLock
constexpr U64 _ID(const char *const str, const U64 value=val_64_const) noexcept
SceneNodeHandle FromHandle(const Handle< T > handle)
void AddSGNComponent(SceneGraphNode *node, Args... args)
void RemoveSGNComponent(SceneGraphNode *node)
FORCE_INLINE T * Get(const Handle< T > handle)
Handle< T > ToHandle(const SceneNodeHandle handle)
constexpr auto to_base(const Type value) -> Type
eastl::fixed_vector< SceneGraphNode *, 32, true > _data
RenderingComponent * _renderingComponent
TransformComponent * _transformComponentCache
BoundsComponent * _boundsComponentCache
Handle< SceneNode > _handle