AGX Dynamics  2.37.2.0
CableProperties.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. 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 
49  agx::Real getYoungsModulus(agxCable::Direction direction) const;
50 
56  void setDamping(agx::Real damping, agxCable::Direction direction);
57 
61  agx::Real getDamping(agxCable::Direction direction) const;
62 
63  void setPoissonsRatio(agx::Real poissonsRatio, agxCable::Direction direction);
64  agx::Real getPoissonsRatio(agxCable::Direction direction) const;
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
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
bool Bool
Definition: Integer.h:48
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
Base class providing referencing counted objects.
Definition: Referenced.h:119
A model of a cable using a lumped elements model.
Definition: Cable.h:43
Class controlling material properties of one or more cables.
Direction
The different directions in which a cable can be deformed.
Definition: Direction.h:31
Contain classes for 6 DOF lumped element cables/wires/ropes.
Class for reading a binary stream of serialized data.
Definition: InputArchive.h:51
AGXFMI_EXPORT InputVariable_Real * setDamping(agx::Constraint *constraint)
#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
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
double Real
Definition: Real.h:42
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
#define AGXCABLE_EXPORT
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97