mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-04 18:51:17 -06:00
Make Engine a Property Owner
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#ifndef __OPENSPACE_CORE___OPENSPACEENGINE___H__
|
||||
#define __OPENSPACE_CORE___OPENSPACEENGINE___H__
|
||||
|
||||
#include <openspace/properties/propertyowner.h>
|
||||
#include <openspace/properties/stringproperty.h>
|
||||
#include <openspace/properties/scalar/boolproperty.h>
|
||||
#include <openspace/scene/profile.h>
|
||||
@@ -63,7 +64,7 @@ struct CommandlineArguments {
|
||||
std::string configurationOverride;
|
||||
};
|
||||
|
||||
class OpenSpaceEngine {
|
||||
class OpenSpaceEngine : public properties::PropertyOwner {
|
||||
public:
|
||||
// A mode that specifies which part of the system is currently in control.
|
||||
// The mode can be used to limit certain features, like setting time, navigation
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
openspace::properties::Property::PropertyInfo PrintEventsInfo = {
|
||||
constexpr openspace::properties::Property::PropertyInfo PrintEventsInfo = {
|
||||
"PrintEvents",
|
||||
"Print Events",
|
||||
"If this is enabled, all events that are propagated through the system are "
|
||||
@@ -131,7 +131,8 @@ namespace openspace {
|
||||
class Scene;
|
||||
|
||||
OpenSpaceEngine::OpenSpaceEngine()
|
||||
: _printEvents(PrintEventsInfo, false)
|
||||
: properties::PropertyOwner({ "OpenSpaceEngine" })
|
||||
, _printEvents(PrintEventsInfo, false)
|
||||
{
|
||||
FactoryManager::initialize();
|
||||
FactoryManager::ref().addFactory<Renderable>("Renderable");
|
||||
@@ -146,6 +147,8 @@ OpenSpaceEngine::OpenSpaceEngine()
|
||||
|
||||
SpiceManager::initialize();
|
||||
TransformationManager::initialize();
|
||||
|
||||
addProperty(_printEvents);
|
||||
}
|
||||
|
||||
OpenSpaceEngine::~OpenSpaceEngine() {} // NOLINT
|
||||
|
||||
Reference in New Issue
Block a user