64 inline const agx::Vec3& getNormal()
const;
83 inline bool getAutoFeed()
const;
224 void setEnableForcedBrake(
bool enableForcedBrake);
230 bool getEnableForcedBrake() const;
244 friend class WireInitializationController;
245 friend class WireRouteController;
251 virtual
void addNotification(
agxSDK::SimulationProxy* ) {}
310 virtual void update(
Node* controlledNode,
Node* lumpedNode,
bool begin )
override;
322 virtual bool owns(
const Node* node )
const override
324 return m_stopNode == node;
423 inline void WireWinchController::setEnableForcedBrake(
bool enableForcedBrake )
428 inline bool WireWinchController::getEnableForcedBrake()
const
445 set( v.
x(), v.
y(), v.
z() );
487 _v[ 0 ] = std::sqrt(
x *
x +
z *
z );
489 _v[ 1 ] = angle < 0 ? 2 *
agx::PI + angle : angle;
550 using WireWinchController::getConstraint;
561 virtual void update(
Node* controlledNode,
Node* lumpedNode,
bool begin )
override;
576 using WireWinchController::attach;
579 friend class WireSimpleDrumRenderer;
592 class WireSimpleDrumRenderer : public ConstraintRenderer
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints,...
Interface class used by internal objects running in parallel.
Class for writing serialized data in binary format to a stream.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
The body fixed node is attached to a body at a given offset.
agx::Real convertAngle(agx::Real full) const
CylindricalCoordinateRPY()
void set(agx::Real x, agx::Real y, agx::Real z)
CylindricalCoordinateRPY(const CylindricalCoordinateRPY &c)
CylindricalCoordinateRPY & operator=(const CylindricalCoordinateRPY &c)
CylindricalCoordinateRPY(const agx::Vec3 &v)
Class defining a node that is part of a wire.
Stop node, wire end node used by winches.
Class to hold specific parameters for the wire - this makes the wires highly configurable.
virtual void update(Node *controlledNode, Node *lumpedNode, bool begin) override
Called when it's time to update the constraint and reset the position of the lump.
void initializeControlPoints(WireSimpleDrumControlPointList &controlPoints) const
virtual void initialize(bool begin, WireParameterController *parameters) override
Initializes this winch (inserts the stop node and move the lump for example).
agxCollide::GeometryRef m_geometry
agx::Real getControlPointRadius() const
virtual agx::Real getCurrentSpeed() const override
bool changeBodyFixedToContactNode(BodyFixedNode *bfn)
WireSimpleDrumController(agx::Real radius, agx::Real length, size_t maxNumActiveContactNodes=5, bool upsideDown=false)
WireSimpleDrumControlPointList m_controlPoints
WireSimpleDrumController()
virtual ~WireSimpleDrumController()
void createControlPoints(NodeConstIterator from, NodeConstIterator to, size_t numNodes, agx::Real &restLength, agx::Real ¤tLength)
virtual agx::Real getCurrentForce() const override
virtual agx::Real getCurrentBrakeForce() const override
const WireSimpleDrumControlPointList & getControlPoints() const
bool attach(agx::RigidBody *rb, agx::Frame *attachmentFrame)
Attach this simple drum to a rigid body using an attachment frame.
bool removeContactNodes(NodeIterator from, NodeIterator to)
void rollIn(bool begin, NodeIterator from, size_t numContacts, agx::Real &dRestLength, agx::Real &dCurrentLength)
agx::Hinge * getHinge() const
void updateHinge(agx::Hinge *h) const
void rebind(const Node *to)
size_t m_maxNumActiveContactNodes
ContactNode * rollOut(agx::Real &dRestLength, agx::Real &dCurrentLength)
agx::RigidBody * getRigidBody() const
size_t getNumContacts(bool begin, WireDistanceCompositeConstraint *wire, NodeIterator &lastContact, NodeIterator &firstLumpIter) const
agxCollide::Geometry * getGeometry() const
Winch class for handling in and out hauling of wires.
virtual bool getWithinEndRange() const
void setStabilityController(agxWire::WireStabilityController *stabilityController)
Associate a stability controller to this winch.
bool insertStopNode(bool begin)
Inserts the stop wire node in the wire.
BodyFixedNodeRef m_fixedNode
void setSpeed(agx::Real speed)
Set winch motor speed.
WireParameterController * m_parameters
virtual bool owns(const Node *node) const override
For the wire to know if node belongs to this attachment.
void massUpdate(agx::Real restLengthChange, bool begin)
Updates mass for lumped nodes where the rest length is changed by restLengthChange.
WireWinchController(agx::RigidBody *body, const agx::Vec3 &positionInBodyFrame, const agx::Vec3 &normalInBodyFrame, agx::Real pulledInLength=agx::Real(0))
Construct this winch given position, normal and body this winch is attached to.
const agx::Vec3 & getNormal() const
virtual agx::Real getCurrentForce() const
void setForceRange(agx::RangeReal forceRange)
Set the desired winch force where range::lower is the force in which this winch may haul in wire,...
agxWire::BodyFixedNode * getFixedNode() const
virtual void unitialize()
Forgets about all wire parameters and clears the constraint.
agx::Vec3 getWorldNormal() const
agx::Prismatic * createPrismatic(Node *fixedNode, Node *lumpedNode, const agx::Vec3 &worldNormal) const
Creates a prismatic constraint given the fixed-, lumped node and a normal.
agx::observer_ptr< BodyFixedNode > m_parametersHoldingNode
To access and change rest/current length.
virtual agx::Real getCurrentBrakeForce() const
virtual agx::Real getCurrentSpeed() const
const agx::RangeReal & getForceRange() const
agx::observer_ptr< WireStabilityController > m_stabilityController
If by the initialization controller, this winch can merge segments and change mass of the lumps via t...
agx::RigidBody * getRigidBody() const
void setCompliance(agx::Prismatic *prismatic) const
Sets the default compliance for the prismatic constraint.
agx::Real resetLumpPosition(agx::Real angle)
Resets the lump position to reference.
virtual void initialize(bool begin, WireParameterController *parameters) override
Initializes this winch (inserts the stop node and move the lump for example).
agx::Real getStopNodeReferenceDistance() const
agx::Real m_pulledInLength
virtual void forcePulledInLength(agx::Real newLength)
void setBrakeForceRange(agx::RangeReal brakeForceRange)
Set the desired brake force range where range::lower is the force in which this winch brake can hold ...
virtual void incrementPulledInLength(agx::Real dl)
virtual void preCollideUpdate(agx::Bool, agxSDK::SimulationProxy *)
Pre-collide update call from the wire.
virtual bool attach(WireDistanceCompositeConstraint *constraint, WireParameterController *parameters, bool begin)
Create new nodes for new wire.
agx::RangeReal m_brakeRange
void updateConstraintSettings(agx::Prismatic *prismatic, agx::Real desiredSpeed, const agx::RangeReal &forceRange, const agx::RangeReal &brakeRange, bool rangeEnable, bool forcedBrake=false) const
Updates motor, lock and range parameters.
const agx::Constraint1DOF * get1DOFConstraint() const
virtual agx::Real getPulledInWireLength() const
void setForceRange(agx::Real force)
Same as setForceRange( agx::RangeReal forceRange ) but this method will set range as [-force,...
void setPulledInWireLength(agx::Real pulledInLength)
Set the pulled in length for this winch.
agx::RangeReal m_forceRange
agx::Real getSpeed() const
agxWire::StopNode * getStopNode() const
virtual void update(Node *controlledNode, Node *lumpedNode, bool begin) override
Called when it's time to update the constraint and reset the position of the lump.
agx::observer_ptr< BodyFixedNode > m_lumpedNode
void setParameterController(agxWire::WireParameterController *parameters)
Associate a parameter controller to this winch.
bool getStopNodeInserted() const
virtual agx::Real getReferenceCurrentLength(bool begin) const override
agx::Real configureInitialState()
This method will set the position of the lumped node given the stop node and pulled in length.
virtual void preUpdate(agx::Bool, agxSDK::SimulationProxy *)
Pre update call from the wire.
void setAutoFeed(bool autoFeed)
Set auto feed to this winch.
virtual Node * getReferenceNode() override
const agx::RangeReal & getBrakeForceRange() const
BodyFixedNode * getNextLumpedNode(BodyFixedNode *from, bool begin)
Finds the next (or previous) lumped node given a lumped node and the direction of the search.
void setBrakeForceRange(agx::Real brakeForce)
Same as setBrakeForceRange( agx::RangeReal brakeForceRange ) but this method will set range as [-brak...
agx::Vec3 getLumpNodeReferencePosition() const
virtual void postUpdate(agx::Bool, agxSDK::SimulationProxy *)
Post update call from the wire.
agx::Constraint1DOF * get1DOFConstraint()
Get pointer to Constraint1DOF.
BodyFixedNode * findParametersHoldingNode(bool begin)
Search the wire, given begin true of false, for the parameters holding node.
Interface and placeholder of controllers/helpers for wires.
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic.
The object defining a frame of reference and providing transformations operations.
The hinge constraint between two rigid bodies or one rigid body and the world.
A prismatic joint keeps a fixed relative orientation between the attached bodies but allows them to s...
The rigid body class, combining a geometric model and a frame of reference.
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Implements a Wire model with adaptive resolution.
agx::Vector< agx::observer_ptr< WireWinchController > > WireWinchControllerObsVector
NodeContainer::const_iterator NodeConstIterator
agx::ref_ptr< WireSimpleDrumController > WireSimpleDrumControllerRef
agx::List< WireSimpleDrumControlPoint > WireSimpleDrumControlPointList
agx::ref_ptr< WireWinchController > WireWinchControllerRef
agx::Vector< WireWinchControllerRef > WireWinchControllerRefVector
NodeContainer::iterator NodeIterator
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
WireSimpleDrumControlPoint & operator=(const WireSimpleDrumControlPoint &p)
void restore(agxStream::InputArchive &in)
CylindricalCoordinateRPY coordinate
void store(agxStream::OutputArchive &out) const
WireSimpleDrumControlPoint(const agx::Vec3 &position, agx::Real rest, agx::Real current)
WireSimpleDrumControlPoint(const WireSimpleDrumControlPoint &p)
WireSimpleDrumControlPoint()