The MeshInstanceManager tracks the mesh/material combinations that can be instanced. More...
#include <MeshInstanceManager.h>
Public Types | |
using | Handle = MeshInstanceGroupList::WeakHandle |
using | InsertResult = MeshInstanceGroupList::InsertResult |
using | ParallelRanges = MeshInstanceGroupList::ParallelRanges |
Public Member Functions | |
InsertResult | AddInstance (MeshInstanceGroupKey meshInstanceGroupData) |
void | RemoveInstance (MeshInstanceGroupKey meshInstanceGroupData) |
void | RemoveInstance (Handle handle) |
uint32_t | GetInstanceGroupCount () const |
Get the total number of instance groups being managed by the MeshInstanceManager. | |
MeshInstanceGroupData & | operator[] (Handle handle) |
Constant O(1) access to a MeshInstanceGroup via its handle. | |
ParallelRanges | GetParallelRanges () |
Get begin and end iterators for each page in the MeshInstanceGroup, which can be processed in parallel. | |
The MeshInstanceManager tracks the mesh/material combinations that can be instanced.
InsertResult AZ::Render::MeshInstanceManager::AddInstance | ( | MeshInstanceGroupKey | meshInstanceGroupData | ) |
Increase the ref-count for an instance group if one already exists for the given key, or add a new instance group if it doesn't exist. Returns an InsertResult with a weak handle to the data and the ref-count for the instance group after adding this instance.
void AZ::Render::MeshInstanceManager::RemoveInstance | ( | Handle | handle | ) |
Decrease the ref-count for an instance group, and remove it if the ref-count drops to 0. The MeshInstanceManager keeps a copy of the MeshInstanceGroupKey alongside the data, so removing by handle is just as performance as removing by key.
void AZ::Render::MeshInstanceManager::RemoveInstance | ( | MeshInstanceGroupKey | meshInstanceGroupData | ) |
Decrease the ref-count for an instance group, and remove it if the ref-count drops to 0. The MeshInstanceManager keeps a copy of the MeshInstanceGroupKey alongside the data, so removing by handle is just as performance as removing by key.