![]() |
Aether3D Game Engine
|
Contains game objects in a transform hierarchy. More...
#include <Scene.hpp>
Public Types | |
enum | DeserializeResult { Success, ParseError } |
Result of GetSerialized. | |
Public Member Functions | |
void | Add (class GameObject *gameObject) |
Adds a game object into the scene if it does not exist there already. | |
void | Remove (GameObject *gameObject) |
void | Render () |
Renders the scene. | |
void | SetSkybox (class TextureCube *skyTexture) |
std::string | GetSerialized () const |
DeserializeResult | Deserialize (const FileSystem::FileContentsData &serialized, std::vector< GameObject > &outGameObjects, std::map< std::string, class Texture2D * > &outTexture2Ds, std::map< std::string, class Material * > &outMaterials, std::vector< class Mesh * > &outMeshes) const |
Contains game objects in a transform hierarchy.
DeserializeResult ae3d::Scene::Deserialize | ( | const FileSystem::FileContentsData & | serialized, |
std::vector< GameObject > & | outGameObjects, | ||
std::map< std::string, class Texture2D * > & | outTexture2Ds, | ||
std::map< std::string, class Material * > & | outMaterials, | ||
std::vector< class Mesh * > & | outMeshes | ||
) | const |
Deserializes a scene additively from file contents. Must be called after renderer is initialized.
serialized | Serialized scene contents. |
outGameObjects | Returns game objects that were created from serialized scene contents. |
outTexture2Ds | Returns texture 2Ds that were created from serialized scene contents. Caller is responsible for freeing the memory. |
outMaterials | Returns materials that were created. Caller is responsible for freeing the memory. |
outMeshes | Returns meshes that were created. Caller is responsible for freeing the memory. |
std::string ae3d::Scene::GetSerialized | ( | ) | const |
void ae3d::Scene::Remove | ( | GameObject * | gameObject | ) |
gameObject | Game object to remove. Does nothing if it is null or doesn't exist in the scene. |
void ae3d::Scene::SetSkybox | ( | class TextureCube * | skyTexture | ) |
skyTexture | Skybox texture. |