mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 11:09:37 -06:00
Fix requests from code review
This commit is contained in:
@@ -98,7 +98,7 @@ public:
|
||||
void encode();
|
||||
void decode();
|
||||
|
||||
void scheduleLoadScene(const std::string& scenePath);
|
||||
void scheduleLoadScene(std::string scenePath);
|
||||
|
||||
void enableBarrier();
|
||||
void disableBarrier();
|
||||
@@ -199,7 +199,7 @@ private:
|
||||
// Others
|
||||
std::unique_ptr<properties::PropertyOwner> _globalPropertyNamespace;
|
||||
|
||||
bool _switchScene;
|
||||
bool _scheduledSceneSwitch;
|
||||
std::string _scenePath;
|
||||
|
||||
struct {
|
||||
|
||||
@@ -25,17 +25,18 @@
|
||||
#ifndef __OPENSPACE_CORE___RENDERENGINE___H__
|
||||
#define __OPENSPACE_CORE___RENDERENGINE___H__
|
||||
|
||||
#include <openspace/scripting/scriptengine.h>
|
||||
|
||||
#include <openspace/performance/performancemanager.h>
|
||||
#include <openspace/properties/optionproperty.h>
|
||||
#include <openspace/properties/propertyowner.h>
|
||||
#include <openspace/properties/triggerproperty.h>
|
||||
#include <openspace/properties/scalar/boolproperty.h>
|
||||
#include <openspace/properties/scalar/intproperty.h>
|
||||
#include <openspace/rendering/screenspacerenderable.h>
|
||||
#include <openspace/rendering/renderer.h>
|
||||
#include <openspace/properties/triggerproperty.h>
|
||||
|
||||
#include <openspace/rendering/raycastermanager.h>
|
||||
#include <openspace/performance/performancemanager.h>
|
||||
#include <openspace/rendering/renderer.h>
|
||||
#include <openspace/rendering/screenspacerenderable.h>
|
||||
|
||||
#include <openspace/scripting/scriptengine.h>
|
||||
|
||||
#include <openspace/util/syncdata.h>
|
||||
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
#ifndef __OPENSPACE_CORE___SCENELOADER___H__
|
||||
#define __OPENSPACE_CORE___SCENELOADER___H__
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <openspace/scene/scenegraphnode.h>
|
||||
#include <openspace/util/camera.h>
|
||||
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
#include <ghoul/lua/ghoul_lua.h>
|
||||
|
||||
#include <openspace/scene/scenegraphnode.h>
|
||||
#include <openspace/util/camera.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
@@ -40,35 +40,6 @@ class Scene;
|
||||
|
||||
class SceneLoader {
|
||||
public:
|
||||
struct LoadedNode {
|
||||
LoadedNode(
|
||||
const std::string& nodeName,
|
||||
const std::string& parentName,
|
||||
const std::vector<std::string>& deps,
|
||||
std::unique_ptr<SceneGraphNode> n
|
||||
)
|
||||
: name(nodeName)
|
||||
, parent(parentName)
|
||||
, dependencies(deps)
|
||||
, node(std::move(n)) {}
|
||||
|
||||
std::string name;
|
||||
std::string parent;
|
||||
std::vector<std::string> dependencies;
|
||||
std::unique_ptr<SceneGraphNode> node;
|
||||
};
|
||||
|
||||
struct LoadedCamera {
|
||||
LoadedCamera(
|
||||
const std::string& parentName,
|
||||
std::unique_ptr<Camera> c
|
||||
)
|
||||
: parent(parentName)
|
||||
, camera(std::move(c)) {}
|
||||
std::string parent;
|
||||
std::unique_ptr<Camera> camera;
|
||||
};
|
||||
|
||||
SceneLoader() = default;
|
||||
~SceneLoader() = default;
|
||||
|
||||
@@ -88,6 +59,35 @@ public:
|
||||
SceneGraphNode* importNodeDictionary(Scene& scene, const ghoul::Dictionary& dictionary);
|
||||
|
||||
private:
|
||||
struct LoadedNode {
|
||||
LoadedNode(
|
||||
const std::string& nodeName,
|
||||
const std::string& parentName,
|
||||
const std::vector<std::string>& deps,
|
||||
std::unique_ptr<SceneGraphNode> n
|
||||
)
|
||||
: name(nodeName)
|
||||
, parent(parentName)
|
||||
, dependencies(deps)
|
||||
, node(std::move(n)) {}
|
||||
|
||||
std::string name;
|
||||
std::string parent;
|
||||
std::vector<std::string> dependencies;
|
||||
std::unique_ptr<SceneGraphNode> node;
|
||||
};
|
||||
|
||||
struct LoadedCamera {
|
||||
LoadedCamera(
|
||||
const std::string& parentName,
|
||||
std::unique_ptr<Camera> c
|
||||
)
|
||||
: parent(parentName)
|
||||
, camera(std::move(c)) {}
|
||||
std::string parent;
|
||||
std::unique_ptr<Camera> camera;
|
||||
};
|
||||
|
||||
/**
|
||||
* Load a scene graph node from a dictionary
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user