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 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;
707 Type getNodeType()
const;
730 SpatialState* getSpatialState();
735 const SpatialState* getSpatialState()
const;
741 const agx::Vec3& getWorldPosition()
const;
756 virtual void setTranslate(
const agx::Vec3& translate );
771 virtual void reverse();
816 void setIgnoreBend(
bool ignoreBend );
821 bool getIgnoreBend()
const;
826 int getState()
const;
832 void addState(
int state );
838 void removeState(
int state );
878 const EyeNode* getAsEye()
const;
890 const EyeNode* getAsEyeLineNode()
const;
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;
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;
1363 virtual ~BodyFixedNode();
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;
1585 BodyFixedNode* getCmNode()
const;
1602 void fullTransform();
1608 void setSuperBendReplacedWithBend(
bool replaceSuperBend );
1613 bool getSuperBendReplacedWithBend() const;
1618 virtual
void updateConnection(
agxWire::
Wire* ) {}
1638 virtual ~ConnectingNode();
1645 void create(
agx::RigidBody* rb, const
agx::
Vec3& relativeTranslate );
1648 BodyFixedNodeRef m_cmNode;
1691 void setReferenceDistance(
agx::Real referenceDistance );
1706 virtual ~StopNode();
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;
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;
1856 const agx::Vec3& getShapeTranslate()
const;
1861 void setShapeEdge(
const agx::Vec3& shapeEdge);
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();
1930 void setShapeEdgeOffset(
const agx::Vec3& offset);
1945 const GeometryRefDepthTable& getCollidedGeometries()
const;
1950 void resetCollidedGeometries();
1971 void analyzeCollidedGeometries();
1992 bool getCreatedFromDynamicContact()
const;
2002 bool onSameGeometry(
const agxWire::Node* otherNode )
const;
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;
2151 return m_connecting;
2156 return m_connecting;
2181 return m_shapeContact;
2186 return m_shapeContact;
2191 return &m_meshIndex;
2196 return &m_meshIndex;
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...
agx::Real m_nodesPerUnitDistance
agx::RigidBody * getRigidBody() const
Direction
Friction direction in a wire.
AGXCORE_EXPORT Type * getType(const agx::String &name)
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Stability parameters object defining the behavior of the constraints associated to this connecting no...
agx::ref_ptr< EyeNode > m_childNode
Type
The supported node types.
agx::Vector< NodeRef > NodeRefVector
bool m_activeConstraint
Tells you if the friction constraint is active.
Connecting nodes contains two nodes, one at center of mass and the other at the user defined position...
const agx::Vec3 & getWorldPosition() const
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...
NodeRefListA NodeContainer
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
Node coordinate frame in another frame.
NodeContainer::iterator NodeIterator
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
#define AGXPHYSICS_EXPORT
Inheritance with partial specialization due to bug with ref_ptr containers.
Free node class used to route wires.
agx::ref_ptr< EyeNode > EyeNodeRef
agx::List< Node *> NodePtrListA
agx::Real m_violationPerUnitLength
Violation of the friction constraint.
agx::Real m_restLength
Rest length of the friction constraint.
NodeContainer::reverse_iterator NodeReverseIterator
ContactForce m_contactForce
agx::HashVector< agxCollide::GeometryRef, agx::Vec3 > GeometryRefDepthTable
BodyFixedNode * m_bodyFixed
char m_goForward
Bit mask for GO_FORWARD, IS_DIRTY...
Material definition for a wire node Specifies the friction of a wire for sliding through an EyeNode...
agx::RigidBody * getRigidBody() const
NodePtrContainer::const_iterator NodePtrConstIterator
const agx::Vec3 & getWorldPosition() const
Base class providing referencing counted objects.
agx::Bool isType(agx::Int typeMask) const
Test several types, e.g., node->isType( agxWire::Node::EYE | agxWire::Node::CONNECTING )...
The geometry representation used by the collision detection engine.
HighResolutionRange m_highResolutionRange
agx::ref_ptr< FreeNode > FreeNodeRef
The body fixed node is attached to a body at a given offset.
Interface and placeholder of controllers/helpers for wires.
ContactNode * getAsContact()
Direction towards end of the wire.
Vector containing 'raw' data.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Implements a Wire model with adaptive resolution.
ConnectingNode * getAsConnecting()
agx::ref_ptr< ContactNode > ContactNodeRef
NodeContainer::const_reverse_iterator NodeConstReverseIterator
ShapeContactNode * m_shapeContact
Stop node, wire end node used by winches.
Smart pointer for handling referenced counted objects.
ConnectingNode * m_connecting
const ShapeContactNode * getAsShapeContact() const
agx::ref_ptr< agx::Referenced > m_customData
NodePtrListA NodePtrContainer
agx::ref_ptr< Node > NodeRef
Object that defines the relation between different types of wires (agxWire::Wire).
The rigid body class, combining a geometric model and a frame of reference.
agx::List< NodeRef > NodeRefListA
BodyFixedNode * getAsBodyFixed()
Class to control variable node density along wires through routed nodes.
NodePtrContainer::iterator NodePtrIterator
SpatialState m_spatialState
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
agx::Vector< Node *> NodePtrVector
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Class for writing serialized data in binary format to a stream.
NodeContainer::const_iterator NodeConstIterator
agx::observer_ptr< Node > m_parent
Current transformed relative.
LinearProbingHashSetImplementation< KeyT, HashT >::iterator end(LinearProbingHashSetImplementation< KeyT, HashT > &set)
StateInfo
Internal state a node may have.
Class defining a node that is part of a wire.
Eye node is a type of node that can slide along a wire with or without friction.
agx::Real m_startDistance
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
Inheritance with partial specialization due to bug with ref_ptr containers.
Current transformed translate.
StoreRestoreData m_storeRestoreData
#define DOXYGEN_END_INTERNAL_BLOCK()
FrictionDirection
Internal.
agx::LinearProbingHashTable< Node *, NodeIterator > NodePtrNodeIterHash
#define DOXYGEN_START_INTERNAL_BLOCK()
agx::Real m_normalForceMagnitude
Magnitude of the normal force.