Immutable geometry snapshot submitted to a RenderDevice.
More...
#include <render_device.h>
Immutable geometry snapshot submitted to a RenderDevice.
Constructor inputs are copied, so temporaries and subsequent model edits are safe. Updating geometry creates a new snapshot.
◆ Geometry()
| Geometry |
( |
std::vector< Vertex > |
vertices, |
|
|
std::vector< std::uint32_t > |
indices = {}, |
|
|
Topology |
topology = Topology::triangles, |
|
|
std::vector< std::uint32_t > |
primitive_ids = {}, |
|
|
std::shared_ptr< const PointData > |
point_data = {} |
|
) |
| |
Create a geometry snapshot.
- Parameters
-
| vertices | Per-vertex positions and attributes. |
| indices | Optional indices into vertices. |
| topology | Primitive topology. |
| primitive_ids | Optional per-primitive picking IDs. |
| point_data | Optional point positions and source-slot mapping. |
◆ indices()
| const std::vector< std::uint32_t > & indices |
( |
| ) |
const |
|
inline |
Return indices, or an empty vector for non-indexed geometry.
- Returns
- Indices, or an empty vector for non-indexed geometry.
◆ point_data()
| const std::shared_ptr< const PointData > & point_data |
( |
| ) |
const |
|
inline |
Return associated point data, if present.
- Returns
- Associated point snapshot, or an empty pointer.
◆ primitive_ids()
| const std::vector< std::uint32_t > & primitive_ids |
( |
| ) |
const |
|
inline |
Return per-primitive IDs, if supplied.
- Returns
- Per-primitive picking IDs, if supplied.
◆ topology()
| Topology topology |
( |
| ) |
const |
|
inline |
Return the geometry topology.
- Returns
- Primitive topology.
◆ vertices()
| const std::vector< Vertex > & vertices |
( |
| ) |
const |
|
inline |
Return the vertex data.
- Returns
- Vertex positions and attributes.
The documentation for this class was generated from the following files: