AGX Dynamics  2.35.0.1
CableProperties.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 
18 #ifndef AGXCABLE_CABLE_PROPERTIES_H
19 #define AGXCABLE_CABLE_PROPERTIES_H
20 
21 #include <agxCable/export.h>
22 #include <agxCable/Direction.h>
23 
24 #include <agxStream/Serializable.h>
25 
26 namespace agxCable
27 {
28  class Cable;
29 
31 
36  {
37  public:
44  void setYoungsModulus(agx::Real youngsModulus, agxCable::Direction direction);
45 
50 
56  void setDamping(agx::Real damping, agxCable::Direction direction);
57 
62 
63  void setPoissonsRatio(agx::Real poissonsRatio, agxCable::Direction direction);
65 
67  public:
69 
70 
71  protected:
72  friend class agxCable::Cable;
74  virtual ~CableProperties();
75 
76  bool isDirty() const;
77  void clearDirtyFlag();
78  void updateBulkProperties(Cable& cable) const;
79 
80  private:
81  void restoreFromLinkedCable(agxStream::InputArchive& in);
82  void restoreFromDeformable1D(agxStream::InputArchive& in);
83 
84  private:
85  agx::Real m_youngsModulus[ALL_DIRECTIONS];
86  agx::Real m_damping[ALL_DIRECTIONS];
87  agx::Real m_poissonsRatio[ALL_DIRECTIONS];
88 
89  agx::Bool m_dirty;
91  };
92 }
93 
94 #endif
#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 AGXCABLE_EXPORT
Class controlling material properties of one or more cables.
agx::Real getDamping(agxCable::Direction direction) const
void setPoissonsRatio(agx::Real poissonsRatio, agxCable::Direction direction)
void setYoungsModulus(agx::Real youngsModulus, agxCable::Direction direction)
Set Young's modulus of the cable along the given direction.
agx::Real getPoissonsRatio(agxCable::Direction direction) const
void setDamping(agx::Real damping, agxCable::Direction direction)
Set the SPOOK damping of the constraints holding the cable together.
agx::Real getYoungsModulus(agxCable::Direction direction) const
A model of a cable using a lumped elements model.
Definition: Cable.h:44
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:45
Base class providing referencing counted objects.
Definition: Referenced.h:114
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
Contain classes for 6 DOF lumped element cables/wires/ropes.
Direction
The different directions in which a cable can be deformed.
Definition: Direction.h:32
@ ALL_DIRECTIONS
Definition: Direction.h:37
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...
Definition: InputArchive.h:400
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition: Integer.h:48
double Real
Definition: Real.h:42