AGX Dynamics 2.41.3.0
Loading...
Searching...
No Matches
agxSDK::MergeSplitUtils::WireSegmentMergedState Class Reference

Wire merged state segment along a wire. More...

#include <MergeSplitUtils.h>

Public Types

enum  EState : agx::UInt32 { FREE = 1 << 0 , MERGED = 1 << 1 , IGNORE = 1 << 2 }
 
using State = agx::BitState< EState, agx::UInt32 >
 

Public Member Functions

 WireSegmentMergedState (const agxWire::WireDistanceCompositeConstraint *wire)
 Construct given wire constraint.
 
agxWire::Nodeback () const
 
agxWire::NodeConstIterator begin () const
 
agxWire::NodeConstIterator construct (agxWire::NodeConstIterator it)
 Initialize using iterator to first node (end of previous segment).
 
agxWire::NodeConstIterator end () const
 
agxWire::BodyFixedNodefront () const
 
agx::MergedBodygetMergedBody () const
 
State getState () const
 
agx::UInt size () const
 

Static Public Member Functions

static WireSegmentMergedStateContainer create (const agxWire::Wire *wire)
 Creates vector of WireMergedState segments along the wire starting from first lumped node to (and including) last lumped node.
 

Detailed Description

Wire merged state segment along a wire.

The state of this segment can be: FREE: None of the nodes in this segment is merged. MERGED: All nodes in this segment is merged to the same merged body instance. IGNORE: All nodes in this segment is explicitly merged.

The state is only checked for lumped nodes in the wire. Intermediate contact and/or eye nodes are included in the segment but the merged state may differ.

Note: Say that the wire has 10 nodes - all are merged. Nodes 1 to 6 are merged to mergedBody1 and 7 to 10 are merged to mergedBody2. Calling: auto segments = WireMergedState::create( wire ); will contain two entries, both with state MERGED but since the MergedBody instances differs, the segments are separated.

Definition at line 293 of file MergeSplitUtils.h.

Member Typedef Documentation

◆ State

Member Enumeration Documentation

◆ EState

Enumerator
FREE 

Segment isn't merged.

MERGED 

Segment is merged by the MergeSplitHandler.

IGNORE 

Segemnt is explicitly merged by the user.

Definition at line 306 of file MergeSplitUtils.h.

Constructor & Destructor Documentation

◆ WireSegmentMergedState()

agxSDK::MergeSplitUtils::WireSegmentMergedState::WireSegmentMergedState ( const agxWire::WireDistanceCompositeConstraint *  wire)

Construct given wire constraint.

Parameters
wire- wire constraint

Member Function Documentation

◆ back()

agxWire::Node * agxSDK::MergeSplitUtils::WireSegmentMergedState::back ( ) const
Returns
the last node in this segment

◆ begin()

agxWire::NodeConstIterator agxSDK::MergeSplitUtils::WireSegmentMergedState::begin ( ) const
Returns
begin node iterator of this segment

◆ construct()

agxWire::NodeConstIterator agxSDK::MergeSplitUtils::WireSegmentMergedState::construct ( agxWire::NodeConstIterator  it)

Initialize using iterator to first node (end of previous segment).

Parameters
it- first node iterator in this segment
Returns
end iterator of this segment

◆ create()

static WireSegmentMergedStateContainer agxSDK::MergeSplitUtils::WireSegmentMergedState::create ( const agxWire::Wire wire)
static

Creates vector of WireMergedState segments along the wire starting from first lumped node to (and including) last lumped node.

Note that the first and last attachment nodes are both excluded.

Parameters
wire- wire instance
Returns
vector of merged states along the wire

◆ end()

agxWire::NodeConstIterator agxSDK::MergeSplitUtils::WireSegmentMergedState::end ( ) const
Returns
end node iterator of this segment

◆ front()

agxWire::BodyFixedNode * agxSDK::MergeSplitUtils::WireSegmentMergedState::front ( ) const
Returns
the first node in this segment (by definition a lumped node)

◆ getMergedBody()

agx::MergedBody * agxSDK::MergeSplitUtils::WireSegmentMergedState::getMergedBody ( ) const
Returns
merged body instance if state == MERGED - otherwise nullptr

◆ getState()

State agxSDK::MergeSplitUtils::WireSegmentMergedState::getState ( ) const
Returns
the state of this segment

◆ size()

agx::UInt agxSDK::MergeSplitUtils::WireSegmentMergedState::size ( ) const
Returns
the number of nodes in this segment

The documentation for this class was generated from the following file: