39 class LinkExecuteFilter;
40 class GeometryPropertyBoolFilter;
41 class RigidBodyPropertyBoolFilter;
96 virtual
void post(
agxWire::
Link* link,
agxSDK::SimulationProxy* simulationProxy ) override;
136 virtual
void store(
agxStream::OutputArchive&
out ) const override;
141 virtual
void restore(
agxStream::InputArchive&
in ) override;
154 virtual
bool matchOther( const
agxCollide::Geometry* otherGeometry ) const = 0;
156 using
agxSDK::ExecuteFilter::match;
161 virtual
bool match( const
agxCollide::Geometry* geometry1, const
agxCollide::Geometry* geometry2 )
const override
167 if ( m_link ==
nullptr )
170 agx::Bool firstIsLink = m_link !=
nullptr && geometry1->getRigidBody() == m_link->getRigidBody();
171 agx::Bool secondIsLink = m_link !=
nullptr && geometry2->getRigidBody() == m_link->getRigidBody();
172 return firstIsLink ? matchOther( geometry2 ) : secondIsLink ? matchOther( geometry1 ) :
false;
198 : LinkExecuteFilter( link ), m_propertyName( propertyName ) {}
210 GeometryPropertyBoolFilter();
215 virtual ~GeometryPropertyBoolFilter();
221 virtual
bool matchOther( const
agxCollide::Geometry* otherGeometry )
const override
223 return matchT( otherGeometry );
230 template<
typename T >
234 return obj !=
nullptr &&
235 obj->hasPropertyContainer() &&
236 obj->getPropertyContainer()->getPropertyBool( m_propertyName, propertyValue ) &&
263 : GeometryPropertyBoolFilter( propertyName, link ) {}
275 RigidBodyPropertyBoolFilter();
280 virtual ~RigidBodyPropertyBoolFilter();
286 virtual
bool matchOther( const
agxCollide::Geometry* otherGeometry )
const override
288 return matchT( otherGeometry->getRigidBody() );
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
(Optional) Link algorithm that tries to stabilize the link when the link is in contact with an object...
agx::Real getTensionThreshold() const
agx::ref_ptr< RigidBodyPropertyBoolFilter > RigidBodyPropertyBoolFilterRef
RigidBodyPropertyBoolFilter(const agx::String &propertyName, const agxWire::Link *link)
Construct matching filter given property-bool name and the link.
LinkExecuteFilter(const agxWire::Link *link)
Construct given link this algorithm belongs to.
agx::Bool matchT(const T *obj) const
Match function for either agxCollide::Geometry or agx::RigidBody.
void setTensionThreshold(agx::Real tensionThreshold)
Assign new tension threshold defining the moment the stabilizing constraints should be applied.
agx::ref_ptr< GeometryPropertyBoolFilter > GeometryPropertyBoolFilterRef
const agxWire::Link * getLink() const
agx::String m_propertyName
GeometryPropertyBoolFilter()
Protected default constructor, used during restore.
GeometryPropertyBoolFilter(const agx::String &propertyName, const agxWire::Link *link)
Construct matching filter given property-bool name and the link.
LinkObjectStabilizingAlgorithm(agxWire::LinkObjectStabilizingAlgorithm::LinkExecuteFilter *filter, agx::Real tensionThreshold=agx::Real(1E4))
Construct given filter to filter out which objects should have this feature.
Object that defines the relation between different types of wires (agxWire::Wire).
Algorithm()
Abstract class - protected constructor.
Smart pointer for handling referenced counted objects.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
This namespace consists of a set of classes for handling geometric intersection tests including boole...
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
agx::ref_ptr< ContactEventListener > ContactEventListenerRef
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
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...
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.
Implements a Wire model with adaptive resolution.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
ref_ptr< LockJoint > LockJointRef