AGX Dynamics  2.37.2.0
CableDamageState.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 #pragma once
18 
21 #include <agxCable/Cable.h>
22 
23 #include <agxStream/Serializable.h>
24 
25 
26 namespace agxCable
27 {
28  class SegmentDamageState;
29 }
30 
31 namespace agxCable
32 {
43  {
44  public:
52 
58  const agxCable::SegmentDamageStateVector& getSegmentDamageData() const;
59 
63  size_t getNumSegmentDamageStates() const;
64 
71  void setCableDamageStateFilter(agxCable::CableDamageStateFilter filter);
72 
76  agxCable::CableDamageStateFilter getCableDamageStateFilter() const;
77 
78 
85  void setEnable(agxCable::DamageStateTypes::StateType damageType, bool enable);
86 
93  bool isEnabled(agxCable::DamageStateTypes::StateType damageType) const;
94 
95  agxCable::Cable* getCable();
96  const agxCable::Cable* getCable() const;
97 
98  public: // Methods called by the AGX framework.
99  virtual void pre();
100  virtual void post();
101 
103 
107 
108  protected:
109  virtual ~CableDamageState();
110 
111  private:
112  CableObserver m_cable;
113  SegmentDamageStateVector m_segmentDamages;
114  CableDamageStateFilter m_filter;
115  };
116 
117  AGX_DECLARE_POINTER_TYPES(CableDamageState);
118 }
#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
Contain classes for 6 DOF lumped element cables/wires/ropes.
StateType
Listing of all the cable states that CableDamageState can extract for use by cable damage estimation...
A bit set used by the cable damage framework to control which parts of the cable damage input that a ...
#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
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
#define AGXCABLE_EXPORT
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97
Inspect a cable&#39;s current state and compute a SegmentDamageState for each segment.