305 virtual
void onAddNotification(
agxSDK::Simulation* simulation) override;
306 virtual
void onPreStep() override;
307 virtual
void onPostStep() override;
315 void restoreFromLinkedCable(
agxStream::InputArchive&
in);
318 void restoreFromDeformable1D(
agxStream::InputArchive&
in);
323 INITIALIZED = 1 << 0,
325 using State = agx::BitState<StateEnum, agx::UInt32>;
#define AGX_DECLARE_POINTER_TYPES(type)
#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)
Class controlling material properties of one or more cables.
A CableSegment represents a single link of a cable.
A model of a cable using a lumped elements model.
static agx::StringVector getAvailableLibraryProperties()
Returns a vector with all the named CableProperties that were found in the Material Library.
agx::Real getResolution() const
Returns the resolution of the cable, measured in units of length per segment.
static Cable * find(agxSDK::Simulation *simulation, const agx::Uuid &uuid)
This method will do a linear search in Simulation and return a pointer to the specified Cable.
agxCable::CableProperties * getCableProperties() const
Return the cable properties for this cable.
agxCable::CableIterator begin() const
Returns an iterator that walks over the segments of the cable.
static agxCable::Cable * getCableForGeometry(agxCollide::Geometry *geometry)
agxCable::RouteInitializationReport getInitializationReport() const
agxCable::CableIterator end() const
Returns an iterator pointing one-past the last segment.
agx::UInt getNumSegments() const
Returns the number of segments in the cable.
static agxCable::Cable * asCable(agxSDK::Assembly *assembly)
static agxCable::CablePtrVector getAll(agxSDK::Simulation *simulation)
Collect all Cables in the given simulation.
agx::Bool add(agxCable::RoutingNode *node)
Add the given cable node to the end of the cable.
agxCable::CableIterator begin()
virtual agx::Real getCurrentLength() const override
Get the current length of the cable, including any stretching.
static Cable * find(agxSDK::Simulation *simulation, const agx::Name &name)
This method will do a linear search in Simulation and return a pointer to the specified Cable.
bool attach(agxCable::CableIterator segment, agx::RigidBody *body, const agx::Vec3 &relativeTranslate)
Attach the given segment to the given rigid body using a BallJoint that lets the cable rotate freely ...
bool attach(agxCable::CableIterator segment, agx::RigidBody *body, const agx::AffineMatrix4x4 &relativeTransform)
Attach the given segment to the given rigid body using a LockJoint.
void setCableProperties(agxCable::CableProperties *cableProperties)
Set the cable properties object used by this cable.
agxCable::CableIterator findLast() const
Returns an iterator pointing to the last segment.
static const agxCable::Cable * getCableForBody(const agx::RigidBody *body)
static agxCable::Cable * getCableForBody(agx::RigidBody *body)
virtual agx::Real getRestLength() const override
Get the rest length of the cable.
agxCable::CableIterator end()
static agxCable::CablePtrVector findAll(agxSDK::Simulation *simulation, const agx::Name &name)
This method will do a linear search in Simulation and return a vector with pointers to all matching C...
agxCable::RouteInitializationReport tryInitialize(agx::Real maxError)
Make a dry-run with a specified maximum allowed routing error.
agxCable::SegmentRange getSegments() const
Cable(agx::Real radius, agxCable::HomogeneousSegmentsRoute *routingAlgorithm)
Create a new cable using the given routing algorithm.
Cable(agx::Real radius, agx::Real resolutionPerUnitLength)
Create a new cable with the given radius and resolution.
static const agxCable::Cable * getCableForGeometry(const agxCollide::Geometry *geometry)
agxCable::RouteInitializationReport tryInitialize()
Make a dry-run of the cable initialization.
agx::Real getRadius() const
bool loadLibraryProperties(const agx::String &name)
Load named CableProperties from the Material Library for the current Cable.
An ordered collection of agxCable::Node objects that has been added to a particular cable.
Base class for route nodes that defines the path and some behavior of a cable.
The geometry representation used by the collision detection engine.
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints,...
Optionally unbounded linked structure segment iterator object to iterate segments in a SegmentStructu...
Segment range object for linked structure.
Basic implementation of any structure where bodies are linked/constrained together in a well defined ...
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Representation of a name string.
The rigid body class, combining a geometric model and a frame of reference.
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
Vector containing 'raw' data.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
Contain classes for 6 DOF lumped element cables/wires/ropes.
AGXCABLE_EXPORT agxCable::CableIterator end(const agxCable::Cable &cable)
AGXCABLE_EXPORT agxCable::CableIterator begin(const agxCable::Cable &cable)
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
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...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.