58 ROTATE_TO_NODE_DIRECTION
92 void store(agxStream::OutputArchive&
out) const override;
93 void restore(agxStream::InputArchive&
in) override;
97 SegmentAttachment(agx::RigidBody* body, agx::Frame* rbSegmentAttachmentFrame,
98 agxCable::SegmentAttachment::InitializationMode initMode);
100 SegmentAttachment(const agx::Name& name, agx::RigidBody* body, agx::Frame* bodyAttachmentFrame,
101 agx::Constraint* constraint, InitializationMode initMode);
103 virtual ~SegmentAttachment();
137 : SegmentAttachment(body, rbSegmentAttachmentFrame, initMode)
146 : SegmentAttachment(nullptr, nullptr, agxCable::SegmentAttachment::ROTATE_TO_NODE_DIRECTION)
153 : SegmentAttachment(name, body, bodyAttachmentFrame, constraint, initMode)
169 return new T(body1, frame1, body2, frame2);
192 using agxCable::SegmentAttachment::restore;
218 using agxCable::SegmentAttachment::restore;
233 return createFromBody<T>(localPoint, body);
242 return new T(body, bodyPoint);
253 return createFromBody<T>(localTransform, body);
262 return new T(body, bodyTransform);
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
static agxCable::SegmentAttachmentRef createFromWorld(const agx::Vec3 &worldPoint, agx::RigidBody *body)
static agxCable::SegmentAttachmentRef createFromBody(const agx::Vec3 &bodyPoint, agx::RigidBody *body)
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive...
agx::Frame * getFrame()
Returns the model frame containing model the transformation and utilities to manipulate position...
agx::ref_ptr< Frame > FrameRef
Helper class to create give type of constraint for the different SegmentAttachments.
The base class for a constraint.
#define AGX_DECLARE_POINTER_TYPES(type)
Representation of a name string.
AffineMatrix4x4T< T > inverse() const
Quick inverse, transpose rotation part, and change sign of translation part.
Base class providing referencing counted objects.
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)
agx::ref_ptr< Constraint > ConstraintRef
A CableSegment represents a single link of a cable.
const agx::AffineMatrix4x4 & getTransform() const
Current model frame transform, given in world coordinate frame.
Smart pointer for handling referenced counted objects.
InitializationMode
Each SegmentAttachment implementation controls the initialization mode.
agx::Vec3 transformPointToLocal(const agx::Vec3 &pointWorld) const
Transform point from the world coordinate frame to this frame.
The rigid body class, combining a geometric model and a frame of reference.
virtual agx::ConstraintRef createConstraint(agx::RigidBodyRef body1, agx::FrameRef frame1, agx::RigidBodyRef body2, agx::FrameRef frame2) const override
agx::ref_ptr< RigidBody > RigidBodyRef
The object defining a frame of reference and providing transformations operations.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
SegmentAttachmentT()
Default constructor for serialization.
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
SegmentAttachmentT(agx::RigidBody *body, agx::Frame *rbSegmentAttachmentFrame, agxCable::SegmentAttachment::InitializationMode initMode)
Construct given rigid body and a relative frame.
AGX_DECLARE_VECTOR_TYPES(SegmentAttachment)
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()