11#ifndef FOOLSENGINE_SCENELOADING_H
12#define FOOLSENGINE_SCENELOADING_H
66 std::shared_ptr<IResource>
createResource(
const nlohmann::json& methodParams);
160 SceneFromDescription():
187 std::shared_ptr<SimObject>
loadSceneNodes(
const nlohmann::json& nodeList);
195 void loadConnections(
const nlohmann::json& connectionList, std::shared_ptr<SceneNodeCore> localRoot);
203 void overrideComponents(std::shared_ptr<SimObject> node,
const nlohmann::json& componentList);
211 void overrideAspects(std::shared_ptr<SimObject> node,
const nlohmann::json& aspectList);
219 std::shared_ptr<IResource>
createResource(
const nlohmann::json& methodParams)
override;
231 SceneNodeFromDescription():
235 static std::string getResourceConstructorName() {
return "fromNodeDescription"; }
238 std::shared_ptr<IResource>
createResource(
const nlohmann::json& methodParams)
override;
250 SimObjectFromDescription():
254 static std::string getResourceConstructorName() {
return "fromDescription"; }
256 std::shared_ptr<IResource>
createResource(
const nlohmann::json& methodParameters);
302 class ViewportNodeFromDescription:
public ResourceConstructor<ViewportNode, ViewportNodeFromDescription> {
304 ViewportNodeFromDescription():
308 static std::string getResourceConstructorName() {
return "fromDescription"; }
311 std::shared_ptr<IResource>
createResource(
const nlohmann::json& methodParameters);
ResourceConstructor(int explicitlyInitializeMe)
Definition resource_database.hpp:491
Constructs a scene tree (separate from the scene tree) based on its description in JSON.
Definition scene_loading.hpp:158
static std::string getResourceConstructorName()
Gets this constructor's resource constructor type string.
Definition scene_loading.hpp:169
std::shared_ptr< SimObject > loadSceneNodes(const nlohmann::json &nodeList)
Loads the scene nodes listed in the "nodes" section of the scene description.
Definition scene_loading.cpp:52
void loadResources(const nlohmann::json &resourceList)
Loads the resources listed in the resource section of this scene description.
Definition scene_loading.cpp:35
void overrideAspects(std::shared_ptr< SimObject > node, const nlohmann::json &aspectList)
(When used as a node in another scene) a list of overrides to SimObjectAspects to be applied to the r...
Definition scene_loading.cpp:156
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParams) override
Actually creates a scene tree out of its JSON description.
Definition scene_loading.cpp:26
void loadConnections(const nlohmann::json &connectionList, std::shared_ptr< SceneNodeCore > localRoot)
Loads connections between nodes (functioning as SignalTrackers) within a scene.
Definition scene_loading.cpp:140
void overrideComponents(std::shared_ptr< SimObject > node, const nlohmann::json &componentList)
(When used as a node in another scene) a list of overrides to ECSWorld components to be applied to th...
Definition scene_loading.cpp:151
static std::string getResourceConstructorName()
The resource constructor type string associated with this constructor.
Definition scene_loading.hpp:58
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParams)
Creates a resource from its JSON description stored in a file at the path specified.
Definition scene_loading.cpp:9
Constructs a scene node based on its description in JSON.
Definition scene_loading.hpp:229
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParams) override
Creates a resource object using the parameters specified in methodParameters.
Definition scene_loading.cpp:162
Constructs a SimObject from its description in JSON.
Definition scene_loading.hpp:248
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters)
Creates a resource object using the parameters specified in methodParameters.
Definition scene_loading.cpp:166
Constructs a ViewportNode from its description in JSON.
Definition scene_loading.hpp:302
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters)
Creates a resource object using the parameters specified in methodParameters.
Definition scene_loading.cpp:170
Namespace containing all class definitions and functions related to the ToyMaker engine.
Definition camera_system.hpp:20
Headers relating to resources and their management for a given project.
System classes relating to the SceneSystem, which in some ways lies at the heart of the engine.
Classes and structs relating to the SimSystem, the system responsible for providing some level of gen...