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

The body fixed node is attached to a body at a given offset. More...

#include <Node.h>

+ Inheritance diagram for agxWire::BodyFixedNode:

Public Member Functions

 BodyFixedNode (agx::RigidBody *rb, agx::Real relTranslate_x, agx::Real relTranslate_y, agx::Real relTranslate_z)
 Construct a body fixed wire node given a rigid body and relative position (rigid body frame).
 
 BodyFixedNode (agx::RigidBody *rb, const agx::Vec3 &relativeTranslate=agx::Vec3())
 Construct a body fixed wire node given a rigid body and relative position (rigid body frame).
 
 AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxWire::BodyFixedNode)
 
- Public Member Functions inherited from agxWire::Node
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 agxStream::Serializablecreate (agxStream::InputArchive &)
 
- Static Public Member Functions inherited from agxWire::Node
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

 BodyFixedNode ()
 Protected default constructor.
 
virtual ~BodyFixedNode ()
 Destructor.
 
void create (agx::RigidBody *rb, const agx::Vec3 &relativeTranslate)
 Create method used by all constructors.
 
- Protected Member Functions inherited from agxWire::Node
 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

agx::Real m_currentLength
 
agx::Real m_restLength
 
- Protected Attributes inherited from agxWire::Node
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

- 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...
 
- 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

The body fixed node is attached to a body at a given offset.

If the body is 0, this node type will be attached in world.

Note
Is it not defined to have this node type in the middle of a wire. I.e., as a user, it is only valid to have this node at the beginning and/or at end of a wire.
This node type is used by the wire as mass/lumped nodes. The lumped nodes has a flag isLumpedNode() == true.

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

Constructor & Destructor Documentation

◆ BodyFixedNode() [1/3]

agxWire::BodyFixedNode::BodyFixedNode ( agx::RigidBody rb,
const agx::Vec3 relativeTranslate = agx::Vec3() 
)

Construct a body fixed wire node given a rigid body and relative position (rigid body frame).

Parameters
rb- rigid body this body fixed node belongs to (if 0, relativeTranslate is relative world frame)
relativeTranslate- position of this node given in local coordinate system (default: At model center)

◆ BodyFixedNode() [2/3]

agxWire::BodyFixedNode::BodyFixedNode ( agx::RigidBody rb,
agx::Real  relTranslate_x,
agx::Real  relTranslate_y,
agx::Real  relTranslate_z 
)

Construct a body fixed wire node given a rigid body and relative position (rigid body frame).

Parameters
rb- rigid body this body fixed node belongs to
relTranslate_x- x position of this node given in local coordinate system
relTranslate_y- x position of this node given in local coordinate system
relTranslate_z- x position of this node given in local coordinate system

◆ BodyFixedNode() [3/3]

agxWire::BodyFixedNode::BodyFixedNode ( )
protected

Protected default constructor.

◆ ~BodyFixedNode()

virtual agxWire::BodyFixedNode::~BodyFixedNode ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ AGXSTREAM_DECLARE_SERIALIZABLE_BASE()

agxWire::BodyFixedNode::AGXSTREAM_DECLARE_SERIALIZABLE_BASE ( agxWire::BodyFixedNode  )

◆ create() [1/2]

void agxWire::BodyFixedNode::create ( agx::RigidBody rb,
const agx::Vec3 relativeTranslate 
)
protected

Create method used by all constructors.

◆ create() [2/2]

static agxStream::Serializable * agxWire::BodyFixedNode::create ( agxStream::InputArchive )
inlinestatic

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

Member Data Documentation

◆ m_currentLength

agx::Real agxWire::BodyFixedNode::m_currentLength
protected

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

◆ m_restLength

agx::Real agxWire::BodyFixedNode::m_restLength
protected

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


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