pub enum AccelerationStructureGeometryData {
    AABBs {
        stride: DeviceSize,
    },
    Instances {
        array_of_pointers: bool,
        data: DeviceOrHostAddress,
    },
    Triangles {
        index_data: DeviceOrHostAddress,
        index_type: IndexType,
        max_vertex: u32,
        transform_data: Option<DeviceOrHostAddress>,
        vertex_data: DeviceOrHostAddress,
        vertex_format: Format,
        vertex_stride: DeviceSize,
    },
}
Expand description

Specifies acceleration structure geometry data.

See VkAccelerationStructureGeometryDataKHR for more information.

Variants

AABBs

Fields

stride: DeviceSize

Stride in bytes between each entry in data.

The stride must be a multiple of 8.

Axis-aligned bounding box geometry in a bottom-level acceleration structure.

See VkAccelerationStructureGeometryAabbsDataKHR for more information.

Instances

Fields

array_of_pointers: bool

Specifies whether data is used as an array of addresses or just an array.

data: DeviceOrHostAddress

Either the address of an array of device referencing individual VkAccelerationStructureInstanceKHR structures or packed motion instance information as described in motion instances if array_of_pointers is true, or the address of an array of VkAccelerationStructureInstanceKHR structures.

Addresses and VkAccelerationStructureInstanceKHR structures are tightly packed.

Geometry consisting of instances of other acceleration structures.

See VkAccelerationStructureGeometryInstancesDataKHR for more information.

Triangles

Fields

index_data: DeviceOrHostAddress

A device or host address to memory containing index data for this geometry.

index_type: IndexType

The VkIndexType of each index element.

max_vertex: u32

The highest index of a vertex that will be addressed by a build command using this structure.

transform_data: Option<DeviceOrHostAddress>

A device or host address to memory containing an optional reference to a VkTransformMatrixKHR structure describing a transformation from the space in which the vertices in this geometry are described to the space in which the acceleration structure is defined.

vertex_data: DeviceOrHostAddress

A device or host address to memory containing vertex data for this geometry.

vertex_format: Format

The VkFormat of each vertex element.

vertex_stride: DeviceSize

The stride in bytes between each vertex.

A triangle geometry in a bottom-level acceleration structure.

See VkAccelerationStructureGeometryTrianglesDataKHR for more information.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.