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<[[f32; 4]; 3]>>,
pub _ne: NonExhaustive,
}Expand description
A bottom-level geometry consisting of triangles.
Fields§
§flags: GeometryFlagsSpecifies how the geometry should be built.
The default value is empty.
vertex_format: FormatThe 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: u32The 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: u32The 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<[[f32; 4]; 3]>>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: NonExhaustiveImplementations§
Source§impl AccelerationStructureGeometryTrianglesData
impl AccelerationStructureGeometryTrianglesData
Sourcepub fn new(vertex_format: Format) -> AccelerationStructureGeometryTrianglesData
pub fn new(vertex_format: Format) -> AccelerationStructureGeometryTrianglesData
Returns a AccelerationStructureGeometryTrianglesData with the specified
vertex_format.
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