44 if ( GUID != _parentNode->getGUID() )
47 for (
const CacheEntry& it : _childrenRecursiveCache )
49 if ( it._guid == GUID )
52 ? RelationshipType::GRANDCHILD
53 : RelationshipType::CHILD;
57 for (
const CacheEntry& it : _parentRecursiveCache )
59 if ( it._guid == GUID )
62 ? RelationshipType::GRANDPARENT
63 : RelationshipType::PARENT;
69 if ( it._guid == GUID )
71 return RelationshipType::SIBLING;
76 return RelationshipType::COUNT;
87 case RelationshipType::GRANDCHILD:
89 for (
const CacheEntry& it : _childrenRecursiveCache )
91 if ( it._guid == GUID )
93 return it._level > 0u;
97 case RelationshipType::CHILD:
99 for (
const CacheEntry& it : _childrenRecursiveCache )
101 if ( it._guid == GUID )
103 return it._level == 0u;
107 case RelationshipType::GRANDPARENT:
109 for (
const CacheEntry& it : _parentRecursiveCache )
111 if ( it._guid == GUID )
113 return it._level > 0u;
117 case RelationshipType::PARENT:
119 for (
const CacheEntry& it : _parentRecursiveCache )
121 if ( it._guid == GUID )
123 return it._level == 0u;
127 case RelationshipType::SIBLING:
131 if ( it._guid == GUID )
137 case RelationshipType::COUNT:
break;
150 for (
U32 i = 0u; i < childCount; ++i )
181 for (
U32 i = 0u; i < childCount; ++i )
#define PROFILE_SCOPE_AUTO(CATEGORY)
static const SGNRelationshipCache & relationshipCache(const SceneGraphNode *node) noexcept
FORCE_INLINE I64 getGUID() const noexcept
ProjectManager & parent() noexcept
void updateSiblings(U16 level, Cache &cache) const
void updateParents(U16 level, Cache &cache) const
void invalidate() noexcept
SceneGraphNode * _parentNode
bool validateRelationship(I64 guid, RelationshipType type) const noexcept
Cache _siblingCache
pair: GUID ... level unused
RelationshipType classifyNode(I64 GUID) const noexcept
vector< CacheEntry > Cache
Cache _childrenRecursiveCache
std::atomic_bool _isValid
void updateChildren(U16 level, Cache &cache) const
SGNRelationshipCache(SceneGraphNode *parent) noexcept
Cache _parentRecursiveCache
pair: GUID ... parent level (0 = parent, 1 = grandparent, ...)
bool isValid() const noexcept
ChildContainer & getChildren() noexcept
constexpr Optick::Category::Type GameLogic
Handle console commands that start with a forward slash.
std::lock_guard< mutex > LockGuard
std::shared_lock< mutex > SharedLock
eastl::fixed_vector< SceneGraphNode *, 32, true > _data