Skip to content

LiteFX::Rendering::IBottomLevelAccelerationStructure::addTriangleMesh

Adds a triangle mesh to the BLAS.

Synopses

Declared in <litefx/rendering_api.hpp>

Adds a triangle mesh to the BLAS.

[[dllimport, dllexport]] virtual void addTriangleMesh(TriangleMesh const& mesh) = 0;

» more...

Adds a triangle mesh to the BLAS.

[[dllimport, dllexport]] void addTriangleMesh(
    SharedPtr<IVertexBuffer const> const& vertexBuffer,
    SharedPtr<IIndexBuffer const> const& indexBuffer = nullptr,
    SharedPtr<IBuffer const> const& transformBuffer = nullptr,
    GeometryFlags flags = GeometryFlags::None);

» more...

Exceptions

NameThrown on
RuntimeExceptionThrown, if the acceleration structure already contains bounding boxes.

Parameters

NameDescription
meshThe triangle mesh to add to the BLAS.
vertexBufferThe vertex buffer that stores the mesh vertices.
indexBufferThe index buffer that stores the mesh indices.
transformBufferA buffer that stores a row-major 3x4 transformation matrix applied to the vertices when building the BLAS.
flagsThe flags that control how the primitives in the geometry behaves during ray-tracing.