![]() |
Lysa
0.0
Lysa 3D Engine
|
Represents a 3D scene containing lights and mesh instances.
The Scene class manages the high-level representation of a scene, including its environment, lights, and mesh instances. It handles deferred operations for adding/removing instances across multiple frames.
Inheritance diagram for Scene:Public Member Functions | |
| Scene (const SceneConfiguration &config={}) | |
| ~Scene () override | |
| void | setEnvironment (const Environment &environment) |
| bool | haveInstance (const MeshInstance &meshInstance) const |
| void | addInstance (const MeshInstance &meshInstance, bool async=false) |
| void | updateInstance (const MeshInstance &meshInstance) |
| void | removeInstance (const MeshInstance &meshInstance, bool async=false) |
| void | addLight (const Light &light) |
| void | removeLight (const Light &light) |
| void | processDeferredOperations (uint32 frameIndex) |
| SceneFrameData & | get (const uint32 frameIndex) const |
Public Member Functions inherited from UniqueResource | |
| UniqueResource () = default | |
| UniqueResource (UniqueResource &) = delete | |
| UniqueResource & | operator= (UniqueResource &) = delete |
Public Member Functions inherited from UnmanagedResource | |
| UnmanagedResource () | |
| UnmanagedResource (const Resource &other) | |
Public Member Functions inherited from Resource | |
| bool | operator== (const Resource &other) const |
| Resource () = default | |
| Resource (const unique_id id) | |
| virtual | ~Resource () = default |
Protected Attributes | |
| ImageManager & | imageManager |
| MaterialManager & | materialManager |
| MeshManager & | meshManager |
Additional Inherited Members | |
Public Attributes inherited from Resource | |
| unique_id | id {INVALID_ID} |
| Scene | ( | const SceneConfiguration & | config = {} | ) |
|
override |
Virtual destructor for Scene.
| void addInstance | ( | const MeshInstance & | meshInstance, |
| bool | async = false |
||
| ) |
Adds a mesh instance to the scene.
| meshInstance | The mesh instance to add. |
| async | Whether to add the instance asynchronously. |
| void addLight | ( | const Light & | light | ) |
Adds a light to the scene.
| light | The light to add. |
|
inline |
Gets the frame-specific data for a given frame index.
| frameIndex | The index of the frame. |
| bool haveInstance | ( | const MeshInstance & | meshInstance | ) | const |
Checks if a mesh instance is present in the scene.
| meshInstance | The mesh instance to check. |
| void processDeferredOperations | ( | uint32 | frameIndex | ) |
Processes deferred scene operations for a specific frame.
| frameIndex | The index of the frame to process. |
| void removeInstance | ( | const MeshInstance & | meshInstance, |
| bool | async = false |
||
| ) |
Removes a mesh instance from the scene.
| meshInstance | The mesh instance to remove. |
| async | Whether to remove the instance asynchronously. |
| void removeLight | ( | const Light & | light | ) |
Removes a light from the scene.
| light | The light to remove. |
| void setEnvironment | ( | const Environment & | environment | ) |
Sets the environment for the scene.
| environment | The environment settings to apply. |
| void updateInstance | ( | const MeshInstance & | meshInstance | ) |
Updates an existing mesh instance.
| meshInstance | The mesh instance to update. |
|
protected |
Reference to the image manager.
|
protected |
Reference to the material manager.
|
protected |
Reference to the mesh manager.