AGX Dynamics  2.37.2.0
agxPlot::DebugPlot Class Reference

"Static" helper class to plot values from where e.g., values aren't exposed. More...

#include <DebugPlot.h>

+ Inheritance diagram for agxPlot::DebugPlot:

Public Types

enum  TimeDataBehavior { ADD, USE_FIRST, USE_LAST }
 Behavior when pushing time data values since several calls can be made within same the time step. More...
 
- Public Types inherited from agx::Singleton
enum  Priority { HIGHEST_PRIORITY = 2147483647, LOWEST_PRIORITY = 10000, DEFAULT_PRIORITY = 1073741824 }
 Specifies the ranges of the priority which can be assigned to a singleton at the time of creation. More...
 

Static Public Member Functions

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, i.e., number of samples. More...
 
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. More...
 
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. More...
 
static agx::Bool hasInstance (agxSDK::Simulation *simulation)
 

Protected Member Functions

 ~DebugPlot ()
 
virtual void shutdown () override
 Implement this method to cleanup your Singleton class. More...
 
- Protected Member Functions inherited from agx::Singleton
virtual ~Singleton ()
 Destructor. More...
 
void _shutdown ()
 

Additional Inherited Members

- Public Member Functions inherited from agx::Singleton
 Singleton (int priority=DEFAULT_PRIORITY)
 Default constructor. More...
 
virtual std::string getClassName () const =0
 
int getPriority () const
 Return the shutdown priority of the singleton instance. More...
 

Detailed Description

"Static" helper class to plot values from where e.g., values aren't exposed.

It's basic so you have to know what your axes labels mean and to which window you're pushing values.

Definition at line 43 of file DebugPlot.h.

Member Enumeration Documentation

◆ TimeDataBehavior

Behavior when pushing time data values since several calls can be made within same the time step.

Enumerator
ADD 

Add previous and current.

USE_FIRST 

Use first value set - i.e., ignore all the rest of the values during this time step, to this curve.

USE_LAST 

Use the current value, i.e., write over any previous value written.

Definition at line 50 of file DebugPlot.h.

Constructor & Destructor Documentation

◆ ~DebugPlot()

agxPlot::DebugPlot::~DebugPlot ( )
protected

Member Function Documentation

◆ add() [1/2]

static void agxPlot::DebugPlot::add ( agx::Real  yValue,
const agx::String &  curve,
const agx::String &  window = "" 
)
static

Add y-value to a curve, named curve, in a window named window, where the x-values are integers, i.e., number of samples.

Use this method, rather than addTimeData, if you know you're writing many values each time step and wants to see them all.

Parameters
yValue- y-value
curve- name of the curve in window
window- name of the window

◆ add() [2/2]

static void agxPlot::DebugPlot::add ( agx::Real  xValue,
agx::Real  yValue,
const agx::String &  curve,
const agx::String &  window = "" 
)
static

Add (x, y) to a curve with name curve in a window named window.

Parameters
xValue- x-value
yValue- y-value
curve- name of the curve in window
window- name of the window

◆ addTimeData()

static void agxPlot::DebugPlot::addTimeData ( agx::Real  yValue,
const agx::String &  curve,
const agx::String &  window = "",
TimeDataBehavior  behavior = USE_LAST 
)
static

Add y-value to a curve, named curve, in a window named window, where the x-values are simulation time.

Parameters
yValue- y-value
curve- name of the curve in window
window- name of the window
behavior- behavior if several calls are made during the same time step

◆ hasInstance()

static agx::Bool agxPlot::DebugPlot::hasInstance ( agxSDK::Simulation *  simulation)
static
Returns
true if an instance of this object exists for the given simulation

◆ shutdown()

virtual void agxPlot::DebugPlot::shutdown ( )
overrideprotectedvirtual

Implement this method to cleanup your Singleton class.

Reimplemented from agx::Singleton.


The documentation for this class was generated from the following file: