|
VisuTwin Canvas
C++ 3D Engine — Metal Backend
|
#include <framework/batching/batch.h>
Public Member Functions | |
| void | updateBoundingBox () |
Public Attributes | |
| int | batchGroupId = BatchGroup::NOID |
| bool | dynamic = false |
| std::shared_ptr< IndexBuffer > | indexBuffer |
| std::shared_ptr< Mesh > | mesh |
| std::unique_ptr< MeshInstance > | meshInstance |
| GraphNode | node |
| std::vector< MeshInstance * > | origMeshInstances |
| std::unique_ptr< SkinBatchInstance > | skinBatchInstance |
| std::shared_ptr< VertexBuffer > | vertexBuffer |
A Batch is the output of BatchManager::createBatch(). It holds the combined mesh that replaces multiple original MeshInstances sharing the same material.
The originals are hidden (visible=false) while the batch is alive; calling BatchManager::destroy() restores them.
For dynamic batches, the SkinBatchInstance provides a per-frame matrix palette and updateBoundingBox() refreshes the AABB from the originals.
|
inline |
Update AABB from all original mesh instances (dynamic batches only).
Definition at line 64 of file batch.h.
References visutwin::canvas::BoundingBox::add(), meshInstance, and origMeshInstances.
| int visutwin::canvas::Batch::batchGroupId = BatchGroup::NOID |
| bool visutwin::canvas::Batch::dynamic = false |
| std::shared_ptr<IndexBuffer> visutwin::canvas::Batch::indexBuffer |
| std::shared_ptr<Mesh> visutwin::canvas::Batch::mesh |
| std::unique_ptr<MeshInstance> visutwin::canvas::Batch::meshInstance |
The combined mesh instance that replaces the originals.
Definition at line 47 of file batch.h.
Referenced by updateBoundingBox().
| GraphNode visutwin::canvas::Batch::node |
| std::vector<MeshInstance*> visutwin::canvas::Batch::origMeshInstances |
The original mesh instances that were merged into this batch.
Definition at line 44 of file batch.h.
Referenced by updateBoundingBox().
| std::unique_ptr<SkinBatchInstance> visutwin::canvas::Batch::skinBatchInstance |
SkinBatchInstance for dynamic batches (owns the matrix palette). nullptr for static batches.
| std::shared_ptr<VertexBuffer> visutwin::canvas::Batch::vertexBuffer |