|
AGX Dynamics 2.42.3.1
|
Object containing merge-split actions to be processed by the agxSDK::MergeSplitHandler. More...
#include <MergeSplitAction.h>
Public Types | |
| typedef agx::Vector< MergeSplitAction > | Actions |
| typedef Actions::const_iterator | ActionsConstIterator |
| typedef Actions::iterator | ActionsIterator |
Public Member Functions | |
| MergeSplitActionContainer (agx::UInt capacity=agx::UInt(256)) | |
| Default constructor. | |
| agx::Bool | add (const MergeSplitAction &action) |
| Adds the action to the container. | |
| void | append (const MergeSplitActionContainer &other) |
| Append actions to this container. | |
| ActionsIterator | begin () |
| ActionsConstIterator | begin () const |
| void | clear () |
| Clears data. | |
| agx::Bool | empty () const |
| ActionsIterator | end () |
| ActionsConstIterator | end () const |
| agx::Bool | merge (const agxSDK::MergedState &mergedState, agx::MergedBody::EdgeInteraction *edge) |
| Merge given merged state and an edge. | |
| agx::Bool | split (const agxSDK::MergedState &mergedState) |
| Split given allowed actions in the merged state. | |
| agx::Bool | split (const agxSDK::MergedState &mergedState, agxSDK::MergedState::Actions action) |
| Split given action mask. | |
| agx::Bool | split (const MergedState &mergedState, agx::MergedBody::EdgeInteraction *edge) |
| Split a single edge. | |
Object containing merge-split actions to be processed by the agxSDK::MergeSplitHandler.
Definition at line 115 of file MergeSplitAction.h.
Definition at line 118 of file MergeSplitAction.h.
Definition at line 120 of file MergeSplitAction.h.
Definition at line 119 of file MergeSplitAction.h.
Default constructor.
| agx::Bool agxSDK::MergeSplitActionContainer::add | ( | const MergeSplitAction & | action | ) |
Adds the action to the container.
Consider using merge and split methods instead. Example usage: actions.add( MergeSplitAction::merge( edge, handler ) ), when you're splitting or merging without a given mergedState.
| action | - action to add |
| void agxSDK::MergeSplitActionContainer::append | ( | const MergeSplitActionContainer & | other | ) |
Append actions to this container.
| other | - other container |
| MergeSplitActionContainer::ActionsIterator agxSDK::MergeSplitActionContainer::begin | ( | ) |
Definition at line 225 of file MergeSplitAction.h.
References agx::Vector< T, Allocator >::begin().
| MergeSplitActionContainer::ActionsConstIterator agxSDK::MergeSplitActionContainer::begin | ( | ) | const |
Definition at line 230 of file MergeSplitAction.h.
References agx::Vector< T, Allocator >::begin().
| void agxSDK::MergeSplitActionContainer::clear | ( | ) |
Clears data.
| agx::Bool agxSDK::MergeSplitActionContainer::empty | ( | ) | const |
| MergeSplitActionContainer::ActionsIterator agxSDK::MergeSplitActionContainer::end | ( | ) |
Definition at line 235 of file MergeSplitAction.h.
References agx::Vector< T, Allocator >::end().
| MergeSplitActionContainer::ActionsConstIterator agxSDK::MergeSplitActionContainer::end | ( | ) | const |
Definition at line 240 of file MergeSplitAction.h.
References agx::Vector< T, Allocator >::end().
| agx::Bool agxSDK::MergeSplitActionContainer::merge | ( | const agxSDK::MergedState & | mergedState, |
| agx::MergedBody::EdgeInteraction * | edge | ||
| ) |
Merge given merged state and an edge.
The action wont be added if it violates the allowed actions in the merged state.
| mergedState | - merged state of the interaction |
| edge | - edge that merged the objects |
| agx::Bool agxSDK::MergeSplitActionContainer::split | ( | const agxSDK::MergedState & | mergedState | ) |
Split given allowed actions in the merged state.
Fails (returns false) when none of the objects may be split.
| mergedState | - current merged state |
| agx::Bool agxSDK::MergeSplitActionContainer::split | ( | const agxSDK::MergedState & | mergedState, |
| agxSDK::MergedState::Actions | action | ||
| ) |
Split given action mask.
E.g., actions.split( mergedState, MergedState::Actions( MergeSplitAction::SPLIT_FIRST ) ).
| mergedState | - current merged state |
| action | - split action |
| agx::Bool agxSDK::MergeSplitActionContainer::split | ( | const MergedState & | mergedState, |
| agx::MergedBody::EdgeInteraction * | edge | ||
| ) |
Split a single edge.
| mergedState | - current merged state |
| edge | - edge to split |