"An object binding indexed or non-indexed geometry with a material." according to the glTF spec. It's a subset of a mesh and has its own set of vertices/indices as well as its own material. All mesh data is contained in one big buffer, so "First" is used to get the correct offset into the buffer.
More...
#include <foray_mesh.hpp>
"An object binding indexed or non-indexed geometry with a material." according to the glTF spec. It's a subset of a mesh and has its own set of vertices/indices as well as its own material. All mesh data is contained in one big buffer, so "First" is used to get the correct offset into the buffer.
◆ EType
◆ Primitive() [1/2]
foray::scene::Primitive::Primitive |
( |
| ) |
|
|
inline |
◆ Primitive() [2/2]
foray::scene::Primitive::Primitive |
( |
EType |
type, |
|
|
uint32_t |
first, |
|
|
uint32_t |
count, |
|
|
int32_t |
materialIndex, |
|
|
int32_t |
highestRef, |
|
|
std::vector< foray::scene::Vertex > & |
vertices, |
|
|
std::vector< uint32_t > |
indices |
|
) |
| |
|
inline |
◆ CmdDraw()
void foray::scene::Primitive::CmdDraw |
( |
VkCommandBuffer |
commandBuffer | ) |
|
◆ CmdDrawInstanced()
void foray::scene::Primitive::CmdDrawInstanced |
( |
VkCommandBuffer |
commandBuffer, |
|
|
uint32_t |
instanceCount |
|
) |
| |
◆ IsValid()
bool foray::scene::Primitive::IsValid |
( |
| ) |
const |
|
inline |
◆ First
uint32_t foray::scene::Primitive::First = 0 |
Index to the first index/vertex in a buffer.
◆ HighestReferencedIndex
uint32_t foray::scene::Primitive::HighestReferencedIndex = 0 |
The highest index into the vertex buffer referenced by this primitive. Used in Blas creation.
◆ Indices
std::vector<uint32_t> foray::scene::Primitive::Indices |
◆ MaterialIndex
int32_t foray::scene::Primitive::MaterialIndex = 0 |
Index into the material buffer. Negative will cause use of fallback material.
◆ Type
EType foray::scene::Primitive::Type = {} |
◆ VertexOrIndexCount
uint32_t foray::scene::Primitive::VertexOrIndexCount = 0 |
Number of indices/vertices used for this primitive.
◆ Vertices
The documentation for this struct was generated from the following file: