Helios++
Helios software for LiDAR simulations
|
Wrapper for scenes which assists read and write serialization operations depending on the type of scene (Scene, StaticScene, DynScene) More...
#include <SerialSceneWrapper.h>
Public Types | |
enum | SceneType { SCENE , STATIC_SCENE , DYNAMIC_SCENE } |
Types of scene that can be handled by the SerialSceneWrapper. | |
Public Member Functions | |
SerialSceneWrapper () | |
Default constructor for serial scene wrapper. | |
SerialSceneWrapper (SceneType sceneType, Scene *scene) | |
void | writeScene (std::string const &path) |
Serialize the scene writing it to given output file. More... | |
SceneType | getSceneType () const |
Obtain the type of scene being wrapped. More... | |
void | setSceneType (SceneType const &sceneType) |
Set the type of scene being wrapped. More... | |
Scene * | getScene () const |
Obtain the scene being wrapped. More... | |
void | setScene (Scene *scene) |
Set the scene being wrapped. More... | |
StaticScene * | getStaticScene () const |
Obtain the scene being wrapped as a StaticScene. More... | |
DynScene * | getDynScene () const |
Obtain the scene being wrapped as a DynScene. More... | |
![]() | |
std::string | getLocationString () |
Obtain asset location string. More... | |
virtual bool | isEgg () const |
Check whether the asset is an EggAsset or not. More... | |
Static Public Member Functions | |
static SerialSceneWrapper * | readScene (std::string const &path) |
Read serialized scene from given file, automatically handling the scene type to be read. | |
Protected Attributes | |
SceneType | sceneType |
Type of the scene being wrapped. | |
Scene * | scene |
Pointer to the scene being wrapped. | |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Serialize a SerialSceneWrapper to a stream of bytes. More... | |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
![]() | |
std::string | id = "" |
Asset identifier. | |
std::string | name = "Unnamed Asset" |
Asset name. | |
std::string | sourceFilePath = "" |
Path to asset file. | |
Wrapper for scenes which assists read and write serialization operations depending on the type of scene (Scene, StaticScene, DynScene)
|
inline |
Obtain the scene being wrapped as a DynScene.
|
inline |
Obtain the scene being wrapped.
|
inline |
Obtain the type of scene being wrapped.
|
inline |
Obtain the scene being wrapped as a StaticScene.
|
inlineprivate |
Serialize a SerialSceneWrapper to a stream of bytes.
Archive | Type of rendering |
ar | Specific rendering for the stream of bytes |
version | Version number for the SerialSceneWrapper |
|
inline |
Set the scene being wrapped.
scene | New scene to be wrapped |
|
inline |
Set the type of scene being wrapped.
sceneType | Type of scene to be wrapped |
void SerialSceneWrapper::writeScene | ( | std::string const & | path | ) |
Serialize the scene writing it to given output file.
path | Path to output file where serialized scene shall be stored. |