Data for merge or split actions created in an implementation of an agxSDK::MergeSplitAlgorithm.
More...
#include <MergeSplitAction.h>
Data for merge or split actions created in an implementation of an agxSDK::MergeSplitAlgorithm.
Instances of this class is generated by using the API of agxSDK::MergeSplitActionContainer.
Definition at line 27 of file MergeSplitAction.h.
◆ MergeSplitAction()
Construct given merged state, type of action and (optional) an edge to add or remove.
- Parameters
-
mergedState | - current merged state |
actionType | - type of action |
edge | - edge to add, or optionally, edge to remove (if split state) |
◆ empty()
◆ getEdge()
- Returns
- edge to add or remove (depending on action type)
Definition at line 220 of file MergeSplitAction.h.
◆ getMergedState()
const MergedState & agxSDK::MergeSplitAction::getMergedState |
( |
| ) |
const |
◆ getType()
◆ isValid()
agx::Bool agxSDK::MergeSplitAction::isValid |
( |
| ) |
const |
- Returns
- true if this is a valid action
◆ merge() [1/2]
Creates a merge action given an edge and the merge split handler.
An empty action is created if the bodies in the edge interaction aren't allowed to merge.
◆ merge() [2/2]
Creates a merge action given a merged state and an edge.
An empty action is created if the bodies in the edge interaction aren't allowed to merge.
◆ split() [1/3]
Creates a split action given an edge and the merge split handler (to fetch allowed actions, i.e., 'may we split this edge').
An empty action is created if the edge isn't allowed to be splitted.
◆ split() [2/3]
Creates a split action given a rigid body and the merge split handler.
An empty action is created if the body isn't allowed to be splitted.
◆ split() [3/3]
Creates a split action given a merged state and action.
An empty action is created if the allowed actions doesn't match the action
.
- Parameters
-
mergedState | - the merged state |
action | - split action (split first or split second or split both) |
edge | - optional edge to split (i.e., will not split all edges) |
◆ sync()
Synchronizes data to current state, e.g., bodies that has been merged or splitted after this action was create.
- Returns
- this, synchronized
The documentation for this class was generated from the following file: