|
AGX Dynamics
2.35.0.1
|
#include <ShapeContactNode.h>
Inheritance diagram for agxWire::ShapeContactNode:Public Types | |
| enum | ContactState { NO_ISSUES = 0 , PREV_IS_CLOSE = 1 << 0 , NEXT_IS_CLOSE = 1 << 1 , PREV_HAS_SAME_NORMAL = 1 << 2 , NEXT_HAS_SAME_NORMAL = 1 << 3 , ANGLE_NOT_VALID = 1 << 4 , NEAR_CLAMP_POSITION = 1 << 5 , WORTHLESS_MIDDLE_CONTACT = 1 << 6 , REMOVE_IMEDIATELY = 1 << 7 , LEAVING_GYPSY = 1 << 8 } |
| enum class | NodeExistancePolicy { KEEP = 0 , REMOVE , REPLACE , REMOVED } |
Public Types inherited from agxWire::Node | |
| enum | StateInfo { STANDARD = 0 , WAS_CONTACT = (1<< 0) , IS_HIGH_RES = (1<< 1) , IGNORE_BEND = (1<< 2) , NO_LUMP_NEAR = (1<< 3) , NO_CIRCLE_CONTACT = (1<< 4) , GYPSY_CONTACT = (1<< 5) , NO_MOVEMENT_RANGE = (1<< 6) , NO_FRICTION = (1<< 7) , SPLIT_ENABLED = (1<< 8) , INSIDE_OBJECT = (1<< 9) , WAS_CONTACT_LAST_TIMESTEP = (1<<10) , PERMANENT_LUMP = (1<<11) , REPLACE_SUPERBEND_WITH_BEND = (1<<12) , LUMPED_NODE = (1<<13) , LUMP_CONTACT = (1<<14) , WW_STABILIZED = (1<<15) } |
| Internal state a node may have. More... | |
| enum | Type { NOT_DEFINED = 0 , EYE = (1<<0) , MISSING = (1<<1) , CONNECTING = (1<<2) , FREE = (1<<3) , CONTACT = (1<<4) , BODY_FIXED = (1<<5) , STOP = (1 << 6) , SHAPE_CONTACT = (1<<7) } |
| The supported node types. More... | |
Public Member Functions | |
| ShapeContactNode () | |
| ShapeContactNode (agxCollide::Shape *shape) | |
| ShapeContactNode (agxCollide::Shape *shape, const agx::Real &wireRadius, const agx::Vec3 &shapeLocalPoint) | |
| const char * | getClassName () const override |
| agx::Real | getEdgeEnd () const |
| agx::Real | getEdgeStart () const |
| agx::Real | getEdgeVelocity () const |
| agx::Real | getExtraLength () const |
| agxCollide::Shape * | getShape () |
| const agxCollide::Shape * | getShape () const |
| ShapeContactEdge & | getShapeContactEdge () |
| const ShapeContactEdge & | getShapeContactEdge () const |
| agx::Vec3 | getShapeEdgeNormal () const |
| agx::Vec3 | getShapeSurfaceNormal () const |
| Get data in shape coordinates. More... | |
| agx::Vec3 | getShapeTranslate () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| virtual agx::Vec3 | getVelocity () const override |
| void | getWorldEdgeEnds (agx::Vec3 &edgeStart, agx::Vec3 &edgeEnd) |
| agx::Vec3 | getWorldEdgeNormal () const |
| agx::Vec3 | getWorldSurfaceNormal () const |
| agx::Bool | handleCylinderContact () |
| Treat special cases where the node shape is a cylinder and hasCylinderContactState() return true. More... | |
| agx::Bool | hasCylinderContactState () const |
| Find out if the node is a cylinder contact. More... | |
| agx::Bool | initialize (const Wire *wire, const Node *prevNode, const Node *nextNode, const agx::Vec3 &surfacePoint) |
| Initialize the node: More... | |
| agx::Bool | isNearClampPosition (const agx::Real &edgeDefaultLength) const |
| void | resetEdgeLength (agx::Real edgeHalfLength) |
| Undo all clamping. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| void | setEdgeVelocity (const agx::Real &vel) |
| set the velocity of the node along it's edge. More... | |
| void | setExtraLength (const agx::Real extraLength) |
| Set the extra lenght of this node this timestep. More... | |
| void | setShapeContactEdge (ShapeContactEdge &shapeContactEdge) |
| Set an edge to the node, containing shape etc. More... | |
| void | setShapeTranslate (const agx::Vec3 &localPos) |
| Update position using a local translate. More... | |
| void | setVelocity (const agx::Vec3 &velocity) |
| Set the velocity of the node in world coordinates. More... | |
| void | setWorldPosition (const agx::Vec3 &worldPosition) |
| Position the node in world coordinates. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| agx::Vec3 & | velocity () |
Public Member Functions inherited from agxWire::EyeNode | |
| EyeNode (agx::RigidBody *rb, agx::Real radius=agx::Real(0)) | |
| Construct a sliding node given a body and a radius. More... | |
| EyeNode (agx::RigidBody *rb, agx::Real relTranslate_x, agx::Real relTranslate_y, agx::Real relTranslate_z, const agx::Vec3 &extraEyeVector=agx::Vec3(), agx::Real radius=agx::Real(0)) | |
| Construct a sliding node given a body, model center offset and a radius. More... | |
| EyeNode (agx::RigidBody *rb, const agx::Vec3 &relativeTranslate, agx::Real radius=agx::Real(0)) | |
| Construct a sliding node given a body, model center offset and a radius. More... | |
| EyeNode (agx::RigidBody *rb, const agx::Vec3 &relativeTranslate, const agx::Vec3 &extraEyeVector, agx::Real radius=agx::Real(0)) | |
| Construct a sliding node given a body, model center offset and a radius. More... | |
| agx::Real | findSpeedAlongWire (const agxWire::Wire *wire) const |
| Calculates the speed in which this eye node travels along a wire. More... | |
| EyeNode * | getChildNode () |
| const EyeNode * | getChildNode () const |
| agx::Real | getDistanceToChild () const |
| bool | getFixFrictionDirection () const |
| EyeNode * | getParentNode () const |
| agx::Real | getRadius () const |
| bool | getReverseAdd () const |
| agx::Vec3 | getVectorToChild () const |
| virtual void | reverse () override |
| Only for internal use! Reverse all direction dependent internal structures. More... | |
| void | setFixFrictionDirection (bool fixFrictionDirection, bool goForward) |
| Assign fixed friction direction for this eye node. More... | |
| void | setRadius (agx::Real radius) |
| Set the radius of this eye node. More... | |
| void | setReverseAdd (bool reverseAdd) |
| If this node has a child node, this parameter controls in which order the nodes (parent and child) gets added/inserted into the wire. More... | |
| void | setVectorToChild (const agx::Vec3 &vec) |
| set the relative translation from this node to its child node (if child present) More... | |
Public Member Functions inherited from agxWire::Node | |
| void | addState (int state) |
| Add state mask to the current state. More... | |
| BodyFixedNode * | getAsBodyFixed () |
| const BodyFixedNode * | getAsBodyFixed () const |
| ConnectingNode * | getAsConnecting () |
| const ConnectingNode * | getAsConnecting () const |
| ContactNode * | getAsContact () |
| const ContactNode * | getAsContact () const |
| EyeNode * | getAsEye () |
| const EyeNode * | getAsEye () const |
| EyeNode * | getAsEyeLineNode () |
| const EyeNode * | getAsEyeLineNode () const |
| FreeNode * | getAsFree () |
| const FreeNode * | getAsFree () const |
| ShapeContactNode * | getAsShapeContact () |
| const ShapeContactNode * | getAsShapeContact () const |
| StopNode * | getAsStop () |
| const StopNode * | getAsStop () const |
| agx::Referenced * | getCustomData () const |
| NodeFrame * | getFrame () |
| const NodeFrame * | getFrame () const |
| HighResolutionRange * | getHighResolutionRange () |
| const HighResolutionRange * | getHighResolutionRange () const |
| bool | getIgnoreBend () const |
| agx::Vec3 | getIntegratedPosition (agx::Real t, bool onlyTranslational=true) const |
| Calculates the position of this node at time t from now. More... | |
| NodeMaterial * | getMaterial () |
| const NodeMaterial * | getMaterial () const |
| NodeFrame & | getNodeFrame () |
| Type | getNodeType () const |
| const agx::Vec3 & | getPosition () const |
| agx::RigidBody * | getRigidBody () const |
| int | getState () const |
| const agx::Vec3 & | getTranslate () const |
| Node::Type | getType () const |
| const agx::Vec3 & | getWorldPosition () const |
| agx::Bool | isType (agx::Int typeMask) const |
| Test several types, e.g., node->isType( agxWire::Node::EYE | agxWire::Node::CONNECTING ). More... | |
| void | removeState (int state) |
| Remove state mask from the current state. More... | |
| void | setCustomData (agx::Referenced *customData) |
| Set custom data to this node. More... | |
| void | setIgnoreBend (bool ignoreBend) |
| Flag if bend constraints should be ignored over this node. More... | |
| void | setTranslate (agx::Real x, agx::Real y, agx::Real z) |
| Set the relative translate of this node in parent frame (body frame if body is set, otherwise world frame) More... | |
| virtual void | setTranslate (const agx::Vec3 &translate) |
| Set the relative translate of this node in parent frame (body frame if body is set, otherwise world frame) More... | |
| void | transform () |
| Transforms the frame. More... | |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. More... | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. More... | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Public Member Functions inherited from agxStream::Serializable | |
| virtual | ~Serializable () |
| Destructor for normal C++ use but hidden from SWIG bindings. More... | |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agx::Uuid | getUuid () const |
| bool | isFinished () const |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
Static Public Member Functions | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static ShapeContactNode * | createFromWorld (agxCollide::Shape *shape, const agx::Real &wireRadius, const agx::Vec3 &surfacePosition, const ShapeCurvature &worldCurvature) |
| static ShapeContactNode * | getAsShapeContact (agxWire::Node *node) |
| static const ShapeContactNode * | getAsShapeContact (const agxWire::Node *node) |
| static const char * | getConstructClassId () |
Static Public Member Functions inherited from agxWire::EyeNode | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static const char * | getConstructClassId () |
Static Public Member Functions inherited from agxWire::Node | |
| static int | findNodeState (const agxCollide::Geometry *geometry) |
| Class used to track nodes when CCD is used. More... | |
| static agx::Bool | isContactType (const Node *node) |
| static agx::Bool | isContactType (const Node::Type &type) |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Public Member Functions inherited from agxStream::Serializable | |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
Protected Member Functions | |
| virtual | ~ShapeContactNode () |
Protected Member Functions inherited from agxWire::EyeNode | |
| EyeNode () | |
| Protected default constructor. More... | |
| EyeNode (Type type, agx::Real radius=agx::Real(0)) | |
| Protected constructor used by other nodes. More... | |
| virtual | ~EyeNode () |
| Destructor. More... | |
| void | create (agx::RigidBody *rb, const agx::Vec3 &relativeTranslate, const agx::Vec3 &extraEyeVector, agx::Real radius) |
| Create method used by all public constructors. More... | |
Protected Member Functions inherited from agxWire::Node | |
| Node () | |
| Default constructor. More... | |
| Node (Type type) | |
| Constructor given general node type. More... | |
| virtual | ~Node () |
| Destructor. More... | |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Member Functions inherited from agxStream::Serializable | |
| Serializable () | |
| Default constructor. More... | |
| Serializable (const Serializable &other) | |
| Copy constructor. More... | |
| void | generateUuid () |
Definition at line 28 of file ShapeContactNode.h.
| Enumerator | |
|---|---|
| NO_ISSUES | |
| PREV_IS_CLOSE | |
| NEXT_IS_CLOSE | |
| PREV_HAS_SAME_NORMAL | |
| NEXT_HAS_SAME_NORMAL | |
| ANGLE_NOT_VALID | |
| NEAR_CLAMP_POSITION | |
| WORTHLESS_MIDDLE_CONTACT | |
| REMOVE_IMEDIATELY | |
| LEAVING_GYPSY | |
Definition at line 37 of file ShapeContactNode.h.
|
strong |
| Enumerator | |
|---|---|
| KEEP | |
| REMOVE | |
| REPLACE | |
| REMOVED | |
Definition at line 32 of file ShapeContactNode.h.
| agxWire::ShapeContactNode::ShapeContactNode | ( | ) |
| agxWire::ShapeContactNode::ShapeContactNode | ( | agxCollide::Shape * | shape | ) |
| agxWire::ShapeContactNode::ShapeContactNode | ( | agxCollide::Shape * | shape, |
| const agx::Real & | wireRadius, | ||
| const agx::Vec3 & | shapeLocalPoint | ||
| ) |
|
protectedvirtual |
|
inlinestatic |
Definition at line 203 of file ShapeContactNode.h.
|
inlinestatic |
Definition at line 203 of file ShapeContactNode.h.
|
static |
|
static |
|
static |
|
inlineoverridevirtual |
Reimplemented from agxWire::EyeNode.
Definition at line 203 of file ShapeContactNode.h.
|
inlinestatic |
Definition at line 203 of file ShapeContactNode.h.
| agx::Real agxWire::ShapeContactNode::getEdgeEnd | ( | ) | const |
| agx::Real agxWire::ShapeContactNode::getEdgeStart | ( | ) | const |
| agx::Real agxWire::ShapeContactNode::getEdgeVelocity | ( | ) | const |
| agx::Real agxWire::ShapeContactNode::getExtraLength | ( | ) | const |
| agxCollide::Shape* agxWire::ShapeContactNode::getShape | ( | ) |
| const agxCollide::Shape* agxWire::ShapeContactNode::getShape | ( | ) | const |
| ShapeContactEdge& agxWire::ShapeContactNode::getShapeContactEdge | ( | ) |
| const ShapeContactEdge& agxWire::ShapeContactNode::getShapeContactEdge | ( | ) | const |
| agx::Vec3 agxWire::ShapeContactNode::getShapeEdgeNormal | ( | ) | const |
| agx::Vec3 agxWire::ShapeContactNode::getShapeSurfaceNormal | ( | ) | const |
Get data in shape coordinates.
| agx::Vec3 agxWire::ShapeContactNode::getShapeTranslate | ( | ) | const |
|
inlineoverridevirtual |
Reimplemented from agxWire::EyeNode.
Definition at line 203 of file ShapeContactNode.h.
|
overridevirtual |
Reimplemented from agxWire::Node.
| agx::Vec3 agxWire::ShapeContactNode::getWorldEdgeNormal | ( | ) | const |
| agx::Vec3 agxWire::ShapeContactNode::getWorldSurfaceNormal | ( | ) | const |
| agx::Bool agxWire::ShapeContactNode::handleCylinderContact | ( | ) |
Treat special cases where the node shape is a cylinder and hasCylinderContactState() return true.
This will force the node edge to either be of zero length, aline with the cylinder axis and/or exist only on the center plane of the cylinder.
| agx::Bool agxWire::ShapeContactNode::hasCylinderContactState | ( | ) | const |
Find out if the node is a cylinder contact.
| agx::Bool agxWire::ShapeContactNode::initialize | ( | const Wire * | wire, |
| const Node * | prevNode, | ||
| const Node * | nextNode, | ||
| const agx::Vec3 & | surfacePoint | ||
| ) |
Initialize the node:
| wire | - the wire of which it is inserted |
| prevNode | - the preceding node |
| nextNode | - the succeeding node |
| surfacePoint | - the world position of the nodes projection to a shape surface (usually found from collision detection) |
| agx::Bool agxWire::ShapeContactNode::isNearClampPosition | ( | const agx::Real & | edgeDefaultLength | ) | const |
| void agxWire::ShapeContactNode::resetEdgeLength | ( | agx::Real | edgeHalfLength | ) |
Undo all clamping.
|
overridevirtual |
Reimplemented from agxWire::EyeNode.
| void agxWire::ShapeContactNode::setEdgeVelocity | ( | const agx::Real & | vel | ) |
set the velocity of the node along it's edge.
| void agxWire::ShapeContactNode::setExtraLength | ( | const agx::Real | extraLength | ) |
Set the extra lenght of this node this timestep.
| void agxWire::ShapeContactNode::setShapeContactEdge | ( | ShapeContactEdge & | shapeContactEdge | ) |
Set an edge to the node, containing shape etc.
| void agxWire::ShapeContactNode::setShapeTranslate | ( | const agx::Vec3 & | localPos | ) |
Update position using a local translate.
| void agxWire::ShapeContactNode::setVelocity | ( | const agx::Vec3 & | velocity | ) |
Set the velocity of the node in world coordinates.
| void agxWire::ShapeContactNode::setWorldPosition | ( | const agx::Vec3 & | worldPosition | ) |
Position the node in world coordinates.
The node will get an updated shape translate
| worldPosition | - wanted world position of the node. |
|
overridevirtual |
Reimplemented from agxWire::EyeNode.
| agx::Vec3& agxWire::ShapeContactNode::velocity | ( | ) |