Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/InstancedStaticMesh
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/InstancedStaticMesh/InstanceAttributeTracker.h |
| Include | #include "InstancedStaticMesh/InstanceAttributeTracker.h" |
Syntax
class FInstanceAttributeTracker
Remarks
Tracks changes for instances, but that assumes storing stuff per index except the removed status which must be kept ID-based Removed items are tracked by ID and kept separate as we need to remember if an item was ever removed in order to handle these correctly. Designed to use move semantics to clear the state and transfer to the updating worker task.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FInstanceAttributeTracker
(
FInstanceAttributeTracker&& Other |
Functions
| Type | Name | Description | |
|---|---|---|---|
| SIZE_T | |||
| FAnyValidIterator< Mask > | |||
| FDeltaRange< Flag > | GetDeltaRange
(
bool bForceFullUpdate, |
||
| ElementType | Get the masked flags for a given index. | ||
| TConstSetBitIterator | Get an iterator that iterates over the IDs (note, not index as they don't exist any more) of removed instances. | ||
| bool | |||
| void | |||
| void | MarkRemoved
(
FPrimitiveInstanceId Id |
Lazy allocate bits in the bit vector tracking removed instances and set the flag for the instance ID. | |
| void | Move
(
FInstanceAttributeTracker& Dest, |
||
| void | RemoveAt
(
FPrimitiveInstanceId Id, |
Mark removed & update the tracked bits (remove & move operation) Note: this is not something that should be used really as it forces the tracker to touch all the masks after the removed item... | |
| void | RemoveAtSwap
(
FPrimitiveInstanceId Id, |
Mark removed & update the tracked bits (remove & swap operation) | |
| void | Reset () |
||
| void | |||
| bool | Test a specific flag at a given index. | ||
| void | Validate () |
Operators
| Type | Name | Description | |
|---|---|---|---|
| void | operator=
(
FInstanceAttributeTracker&& Other |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FAnyValidIterator | Iterator for iterating tracked state with the given flags. | ||
| FDeltaRange | Represents the delta range for a given attribute, can either refer to the tracked data or just a span, or be empty. | ||
| FToBit | Helper struct to convert the flag to its bitmask at comile time. |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EFlag | Flag describing the changed attribute. Note that not all are created equal, see comments. |
Typedefs
| Name | Description |
|---|---|
| ElementType | Underlying type to store per-instance masks packed in. For example, with EFlag::Num == 4, and uint32 we can store 8 masks in each element. |
| FBitManip |
Constants
| Name | Description |
|---|---|
| AddedElementMask | |
| AnyFlagMask | |
| BitsPerElement | |
| IndexChangedElementMask | Masks replicated to all masks that fit inside ElementType |
| MasksPerElement |