AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
Wire.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
20
30
33
34#include <agx/ICloneable.h>
35
36namespace agxUtil
37{
38 class SmoothingFilter;
39}
40
41namespace agx
42{
43 class SolveIslandSplitAlgorithm;
44
45 namespace Physics
46 {
47 class GraphNodeData;
48 }
49}
50
52namespace 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
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
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
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
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
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:
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
1056 inline WireParameterController* Wire::getParameterController() const
1057 {
1058 return const_cast< WireParameterController* >( &m_parameterController );
1059 }
1060
1061 inline WireRouteController* Wire::getRouteController() const
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
1091 AGX_FORCE_INLINE agx::PropertyContainer* Wire::getPropertyContainer()
1092 {
1093 if (!m_propertyContainer)
1094 m_propertyContainer = new agx::PropertyContainer;
1095 return m_propertyContainer;
1096 }
1097
1098 AGX_FORCE_INLINE bool Wire::hasPropertyContainer() const
1099 {
1100 return (m_propertyContainer.isValid());
1101 }
1102
1103 AGX_FORCE_INLINE const agx::PropertyContainer* Wire::getPropertyContainer() const
1104 {
1105 if (!m_propertyContainer)
1106 m_propertyContainer = new agx::PropertyContainer;
1107
1108 return m_propertyContainer;
1109 }
1110
1111 // **********************************************************************************************************
1112
1113 // Static utility functions *********************************************************************************
1120 // **********************************************************************************************************
1121}
1122
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#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)
Definition agx/Vector.h:34
The geometry representation used by the collision detection engine.
Definition Geometry.h:92
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Definition Space.h:82
Type
Type of EventListener.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition Simulation.h:126
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.
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.
Interface and placeholder of controllers/helpers for wires.
Definition Wire.h:62
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.
agx::FrameRef m_frame
Definition Wire.h:1022
WireFrictionControllerRef m_frictionController
Definition Wire.h:1017
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
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
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
Definition Wire.h:1025
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)
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
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
void setEnableCollisions(agxCollide::Geometry *geometry, bool enable)
Enable or disable collisions between a geometry and this wire.
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
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
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
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
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
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
bool hasGroup(const agx::Name &name) const
Find if wire geometries contains group.
WireStabilityControllerRef m_stabilityController
Definition Wire.h:1015
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
Definition Wire.h:1018
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
Definition Wire.h:1016
agxUtil::SmoothingFilterRef m_smoothingFilter
Definition Wire.h:1020
static agxWire::BodyFixedNode * getLumpedNode(agx::RigidBody *rb)
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.
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::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.
Definition Wire.h:1023
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
Definition Wire.h:64
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.
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:376
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:120
The rigid body class, combining a geometric model and a frame of reference.
Definition RigidBody.h:52
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.
NodeContainer::iterator NodeIterator
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint32_t UInt32
Definition Integer.h:32
bool Bool
Definition Integer.h:40
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)