SnapshotItem Struct
Structure for representing a snapshot item of a renderable's object state at a specific point in time. More...
Declaration
Public Constructors Index
| SnapshotItem (const helios::rendering::Renderable *renderable, const helios::math::mat4f &worldMatrix) | |
|
Constructs a new SnapshotItem with the specified renderable and the worldMatrix. More... | |
Public Member Functions Index
| const helios::rendering::Renderable * | renderable () const noexcept |
|
Returns a raw pointer to the Renderable of this SnapshotItem. More... | |
| const helios::math::mat4f & | worldMatrix () const noexcept |
|
Returns a const ref to the worldMatrix of this SnapshotItem. The world transformation matrix is a copy from the world transformation matrix created with this SnapshotItem. More... | |
Private Member Attributes Index
| const helios::rendering::Renderable * | renderable_ |
|
A non-owning raw pointer to the Renderable object. More... | |
| const helios::math::mat4f | worldMatrix_ |
|
A copy of the world transformation matrix for the Renderable. More... | |
Description
Structure for representing a snapshot item of a renderable's object state at a specific point in time.
The structure bundles a non-owning raw pointer to a Renderable and a pre-calculated worldMatrix, serving as a lightweight DTO to be used with a `Snapshot`.
A SnapshotItem captures the essential information to render an item without the need to traverse the entire Scene Graph during the rendering phase. The worldMatrix is a copy of the SceneNode's worldMatrix at the time of this creation, ensuring that its value remains constant, even if the transformation of the SceneNode should change during rendering.
The caller must ensure that the Renderable remains valid for the lifetime of this SnapshotItem (typically within a single frame).
While internal properties of the Renderable might change while this SnapshotItem is processed, the worldMatrix is immutable and reflects the transformation state at the moment the Snapshot was taken.
Definition at line 38 of file SnapshotItem.ixx.
Public Constructors
SnapshotItem()
| inline |
Constructs a new SnapshotItem with the specified renderable and the worldMatrix.
- Parameters
-
renderable A raw pointer to the Renderable (must remain valid for the lifetime of this item).
worldMatrix A const ref to the world transformation matrix, which gets copied.
Definition at line 62 of file SnapshotItem.ixx.
References renderable and worldMatrix.
Public Member Functions
renderable()
| inline nodiscard noexcept |
Returns a raw pointer to the Renderable of this SnapshotItem.
- Returns
A raw pointer to the Renderable of this SnapshotItem.
Definition at line 76 of file SnapshotItem.ixx.
Referenced by SnapshotItem.
worldMatrix()
| inline nodiscard noexcept |
Returns a const ref to the worldMatrix of this SnapshotItem. The world transformation matrix is a copy from the world transformation matrix created with this SnapshotItem.
- Returns
The const ref to the world matrix of this SnapshotItem.
Definition at line 87 of file SnapshotItem.ixx.
Referenced by SnapshotItem.
Private Member Attributes
renderable_
|
A non-owning raw pointer to the Renderable object.
The Renderable must remain valid for the lifetime of this SnapshotItem.
Definition at line 45 of file SnapshotItem.ixx.
worldMatrix_
|
A copy of the world transformation matrix for the Renderable.
Definition at line 50 of file SnapshotItem.ixx.
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.