MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ build()

std::optional< MeshAccess > MayaFlux::Kakshya::MeshInsertion::build ( ) const

Produce a MeshAccess over the current variant contents.

Returns std::nullopt if no data has been inserted or if either variant holds the wrong type (indicates a programming error, logged as error). The returned MeshAccess borrows from the two DataVariant references held by this object; both must remain alive while the MeshAccess is in use.

Definition at line 192 of file MeshInsertion.cpp.

193{
194 if (!m_layout_set || m_vertex_count == 0 || m_index_count == 0) {
196 "MeshInsertion::build: no data inserted");
197 return std::nullopt;
198 }
199
200 return as_mesh_access(
203 m_layout,
205}
#define MF_WARN(comp, ctx,...)
std::optional< RegionGroup > m_submeshes
uint32_t m_vertex_count
Running total across all submitted batches.
@ Runtime
General runtime operations (default fallback)
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.
std::optional< MeshAccess > as_mesh_access(const DataVariant &vertex_variant, const DataVariant &index_variant, const VertexLayout &layout, std::optional< RegionGroup > submeshes)
Construct a MeshAccess from two DataVariant instances.

References MayaFlux::Kakshya::as_mesh_access(), MayaFlux::Journal::Kakshya, m_index_count, m_index_variant, m_layout, m_layout_set, m_submeshes, m_vertex_count, m_vertex_variant, MF_WARN, and MayaFlux::Journal::Runtime.

Referenced by MayaFlux::IO::ModelReader::extract_single_mesh().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: