32 typedef std::pair< agx::Real, agx::Real >
RealPair;
37 class WireDistanceCompositeConstraint;
38 class WireGeometryController;
39 class WireMaterialController;
50 struct ContactPointDef
52 enum OnSegment { BEFORE = -1, UNKNOWN, AFTER };
54 : point( p ), normal( n ), depth( d ), primary(
true ), onSegment( UNKNOWN ) {}
56 : point( p ), normal( n ), depth( d ), primary( isPrimaryPoint ), onSegment( UNKNOWN ) {}
66 namespace WireContactStatus
68 enum Enum { KEEP, REMOVE, RELEASE };
107 const agx::Vec3& point()
const {
return m_point; }
113 const agx::Vec3f& normal()
const {
return m_normal; }
119 agx::Real depth()
const {
return m_depth; }
121 operator agxWire::ContactPointDef()
const {
return ContactPointDef( m_point, m_normal, m_depth ); }
140 static void setContactNode(
agxWire::Node* node,
bool enable );
148 static agx::RealPair getMinMaxSegmentRestLength(
const agxWire::WireDistanceCompositeConstraint* wire );
157 static agx::RealPair getMinMaxSegmentRestLength(
const agxWire::WireDistanceCompositeConstraint* wire1,
const agxWire::WireDistanceCompositeConstraint* wire2 );
167 WireContactSegment( agxWire::WireDistanceCompositeConstraint* wire, agxWire::WireGeometryController* geometryController,
const agxWire::WireContactSegment::PointDef& p,
const agxCollide::Geometry* wireGeometry );
173 bool isValid()
const;
195 void setMinimumLength(
agx::Real minimumLength );
220 const agxWire::WireContactSegment::PointDef& getContactPoint()
const;
225 agxWire::WireContactSegment::PointDef& getContactPoint();
232 bool requiresNewNodes(
bool& ret_newCurr,
bool& ret_newNext )
const;
244 agxWire::WireDistanceCompositeConstraint* getWire()
const;
287 enum RealData { SEGMENT_LENGTH, DIST_TO_CURR, DIST_TO_NEXT, SEGMENT_MINIMUM_LENGTH, NUM_PARAMS };
290 WireContactSegment();
295 void initialize( agxWire::WireGeometryController* geometryController,
const agxCollide::Geometry* wireGeometry );
298 WireDistanceCompositeConstraint* m_wire;
308 #define RENDER_DEBUG_POINT( p, color, reason, pos ) \
309 ::render( p, color ); \
310 agxRender::RenderSingleton::instance()->add( reason, pos, color )
315 template<
typename T >
316 void render(
const T& point,
const agxRender::Color& color ) { agxWire::render( point.point(), point.normal(), color ); }
328 typedef std::pair< NodeConstIterator, NodeConstIterator > NodeConstIteratorPair;
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
Utility color class with "common colors".
Class defining a node that is part of a wire.
A std::pair, with both elements of the same type, and symmetric so (a, b) == (b, a)
A class holding 4 dimensional vectors and providing basic arithmetic.
Vector containing 'raw' data.
#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...
Implements a Wire model with adaptive resolution.
NodeContainer::const_iterator NodeConstIterator
agx::SymmetricPair< agxWire::Node * > SymmetricNodePtrPair
NodeContainer::iterator NodeIterator
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
std::pair< Real, Real > RealPair