41 class ShapeContactNode;
42 class WireFrictionController;
43 class WireTensionController;
44 class WireFrictionConstraintImplementation;
61 #if HASH_FOR_WIRE == HASH_NEW
63 #elif HASH_FOR_WIRE == HASH_OLD
114 agx::Vec3& getElement( Elements element );
121 const agx::Vec3& getElement( Elements element )
const;
132 void setTranslate(
const agx::Vec3& translate );
161 const agx::Vec3& getWorldPosition()
const;
201 FIX_FRICTION_DIRECTION = (1<<2)
213 bool hasValidRestLength()
const;
219 bool isStick()
const;
232 void setActive(
bool active );
238 bool getActive()
const;
244 void setStick(
bool stick,
Direction dir );
273 bool getEnable()
const;
278 bool isEnabled()
const;
293 bool isInfCoefficient(
Direction dir )
const;
298 agx::Real getNormalForceMagnitude()
const;
305 void toggleGoForward();
310 bool getGoForward() const;
315 bool goForwardIsDirty() const;
321 void setGoForwardIsDirty();
326 void resetGoForwardIsDirty();
332 void updateStick(
agx::
Real tension );
337 void setInvalidRestLength();
359 agx::
Real getRestLength() const;
365 agx::
Real getViolation() const;
370 friend class WireFrictionController;
373 friend class WireFrictionConstraintImplementation;
374 friend class WireOldContactController;
375 friend class WireDistanceCompositeConstraintImplementation;
381 void setRestLength(
agx::
Real restLength );
387 void setViolation(
agx::
Real violation );
393 void setViolationPerUnitLength(
agx::
Real violationPerUnitLength );
398 agx::
Real getViolationPerUnitLength();
404 void setNormalForceMagnitude(
agx::
Real normalForce );
413 bool m_stick[ BOTH ];
443 bool isActive()
const;
458 agx::Real getNodesPerUnitDistance()
const;
466 void setStartDistance(
agx::Real startDistance );
474 void setEndDistance(
agx::Real endDistance );
481 void setNodesPerUnitDistance(
agx::Real nodesPerUnitDistance );
529 SHAPE_CONTACT = (1<<7)
538 WAS_CONTACT = (1<< 0),
539 IS_HIGH_RES = (1<< 1),
540 IGNORE_BEND = (1<< 2),
541 NO_LUMP_NEAR = (1<< 3),
542 NO_CIRCLE_CONTACT = (1<< 4),
543 GYPSY_CONTACT = (1<< 5),
544 NO_MOVEMENT_RANGE = (1<< 6),
545 NO_FRICTION = (1<< 7),
546 SPLIT_ENABLED = (1<< 8),
547 INSIDE_OBJECT = (1<< 9),
548 WAS_CONTACT_LAST_TIMESTEP = (1<<10),
549 PERMANENT_LUMP = (1<<11),
550 REPLACE_SUPERBEND_WITH_BEND = (1<<12),
551 LUMPED_NODE = (1<<13),
552 LUMP_CONTACT = (1<<14),
553 WW_STABILIZED = (1<<15)
578 bool operator < (
const Data& other )
const;
645 const Data* local()
const;
650 const DataContainer& removed()
const {
return m_removed; }
660 const Data* intermediate(
agx::UInt i )
const;
674 DataContainer m_removed;
685 static
int findNodeState( const
agxCollide::Geometry* geometry );
687 static
agx::
Bool isContactType(const Node* node);
688 static
agx::
Bool isContactType(const Node::
Type& type);
707 Type getNodeType() const;
712 NodeFrame* getFrame();
717 const NodeFrame* getFrame() const;
724 NodeFrame& getNodeFrame();
730 SpatialState* getSpatialState();
735 const SpatialState* getSpatialState() const;
741 const
agx::
Vec3& getWorldPosition() const;
746 const
agx::
Vec3& getTranslate() const;
751 const
agx::
Vec3& getPosition() const;
756 virtual
void setTranslate( const
agx::
Vec3& translate );
766 agx::RigidBody* getRigidBody() const;
771 virtual
void reverse();
782 void setCustomData(
agx::Referenced* customData );
787 agx::Referenced* getCustomData() const;
792 HighResolutionRange* getHighResolutionRange();
797 const HighResolutionRange* getHighResolutionRange() const;
806 agx::
Vec3 getIntegratedPosition(
agx::
Real t,
bool onlyTranslational = true ) const;
811 virtual
agx::
Vec3 getVelocity() const;
816 void setIgnoreBend(
bool ignoreBend );
821 bool getIgnoreBend() const;
826 int getState() const;
832 void addState(
int state );
838 void removeState(
int state );
843 NodeMaterial* getMaterial();
848 const NodeMaterial* getMaterial() const;
853 FreeNode* getAsFree();
858 const FreeNode* getAsFree() const;
863 BodyFixedNode* getAsBodyFixed();
868 const BodyFixedNode* getAsBodyFixed() const;
878 const EyeNode* getAsEye() const;
884 EyeNode* getAsEyeLineNode();
890 const EyeNode* getAsEyeLineNode() const;
895 ConnectingNode* getAsConnecting();
900 const ConnectingNode* getAsConnecting() const;
905 StopNode* getAsStop();
910 const StopNode* getAsStop() const;
915 ContactNode* getAsContact();
920 const ContactNode* getAsContact() const;
925 const ShapeContactNode* getAsShapeContact() const;
930 ShapeContactNode* getAsShapeContact();
939 void setInsideObject(
bool insideObject);
944 bool getInsideObject() const;
949 bool getWasContact() const;
954 bool getWasContactLastTimestep() const;
960 void setWasContact(
bool wasContact );
966 void setWasContactLastTimestep(
bool wasContact );
971 void setNoLumpNear(
bool noLumpNear );
976 bool getNoLumpNear() const;
981 void setNoCircleContact(
bool disableCircleContact );
986 bool getNoCircleContact() const;
992 void setGypsyContact(
bool gypsyContact);
998 bool getGypsyContact() const;
1006 void setNoMovementRange(
bool disableMovementRange);
1011 bool getNoMovementRange() const;
1017 void setNoFriction(
bool noFriction );
1023 bool getNoFriction() const;
1028 void setState(
int nodeState );
1040 int& geometryIndex();
1043 bool getIgnored()
const;
1044 int getGeometryIndex()
const;
1045 bool getAtBegin()
const;
1050 int m_geometryIndex;
1058 StoreRestoreData* getStoreRestoreData();
1063 const StoreRestoreData* getStoreRestoreData()
const;
1082 Tension* getTension();
1087 const Tension* getTension()
const;
1136 ContactForce m_contactForce;
1138 agx::ref_ptr<
agx::Referenced > m_customData;
1148 StoreRestoreData m_storeRestoreData;
1149 SpatialState m_spatialState;
1155 friend class
agx::InternalData;
1160 agx::Referenced* getInternalData() const;
1166 void setInternalData(
agx::Referenced* data );
1170 agx::ref_ptr<
agx::Referenced> m_internalData;
1211 void create(
const agx::Vec3& position );
1249 void setRestLength(
agx::Real restLength );
1266 void setCurrentLength(
agx::Real currentLength );
1272 void changeCurrentLength(
agx::Real dl );
1287 void setIsLumpedNode(
bool lumpedNode );
1292 bool isLumpedNode()
const;
1297 void setIsLumpContact(
bool lumpContact );
1302 bool isLumpContact()
const;
1308 void setSplitEnabled(
bool splitEnabled );
1313 bool getSplitEnabled()
const;
1319 void setIsHighRes(
bool wasHighRes );
1324 bool getIsHighRes()
const;
1330 void setPermanentLump(
bool permantentLump );
1336 bool getPermanentLump()
const;
1368 void create(
agx::RigidBody* rb, const
agx::
Vec3& relativeTranslate );
1441 void setEnableReverseAddOfNormalNode(
bool reverseAdd );
1450 void setReverseAdd(
bool reverseAdd );
1455 bool getReverseAdd()
const;
1465 const EyeNode* getChildNode()
const;
1470 EyeNode* getParentNode()
const;
1485 void setVectorToChild(
const agx::Vec3& vec );
1490 virtual void reverse()
override;
1499 void setFixFrictionDirection(
bool fixFrictionDirection,
bool goForward );
1504 bool getFixFrictionDirection()
const;
1602 void fullTransform();
1608 void setSuperBendReplacedWithBend(
bool replaceSuperBend );
1613 bool getSuperBendReplacedWithBend() const;
1618 virtual
void updateConnection(
agxWire::
Wire* ) {}
1645 void create(
agx::RigidBody* rb, const
agx::
Vec3& relativeTranslate );
1691 void setReferenceDistance(
agx::Real referenceDistance );
1713 void create(
agx::RigidBody* rb, const
agx::
Vec3& relativeTranslate );
1733 MOVEMENT_RANGE_START = 1,
1734 MOVEMENT_RANGE_END = 2
1746 int getMeshCurrentTriangleIndex()
const;
1747 int getMeshNextTriangleIndexStart()
const;
1748 int getMeshNextTriangleIndexEnd()
const;
1749 int getMeshCurrentEdgeIndex()
const;
1750 int getMeshNextEdgeIndexStart()
const;
1751 int getMeshNextEdgeIndexEnd()
const;
1752 void setMeshCurrentIndex(
int meshCurrentTriangleIndex,
int meshCurrentEdgeIndex );
1753 void setMeshNextIndexStart(
int meshNextTriangleIndexStart,
int meshNextEdgeIndexStart );
1754 void setMeshNextIndexEnd(
int meshNextTriangleIndexEnd,
int meshNextEdgeIndexEnd );
1761 int m_meshCurrentTriangleIndex;
1762 int m_meshCurrentEdgeIndex;
1763 int m_meshNextTriangleIndexStart;
1764 int m_meshNextEdgeIndexStart;
1765 int m_meshNextTriangleIndexEnd;
1766 int m_meshNextEdgeIndexEnd;
1787 ContactNode( ContactNode* cn );
1808 void setGeometry(
agxCollide::Geometry* geometry );
1815 virtual
void setTranslate( const
agx::
Vec3& shapeTranslate ) override;
1820 void setNoStickContact(
bool noStickyContact );
1825 bool getNoStickContact() const;
1830 MeshIndex* getMeshIndex();
1835 const MeshIndex* getMeshIndex() const;
1844 agxCollide::Geometry* getNextGeometry() const;
1851 void setNextGeometry(
agxCollide::Geometry* nextGeometry);
1856 const
agx::
Vec3& getShapeTranslate() const;
1861 void setShapeEdge(const
agx::
Vec3& shapeEdge);
1866 const
agx::
Vec3& getShapeEdge() const;
1871 void resetMovementRange(
int direction);
1895 bool getIfOpenAngle() const;
1900 void setOpenAngle(
bool openAngle);
1905 size_t getClampedRangeInformation() const;
1910 const
agx::
Vec3& getPreviousPosition() const;
1920 void resetPreviousPosition();
1925 bool clampMovementRange(const
agx::
Vec3& pos, MovementRange direction);
1930 void setShapeEdgeOffset(const
agx::
Vec3& offset);
1935 agx::
Vec3 getShapeEdgeOffset() const;
1940 void setCollidedGeometry(
agxCollide::Geometry* geometry, const
agx::
Vec3& depthVector);
1950 void resetCollidedGeometries();
1965 agx::
Real findParameterizedValueFullRange(
agx::
Vec3 localPosition) const;
1971 void analyzeCollidedGeometries();
1976 void copyGeometries(
agxWire::ContactNode* cn);
1981 agx::
Real getEdgeVelocity() const;
1987 void setEdgeVelocity(
agx::
Real vel);
1992 bool getCreatedFromDynamicContact() const;
2002 bool onSameGeometry( const
agxWire::Node* otherNode ) const;
2010 bool initialize(
agx::
Real wireRadius,
agx::
Real wireRadiusMultiplier );
2026 virtual ~ContactNode();
2053 MeshIndex m_meshIndex;
2058 return m_data[ TRANSLATE ];
2069 return i < m_removed.size() ? m_removed.ptr() + i : i == m_removed.size() ? &m_local :
nullptr;
2072 AGX_FORCE_INLINE Node::SpatialState::Data* agxWire::Node::SpatialState::local()
2077 AGX_FORCE_INLINE const Node::SpatialState::Data* agxWire::Node::SpatialState::local()
const
2084 return &m_spatialState;
2087 AGX_FORCE_INLINE const agxWire::Node::SpatialState* Node::getSpatialState()
const
2089 return &m_spatialState;
2094 return m_internalData;
2106 return (
agx::Int( m_type ) & typeMask) != 0;
2121 return m_nf.getWorldPosition();
2126 return m_nf.getRigidBody();
2151 return m_connecting;
2156 return m_connecting;
2181 return m_shapeContact;
2186 return m_shapeContact;
2191 return &m_meshIndex;
2196 return &m_meshIndex;