Struct wgpu::BlasTriangleGeometry
source · pub struct BlasTriangleGeometry<'a> {
pub size: &'a BlasTriangleGeometrySizeDescriptor,
pub vertex_buffer: &'a Buffer,
pub first_vertex: u32,
pub vertex_stride: BufferAddress,
pub index_buffer: Option<&'a Buffer>,
pub index_buffer_offset: Option<BufferAddress>,
pub transform_buffer: Option<&'a Buffer>,
pub transform_buffer_offset: Option<BufferAddress>,
}
Expand description
Definition for a triangle geometry for a Bottom Level Acceleration Structure (BLAS).
The size must match the rest of the structures fields, otherwise the build will fail. (e.g. if index count is present in the size, the index buffer must be present as well.)
Fields§
§size: &'a BlasTriangleGeometrySizeDescriptor
Sub descriptor for the size defining attributes of a triangle geometry.
vertex_buffer: &'a Buffer
Vertex buffer.
first_vertex: u32
Offset into the vertex buffer as a factor of the vertex stride.
vertex_stride: BufferAddress
Vertex stride.
index_buffer: Option<&'a Buffer>
Index buffer (optional).
index_buffer_offset: Option<BufferAddress>
Index buffer offset in bytes (optional, required if index buffer is present).
transform_buffer: Option<&'a Buffer>
Transform buffer containing 3x4 (rows x columns, row major) affine transform matrices [f32; 12]
(optional).
transform_buffer_offset: Option<BufferAddress>
Transform buffer offset in bytes (optional, required if transform buffer is present).
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BlasTriangleGeometry<'a>
impl<'a> Send for BlasTriangleGeometry<'a>
impl<'a> Sync for BlasTriangleGeometry<'a>
impl<'a> Unpin for BlasTriangleGeometry<'a>
impl<'a> !UnwindSafe for BlasTriangleGeometry<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more