AGXDynamics  2.35.0.3
CableDamageDataRenderer.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 
19 #include <agx/Real.h>
20 #include <agx/Vector.h>
21 
22 #include <agxOSG/export.h>
23 
25 
26 #include <functional>
27 
28 namespace osg
29 {
30  class Group;
31 }
32 
33 
34 namespace agxCable
35 {
36  class Cable;
37  class CableDamageState;
38  class SegmentDamageState;
39 }
40 
41 
42 
43 namespace agxOSG
44 {
45  class GeometryNode;
46  class Group;
47  class ExampleApplication;
48 }
49 
50 
51 
52 namespace agxOSG
53 {
55 
57  {
58  public:
60  agxOSG::ExampleApplication& application);
61 
62 
63  void setDamageGetter(std::string name, std::function<agx::Real(const agxCable::SegmentDamageState*)> f);
64 
65  virtual void post(const agx::Real& timeStamp) override;
66 
67  void updateColors();
68 
69  void updateText();
70 
71  protected:
73 
74  private:
76 
77  private:
79  agxOSG::ExampleApplication& m_application;
80  std::function<agx::Real(const agxCable::SegmentDamageState*)> m_getDamage;
81  std::string m_getDamageName;
83  };
84 }
agx::Real
double Real
Definition: Real.h:42
Vector.h
agxSDK::StepEventListener
Derive from this class to implement a listener for simulation step events.
Definition: StepEventListener.h:37
agx::Vector< agxOSG::GeometryNode * >
agxOSG::ExampleApplication
Class that encapsulates rendering and simulation using OpenSceneGraph.
Definition: ExampleApplication.h:317
agxCable
Contain classes for 6 DOF lumped element cables/wires/ropes.
Definition: able/Attachment.h:36
agxCable::Cable
A model of a cable using a lumped elements model.
Definition: Cable.h:43
StepEventListener.h
agxOSG::CableDamageDataRenderer::~CableDamageDataRenderer
virtual ~CableDamageDataRenderer()
Definition: CableDamageDataRenderer.h:72
agxOSG
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
agxCable::CableDamageState
Inspect a cable's current state and compute a SegmentDamageState for each segment.
Definition: CableDamageState.h:42
agxOSG::CableDamageDataRenderer
Definition: CableDamageDataRenderer.h:56
agx::root
AGXCORE_EXPORT Component * root()
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
export.h
agxCable::SegmentDamageState
A SegmenDamageState instance records a collection of states computed from a cable for later use by a ...
Definition: SegmentDamageState.h:43
Real.h
AGXOSG_EXPORT
#define AGXOSG_EXPORT