AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
CableDamageDataRenderer.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx 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
28namespace osg
29{
30 class Group;
31}
32
33
34namespace agxCable
35{
36 class Cable;
37 class CableDamageState;
38 class SegmentDamageState;
39}
40
41
42
43namespace agxOSG
44{
45 class GeometryNode;
46 class Group;
47 class ExampleApplication;
48}
49
50
51
52namespace 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
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}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define AGXOSG_EXPORT
Inspect a cable's current state and compute a SegmentDamageState for each segment.
A model of a cable using a lumped elements model.
Definition: Cable.h:44
A SegmenDamageState instance records a collection of states computed from a cable for later use by a ...
virtual void post(const agx::Real &timeStamp) override
Called after a step is taken in the simulation Implement this method in the derived class to get call...
void setDamageGetter(std::string name, std::function< agx::Real(const agxCable::SegmentDamageState *)> f)
CableDamageDataRenderer(agxCable::Cable *cable, agxCable::CableDamageState *damage, osg::Group *root, agxOSG::ExampleApplication &application)
Class that encapsulates rendering and simulation using OpenSceneGraph.
Derive from this class to implement a listener for simulation step events.
Templated vector class.
Definition: agx/Vector.h:53
Contain classes for 6 DOF lumped element cables/wires/ropes.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
double Real
Definition: Real.h:41