41 WireRouteController();
94 virtual void updateNodeTransforms();
101 virtual bool reverse(
bool initialized );
108 virtual WireRouteController* cut(
agx::Real distanceAlongRoute );
136 virtual bool detach(
bool begin );
142 virtual void setResolutionPerUnitLength(
agx::Real resolutionPerUnitLength );
147 inline agx::Real getResolutionPerUnitLength()
const;
154 agx::Real getCurrentLength(
bool includeConnecting =
true )
const;
159 virtual void clear();
209 virtual ~WireRouteController();
212 friend class Composite::Segment;
217 explicit WireRouteController(
const agxWire::WireRouteController& other )
223 agxWire::WireRouteController& operator = (
const agxWire::WireRouteController& other );
225 inline void setInitialized(
bool initialized );
226 inline bool getInitialized()
const;
257 inline void WireRouteController::setInitialized(
bool initialized )
259 m_initialized = initialized;
262 inline bool WireRouteController::getInitialized()
const 264 return m_initialized;
267 inline bool WireRouteController::hasNode(
const Node* node )
const 270 return m_nodeToIterator.contains( const_cast< Node* >( node ) );
274 inline agx::Real WireRouteController::getResolutionPerUnitLength()
const 276 return m_resolutionPerUnitLength;
279 inline void WireRouteController::addToList( Node* node )
281 m_nodes.push_back( node );
282 m_nodeToIterator.insert( node, --m_nodes.end() );
285 inline bool WireRouteController::removeFromList( Node* node )
288 NodePtrNodeIterHash::iterator nodeToIterIt = m_nodeToIterator.find( node );
289 if ( nodeToIterIt == m_nodeToIterator.end() )
293 m_nodeToIterator.erase( nodeToIterIt );
294 m_nodes.erase( nodeIt );
299 inline NodeIterator WireRouteController::getEndIterator()
301 return m_nodes.end();
306 return m_nodes.end();
309 inline NodeIterator WireRouteController::getIterator( Node* node )
311 if ( node ==
nullptr )
312 return m_nodes.end();
313 NodePtrNodeIterHash::iterator i = m_nodeToIterator.find( node );
314 return i != m_nodeToIterator.end() ? i->second : m_nodes.end();
317 inline NodeConstIterator WireRouteController::getIterator(
const Node* node )
const 319 if ( node ==
nullptr )
320 return m_nodes.end();
321 NodePtrNodeIterHash::const_iterator i = m_nodeToIterator.find( const_cast< Node* >( node ) );
322 return i != m_nodeToIterator.end() ? i->second : m_nodes.end();
AGXTERRAIN_EXPORT void clear()
NodeRefListA NodeContainer
agx::Vector< WireWinchControllerRef > WireWinchControllerRefVector
NodeContainer::iterator NodeIterator
#define AGXPHYSICS_EXPORT
Base class providing referencing counted objects.
const Node * getNode(const IteratorCompatibleContainer &container, agx::Real distanceFromStart)
Finds the wire node given current distance from the start of the wire (wire defined to be iterator co...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Implements a Wire model with adaptive resolution.
Smart pointer for handling referenced counted objects.
LinearProbingHashSetImplementation< KeyT, HashT >::iterator begin(LinearProbingHashSetImplementation< KeyT, HashT > &set)
NodeContainer::const_iterator NodeConstIterator
Class defining a node that is part of a wire.
Winch class for handling in and out hauling of wires.
#define DOXYGEN_END_INTERNAL_BLOCK()
agx::LinearProbingHashTable< Node *, NodeIterator > NodePtrNodeIterHash
#define DOXYGEN_START_INTERNAL_BLOCK()