|
VisuTwin Canvas
C++ 3D Engine — Metal Backend
|
#include <framework/batching/batchGroup.h>
Public Member Functions | |
| BatchGroup ()=default | |
| BatchGroup (int id, const std::string &name, bool dynamic=false, float maxAabbSize=0.0f, const std::vector< int > &layers={}) | |
Public Attributes | |
| bool | dynamic = false |
| int | id = NOID |
| std::vector< int > | layers |
| float | maxAabbSize = 0.0f |
| std::string | name |
Static Public Attributes | |
| static constexpr int | NOID = -1 |
Holds batch group settings: which mesh instances belong together, layer assignments, dynamic flag, and maximum AABB size for spatial splitting.
A batch group acts as a recipe — at prepare() time, BatchManager collects all MeshInstances tagged with a group's id, groups them by material, and merges each sub-group into a single draw call.
Definition at line 23 of file batchGroup.h.
|
default |
|
inline |
Definition at line 43 of file batchGroup.h.
References dynamic, layers, maxAabbSize, and name.
| bool visutwin::canvas::BatchGroup::dynamic = false |
When true, transforms may change per frame (uses SkinBatchInstance trick). Phase 1: always false — only static batching is supported.
Definition at line 33 of file batchGroup.h.
Referenced by BatchGroup().
| int visutwin::canvas::BatchGroup::id = NOID |
Definition at line 28 of file batchGroup.h.
Referenced by visutwin::canvas::BatchManager::addGroup().
| std::vector<int> visutwin::canvas::BatchGroup::layers |
Layer IDs this batch group applies to.
Definition at line 39 of file batchGroup.h.
Referenced by BatchGroup().
| float visutwin::canvas::BatchGroup::maxAabbSize = 0.0f |
Maximum AABB dimension for spatial splitting. 0 = no limit.
Definition at line 36 of file batchGroup.h.
Referenced by BatchGroup().
| std::string visutwin::canvas::BatchGroup::name |
Definition at line 29 of file batchGroup.h.
Referenced by BatchGroup().
|
staticconstexpr |
Sentinel value: mesh instance does not belong to any batch group.
Definition at line 26 of file batchGroup.h.