|
AGX Dynamics 2.42.3.0
|
Class that implements a simple graph for plotting scalar values. More...
#include <Graph.h>
Inheritance diagram for agxRender::Graph:Classes | |
| class | Channel |
| Internal class for handling data for a channel. More... | |
| class | GraphRenderer |
| Abstract base class that acts as an interface and can render the data from a Graph. More... | |
Public Types | |
| typedef agx::Vector< agx::Vec2 > | DataVector |
| typedef agx::observer_ptr< const GraphRenderer > | GraphRendererConstObserver |
| typedef agx::ref_ptr< const GraphRenderer > | GraphRendererConstRef |
| typedef agx::observer_ptr< GraphRenderer > | GraphRendererObserver |
| typedef agx::ref_ptr< GraphRenderer > | GraphRendererRef |
Public Member Functions | |
| Graph (float width=float(0.9), float height=float(0.2), const agx::Vec2 &offset=agx::Vec2(agx::Real(0.01), agx::Real(0.01))) | |
| void | addChannel (Channel *channel) |
| void | addPoint (const agx::Vec2 &point) |
| void | addText (const agx::Vec2 &point, const agx::String &str) |
| void | clearChannels () |
| void | clearPoints () |
| void | draw () |
| Channel * | getChannel (size_t idx) |
| bool | getEnable () const |
| float | getHeight () |
| const agx::Vec2 & | getOffset () const |
| GraphRenderer * | getRenderer () |
| const GraphRenderer * | getRenderer () const |
| float | getWidth () |
| size_t | numChannels () const |
| void | postDraw () |
| void | preDraw () |
| void | reserve (size_t size) |
| void | setEnable (bool flag) |
| void | setOffset (const agx::Vec2 &offset) |
| void | setRenderer (GraphRenderer *renderer) |
| void | setSize (float width, float height) |
| bool | validate () const |
| Will check so that the number of channels for the associated GraphRenderer has equal # channels as this graph. | |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
Protected Member Functions | |
| virtual | ~Graph () |
| void | drawData (size_t channelIndex) const |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Additional Inherited Members | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. | |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Class that implements a simple graph for plotting scalar values.
| typedef agx::observer_ptr< const GraphRenderer > agxRender::Graph::GraphRendererConstObserver |
| typedef agx::ref_ptr< const GraphRenderer > agxRender::Graph::GraphRendererConstRef |
| agxRender::Graph::Graph | ( | float | width = float(0.9), |
| float | height = float(0.2), |
||
| const agx::Vec2 & | offset = agx::Vec2(agx::Real(0.01), agx::Real(0.01)) |
||
| ) |
|
protectedvirtual |
| void agxRender::Graph::addChannel | ( | Channel * | channel | ) |
| void agxRender::Graph::addPoint | ( | const agx::Vec2 & | point | ) |
| void agxRender::Graph::addText | ( | const agx::Vec2 & | point, |
| const agx::String & | str | ||
| ) |
| void agxRender::Graph::clearChannels | ( | ) |
| void agxRender::Graph::draw | ( | ) |
|
protected |
|
inline |
|
inline |
|
inline |
| void agxRender::Graph::postDraw | ( | ) |
| void agxRender::Graph::preDraw | ( | ) |
| void agxRender::Graph::setEnable | ( | bool | flag | ) |
|
inline |
|
inline |
Definition at line 203 of file Graph.h.
References agxRender::Graph::GraphRenderer::m_graph.
|
inline |
| bool agxRender::Graph::validate | ( | ) | const |
Will check so that the number of channels for the associated GraphRenderer has equal # channels as this graph.