Move min boundingsphere property to module class and access globally

This commit is contained in:
Emma Broman
2020-04-06 17:22:29 +02:00
parent df5b518f07
commit 141df97471
7 changed files with 46 additions and 38 deletions
@@ -32,18 +32,34 @@
namespace {
constexpr const char* _loggerCat = "AutoNavigationModule";
constexpr const openspace::properties::Property::PropertyInfo MinBoundingSphereInfo = {
"MinimalValidBoundingSphere",
"Minimal Valid Bounding Sphere",
"The minimal allowed value for a bounding sphere. Used for computation of target "
"positions and path generation, to avoid issues when there is no bounding sphere."
};
} // namespace
namespace openspace {
AutoNavigationModule::AutoNavigationModule() : OpenSpaceModule(Name) {
AutoNavigationModule::AutoNavigationModule()
: OpenSpaceModule(Name),
_minValidBoundingSphere(MinBoundingSphereInfo, 10.0, 1.0, 3e10)
{
addPropertySubOwner(_autoNavigationHandler);
addProperty(_minValidBoundingSphere);
}
autonavigation::AutoNavigationHandler& AutoNavigationModule::AutoNavigationHandler() {
return _autoNavigationHandler;
}
double AutoNavigationModule::minValidBoundingSphere() const {
return _minValidBoundingSphere;
}
std::vector<documentation::Documentation> AutoNavigationModule::documentations() const {
return {
// TODO: call documentation methods for the other classes in this module