LiteFX::Rendering::IBottomLevelAccelerationStructure::addTriangleMesh¶
Adds a triangle mesh to the BLAS.
Synopsis¶
Declared in <litefx/rendering_api.hpp>
[[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);
Exceptions¶
| Name | Thrown on |
|---|---|
RuntimeException | Thrown, if the acceleration structure already contains bounding boxes. |
Parameters¶
| Name | Description |
|---|---|
| vertexBuffer | The vertex buffer that stores the mesh vertices. |
| indexBuffer | The index buffer that stores the mesh indices. |
| transformBuffer | A buffer that stores a row-major 3x4 transformation matrix applied to the vertices when building the BLAS. |
| flags | The flags that control how the primitives in the geometry behaves during ray-tracing. |