AGX Dynamics  2.35.0.1
CableDamageState.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 #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 
59 
63  size_t getNumSegmentDamageStates() const;
64 
72 
77 
78 
85  void setEnable(agxCable::DamageStateTypes::StateType damageType, bool enable);
86 
94 
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 
118 }
#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
A bit set used by the cable damage framework to control which parts of the cable damage input that a ...
Inspect a cable's current state and compute a SegmentDamageState for each segment.
bool isEnabled(agxCable::DamageStateTypes::StateType damageType) const
Test if the given piece of the SegmentDamageState is part of the set of state that is computed.
const agxCable::SegmentDamageStateVector & getSegmentDamageData() const
Provides read-only access to the segment damage states.
agxCable::CableDamageStateFilter getCableDamageStateFilter() const
CableDamageState(agxCable::Cable *cable)
Create a new CableDamageState and register it with the given cable.
void setEnable(agxCable::DamageStateTypes::StateType damageType, bool enable)
Enable or disable computation of a single piece of the SegmentDamageState.
agxCable::Cable * getCable()
size_t getNumSegmentDamageStates() const
const agxCable::Cable * getCable() const
void setCableDamageStateFilter(agxCable::CableDamageStateFilter filter)
Set the filter used to determine which parts of the SegmentDamageStates that should be computed.
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
StateType
Listing of all the cable states that CableDamageState can extract for use by cable damage estimation.
Contain classes for 6 DOF lumped element cables/wires/ropes.