pub struct AccelerationStructureGeometryTrianglesData {
pub flags: GeometryFlags,
pub vertex_format: Format,
pub vertex_data: Option<Subbuffer<[u8]>>,
pub vertex_stride: u32,
pub max_vertex: u32,
pub index_data: Option<IndexBuffer>,
pub transform_data: Option<Subbuffer<TransformMatrix>>,
pub _ne: NonExhaustive,
}
Expand description
A bottom-level geometry consisting of triangles.
Fields§
§flags: GeometryFlags
Specifies how the geometry should be built.
The default value is empty.
vertex_format: Format
The format of each vertex in vertex_data
.
This works in the same way as formats for vertex buffers.
There is no default value.
vertex_data: Option<Subbuffer<[u8]>>
The vertex data itself, consisting of an array of vertex_format
values.
This can be None
when calling Device::acceleration_structure_build_sizes
,
but must be Some
otherwise.
The default value is None
.
vertex_stride: u32
The number of bytes between the start of successive elements in vertex_data
.
This must be a multiple of the smallest component size (in bytes) of vertex_format
.
The default value is 0, which must be overridden.
max_vertex: u32
The highest vertex index that may be read from vertex_data
.
The default value is 0, which must be overridden.
index_data: Option<IndexBuffer>
If indices are to be used, the buffer holding the index data.
The indices will be used to index into the elements of vertex_data
.
The default value is None
.
transform_data: Option<Subbuffer<TransformMatrix>>
Optionally, a 3x4 matrix that will be used to transform the vertices in
vertex_data
to the space in which the acceleration structure is defined.
The first three columns must be a 3x3 invertible matrix.
The default value is None
.
_ne: NonExhaustive
Implementations§
Trait Implementations§
source§impl Clone for AccelerationStructureGeometryTrianglesData
impl Clone for AccelerationStructureGeometryTrianglesData
source§fn clone(&self) -> AccelerationStructureGeometryTrianglesData
fn clone(&self) -> AccelerationStructureGeometryTrianglesData
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more