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§

source§

impl AccelerationStructureGeometryTrianglesData

source

pub fn new(vertex_format: Format) -> Self

Returns a AccelerationStructureGeometryTrianglesData with the specified vertex_format.

Trait Implementations§

source§

impl Clone for AccelerationStructureGeometryTrianglesData

source§

fn clone(&self) -> AccelerationStructureGeometryTrianglesData

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccelerationStructureGeometryTrianglesData

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.