17 #ifndef AGXPLOT_DEBUGPLOT_H
18 #define AGXPLOT_DEBUGPLOT_H
20 #include <agx/config/AGX_USE_WEBPLOT.h>
91 SINGLETON_CLASSNAME_METHOD();
104 virtual ~CurveData() {}
107 struct TimeCurveData :
public CurveData
109 TimeCurveData() : m_written( true ), m_value(
agx::
Real( 0 ) ) {}
111 agx::Real getValue()
const { m_written =
true;
return m_value; }
113 void set(
agx::Real val, TimeDataBehavior behavior )
116 if ( behavior == TimeDataBehavior::ADD )
118 else if ( behavior == TimeDataBehavior::USE_FIRST )
120 else if ( behavior == TimeDataBehavior::USE_LAST )
130 virtual ~TimeCurveData() {}
138 struct XYCurveData :
public CurveData
150 virtual ~XYCurveData() {}
154 struct YCurveData :
public XYCurveData
156 YCurveData() : m_counter(0) {}
160 XYCurveData::add( (
agx::Real)m_counter++, y );
164 virtual ~YCurveData() {}
193 #if AGX_USE_WEBPLOT()
194 agxPlot::WebPlotRef m_webPlot;
#define AGXPHYSICS_EXPORT
"Static" helper class to plot values from where e.g., values aren't exposed.
TimeDataBehavior
Behavior when pushing time data values since several calls can be made within same the time step.
@ ADD
Add previous and current.
@ USE_FIRST
Use first value set - i.e., ignore all the rest of the values during this time step,...
static void addTimeData(agx::Real yValue, const agx::String &curve, const agx::String &window="", TimeDataBehavior behavior=USE_LAST)
Add y-value to a curve, named curve, in a window named window, where the x-values are simulation time...
static void add(agx::Real yValue, const agx::String &curve, const agx::String &window="")
Add y-value to a curve, named curve, in a window named window, where the x-values are integers,...
static agx::Bool hasInstance(agxSDK::Simulation *simulation)
static void add(agx::Real xValue, agx::Real yValue, const agx::String &curve, const agx::String &window="")
Add (x, y) to a curve with name curve in a window named window.
virtual void shutdown() override
Implement this method to cleanup your Singleton class.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Base class providing referencing counted objects.
Base class for Singletons that should have its shutdown called explicitly before exit of the applicat...
Namespace contains functionality related to plotting.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
AGXTERRAIN_EXPORT void clear()
The agx namespace contains the dynamics/math part of the AGX Dynamics API.