mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 04:00:37 -06:00
Make sure relevant nodes list is being populated
This commit is contained in:
@@ -75,7 +75,12 @@ double AutoNavigationModule::minValidBoundingSphere() const {
|
||||
return _minValidBoundingSphere;
|
||||
}
|
||||
|
||||
const std::vector<SceneGraphNode*>& AutoNavigationModule::relevantNodes() const {
|
||||
const std::vector<SceneGraphNode*>& AutoNavigationModule::relevantNodes() {
|
||||
if (!_hasInitializedRelevantNodes) {
|
||||
findRelevantNodes();
|
||||
_hasInitializedRelevantNodes = true;
|
||||
}
|
||||
|
||||
return _relevantNodes;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
autonavigation::AutoNavigationHandler& AutoNavigationHandler();
|
||||
double minValidBoundingSphere() const;
|
||||
const std::vector<SceneGraphNode*>& relevantNodes() const;
|
||||
const std::vector<SceneGraphNode*>& relevantNodes();
|
||||
|
||||
std::vector<documentation::Documentation> documentations() const override;
|
||||
scripting::LuaLibrary luaLibrary() const override;
|
||||
@@ -56,6 +56,7 @@ private:
|
||||
properties::StringListProperty _relevantNodeTags;
|
||||
|
||||
std::vector<SceneGraphNode*> _relevantNodes;
|
||||
bool _hasInitializedRelevantNodes = false;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -208,7 +208,8 @@ void AvoidCollisionCurve::removeCollisions(int step) {
|
||||
|
||||
_points.insert(_points.begin() + i + 2, extraKnot);
|
||||
|
||||
removeCollisions(++step);
|
||||
step++;
|
||||
removeCollisions(step);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user