38 class SmoothingFilter;
43 class SolveIslandSplitAlgorithm;
64 typedef SimulationProxyT< agxSDK::StepEventListener >
base;
337 bool initialized()
const;
355 bool setRouteController( agxWire::WireRouteController* routeController,
bool copyCurrentRouteToNew =
false );
360 agxWire::WireRouteController* getRouteController()
const;
370 agxWire::WireStabilityController* getStabilityController()
const;
375 agxWire::WireMaterialController* getMaterialController()
const;
380 agxWire::WireGeometryController* getGeometryController()
const;
586 bool hasPropertyContainer()
const;
737 agxWire::WireDistanceCompositeConstraint* getConstraint()
const;
909 void uninitializeConstraint();
917 bool isStatic() const;
922 agx::UInt getNumNodes() const;
940 void onCreateMergeSplitProperties();
946 agxWire::WirePropertyController* getPropertyController() const;
966 virtual
void addNotification() override;
967 using SimulationProxyT<
agxSDK::StepEventListener >::addNotification;
972 virtual
void removeNotification() override;
973 using SimulationProxyT<
agxSDK::StepEventListener >::removeNotification;
978 void updateMaterial();
1035 friend class
agx::InternalData;
1040 agx::Referenced* getInternalData() const;
1046 void setInternalData(
agx::Referenced* data );
1052 inline
bool Wire::initialized()
const
1054 return m_initialized;
1062 inline WireRouteController* Wire::getRouteController()
const
1064 return m_routeController;
1067 inline WireStabilityController* Wire::getStabilityController()
const
1069 return m_stabilityController;
1072 inline WireMaterialController* Wire::getMaterialController()
const
1074 return m_materialController;
1077 inline WireGeometryController* Wire::getGeometryController()
const
1079 return m_geometryController;
1082 inline WireDistanceCompositeConstraint* Wire::getConstraint()
const
1084 return m_constraint;
1089 return m_internalData;
1094 if (!m_propertyContainer)
1096 return m_propertyContainer;
1101 return (m_propertyContainer.
isValid());
1106 if (!m_propertyContainer)
1109 return m_propertyContainer;
#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 AGXPHYSICS_EXPORT
#define AGX_DECLARE_VECTOR_TYPES(type)
The geometry representation used by the collision detection engine.
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Type
Type of EventListener.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
The body fixed node is attached to a body at a given offset.
Connecting nodes contains two nodes, one at center of mass and the other at the user defined position...
Object that defines the relation between different types of wires (agxWire::Wire).
Class defining a node that is part of a wire.
Proxy class for wire iterators.
Winch object which works like agxWire::WireWinchController but enables the features of having stored,...
Class to hold specific parameters for the wire - this makes the wires highly configurable.
Winch class for handling in and out hauling of wires.
Interface and placeholder of controllers/helpers for wires.
static agxWire::Wire * getWire(agxCollide::Geometry *geometry)
agx::Real scaleToRestlength(agx::Real currentLength, const agxWire::Node *node) const
Scale current length in world coordinates to rest length.
virtual bool remove(agxWire::Node *node)
Remove node from this wire.
const agxWire::WireAttachmentController * getBeginAttachment() const
Return pointer to the attachment controller used at begin of the wire constraint.
bool hasGroup(const uint32_t id) const
Find if wire geometries contains group.
WireFrictionControllerRef m_frictionController
agx::Real getRadiusIncludingContactNodeOffsetDistanceMultiplier() const
static agxWire::Wire * find(agxSDK::Simulation *simulation, const agx::Uuid &uuid)
Find wire instance given simulation and unique id.
agx::Material * getMaterial() const
WireInitializationControllerRef m_initializationController
agx::Vec3 findPoint(agx::Real distanceFromStart) const
Returns a point on this wire distanceFromStart meters from the beginning of this wire.
void setResolutionPerUnitLength(agx::Real resolutionPerUnitLength)
Assign new resolution per unit length.
bool merge(agxWire::WireRef other)
Merge this wire with other wire.
agx::Real getContactNodeMomentum() const
static agxWire::Wire * getWire(agx::RigidBody *rb)
virtual void post(const agx::TimeStamp &t) override
Clean up after splitting.
agx::Frame * getFrame() const
This wire has a frame which is the parent frame of all internal bodies.
static const agxWire::Wire * getWire(const agx::RigidBody *rb)
void setSolveType(agx::Constraint::SolveType solveType)
Set solve type, either DIRECT, ITERATIVE or DIRECT_AND_ITERATIVE.
bool setRouteController(agxWire::WireRouteController *routeController, bool copyCurrentRouteToNew=false)
Associate new, own implemented, route controller to this wire.
agx::Real getCurrentLength(const agxWire::Node *node1, const agxWire::Node *node2) const
Calculates the current length between node1 and node2 in wire coordinates.
bool getEnableCollisions(const agx::RigidBody *rb) const
agx::Vec3 findPoint(const agx::Vec3 &point) const
Given any point in 3D, this method will find a point on this wire which is closest to the given point...
agxWire::WireAttachmentController * getEndAttachment()
Return pointer to the attachment controller used at end of the wire constraint.
agx::Real getRadius() const
bool hasContactNodesOn(const agxCollide::Geometry *geometry) const
bool getEnableCollisions() const
void addGroup(const agx::Name &name)
Add group for all geometries handled by this collision controller.
bool getRenderListEmpty() const
agx::Constraint::SolveType m_solveType
static const agxWire::Wire * getWire(const agxCollide::Geometry *geometry)
agxWire::WireSegmentTensionData getTension(const agx::Vec3 &point) const
Given any point in 3D, this method will find a point on this wire which is closest to the given point...
void setActiveContactControllerType(const WireContactControllerType type)
Choose the type of WireContactController to use Default is the WireShapeContactController.
agx::Real getResolutionPerUnitLength() const
bool simplify(const agx::Frame *parentFrame=nullptr)
Simplify this wire.
void getGeometries(agxCollide::GeometryPtrVector &geoms) const
Fills geoms with all geometries used by this wire.
agxWire::WireRef cut(agx::Real distanceAlongWire, size_t minimumResolution, bool includeWinchPulledInLength=true)
Cut this wire given distance from start (including winches).
static const agxWire::BodyFixedNode * getLumpedNode(const agx::RigidBody *rb)
void setEnableCollisions(agxCollide::Geometry *geometry, bool enable, bool forceContactUpdate=false)
Enable or disable collisions between a geometry and this wire.
bool hasGeometry(const agxCollide::Geometry *geometry) const
agx::Real getCurrentLength(bool includeWinches=true) const
Calculates the current length of this wire (stretched/compressed included).
agx::ref_ptr< agx::Referenced > m_propertyController
agx::Real getMass() const
bool insert(agxWire::Node *node, agx::Real distanceFromStart, bool includeWinchPulledInLength=true)
Insert a node in this given distance along this wire.
static void setEnableGroupWireCollision(agxCollide::Space *space, const agx::UInt32 group, bool enable)
Enable/Disable a group (unique group id) against all wires.
agxWire::RenderIterator getRenderBeginIterator() const
agxWire::Node * getLastNode() const
virtual bool attach(agxWire::WireWinchController *winchController, bool begin)
Attach a winch to a free end of this wire.
virtual bool remove(agxWire::WireWinchController *winchController)
Remove winch from this wire.
void removeGeometries()
Removes all geometries.
const agxWire::WireAttachmentController * getEndAttachment() const
Return pointer to the attachment controller used at end of the wire constraint.
WireDistanceCompositeConstraintRef m_constraint
virtual void setWinchController(agxWire::WireWinchController *winchController, bool begin)
Assign new winch controller to this wire.
void setFrame(agx::Frame *frame)
Assign new parent frame to this wire.
virtual void preCollide(const agx::TimeStamp &) override
Update geometries.
agx::PropertyContainerRef m_propertyContainer
virtual void pre(const agx::TimeStamp &t) override
Run stability update.
void setIsBendResistent(bool isBendResistant)
This determines if the wire should have a bend constraint or not.
void addGroup(uint32_t id)
Add group for all geometries handled by this collision controller.
bool getEnableSplitting() const
bool isSimplified() const
void setEnableCollisions(agx::RigidBody *rb, bool enable)
Enable or disable collisions between all geometries in a rigid body and this wire.
WireMaterialControllerRef m_materialController
agx::Real scaleToCurrentlength(agx::Real restLength, const agxWire::Node *node) const
Scale rest length to current length.
bool hasContactNodesOn(const agx::RigidBody *rb) const
void setSmoothedTension(agx::Real newSmoothedTension, agxWire::NodeIterator from, agxWire::NodeIterator to)
Assign smoothed tension (can be useful after certain events, like cut) to part of this wire.
bool reverse()
Reverse this wire - use to match merge where first wire end is connected to second wire begin.
bool hasNode(const agxWire::Node *node) const
void setEnableCollisions(bool enable)
Enable or disable this wire collision handling (i.e., if false, this wire will only contain bodies an...
virtual bool add(agxWire::Node *node)
Add node to this wire.
void setEnableSplitting(bool splitting)
enable/disable the ability to automatically split the wire at a body fixed node.
void setSmoothingFilter(agxUtil::SmoothingFilter *filter)
Assign filter that will be used to filter out the tension values for smoothed tension readings.
bool insert(agxWire::Node *node, const agx::Vec3 &worldPoint)
Insert a node given a point in world coordinate system.
agxWire::Node * getFirstNode() const
void setLinearVelocityDamping(agx::Real linearVelocityDamping)
Assigns linear velocity damping to all lumped nodes (i.e., rigid bodies owned by this wire) in this w...
void updateNodeTransforms()
Updates all node transforms.
virtual bool attach(agxWire::Node *node, bool begin)
Attach this wire to a new object given new begin or end node and at which end.
agxWire::WireSegmentTensionData getTension(agx::Real distanceFromStart) const
Returns the current tension in a point given distance from start of this wire.
agx::Real getRestLength(const agxWire::Node *node1, const agxWire::Node *node2) const
Calculates the rest length between two nodes (node1 and node2).
virtual bool add(agxWire::WireWinchController *winchController)
Add winch to this wire.
virtual agx::Real getRestLength(bool includeWinches=true) const
Calculates the rest length of this wire.
agx::Real findRestLengthFromStart(const agx::Vec3 &point, bool includeWinchesPulledInLength=true) const
Given any point in 3D, this method will find the distance along this wire which is closest to the giv...
virtual bool add(agxWire::WireWinchController *winchController, agx::Real pulledInLength)
Add winch to this wire.
void setPropertyContainer(agx::PropertyContainer *propertyContainer)
Property container for all rigid bodies and geometries that are owned by this wire.
virtual bool detach(bool begin)
Detach begin or end of this wire (if attached to something).
virtual bool add(agxWire::Link *link, bool updateConnectionType=true)
Add link to the route.
agxWire::WireContactController * getActiveContactController() const
virtual void setRadius(agx::Real radius)
Set the radius of this wire.
agx::Real findRestLength(bool includeWinches=true) const
Extended functionality, compared to getRestLength, to find rest length of this wire in a agxWire::Win...
agxWire::WireNodeTensionData getTension(const agxWire::Node *node) const
WireRouteControllerRef m_routeController
agx::ref_ptr< agx::Referenced > m_splitAlgorithm
agx::Real getCurrentLengthScaler(const agxWire::Node *node) const
Given node on this wire, calculates the transform from rest length to current length.
virtual bool add(agxWire::Link *link, const agx::Vec3 &relativeTranslate)
Add link to the route.
WireWinchControllerRefVector m_winchControllers
Winch controller vector, always of size 2, default both 0.
bool hasGroup(const agx::Name &name) const
Find if wire geometries contains group.
WireStabilityControllerRef m_stabilityController
agxWire::WireAttachmentController * getBeginAttachment()
Return pointer to the attachment controller used at begin of the wire constraint.
void setInitializationController(agxWire::WireInitializationController *initializationController)
Assign initialization controller for this wire.
bool shorten(const agxWire::Node *toNode, bool fromBegin)
Shorten this wire to a given node.
agxWire::WireWinchController * getWinchController(size_t i) const
const agxUtil::SmoothingFilter * getSmoothingFilter() const
static agx::Bool isLumpedNode(const agx::RigidBody *rb)
WireSimplifyControllerRef m_simplifyController
agx::SolveIslandSplitAlgorithm * getSplitAlgorithm() const
Get pointer to solve algorithm.
bool changeRigidBody(agxWire::Node *node, agx::RigidBody *newRigidBody) const
Utility method to change rigid body in any node, given it has a valid node type.
void setSmoothedTension(agx::Real newSmoothedTension)
Assign smoothed tension (can be useful after certain events, like cut) to this wire.
WireGeometryControllerRef m_geometryController
agxUtil::SmoothingFilterRef m_smoothingFilter
static agxWire::BodyFixedNode * getLumpedNode(agx::RigidBody *rb)
agx::ref_ptr< agx::Referenced > m_internalData
void removeGroup(uint32_t id)
Remove group for all geometries handled by this collision controller.
bool replaceBodyInNodes(agx::RigidBody *currentBody, agx::RigidBody *newBody, agxCollide::Geometry *geometry=nullptr)
Given currentBody, go through all bodies related to this Wire and replace them with newBody.
WireParameterController m_parameterController
agxWire::RenderIterator getRenderEndIterator() const
agx::Real getRestLengthScaler(const agxWire::Node *node) const
Given node on this wire, calculates the transform from current length to rest length.
agxWire::WireSimplifyController * getSimplifyController() const
agxSDK::EventListener::Type getType() const
Hide eventListenerType getType()
bool unsimplify()
Unsimplify this wire.
virtual agxWire::Wire * clone(agxWire::Wire *newWire=nullptr)
Clone this wire object and return an empty, uninitialized wire.
static agxWire::Wire * find(agxSDK::Simulation *simulation, const agx::Name &name)
Find wire instance given simulation and name.
WireContactControllerType getActiveContactControllerType() const
static agxWire::WirePtrVector findAll(const agxSDK::Simulation *simulation)
Finds all agxWire::Wire instances in the given simulation.
agx::Real m_linearVelocityDamping
Only linear velocity damping as real is defined for lumped nodes.
virtual void setMaterial(agx::Material *material)
Sets the material for this wire.
agx::Real getLinearVelocityDamping() const
Wire(agx::Real radius, agx::Real resolutionPerUnitLength, bool enableCollisions=true)
Constructor given the basic parameters to create a wire.
static agxWire::WirePtrVector findAll(const agxSDK::Simulation *simulation, const agx::Name &name)
Finds all wire instances given simulation and name.
SimulationProxyT< agxSDK::StepEventListener > base
void removeGroup(const agx::Name &name)
Remove group for all geometries handled by this collision controller.
void replaceContactNodesWithShapeContacts()
Replace all contact nodes with shape contact nodes.
agxWire::WireRef cut(const agx::Vec3 &worldPoint, size_t minimumResolution)
Cut this wire given any point in world.
agx::Vec3 findPoint(agx::Real distanceFromStart, bool includesWinchesPulledInLength) const
Returns a point on this wire distanceFromStart meters from the beginning of this wire.
bool getEnableCollisions(const agxCollide::Geometry *geometry) const
SolveType
Specifies in what solvers the constraint will be solved.
The object defining a frame of reference and providing transformations operations.
Main material class which acts as a holder of a Surface Material and a Bulk material.
Representation of a name string.
Class that is a container of named properties.
Base class providing referencing counted objects.
The rigid body class, combining a geometric model and a frame of reference.
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()
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
The agxUtil namespace contain classes and methods for utility functionality.
Implements a Wire model with adaptive resolution.
AGXPHYSICS_EXPORT void extractNodes(NodePtrVector &nodes, const Wire *wire)
Extracts all the nodes given the render list in the wire.
NodeContainer::iterator NodeIterator
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Structure containing relevant tension data for a node.
Structure containing relevant tension data for a wire element/segment.
Structure containing relevant tension data given one look-up.
TensionData(agx::Real rawTension, agx::Real smoothedTension)
TensionData(const agxWire::Node::Tension *tension)