58 ROTATE_TO_NODE_DIRECTION
92 void store(
agxStream::OutputArchive& out) const override;
93 void restore(
agxStream::InputArchive& in) override;
105 virtual
agx::ConstraintRef createConstraint(
106 agx::RigidBodyRef body1,
agx::FrameRef frame1,
107 agx::RigidBodyRef body2,
agx::FrameRef frame2) const = 0;
113 agx::FrameRef m_bodyAttachmentFrame;
114 agx::ConstraintRef m_constraint;
169 return new T(body1, frame1, body2, frame2);
192 using agxCable::SegmentAttachment::restore;
218 using agxCable::SegmentAttachment::restore;
230 const
agx::Vec3& worldPoint,
agx::RigidBody* body)
232 agx::Vec3 localPoint = body !=
nullptr ? body->getFrame()->transformPointToLocal(worldPoint) : worldPoint;
233 return createFromBody<T>(localPoint, body);
242 return new T(body, bodyPoint);
253 return createFromBody<T>(localTransform, body);
262 return new T(body, bodyTransform);
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGX_DECLARE_VECTOR_TYPES(type)
A CableSegment represents a single link of a cable.
PointSegmentAttachment(agx::RigidBody *body, const agx::Vec3 &relativeTranslate)
RigidSegmentAttachment(agx::RigidBody *body, const agx::Vec3 &relativeTranslate)
RigidSegmentAttachment(agx::RigidBody *body, const agx::AffineMatrix4x4 &relativeTransform)
Helper class to create give type of constraint for the different SegmentAttachments.
virtual agx::ConstraintRef createConstraint(agx::RigidBodyRef body1, agx::FrameRef frame1, agx::RigidBodyRef body2, agx::FrameRef frame2) const override
SegmentAttachmentT(agx::RigidBody *body, agx::Frame *rbSegmentAttachmentFrame, agxCable::SegmentAttachment::InitializationMode initMode)
Construct given rigid body and a relative frame.
SegmentAttachmentT()
Default constructor for serialization.
virtual ~SegmentAttachmentT()
Reference counted object, protected destructor.
SegmentAttachmentT(const agx::Name &name, agx::RigidBody *body, agx::Frame *bodyAttachmentFrame, agx::Constraint *constraint, agxCable::SegmentAttachment::InitializationMode initMode)
static agxCable::SegmentAttachmentRef createFromWorld(const agx::Vec3 &worldPoint, agx::RigidBody *body)
void setName(const agx::Name &name)
agx::Frame * getFrame() const
agx::AffineMatrix4x4 getWorldMatrix() const
const agx::Name & getName() const
InitializationMode
Each SegmentAttachment implementation controls the initialization mode.
static agxCable::SegmentAttachmentRef createFromBody(const agx::Vec3 &bodyPoint, agx::RigidBody *body)
agx::Constraint * getConstraint() const
agx::RigidBody * getRigidBody() const
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
AffineMatrix4x4T< T > inverse() const
Quick inverse, transpose rotation part, and change sign of translation part.
The base class for a constraint.
The object defining a frame of reference and providing transformations operations.
Representation of a name string.
Base class providing referencing counted objects.
The rigid body class, combining a geometric model and a frame of reference.
const agx::AffineMatrix4x4 & getTransform() const
Current model frame transform, given in world coordinate frame.
Smart pointer for handling referenced counted objects.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
Contain classes for 6 DOF lumped element cables/wires/ropes.
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.