|
AGXDynamics
2.31.1.0
|
Data for merge or split actions created in an implementation of an agxSDK::MergeSplitAlgorithm. More...
#include <MergeSplitAction.h>
Public Member Functions | |
| MergeSplitAction (const agxSDK::MergedState &mergedState, agxSDK::MergedState::Actions actionType, agx::MergedBody::EdgeInteraction *edge=nullptr) | |
| Construct given merged state, type of action and (optional) an edge to add or remove. More... | |
| agx::MergedBody::EdgeInteraction * | getEdge () const |
| const agxSDK::MergedState & | getMergedState () const |
| agxSDK::MergedState::Actions | getType () const |
| agx::Bool | isValid () const |
| MergeSplitAction & | sync () |
| Synchronizes data to current state, e.g., bodies that has been merged or splitted after this action was create. More... | |
Static Public Member Functions | |
| static MergeSplitAction | empty () |
| Creates an empty action. More... | |
| static MergeSplitAction | merge (agx::MergedBody::EdgeInteraction *edge, const agxSDK::MergeSplitHandler *handler) |
| Creates a merge action given an edge and the merge split handler. More... | |
| static MergeSplitAction | merge (const agxSDK::MergedState &mergedState, agx::MergedBody::EdgeInteraction *edge) |
| Creates a merge action given a merged state and an edge. More... | |
| static MergeSplitAction | split (agx::RigidBody *rb, const agxSDK::MergeSplitHandler *handler) |
| Creates a split action given a rigid body and the merge split handler. More... | |
| static MergeSplitAction | split (agx::MergedBody::EdgeInteraction *edge, const agxSDK::MergeSplitHandler *handler) |
| Creates a split action given an edge and the merge split handler (to fetch allowed actions, i.e., 'may we split this edge'). More... | |
| static MergeSplitAction | split (const agxSDK::MergedState &mergedState, agxSDK::MergedState::Actions action, agx::MergedBody::EdgeInteraction *edge=nullptr) |
| Creates a split action given a merged state and action. More... | |
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.
| agxSDK::MergeSplitAction::MergeSplitAction | ( | const agxSDK::MergedState & | mergedState, |
| agxSDK::MergedState::Actions | actionType, | ||
| agx::MergedBody::EdgeInteraction * | edge = nullptr |
||
| ) |
Construct given merged state, type of action and (optional) an edge to add or remove.
| mergedState | - current merged state |
| actionType | - type of action |
| edge | - edge to add, or optionally, edge to remove (if split state) |
|
static |
Creates an empty action.
| agx::MergedBody::EdgeInteraction * agxSDK::MergeSplitAction::getEdge | ( | ) | const |
Definition at line 220 of file MergeSplitAction.h.
| const MergedState & agxSDK::MergeSplitAction::getMergedState | ( | ) | const |
Definition at line 210 of file MergeSplitAction.h.
| MergedState::Actions agxSDK::MergeSplitAction::getType | ( | ) | const |
Definition at line 215 of file MergeSplitAction.h.
| agx::Bool agxSDK::MergeSplitAction::isValid | ( | ) | const |
|
static |
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.
|
static |
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.
|
static |
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.
|
static |
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.
|
static |
Creates a split action given a merged state and action.
An empty action is created if the allowed actions doesn't match the action.
| 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) |
| MergeSplitAction& agxSDK::MergeSplitAction::sync | ( | ) |
Synchronizes data to current state, e.g., bodies that has been merged or splitted after this action was create.