VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
visutwin::canvas::BatchGroup Struct Reference

#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

Detailed Description

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.

Constructor & Destructor Documentation

◆ BatchGroup() [1/2]

visutwin::canvas::BatchGroup::BatchGroup ( )
default

◆ BatchGroup() [2/2]

visutwin::canvas::BatchGroup::BatchGroup ( int id,
const std::string & name,
bool dynamic = false,
float maxAabbSize = 0.0f,
const std::vector< int > & layers = {} )
inline

Definition at line 43 of file batchGroup.h.

References dynamic, layers, maxAabbSize, and name.

Member Data Documentation

◆ dynamic

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().

◆ id

int visutwin::canvas::BatchGroup::id = NOID

Definition at line 28 of file batchGroup.h.

Referenced by visutwin::canvas::BatchManager::addGroup().

◆ layers

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().

◆ maxAabbSize

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().

◆ name

std::string visutwin::canvas::BatchGroup::name

Definition at line 29 of file batchGroup.h.

Referenced by BatchGroup().

◆ NOID

int visutwin::canvas::BatchGroup::NOID = -1
staticconstexpr

Sentinel value: mesh instance does not belong to any batch group.

Definition at line 26 of file batchGroup.h.


The documentation for this struct was generated from the following file: