22 #define LINK_V2_SERIALIZATION_VERSION agx::UInt16( 37 ) 26 class SimulationProxy;
57 INVALID_CONNECTION = 0xFF
85 agx::Bool findClosestIfLinkConnections =
false );
203 template<
typename T >
204 T* getAlgorithm()
const;
244 template<
typename Pred>
250 template<
typename Pred>
261 void debugRenderConnections()
const;
314 INITIALIZED = 1 << 0,
315 ENABLE_TOGGLED = 1 << 1
334 void collectGarbage();
362 friend class LinkController;
373 virtual void update( agxWire::WireParallelCallbacksHandler::CallbackTypes type,
agxSDK::SimulationProxy* simulationProxy );
384 ConnectionsContainer m_connections;
454 void preChildrenUpdate();
460 void postChildrenUpdate();
465 template<
typename T >
471 template<
typename T >
477 template<
typename T >
503 enum State { IDLE = 0, UPDATING_CHILDREN = (1<<0) };
509 ChildrenContainer m_children;
510 ChildrenContainer m_removedChildren;
511 Link::Algorithm* m_parent;
526 T* Link::getAlgorithm()
const 528 T* algorithm =
nullptr;
529 for (
agx::UInt i = 0, numAlgorithms = m_algorithms.size(); algorithm ==
nullptr && i < numAlgorithms; ++i )
530 algorithm = m_algorithms[ i ]->find<T>();
537 template<
typename Pred>
541 ret.
reserve( m_connections.size() );
542 for (
agx::UInt i = 0, numConnections = m_connections.size(); i < numConnections; ++i )
543 if ( pred( m_connections[ i ] ) )
548 template<
typename Pred>
551 for (
agx::UInt i = 0, numConnections = m_connections.size(); i < numConnections; ++i )
552 if ( pred( m_connections[ i ] ) )
553 return m_connections[ i ];
558 T* Link::Algorithm::find()
const 560 T* algorithm =
const_cast<Link::Algorithm*
>( this )->as<T>();
561 for (
agx::UInt i = 0; algorithm ==
nullptr && i < m_children.size(); ++i )
562 algorithm = m_children[ i ]->find<T>();
568 const T* Link::Algorithm::as()
const 570 return dynamic_cast<const T*
>( this );
574 T* Link::Algorithm::as()
576 return dynamic_cast<T*
>( this );
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
Winch object which works like agxWire::WireWinchController but enables the features of having stored...
Connecting nodes contains two nodes, one at center of mass and the other at the user defined position...
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive...
agx::Vector< agxWire::LinkRef > LinkConnectionsContainer
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
#define AGXPHYSICS_EXPORT
The base class for a constraint.
#define AGX_DECLARE_POINTER_TYPES(type)
void reserve(size_t size)
Reserve capacity in the vector.
AlgorithmContainer m_algorithms
Base class providing referencing counted objects.
AlgorithmContainer m_newlyAddedAlgorithms
Interface class for nodes connected to links.
Interface and placeholder of controllers/helpers for wires.
Implements a Wire model with adaptive resolution.
ConnectionType
Connection type of the wires connected to this link, i.e., if this link should be attached to begin o...
ILinkNode::ConnectionProperties m_defaultLinkConnectionProperties
Link attached to another link.
Object that defines the relation between different types of wires (agxWire::Wire).
The rigid body class, combining a geometric model and a frame of reference.
ILinkNode::ConnectionProperties m_defaultWireConnectionProperties
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Class for writing serialized data in binary format to a stream.
Object holding parameters, such as bend and twist stiffness, related to wire to link connections...
agx::Vector< agxWire::Link::AlgorithmRef > AlgorithmContainer
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Algorithm()
Abstract class - protected constructor.
Interface class used by internal objects running in parallel.
agx::Vector< agxWire::ILinkNodeRef > ConnectionsContainer
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
void push_back(const T2 &value)
#define DOXYGEN_END_INTERNAL_BLOCK()
WinchState
State when a link is interacting with a winch.
#define DOXYGEN_START_INTERNAL_BLOCK()