AGX Dynamics  2.35.0.1
Wire.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
20 
30 
32 #include <agxWire/RenderIterator.h>
33 
34 #include <agx/ICloneable.h>
35 
36 namespace agxUtil
37 {
38  class SmoothingFilter;
39 }
40 
41 namespace agx
42 {
43  class SolveIslandSplitAlgorithm;
44 
45  namespace Physics
46  {
47  class GraphNodeData;
48  }
49 }
50 
52 namespace agxWire
53 {
54  class Winch;
57 
61  class AGXPHYSICS_EXPORT Wire : public SimulationProxyT< agxSDK::StepEventListener >
62  {
63  public:
64  typedef SimulationProxyT< agxSDK::StepEventListener > base;
65 
66  public:
71  {
73  TensionData( agx::Real rawTension, agx::Real smoothedTension );
74  TensionData( const agxWire::Node::Tension* tension );
75 
78  };
79 
80  public:
81 
83 
88  static agx::Bool isLumpedNode( const agx::RigidBody* rb );
89 
95 
101 
107 
112  static const agxWire::Wire* getWire( const agx::RigidBody* rb );
113 
119 
124  static const agxWire::Wire* getWire( const agxCollide::Geometry* geometry );
125 
132  static agxWire::Wire* find( agxSDK::Simulation* simulation, const agx::Name& name );
133 
140  static agxWire::Wire* find( agxSDK::Simulation* simulation, const agx::Uuid& uuid );
141 
147  static agxWire::WirePtrVector findAll( const agxSDK::Simulation* simulation );
148 
155  static agxWire::WirePtrVector findAll( const agxSDK::Simulation* simulation, const agx::Name& name );
156 
157  public:
164  Wire( agx::Real radius, agx::Real resolutionPerUnitLength, bool enableCollisions = true );
165 
171  virtual agxWire::Wire* clone( agxWire::Wire* newWire = nullptr );
172 
179  virtual bool add( agxWire::Node* node );
180 
187  virtual bool add( agxWire::WireWinchController* winchController );
188 
196  virtual bool add( agxWire::WireWinchController* winchController, agx::Real pulledInLength );
197 
206  virtual bool add( agxWire::Link* link, bool updateConnectionType = true );
207 
218  virtual bool add( agxWire::Link* link, const agx::Vec3& relativeTranslate );
219 
225  virtual bool remove( agxWire::Node* node );
226 
233  virtual bool remove( agxWire::WireWinchController* winchController );
234 
245  bool insert( agxWire::Node* node, agx::Real distanceFromStart, bool includeWinchPulledInLength = true );
246 
254  bool insert( agxWire::Node* node, const agx::Vec3& worldPoint );
255 
260  bool reverse();
261 
272  bool merge( agxWire::WireRef other );
273 
283  agxWire::WireRef cut(agx::Real distanceAlongWire, size_t minimumResolution, bool includeWinchPulledInLength = true);
284 
293  agxWire::WireRef cut( const agx::Vec3& worldPoint, size_t minimumResolution );
294 
304  virtual bool attach( agxWire::Node* node, bool begin );
305 
313  virtual bool attach( agxWire::WireWinchController* winchController, bool begin );
314 
320  virtual bool detach( bool begin );
321 
326  const agxWire::WireAttachmentController* getBeginAttachment() const;
327 
332  const agxWire::WireAttachmentController* getEndAttachment() const;
333 
337  bool initialized() const;
338 
344  void setInitializationController( agxWire::WireInitializationController* initializationController );
345 
355  bool setRouteController( agxWire::WireRouteController* routeController, bool copyCurrentRouteToNew = false );
356 
360  agxWire::WireRouteController* getRouteController() const;
361 
365  agxWire::WireParameterController* getParameterController() const;
366 
370  agxWire::WireStabilityController* getStabilityController() const;
371 
375  agxWire::WireMaterialController* getMaterialController() const;
376 
380  agxWire::WireGeometryController* getGeometryController() const;
381 
385  agxWire::WireContactController* getActiveContactController() const;
386 
393  virtual agx::Real getRestLength( bool includeWinches = true ) const;
394 
405  agx::Real getRestLength( const agxWire::Node* node1, const agxWire::Node* node2 ) const;
406 
417  agx::Real findRestLength( bool includeWinches = true ) const;
418 
425  agx::Real getCurrentLength( bool includeWinches = true ) const;
426 
435  agx::Real getCurrentLength( const agxWire::Node* node1, const agxWire::Node* node2 ) const;
436 
443  agx::Real scaleToRestlength( agx::Real currentLength, const agxWire::Node* node ) const;
444 
451 
458  agx::Real scaleToCurrentlength( agx::Real restLength, const agxWire::Node* node ) const;
459 
466 
472 
477 
478 
485 
492 
496  bool getRenderListEmpty() const;
497 
504  agx::Real findRestLengthFromStart( const agx::Vec3& point, bool includeWinchesPulledInLength = true ) const;
505 
513  agx::Vec3 findPoint( agx::Real distanceFromStart ) const;
514 
525  agx::Vec3 findPoint( agx::Real distanceFromStart, bool includesWinchesPulledInLength ) const;
526 
532  agx::Vec3 findPoint( const agx::Vec3& point ) const;
533 
541 
550 
555 
560 
565  virtual void setMaterial( agx::Material* material );
566 
571  void setIsBendResistent( bool isBendResistant );
572 
577  void setPropertyContainer( agx::PropertyContainer* propertyContainer );
578 
580  agx::PropertyContainer* getPropertyContainer();
581 
583  const agx::PropertyContainer* getPropertyContainer() const;
584 
586  bool hasPropertyContainer() const;
587 
592 
597 
602  virtual void setRadius( agx::Real radius );
603 
611  void setResolutionPerUnitLength( agx::Real resolutionPerUnitLength );
612 
617 
623  void setEnableCollisions( agxCollide::Geometry* geometry, bool enable );
624 
630  void setEnableCollisions( agx::RigidBody* rb, bool enable );
631 
636  void setEnableCollisions( bool enable );
637 
643  void setActiveContactControllerType(const WireContactControllerType type);
644  WireContactControllerType getActiveContactControllerType() const;
645 
649  bool getEnableCollisions() const;
650 
654  bool getEnableCollisions( const agxCollide::Geometry* geometry ) const;
655 
659  bool getEnableCollisions( const agx::RigidBody* rb ) const;
660 
664  static void setEnableGroupWireCollision(agxCollide::Space* space,const agx::UInt32 group, bool enable);
665 
672  void setEnableSplitting( bool splitting );
673 
677  bool getEnableSplitting() const;
678 
683  void addGroup( uint32_t id );
684 
689  void addGroup( const agx::Name& name );
690 
694  bool hasGroup( const uint32_t id ) const;
695 
699  bool hasGroup( const agx::Name& name ) const;
700 
705  void removeGroup( uint32_t id );
706 
711  void removeGroup( const agx::Name& name );
712 
716  bool hasGeometry( const agxCollide::Geometry* geometry ) const;
717 
721  bool hasNode( const agxWire::Node* node ) const;
722 
727 
732 
736  agxWire::WireDistanceCompositeConstraint* getConstraint() const;
737 
743 
748 
753 
759 
763  void setFrame( agx::Frame* frame );
764 
770  void setLinearVelocityDamping( agx::Real linearVelocityDamping );
771 
776 
780  bool hasContactNodesOn( const agx::RigidBody* rb ) const;
781 
785  bool hasContactNodesOn( const agxCollide::Geometry* geometry ) const;
786 
795  bool replaceBodyInNodes( agx::RigidBody* currentBody, agx::RigidBody* newBody, agxCollide::Geometry* geometry = nullptr );
796 
812  bool changeRigidBody( agxWire::Node* node, agx::RigidBody* newRigidBody ) const;
813 
818  void setSmoothedTension( agx::Real newSmoothedTension );
819 
827 
834 
839 
843  virtual void preCollide( const agx::TimeStamp& ) override;
844 
848  virtual void pre( const agx::TimeStamp& t ) override;
849 
853  virtual void post( const agx::TimeStamp& t ) override;
854 
859  bool simplify( const agx::Frame* parentFrame = nullptr );
860 
865  bool unsimplify();
866 
870  bool isSimplified() const;
871 
875  agxWire::WireSimplifyController* getSimplifyController() const;
876 
881 
886 
895  bool shorten( const agxWire::Node* toNode, bool fromBegin );
896 
901 
903 
904 
908  void uninitializeConstraint();
909 
916  bool isStatic() const;
917 
921  agx::UInt getNumNodes() const;
922 
933  bool explicitReplaceWinchController( agxWire::ConnectingNode* connectingNode, bool begin );
934 
939  void onCreateMergeSplitProperties();
940 
945  agxWire::WirePropertyController* getPropertyController() const;
946 
949 
950  protected:
954  Wire();
955 
959  virtual ~Wire();
960 
965  virtual void addNotification() override;
966  using SimulationProxyT< agxSDK::StepEventListener >::addNotification;
967 
971  virtual void removeNotification() override;
972  using SimulationProxyT< agxSDK::StepEventListener >::removeNotification;
973 
977  void updateMaterial();
978 
982 #ifndef SWIG
984 #endif
985 
986  friend class agxWire::Winch;
992  virtual void setWinchController( agxWire::WireWinchController* winchController, bool begin );
993 
998  agxWire::WireAttachmentController* getBeginAttachment();
999 
1004  agxWire::WireAttachmentController* getEndAttachment();
1005 
1006  protected:
1007  WireDistanceCompositeConstraintRef m_constraint;
1008 
1009  // Controllers
1010  WireRouteControllerRef m_routeController;
1011  WireInitializationControllerRef m_initializationController;
1014  WireMaterialControllerRef m_materialController;
1015  WireStabilityControllerRef m_stabilityController;
1016  WireGeometryControllerRef m_geometryController;
1017  WireFrictionControllerRef m_frictionController;
1018  WireSimplifyControllerRef m_simplifyController;
1019 
1026 
1031 
1032  private:
1034  friend class agx::InternalData;
1039  agx::Referenced* getInternalData() const;
1040 
1045  void setInternalData( agx::Referenced* data );
1047  };
1048 
1049  // Inline methods *******************************************************************************************
1050 
1051  inline bool Wire::initialized() const
1052  {
1053  return m_initialized;
1054  }
1055 
1057  {
1058  return const_cast< WireParameterController* >( &m_parameterController );
1059  }
1060 
1062  {
1063  return m_routeController;
1064  }
1065 
1066  inline WireStabilityController* Wire::getStabilityController() const
1067  {
1068  return m_stabilityController;
1069  }
1070 
1071  inline WireMaterialController* Wire::getMaterialController() const
1072  {
1073  return m_materialController;
1074  }
1075 
1076  inline WireGeometryController* Wire::getGeometryController() const
1077  {
1078  return m_geometryController;
1079  }
1080 
1081  inline WireDistanceCompositeConstraint* Wire::getConstraint() const
1082  {
1083  return m_constraint;
1084  }
1085 
1086  inline agx::Referenced* Wire::getInternalData() const
1087  {
1088  return m_internalData;
1089  }
1090 
1092  {
1093  if (!m_propertyContainer)
1094  m_propertyContainer = new agx::PropertyContainer;
1095  return m_propertyContainer;
1096  }
1097 
1099  {
1100  return (m_propertyContainer.isValid());
1101  }
1102 
1104  {
1105  if (!m_propertyContainer)
1106  m_propertyContainer = new agx::PropertyContainer;
1107 
1108  return m_propertyContainer;
1109  }
1110 
1111  // **********************************************************************************************************
1112 
1113  // Static utility functions *********************************************************************************
1119  AGXPHYSICS_EXPORT void extractNodes( NodePtrVector& nodes, const Wire* wire );
1120  // **********************************************************************************************************
1121 }
1122 
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXPHYSICS_EXPORT
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition: agx/Vector.h:34
The geometry representation used by the collision detection engine.
Definition: Geometry.h:93
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Definition: Space.h:82
Type
Type of EventListener.
Definition: EventListener.h:45
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:127
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...
Class defining a node that is part of a wire.
Definition: agxWire/Node.h:512
Proxy class for wire iterators.
Winch object which works like agxWire::WireWinchController but enables the features of having stored,...
Definition: Winch.h:31
Class to hold specific parameters for the wire - this makes the wires highly configurable.
Winch class for handling in and out hauling of wires.
agx::observer_ptr< WireStabilityController > m_stabilityController
If by the initialization controller, this winch can merge segments and change mass of the lumps via t...
Interface and placeholder of controllers/helpers for wires.
Definition: Wire.h:62
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.
agxWire::WireWinchController * getWinchController(size_t i) const
bool hasGroup(const uint32_t id) const
Find if wire geometries contains group.
agx::FrameRef m_frame
Definition: Wire.h:1022
WireFrictionControllerRef m_frictionController
Definition: Wire.h:1017
agx::Real getRadiusIncludingContactNodeOffsetDistanceMultiplier() const
WireInitializationControllerRef m_initializationController
Definition: Wire.h:1011
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 m_splitEnabled
Definition: Wire.h:1024
static const agxWire::BodyFixedNode * getLumpedNode(const agx::RigidBody *rb)
bool merge(agxWire::WireRef other)
Merge this wire with other wire.
static agxWire::Wire * getWire(agxCollide::Geometry *geometry)
static const agxWire::Wire * getWire(const agx::RigidBody *rb)
agx::Real getContactNodeMomentum() const
virtual void post(const agx::TimeStamp &t) override
Clean up after splitting.
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...
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
Definition: Wire.h:1025
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.
agxWire::WireContactController * getActiveContactController() const
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).
agxWire::Node * getFirstNode() const
bool hasGeometry(const agxCollide::Geometry *geometry) const
agxWire::WireParameterController * getParameterController() const
Definition: Wire.h:1056
agx::Real getCurrentLength(bool includeWinches=true) const
Calculates the current length of this wire (stretched/compressed included).
agx::ref_ptr< agx::Referenced > m_propertyController
Definition: Wire.h:1029
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
static agxWire::BodyFixedNode * getLumpedNode(agx::RigidBody *rb)
void setEnableCollisions(agxCollide::Geometry *geometry, bool enable)
Enable or disable collisions between a geometry and this wire.
agxWire::WireMaterialController * getMaterialController() const
Definition: Wire.h:1071
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.
WireDistanceCompositeConstraintRef m_constraint
Definition: Wire.h:1007
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
Definition: Wire.h:1030
const agxUtil::SmoothingFilter * getSmoothingFilter() const
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.
agx::Material * getMaterial() const
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
Definition: Wire.h:1014
agx::Real scaleToCurrentlength(agx::Real restLength, const agxWire::Node *node) const
Scale rest length to current length.
bool hasContactNodesOn(const agx::RigidBody *rb) const
agx::SolveIslandSplitAlgorithm * getSplitAlgorithm() const
Get pointer to solve algorithm.
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.
agxWire::WireRouteController * getRouteController() const
Definition: Wire.h:1061
const agxWire::WireAttachmentController * getEndAttachment() const
Return pointer to the attachment controller used at end of the wire constraint.
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...
const agxWire::WireAttachmentController * getBeginAttachment() const
Return pointer to the attachment controller used at begin of the wire constraint.
agxWire::WireAttachmentController * getEndAttachment()
Return pointer to the attachment controller used at end of the wire constraint.
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.
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.
agx::PropertyContainer * getPropertyContainer()
Definition: Wire.h:1091
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::WireGeometryController * getGeometryController() const
Definition: Wire.h:1076
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::WireDistanceCompositeConstraint * getConstraint() const
Definition: Wire.h:1081
agxWire::WireNodeTensionData getTension(const agxWire::Node *node) const
WireRouteControllerRef m_routeController
Definition: Wire.h:1010
agx::ref_ptr< agx::Referenced > m_splitAlgorithm
Definition: Wire.h:1027
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.
Definition: Wire.h:1013
static const agxWire::Wire * getWire(const agxCollide::Geometry *geometry)
bool hasGroup(const agx::Name &name) const
Find if wire geometries contains group.
WireStabilityControllerRef m_stabilityController
Definition: Wire.h:1015
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.
static agx::Bool isLumpedNode(const agx::RigidBody *rb)
WireSimplifyControllerRef m_simplifyController
Definition: Wire.h:1018
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
Definition: Wire.h:1016
agxUtil::SmoothingFilterRef m_smoothingFilter
Definition: Wire.h:1020
agx::ref_ptr< agx::Referenced > m_internalData
Definition: Wire.h:1028
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.
virtual agxWire::Wire * clone(agxWire::Wire *newWire=nullptr)
Clone this wire object and return an empty, uninitialized wire.
WireParameterController m_parameterController
Definition: Wire.h:1012
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::WireAttachmentController * getBeginAttachment()
Return pointer to the attachment controller used at begin of the wire constraint.
agxSDK::EventListener::Type getType() const
Hide eventListenerType getType()
bool unsimplify()
Unsimplify this wire.
static agxWire::Wire * find(agxSDK::Simulation *simulation, const agx::Uuid &uuid)
Find wire instance given simulation and unique id.
agxWire::WireStabilityController * getStabilityController() const
Definition: Wire.h:1066
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.
Definition: Wire.h:1023
agxWire::Node * getLastNode() const
virtual void setMaterial(agx::Material *material)
Sets the material for this wire.
agx::Real getLinearVelocityDamping() const
bool hasPropertyContainer() const
Definition: Wire.h:1098
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.
agxWire::WireSimplifyController * getSimplifyController() const
agx::Frame * getFrame() const
This wire has a frame which is the parent frame of all internal bodies.
SimulationProxyT< agxSDK::StepEventListener > base
Definition: Wire.h:64
void removeGroup(const agx::Name &name)
Remove group for all geometries handled by this collision controller.
static agxWire::Wire * find(agxSDK::Simulation *simulation, const agx::Name &name)
Find wire instance given simulation and name.
static agxWire::Wire * getWire(agx::RigidBody *rb)
void replaceContactNodesWithShapeContacts()
Replace all contact nodes with shape contact nodes.
bool m_initialized
Definition: Wire.h:1021
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.
Definition: Constraint.h:93
The object defining a frame of reference and providing transformations operations.
Definition: agx/Frame.h:68
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition: Material.h:388
Representation of a name string.
Definition: Name.h:33
Class that is a container of named properties.
Definition: Property.h:129
Base class providing referencing counted objects.
Definition: Referenced.h:114
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:55
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...
Definition: Uuid.h:42
Vector containing 'raw' data.
Definition: agx/Vector.h:246
bool isValid() const
Definition: ref_ptr.h:268
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
#define AGX_FORCE_INLINE
Definition: macros.h:58
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
The agxUtil namespace contain classes and methods for utility functionality.
Implements a Wire model with adaptive resolution.
Definition: MergedBody.h:40
AGXPHYSICS_EXPORT void extractNodes(NodePtrVector &nodes, const Wire *wire)
Extracts all the nodes given the render list in the wire.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint32_t UInt32
Definition: Integer.h:40
bool Bool
Definition: Integer.h:48
LinearProbingHashSetImplementation< KeyT, HashT >::iterator begin(LinearProbingHashSetImplementation< KeyT, HashT > &set)
uint32_t UInt
Definition: Integer.h:34
double Real
Definition: Real.h:42
agx::Real TimeStamp
Definition: TimeStamp.h:26
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.
Definition: Wire.h:71
TensionData(agx::Real rawTension, agx::Real smoothedTension)
TensionData(const agxWire::Node::Tension *tension)
agx::Real smoothed
Definition: Wire.h:77