class MAGES::MeshDeformations::TearActionData::CutCompletionTracker¶
Overview¶
Plain, physics-free bookkeeping for “all defined cuts have been made”. Tracks which group indices have fired and invokes a callback exactly once, when every group has fired. More…
class CutCompletionTracker
{
public:
// properties
bool IsComplete;
// methods
CutCompletionTracker(int groupCount, Action onAllFired);
void MarkFired(int groupIndex);
};
Detailed Documentation¶
Plain, physics-free bookkeeping for “all defined cuts have been made”. Tracks which group indices have fired and invokes a callback exactly once, when every group has fired.
Extracted from Factory so the completion logic can be unit-tested without a live PhysicsWorld or detector.
Properties¶
bool IsComplete
Gets a value indicating whether every group has fired and the callback has been invoked.
Methods¶
CutCompletionTracker(int groupCount, Action onAllFired)
Initializes a new instance of the CutCompletionTracker class.
Parameters:
groupCount |
The number of groups that must each fire at least once. |
onAllFired |
Invoked exactly once, the first time every group has fired. |
void MarkFired(int groupIndex)
Records that the group at groupIndex has fired. Invokes the completion callback once, the first time all groups have fired. Subsequent calls are no-ops.
Parameters:
groupIndex |
The index of the group that fired. |