Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
NavigationComponent.cpp
Go to the documentation of this file.
1
2
5
6namespace Divide {
7
10 _navigationContext(NavigationContext::NODE_IGNORE),
11 _overrideNavMeshDetail(false)
12{
13}
14
16 _navigationContext = newContext;
17
18 const SceneGraphNode::ChildContainer& children = _parentSGN->getChildren();
19 SharedLock<SharedMutex> w_lock(children._lock);
20 const U32 childCount = children._count;
21 for (U32 i = 0u; i < childCount; ++i) {
22 NavigationComponent* navComp = children._data[i]->get<NavigationComponent>();
23 if (navComp != nullptr) {
24 navComp->navigationContext(newContext);
25 }
26 }
27}
28
29void NavigationComponent::navigationDetailOverride(const bool detailOverride) {
30 _overrideNavMeshDetail = detailOverride;
31
32 const SceneGraphNode::ChildContainer& children = _parentSGN->getChildren();
33 SharedLock<SharedMutex> w_lock(children._lock);
34 const U32 childCount = children._count;
35 for (U32 i = 0u; i < childCount; ++i) {
36 NavigationComponent* navComp = children._data[i]->get<NavigationComponent>();
37 if (navComp != nullptr) {
38 navComp->navigationDetailOverride(detailOverride);
39 }
40 }
41}
42} //namespace Divide
const NavigationContext & navigationContext() const noexcept
void navigationDetailOverride(bool detailOverride)
NavigationComponent(SceneGraphNode *parentSGN, PlatformContext &context)
NavigationContext _navigationContext
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
std::shared_lock< mutex > SharedLock
Definition: SharedMutex.h:49
SGNComponent::Registrar< T, C > BaseComponentType
Definition: SGNComponent.h:207
uint32_t U32
eastl::fixed_vector< SceneGraphNode *, 32, true > _data