 |
AGXDynamics
2.35.0.3
|
Go to the documentation of this file.
39 class LinkExecuteFilter;
40 class GeometryPropertyBoolFilter;
41 class RigidBodyPropertyBoolFilter;
58 void setTensionThreshold(
agx::Real tensionThreshold );
86 virtual
void onLinkEnable(
agx::
Bool enable,
agxWire::
Link* link,
agxSDK::SimulationProxy* simulationProxy ) override;
91 virtual
void pre(
agxWire::
Link* link,
agxSDK::SimulationProxy* simulationProxy ) override;
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() );
agx::ref_ptr< GeometryPropertyBoolFilter > GeometryPropertyBoolFilterRef
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.
#define DOXYGEN_END_INTERNAL_BLOCK()
GeometryPropertyBoolFilter(const agx::String &propertyName, const agxWire::Link *link)
Construct matching filter given property-bool name and the link.
#define DOXYGEN_START_INTERNAL_BLOCK()
Algorithm()
Abstract class - protected constructor.
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
GeometryPropertyBoolFilter()
Protected default constructor, used during restore.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
#define AGXPHYSICS_EXPORT
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...
(Optional) Link algorithm that tries to stabilize the link when the link is in contact with an object...
Smart pointer for handling referenced counted objects.
Implements a Wire model with adaptive resolution.
const agxWire::Link * getLink() const
ref_ptr< LockJoint > LockJointRef
agx::String m_propertyName
LinkExecuteFilter(const agxWire::Link *link)
Construct given link this algorithm belongs to.
#define AGX_DECLARE_POINTER_TYPES(type)
This namespace consists of a set of classes for handling geometric intersection tests including boole...
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
RigidBodyPropertyBoolFilter(const agx::String &propertyName, const agxWire::Link *link)
Construct matching filter given property-bool name and the link.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Object that defines the relation between different types of wires (agxWire::Wire).
agx::ref_ptr< ContactEventListener > ContactEventListenerRef
agx::Bool matchT(const T *obj) const
Match function for either agxCollide::Geometry or agx::RigidBody.
agx::ref_ptr< RigidBodyPropertyBoolFilter > RigidBodyPropertyBoolFilterRef