AGX Dynamics 2.41.3.0
Loading...
Searching...
No Matches
agxWire::Node Class Reference

Class defining a node that is part of a wire. More...

#include <Node.h>

+ Inheritance diagram for agxWire::Node:

Public Types

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

void addState (int state)
 Add state mask to the current state.
 
BodyFixedNodegetAsBodyFixed ()
 
const BodyFixedNodegetAsBodyFixed () const
 
ConnectingNodegetAsConnecting ()
 
const ConnectingNodegetAsConnecting () const
 
ContactNodegetAsContact ()
 
const ContactNodegetAsContact () const
 
EyeNodegetAsEye ()
 
const EyeNodegetAsEye () const
 
EyeNodegetAsEyeLineNode ()
 
const EyeNodegetAsEyeLineNode () const
 
FreeNodegetAsFree ()
 
const FreeNodegetAsFree () const
 
ShapeContactNodegetAsShapeContact ()
 
const ShapeContactNodegetAsShapeContact () const
 
StopNodegetAsStop ()
 
const StopNodegetAsStop () const
 
agx::ReferencedgetCustomData () const
 
NodeFramegetFrame ()
 
const NodeFramegetFrame () const
 
HighResolutionRangegetHighResolutionRange ()
 
const HighResolutionRangegetHighResolutionRange () 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.
 
NodeMaterialgetMaterial ()
 
const NodeMaterialgetMaterial () const
 
NodeFramegetNodeFrame ()
 
Type getNodeType () const
 
const agx::Vec3getPosition () const
 
agx::RigidBodygetRigidBody () const
 
int getState () const
 
const agx::Vec3getTranslate () const
 
Node::Type getType () const
 
virtual agx::Vec3 getVelocity () const
 
const agx::Vec3getWorldPosition () const
 
agx::Bool isType (agx::Int typeMask) const
 Test several types, e.g., node->isType( agxWire::Node::EYE | agxWire::Node::CONNECTING ).
 
void removeState (int state)
 Remove state mask from the current state.
 
virtual void reverse ()
 Only for internal use! Reverses all, internal, direction dependent structures.
 
void setCustomData (agx::Referenced *customData)
 Set custom data to this node.
 
void setIgnoreBend (bool ignoreBend)
 Flag if bend constraints should be ignored over this node.
 
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)
 
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)
 
void transform ()
 Transforms the frame.
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referencedoperator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings.
 
virtual const char * getClassName () const
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object.
 
virtual StorageAgent * getStorageAgent () const =0
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object.
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object.
 

Static Public Member Functions

static int findNodeState (const agxCollide::Geometry *geometry)
 Class used to track nodes when CCD is used.
 
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.
 

Protected Member Functions

 Node ()
 Default constructor.
 
 Node (Type type)
 Constructor given general node type.
 
virtual ~Node ()
 Destructor.
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor.
 
 Serializable (const Serializable &other)
 Copy constructor.
 
void generateUuid ()
 

Protected Attributes

BodyFixedNodem_bodyFixed
 
ConnectingNodem_connecting
 
ContactNodem_contact
 
ContactForce m_contactForce
 
agx::ref_ptr< agx::Referencedm_customData
 
EyeNodem_eye
 
FreeNodem_free
 
HighResolutionRange m_highResolutionRange
 
NodeMaterial m_material
 
NodeFrame m_nf
 
int m_nodeState
 
agx::observer_ptr< Nodem_parent
 
ShapeContactNodem_shapeContact
 
SpatialState m_spatialState
 
StopNodem_stop
 
StoreRestoreData m_storeRestoreData
 
Tension m_tension
 
Type m_type
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Additional Inherited Members

- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandlergetDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 

Detailed Description

Class defining a node that is part of a wire.

Definition at line 511 of file agxWire/Node.h.

Member Enumeration Documentation

◆ StateInfo

Internal state a node may have.

Enumerator
STANDARD 

Default state.

WAS_CONTACT 

If this node was a contact, it may live independent of the resolution.

IS_HIGH_RES 

States if this node is a high resolution node.

IGNORE_BEND 

States if the bend constraint should be forced to be disable over this node.

NO_LUMP_NEAR 

If set, lumped/mass elements may not be closer than a predefined distance.

NO_CIRCLE_CONTACT 

States if this node can live on a circle (e.g., disc area on a cylinder).

GYPSY_CONTACT 

Internal state.

NO_MOVEMENT_RANGE 

States if this node can move along a contact edge or not.

NO_FRICTION 

No friction constraints may be created from this node.

SPLIT_ENABLED 

Internal state.

If set, this node splits the wire.

INSIDE_OBJECT 

Internal state.

WAS_CONTACT_LAST_TIMESTEP 

If this node was contact last time step, it may not be removed for stability reasons.

PERMANENT_LUMP 

This node has a permanent position in the wire and can not be removed by the wire it self.

REPLACE_SUPERBEND_WITH_BEND 

Internal state.

LUMPED_NODE 

Set if this node is an internal mass node of a wire.

LUMP_CONTACT 

Internal state.

WW_STABILIZED 

Internal state.

Definition at line 535 of file agxWire/Node.h.

◆ Type

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.

Constructor & Destructor Documentation

◆ Node() [1/2]

agxWire::Node::Node ( Type  type)
protected

Constructor given general node type.

◆ Node() [2/2]

agxWire::Node::Node ( )
protected

Default constructor.

◆ ~Node()

virtual agxWire::Node::~Node ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ addState()

void agxWire::Node::addState ( int  state)

Add state mask to the current state.

Parameters
state- state to add

◆ findNodeState()

static int agxWire::Node::findNodeState ( const agxCollide::Geometry geometry)
static

Class used to track nodes when CCD is used.

Finds initial node state given geometry.

Parameters
geometry- the geometry
Returns
the node state

◆ getAsBodyFixed() [1/2]

BodyFixedNode * agxWire::Node::getAsBodyFixed ( )
Returns
this node as a body fixed node (0 if this isn't a body fixed node)

Definition at line 2129 of file agxWire/Node.h.

◆ getAsBodyFixed() [2/2]

const BodyFixedNode * agxWire::Node::getAsBodyFixed ( ) const
Returns
this node as a body fixed node (0 if this isn't a body fixed node)

Definition at line 2134 of file agxWire/Node.h.

◆ getAsConnecting() [1/2]

ConnectingNode * agxWire::Node::getAsConnecting ( )
Returns
this node as connecting node (0 if this isn't a connecting node)

Definition at line 2149 of file agxWire/Node.h.

◆ getAsConnecting() [2/2]

const ConnectingNode * agxWire::Node::getAsConnecting ( ) const
Returns
this node as connecting node (0 if this isn't a connecting node)

Definition at line 2154 of file agxWire/Node.h.

◆ getAsContact() [1/2]

ContactNode * agxWire::Node::getAsContact ( )
Returns
this node as a contact node (0 if this isn't a contact node)

Definition at line 2169 of file agxWire/Node.h.

◆ getAsContact() [2/2]

const ContactNode * agxWire::Node::getAsContact ( ) const
Returns
this node as a contact node (0 if this isn't a contact node)

Definition at line 2174 of file agxWire/Node.h.

◆ getAsEye() [1/2]

EyeNode * agxWire::Node::getAsEye ( )
Returns
this node as eye node (0 if this isn't an eye node)

Definition at line 2139 of file agxWire/Node.h.

◆ getAsEye() [2/2]

const EyeNode * agxWire::Node::getAsEye ( ) const
Returns
this node as eye node (0 if this isn't an eye node)

Definition at line 2144 of file agxWire/Node.h.

◆ getAsEyeLineNode() [1/2]

EyeNode * agxWire::Node::getAsEyeLineNode ( )
Deprecated:
Deprecated interface.
Returns
node as eye node (0 if this isn't an eye node)

◆ getAsEyeLineNode() [2/2]

const EyeNode * agxWire::Node::getAsEyeLineNode ( ) const
Deprecated:
Deprecated interface.
Returns
node as eye node (0 if this isn't an eye node)

◆ getAsFree() [1/2]

FreeNode * agxWire::Node::getAsFree ( )
Returns
this node as free node (0 if this isn't an free node)

◆ getAsFree() [2/2]

const FreeNode * agxWire::Node::getAsFree ( ) const
Returns
this node as free node (0 if this isn't an free node)

◆ getAsShapeContact() [1/2]

ShapeContactNode * agxWire::Node::getAsShapeContact ( )
Returns
this node as a shape contact node (0 if this isn't a contact node)

Definition at line 2184 of file agxWire/Node.h.

◆ getAsShapeContact() [2/2]

const ShapeContactNode * agxWire::Node::getAsShapeContact ( ) const
Returns
this node as a shape contact node (0 if this isn't a contact node)

Definition at line 2179 of file agxWire/Node.h.

◆ getAsStop() [1/2]

StopNode * agxWire::Node::getAsStop ( )
Returns
this node as a stop node (0 if this isn't a stop node)

Definition at line 2159 of file agxWire/Node.h.

◆ getAsStop() [2/2]

const StopNode * agxWire::Node::getAsStop ( ) const
Returns
this node as a stop node (0 if this isn't a stop node)

Definition at line 2164 of file agxWire/Node.h.

◆ getCustomData()

agx::Referenced * agxWire::Node::getCustomData ( ) const
Returns
custom data

◆ getFrame() [1/2]

NodeFrame * agxWire::Node::getFrame ( )
Returns
this nodes frame

Definition at line 2109 of file agxWire/Node.h.

Referenced by agxWire::findPointOnWire().

◆ getFrame() [2/2]

const NodeFrame * agxWire::Node::getFrame ( ) const
Returns
this nodes frame

Definition at line 2114 of file agxWire/Node.h.

◆ getHighResolutionRange() [1/2]

HighResolutionRange * agxWire::Node::getHighResolutionRange ( )
Returns
the high resolution range to control dynamic, or variable, node density in a wire

◆ getHighResolutionRange() [2/2]

const HighResolutionRange * agxWire::Node::getHighResolutionRange ( ) const
Returns
the high resolution range to control dynamic, or variable, node density in a wire

◆ getIgnoreBend()

bool agxWire::Node::getIgnoreBend ( ) const
Returns
true if bend should be ignored over this node

◆ getIntegratedPosition()

agx::Vec3 agxWire::Node::getIntegratedPosition ( agx::Real  t,
bool  onlyTranslational = true 
) const

Calculates the position of this node at time t from now.

Parameters
t- delta time from now
onlyTranslational- if true (default) the angular velocity of the body will not be taken into account
Returns
the world position of this node at current time + t
Note
The position gets less and less accurate for delta times larger than the time step.

◆ getMaterial() [1/2]

NodeMaterial * agxWire::Node::getMaterial ( )
Returns
the material

◆ getMaterial() [2/2]

const NodeMaterial * agxWire::Node::getMaterial ( ) const
Returns
the material

◆ getNodeFrame()

NodeFrame & agxWire::Node::getNodeFrame ( )
Deprecated:
Deprecated interface.
See also
getFrame
Returns
this nodes frame

◆ getNodeType()

Type agxWire::Node::getNodeType ( ) const
Deprecated:
Deprecated interface.
See also
getType
Returns
the type of this node

◆ getPosition()

const agx::Vec3 & agxWire::Node::getPosition ( ) const
Deprecated:
Deprecated interface.

◆ getRigidBody()

agx::RigidBody * agxWire::Node::getRigidBody ( ) const
Returns
rigid body (0 if none) of this node

Definition at line 2124 of file agxWire/Node.h.

◆ getState()

int agxWire::Node::getState ( ) const
Returns
the current state mask

◆ getTranslate()

const agx::Vec3 & agxWire::Node::getTranslate ( ) const
Returns
the original relative translate in the parent frame (if no body, world frame otherwise body frame)

◆ getType()

Node::Type agxWire::Node::getType ( ) const
Returns
the type of this node

Definition at line 2099 of file agxWire/Node.h.

◆ getVelocity()

virtual agx::Vec3 agxWire::Node::getVelocity ( ) const
virtual
Returns
the velocity of this node

Reimplemented in agxWire::ShapeContactNode.

◆ getWorldPosition()

const agx::Vec3 & agxWire::Node::getWorldPosition ( ) const
Returns
the world position of this node

Definition at line 2119 of file agxWire/Node.h.

◆ isContactType() [1/2]

static agx::Bool agxWire::Node::isContactType ( const Node node)
static

◆ isContactType() [2/2]

static agx::Bool agxWire::Node::isContactType ( const Node::Type type)
static

◆ isType()

agx::Bool agxWire::Node::isType ( agx::Int  typeMask) const

Test several types, e.g., node->isType( agxWire::Node::EYE | agxWire::Node::CONNECTING ).

Returns
true if the type mask matches this nodes type

Definition at line 2104 of file agxWire/Node.h.

◆ removeState()

void agxWire::Node::removeState ( int  state)

Remove state mask from the current state.

Parameters
state- state to remove

◆ reverse()

virtual void agxWire::Node::reverse ( )
virtual

Only for internal use! Reverses all, internal, direction dependent structures.

Reimplemented in agxWire::EyeNode.

◆ setCustomData()

void agxWire::Node::setCustomData ( agx::Referenced customData)

Set custom data to this node.

Parameters
customData- custom data

◆ setIgnoreBend()

void agxWire::Node::setIgnoreBend ( bool  ignoreBend)

Flag if bend constraints should be ignored over this node.

◆ setTranslate() [1/2]

void agxWire::Node::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)

◆ setTranslate() [2/2]

virtual void agxWire::Node::setTranslate ( const agx::Vec3 translate)
virtual

Set the relative translate of this node in parent frame (body frame if body is set, otherwise world frame)

Reimplemented in agxWire::ContactNode.

◆ transform()

void agxWire::Node::transform ( )

Transforms the frame.

Member Data Documentation

◆ m_bodyFixed

BodyFixedNode* agxWire::Node::m_bodyFixed
protected

Definition at line 1141 of file agxWire/Node.h.

◆ m_connecting

ConnectingNode* agxWire::Node::m_connecting
protected

Definition at line 1143 of file agxWire/Node.h.

◆ m_contact

ContactNode* agxWire::Node::m_contact
protected

Definition at line 1145 of file agxWire/Node.h.

◆ m_contactForce

ContactForce agxWire::Node::m_contactForce
protected

Definition at line 1136 of file agxWire/Node.h.

◆ m_customData

agx::ref_ptr< agx::Referenced > agxWire::Node::m_customData
protected

Definition at line 1138 of file agxWire/Node.h.

◆ m_eye

EyeNode* agxWire::Node::m_eye
protected

Definition at line 1142 of file agxWire/Node.h.

◆ m_free

FreeNode* agxWire::Node::m_free
protected

Definition at line 1140 of file agxWire/Node.h.

◆ m_highResolutionRange

HighResolutionRange agxWire::Node::m_highResolutionRange
protected

Definition at line 1132 of file agxWire/Node.h.

◆ m_material

NodeMaterial agxWire::Node::m_material
protected

Definition at line 1133 of file agxWire/Node.h.

◆ m_nf

NodeFrame agxWire::Node::m_nf
protected

Definition at line 1130 of file agxWire/Node.h.

◆ m_nodeState

int agxWire::Node::m_nodeState
protected

Definition at line 1134 of file agxWire/Node.h.

◆ m_parent

agx::observer_ptr< Node > agxWire::Node::m_parent
protected

Definition at line 1151 of file agxWire/Node.h.

◆ m_shapeContact

ShapeContactNode* agxWire::Node::m_shapeContact
protected

Definition at line 1146 of file agxWire/Node.h.

◆ m_spatialState

SpatialState agxWire::Node::m_spatialState
protected

Definition at line 1149 of file agxWire/Node.h.

◆ m_stop

StopNode* agxWire::Node::m_stop
protected

Definition at line 1144 of file agxWire/Node.h.

◆ m_storeRestoreData

StoreRestoreData agxWire::Node::m_storeRestoreData
protected

Definition at line 1148 of file agxWire/Node.h.

◆ m_tension

Tension agxWire::Node::m_tension
protected

Definition at line 1135 of file agxWire/Node.h.

◆ m_type

Type agxWire::Node::m_type
protected

Definition at line 1131 of file agxWire/Node.h.


The documentation for this class was generated from the following file: