32 class GeometryContactPtr;
39 class WireDistanceCompositeConstraint;
49 class AGXPHYSICS_EXPORT WireShapeContactController :
public agxWire::WireContactController
52 WireShapeContactController( Wire* wire );
54 static BodyFixedNode* changeToBodyFixed(ShapeContactNode* cn, Wire* wire);
58 void removeLumpedNodesTooClose();
60 void findExtraLength();
62 void analyzePossibleBodyFixReplacement();
66 virtual void preCollideUpdate();
67 virtual void preUpdate();
68 virtual void postUpdate();
70 struct SurfacePointData
78 : point( surfacePoint ),
81 geometryContact( geometryContact ),
82 pointIndex( pointIndex ),
83 isFaceContact( isFaceContact )
98 virtual ~WireShapeContactController();
100 void movePenetratingContactNodesBackAlongEdges(NodeShapeSetVector& nodesToShapeList);
105 agx::Bool findSurfacePosition( ShapeContactNode* cn )
const;
109 void chooseAndClampNodeEdges(
ContactNodeDataList& nodes, NodeShapeSetVector& nodesToShapes);
116 agx::Bool evaluateMiddleContact(
const ShapeContactNode* prevContact,
const ShapeContactNode* middleContact,
const ShapeContactNode* nextContact,
agx::Bool& dueToPrev)
const;
117 agx::Bool shouldContactBecomeBodyFixed(ContactNodeDataList::iterator nodeDataIterator)
const;
118 void analyzeContactState(ContactNodeDataList::iterator nodeDataIterator,
ContactNodeDataList& nodeDataList)
const;
119 void validateContact(ContactNodeDataList::iterator nodeDataIterator,
const agx::Bool ignoreClampedPosition =
false)
const;
120 agx::Bool evaluateCloseContact(
const ShapeContactNode* closeContact,
122 const ShapeCurvature& worldCurvature,
124 agx::Bool evaluateCloseContact(
const ShapeContactNode* closeContact,
126 const ShapeCurvature& worldCurvature,
132 void createNewContactNodes(NodeShapeSetVector& nodesToShapeList);
134 void collectPossibleEdges(ShapeContactNode* scn,
agxCollide::Shape* shape, ShapeContactEdgeVector& possibleEdges);
140 void chooseAndClampNodeEdge(ContactNodeData& cnData,
const NodeShapeSetVector& nodesToShapes);
144 agx::Bool mergeNodes(NodeMergePairHashVector& nodesToMerge);
146 agx::Bool findWhichNodeToRemoveByMerge(ShapeContactNode* firstContact, ShapeContactNode* secondContact,
const Node* prevNode,
const Node* nextNode)
const;
148 agx::Bool isClamped(ShapeContactNode* cn);
150 agx::Bool merge(ShapeContactNode* a, ShapeContactNode* b, Node* prevNode, Node* nextNode);
152 void fixFreeEndContactPassings(WireDistanceCompositeConstraint* ldcc);
153 agx::Bool nearClampPosition(
const ShapeContactNode* scn)
const;
154 agx::Bool atClampPosition(
const ShapeContactNode* scn)
const;
159 agx::Bool considerNewEdge(
const ShapeContactNode* scn,
const ShapeContactEdge& edge)
const;
167 void getNewNodeVelocities(
agx::Bool integrate);
175 enum class EvaluationResult
179 CREATE_GEOMETRY_CONTACT_PREV,
180 CREATE_GEOMETRY_CONTACT_NEXT
185 const ShapeCurvature& worldCurvature,
186 const Node* prevNode,
187 const Node* nextNode,
189 const agx::Bool favorLumpSphereContacts =
true )
const;
191 NodePtrGeometryContactVectorTable m_nodeGeometryContactTable;
Inheritance with partial specialization due to bug with ref_ptr containers.
agxCollide namespace consists of a set of classes for handling geometric intersection tests including...
#define AGXPHYSICS_EXPORT
agx::Vector< GeometryContact > GeometryContactVector
The geometry representation used by the collision detection engine.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Implements a Wire model with adaptive resolution.
agx::List< ContactNodeData > ContactNodeDataList
Smart pointer for handling referenced counted objects.
NodeContainer::const_iterator NodeConstIterator
Inheritance with partial specialization due to bug with ref_ptr containers.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()