|
AGXDynamics
2.31.1.0
|
#include <ShapeContactNode.h>
Inheritance diagram for agxWire::ShapeContactNode:Public Member Functions | |
| ShapeContactNode () | |
| ShapeContactNode (agxCollide::Shape *shape) | |
| ShapeContactNode (agxCollide::Shape *shape, const agx::Real &wireRadius, const agx::Vec3 &shapeLocalPoint) | |
| void | addState (int state) |
| Add state mask to the current state. More... | |
| 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 |
| agx::Real | findSpeedAlongWire (const agxWire::Wire *wire) const |
| Calculates the speed in which this eye node travels along a wire. 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 |
| const ShapeContactNode * | getAsShapeContact () const |
| ShapeContactNode * | getAsShapeContact () |
| StopNode * | getAsStop () |
| const StopNode * | getAsStop () const |
| EyeNode * | getChildNode () |
| const EyeNode * | getChildNode () const |
| const char * | getClassName () const override |
| agx::Referenced * | getCustomData () const |
| agx::Real | getDistanceToChild () const |
| agx::Real | getEdgeEnd () const |
| agx::Real | getEdgeStart () const |
| agx::Real | getEdgeVelocity () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::Real | getExtraLength () const |
| bool | getFixFrictionDirection () const |
| NodeFrame * | getFrame () |
| const NodeFrame * | getFrame () const |
| HighResolutionRange * | getHighResolutionRange () |
| const HighResolutionRange * | getHighResolutionRange () const |
| bool | getIgnoreBend () const |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| 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 |
| EyeNode * | getParentNode () const |
| const agx::Vec3 & | getPosition () const |
| agx::Real | getRadius () const |
| int | getReferenceCount () const |
| bool | getReverseAdd () const |
| agx::RigidBody * | getRigidBody () const |
| const agxCollide::Shape * | getShape () const |
| agxCollide::Shape * | getShape () |
| ShapeContactEdge & | getShapeContactEdge () |
| const ShapeContactEdge & | getShapeContactEdge () const |
| agx::Vec3 | getShapeEdgeNormal () const |
| agx::Vec3 | getShapeSurfaceNormal () const |
| Get data in shape coordinates. More... | |
| agx::Vec3 | getShapeTranslate () const |
| int | getState () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| const agx::Vec3 & | getTranslate () const |
| Node::Type | getType () const |
| agx::Uuid | getUuid () const |
| agx::Vec3 | getVectorToChild () const |
| virtual agx::Vec3 | getVelocity () const override |
| void | getWorldEdgeEnds (agx::Vec3 &edgeStart, agx::Vec3 &edgeEnd) |
| agx::Vec3 | getWorldEdgeNormal () const |
| const agx::Vec3 & | getWorldPosition () 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... | |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isFinished () const |
| agx::Bool | isNearClampPosition (const agx::Real &edgeDefaultLength) const |
| agx::Bool | isType (agx::Int typeMask) const |
| Test several types, e.g., node->isType( agxWire::Node::EYE | agxWire::Node::CONNECTING ). 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 | removeState (int state) |
| Remove state mask from the current state. More... | |
| void | resetEdgeLength (agx::Real edgeHalfLength) |
| Undo all clamping. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | reverse () override |
| Only for internal use! Reverse all direction dependent internal structures. More... | |
| void | setCustomData (agx::Referenced *customData) |
| Set custom data to this node. More... | |
| void | setEdgeVelocity (const agx::Real &vel) |
| set the velocity of the node along it's edge. More... | |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setExtraLength (const agx::Real extraLength) |
| Set the extra lenght of this node this timestep. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setFixFrictionDirection (bool fixFrictionDirection, bool goForward) |
| Assign fixed friction direction for this eye node. More... | |
| void | setIgnoreBend (bool ignoreBend) |
| Flag if bend constraints should be ignored over this 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 | 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... | |
| 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 | 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... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| void | setVectorToChild (const agx::Vec3 &vec) |
| set the relative translation from this node to its child node (if child present) 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 |
| void | transform () |
| Transforms the frame. 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... | |
| agx::Vec3 & | velocity () |
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 int | findNodeState (const agxCollide::Geometry *geometry) |
| Class used to track nodes when CCD is used. More... | |
| static ShapeContactNode * | getAsShapeContact (agxWire::Node *node) |
| static const ShapeContactNode * | getAsShapeContact (const agxWire::Node *node) |
| static const char * | getConstructClassId () |
| static agx::Bool | isContactType (const Node *node) |
| static agx::Bool | isContactType (const Node::Type &type) |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| virtual | ~ShapeContactNode () |
| void | allocateObserverVector () const |
| void | create (agx::RigidBody *rb, const agx::Vec3 &relativeTranslate, const agx::Vec3 &extraEyeVector, agx::Real radius) |
| Create method used by all public constructors. More... | |
| void | deleteUsingDeleteHandler () const |
| void | generateUuid () |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes | |
| BodyFixedNode * | m_bodyFixed |
| agx::ref_ptr< EyeNode > | m_childNode |
| ConnectingNode * | m_connecting |
| ContactNode * | m_contact |
| ContactForce | m_contactForce |
| agx::ref_ptr< agx::Referenced > | m_customData |
| EyeNode * | m_eye |
| FreeNode * | m_free |
| HighResolutionRange | m_highResolutionRange |
| NodeMaterial | m_material |
| Mutex | m_mutex |
| NodeFrame | m_nf |
| int | m_nodeState |
| agx::Vec3 | m_normal |
| ObserverContainer | m_observers |
| agx::observer_ptr< Node > | m_parent |
| agx::Real | m_radius |
| AtomicValue | m_refCount |
| bool | m_reverseAdd |
| ShapeContactNode * | m_shapeContact |
| SpatialState | m_spatialState |
| StopNode * | m_stop |
| StoreRestoreData | m_storeRestoreData |
| Tension | m_tension |
| Type | m_type |
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 | |
Definition at line 37 of file ShapeContactNode.h.
|
strong |
| Enumerator | |
|---|---|
| KEEP | |
| REMOVE | |
| REPLACE | |
Definition at line 32 of file ShapeContactNode.h.
|
inherited |
Internal state a node may have.
Definition at line 535 of file agxWire/Node.h.
|
inherited |
The supported node types.
| Enumerator | |
|---|---|
| NOT_DEFINED |
Default type is undefined. |
| EYE |
Eye nodes are nodes that slides along the wire. |
| MISSING |
Node not used. |
| CONNECTING |
Connecting nodes contains two nodes, one at center of mass and the other at the user defined position. Used to handle heavy loads and carries special constraints for stability. |
| FREE |
Free nodes are used to route the wire. |
| CONTACT |
Contact nodes may appear during contact with other objects. |
| BODY_FIXED |
Body fixed node has a fixed position relative a parent (body or world). |
| STOP |
Stop nodes are an internal node used round winches. |
| SHAPE_CONTACT |
Stop nodes are an internal node used round winches. |
Definition at line 517 of file agxWire/Node.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 |
|
inherited |
Add state mask to the current state.
| state | - state to add |
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
inlinestatic |
Definition at line 202 of file ShapeContactNode.h.
|
inlinestatic |
Definition at line 202 of file ShapeContactNode.h.
|
protectedinherited |
Create method used by all public constructors.
| rb | - the body |
| relativeTranslate | - model frame offset |
| extraEyeVector | - if |v| > 0 an extra eye will be created |
| radius | - radius |
|
static |
|
protectedinherited |
|
staticinherited |
Class used to track nodes when CCD is used.
Finds initial node state given geometry.
| geometry | - the geometry |
|
inherited |
Calculates the speed in which this eye node travels along a wire.
| wire | - the wire containing this eye node |
|
protectedinherited |
|
inherited |
Definition at line 2129 of file agxWire/Node.h.
|
inherited |
Definition at line 2134 of file agxWire/Node.h.
|
inherited |
Definition at line 2149 of file agxWire/Node.h.
|
inherited |
Definition at line 2154 of file agxWire/Node.h.
|
inherited |
Definition at line 2169 of file agxWire/Node.h.
|
inherited |
Definition at line 2174 of file agxWire/Node.h.
|
inherited |
Definition at line 2139 of file agxWire/Node.h.
|
inherited |
Definition at line 2144 of file agxWire/Node.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
static |
|
static |
|
inherited |
Definition at line 2179 of file agxWire/Node.h.
|
inherited |
Definition at line 2184 of file agxWire/Node.h.
|
inherited |
Definition at line 2159 of file agxWire/Node.h.
|
inherited |
Definition at line 2164 of file agxWire/Node.h.
|
inherited |
|
inherited |
|
inlineoverridevirtual |
Reimplemented from agxWire::EyeNode.
Definition at line 202 of file ShapeContactNode.h.
|
inlinestatic |
Definition at line 202 of file ShapeContactNode.h.
|
inherited |
|
staticprotectedinherited |
|
inherited |
| agx::Real agxWire::ShapeContactNode::getEdgeEnd | ( | ) | const |
| agx::Real agxWire::ShapeContactNode::getEdgeStart | ( | ) | const |
| agx::Real agxWire::ShapeContactNode::getEdgeVelocity | ( | ) | const |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
| agx::Real agxWire::ShapeContactNode::getExtraLength | ( | ) | const |
|
inherited |
|
inherited |
Definition at line 2109 of file agxWire/Node.h.
Referenced by agxWire::findPointOnWire().
|
inherited |
Definition at line 2114 of file agxWire/Node.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.h.
|
inherited |
Calculates the position of this node at time t from now.
| t | - delta time from now |
| onlyTranslational | - if true (default) the angular velocity of the body will not be taken into account |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 2124 of file agxWire/Node.h.
| const agxCollide::Shape* agxWire::ShapeContactNode::getShape | ( | ) | const |
| agxCollide::Shape* agxWire::ShapeContactNode::getShape | ( | ) |
| 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 |
|
inherited |
|
inlineoverridevirtual |
Reimplemented from agxWire::EyeNode.
Definition at line 202 of file ShapeContactNode.h.
|
inherited |
|
inherited |
Definition at line 2099 of file agxWire/Node.h.
|
inherited |
Definition at line 268 of file Serializable.h.
|
inherited |
|
overridevirtual |
Reimplemented from agxWire::Node.
| agx::Vec3 agxWire::ShapeContactNode::getWorldEdgeNormal | ( | ) | const |
|
inherited |
Definition at line 2119 of file agxWire/Node.h.
| 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) |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
|
staticinherited |
|
inherited |
Definition at line 252 of file Serializable.h.
| agx::Bool agxWire::ShapeContactNode::isNearClampPosition | ( | const agx::Real & | edgeDefaultLength | ) | const |
Test several types, e.g., node->isType( agxWire::Node::EYE | agxWire::Node::CONNECTING ).
Definition at line 2104 of file agxWire/Node.h.
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
Referenced by agxData::Val< UInt >::Val().
|
inherited |
Remove state mask from the current state.
| state | - state to remove |
|
overridevirtual |
Reimplemented from agxWire::EyeNode.
|
overridevirtualinherited |
Only for internal use! Reverse all direction dependent internal structures.
Reimplemented from agxWire::Node.
|
inherited |
Set custom data to this node.
| customData | - custom data |
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
set the velocity of the node along it's edge.
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
Set the extra lenght of this node this timestep.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
|
inherited |
Assign fixed friction direction for this eye node.
This is usually used for eye nodes with infinite friction.
| fixFrictionDirection | - true to enable fixed friction direction |
| goForward | - true if the friction constraints should be attached before this node, false means after |
|
inherited |
Flag if bend constraints should be ignored over this node.
Set the radius of this eye node.
| radius | - new radius (default 0) |
|
inherited |
If this node has a child node, this parameter controls in which order the nodes (parent and child) gets added/inserted into the wire.
Default is that the parent node gets added before the child node.
| reverseAdd | - if true, this child node will be added/inserted before the parent node |
| void agxWire::ShapeContactNode::setShapeContactEdge | ( | ShapeContactEdge & | shapeContactEdge | ) |
Set an edge to the node, containing shape etc.
Update position using a local translate.
Set the relative translate of this node in parent frame (body frame if body is set, otherwise world frame)
Reimplemented in agxWire::ContactNode.
Set the relative translate of this node in parent frame (body frame if body is set, otherwise world frame)
Explicitly set a Uuid on a serializable object.
Use this method with great care, as it can result in non-unique identifiers in the system!
set the relative translation from this node to its child node (if child present)
Set the velocity of the node in world coordinates.
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.
|
inherited |
Transforms the frame.
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
staticinherited |
| agx::Vec3& agxWire::ShapeContactNode::velocity | ( | ) |
|
protectedinherited |
Definition at line 1141 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1543 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1143 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1145 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1136 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1138 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1142 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1140 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1132 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1133 of file agxWire/Node.h.
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
protectedinherited |
Definition at line 1130 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1134 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1546 of file agxWire/Node.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
protectedinherited |
Definition at line 1151 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1545 of file agxWire/Node.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
protectedinherited |
Definition at line 1544 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1146 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1149 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1144 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1148 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1135 of file agxWire/Node.h.
|
protectedinherited |
Definition at line 1131 of file agxWire/Node.h.