AGX Dynamics  2.38.0.2
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 #pragma once
19 
20 #include <agxCable/export.h>
21 #include <agxCable/Direction.h>
22 
23 #include <agxStream/Serializable.h>
24 
25 namespace agxCable
26 {
27  class Cable;
28 
30 
35  {
36  public:
43  void setYoungsModulus(agx::Real youngsModulus, agxCable::Direction direction);
44 
48  agx::Real getYoungsModulus(agxCable::Direction direction) const;
49 
55  void setDamping(agx::Real damping, agxCable::Direction direction);
56 
60  agx::Real getDamping(agxCable::Direction direction) const;
61 
62  void setPoissonsRatio(agx::Real poissonsRatio, agxCable::Direction direction);
63  agx::Real getPoissonsRatio(agxCable::Direction direction) const;
64 
66  public:
68 
69 
70  protected:
71  friend class agxCable::Cable;
73  virtual ~CableProperties();
74 
75  bool isDirty() const;
76  void clearDirtyFlag();
77  void updateBulkProperties(Cable& cable) const;
78 
79  private:
80  void restoreFromLinkedCable(agxStream::InputArchive& in);
81  void restoreFromDeformable1D(agxStream::InputArchive& in);
82 
83  private:
84  agx::Real m_youngsModulus[ALL_DIRECTIONS];
85  agx::Real m_damping[ALL_DIRECTIONS];
86  agx::Real m_poissonsRatio[ALL_DIRECTIONS];
87 
88  agx::Bool m_dirty;
90  };
91 }
92 
agx::Real
double Real
Definition: Real.h:42
export.h
agxStream::Serializable
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
agxCable
Contain classes for 6 DOF lumped element cables/wires/ropes.
Definition: able/Attachment.h:36
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
agxCable::Cable
A model of a cable using a lumped elements model.
Definition: Cable.h:43
AGXSTREAM_DECLARE_SERIALIZABLE
#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
Direction.h
AGXCABLE_EXPORT
#define AGXCABLE_EXPORT
Definition: agxCable/export.h:41
agxStream::in
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:399
Serializable.h
agxStream::InputArchive
Class for reading a binary stream of serialized data.
Definition: InputArchive.h:50
agxCable::CableProperties
Class controlling material properties of one or more cables.
Definition: CableProperties.h:34
agx::Referenced
Base class providing referencing counted objects.
Definition: Referenced.h:119
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
agx::Bool
bool Bool
Definition: Integer.h:40
agxFMI2::Export::Constraint::setDamping
AGXFMI_EXPORT InputVariable_Real * setDamping(agx::Constraint *constraint)
agxCable::ALL_DIRECTIONS
@ ALL_DIRECTIONS
Definition: Direction.h:37
agxCable::Direction
Direction
The different directions in which a cable can be deformed.
Definition: Direction.h:31