Ocular Engine
|
#include <Buildable.hpp>
Public Member Functions | |
virtual void | onLoad (BuilderNode const *node) |
virtual void | onSave (BuilderNode *node) const |
When inheriting from Buildable, a class is allowing for itself to be loaded from, and saved to, various file formats. All loading/saving is done via a generic node chain system implemented through the BuilderNode class.
Buildables, and their node chains, are typically used when loading/saving:
- Scene files (.oscene) - SceneObject files (.opref) - Material files (.omat)
A class that inherits from Buildable may also see special automatic behaviour when also inheriting from the Exposable class. This typically includes automatic building from, and saving to, BuilderNode chains.
|
virtual |
Alternate creation method (opposed to the constructor) in which one is provided with a BuilderNode chain. This chain may be explored to retrieve any relevant variables, and their values, that may have been stored in it.
This method will typically mirror the onSave, in which relevant values are stored within the chain.
[in] | node | Node to extract variable information from |
Reimplemented in Ocular::Core::SceneObject, Ocular::Math::Transform, Ocular::Core::MeshRenderable, Ocular::Graphics::Material, Ocular::Graphics::MaterialEmpty, Ocular::Graphics::MaterialMissing, Ocular::Core::LightSource, and Ocular::Core::ObjectIO.
|
virtual |
Method used to add an object's data to an existing node chain in preparation for being save to a file.
[in] | node | Node to place variable information in |
Reimplemented in Ocular::Core::SceneObject, Ocular::Core::MeshRenderable, Ocular::Graphics::Material, Ocular::Graphics::MaterialEmpty, Ocular::Graphics::MaterialMissing, and Ocular::Core::ObjectIO.