The core processing function that must be implemented by derived classes.
- Parameters
-
This method is where the actual transformation logic is implemented. It should contain the algorithmic details of how the buffer's data is transformed, analyzed, or processed. The implementation can utilize any backend capabilities available to the processor, including:
- Parallel Processing: Using multi-threading or GPU compute for large datasets
- Data Transformations: Applying mathematical operations, filters, or effects
- Feature Extraction: Analyzing data characteristics for further processing
Derived classes must override this method to provide specific processing behavior.
Implements MayaFlux::Buffers::BufferProcessor.
Definition at line 85 of file MeshProcessor.cpp.
86{
88 return;
89 }
90
92 if (!node->get_mesh_vertices().empty()) {
93 const auto& verts = node->get_mesh_vertices();
94 const auto& indices = node->get_mesh_indices();
95 m_mesh_buffer->m_mesh_data.vertex_variant = std::vector<uint8_t>(
96 reinterpret_cast<const uint8_t*>(verts.data()),
97 reinterpret_cast<const uint8_t*>(verts.data() + verts.size()));
99 m_mesh_buffer->m_mesh_data.layout.vertex_count =
static_cast<uint32_t
>(verts.size());
100 m_mesh_buffer->m_vertices_dirty.store(
true, std::memory_order_release);
101 m_mesh_buffer->m_indices_dirty.store(
true, std::memory_order_release);
102 }
103 }
104
108
110 "MeshProcessor: re-uploaded vertex data ({} bytes)",
112 }
113
118
120 "MeshProcessor: re-uploaded index data ({} indices)",
122 }
123}
#define MF_DEBUG(comp, ctx,...)
void link_index_resources()
void upload_vertices(const std::shared_ptr< MeshBuffer > &buf)
std::shared_ptr< MeshBuffer > m_mesh_buffer
void upload_indices(const std::shared_ptr< MeshBuffer > &buf)
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, link_index_resources(), m_mesh_buffer, MF_DEBUG, upload_indices(), and upload_vertices().