|
AGXDynamics
2.31.1.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) |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| void | clearChannels () |
| void | clearPoints () |
| void | draw () |
| Channel * | getChannel (size_t idx) |
| bool | getEnable () const |
| float | getHeight () |
| const agx::Vec2 & | getOffset () const |
| int | getReferenceCount () const |
| GraphRenderer * | getRenderer () |
| const GraphRenderer * | getRenderer () const |
| float | getWidth () |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| size_t | numChannels () const |
| void | postDraw () |
| void | preDraw () |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| 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) |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| bool | validate () const |
| Will check so that the number of channels for the associated GraphRenderer has equal # channels as this graph. More... | |
Static Public Member Functions | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| virtual | ~Graph () |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | drawData (size_t channelIndex) const |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes | |
| 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::addText | ( | const agx::Vec2 & | point, |
| const agx::String & | str | ||
| ) |
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
| void agxRender::Graph::clearChannels | ( | ) |
|
protectedinherited |
| void agxRender::Graph::draw | ( | ) |
|
protected |
|
staticprotectedinherited |
|
inline |
|
inherited |
|
inline |
|
inline |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
| void agxRender::Graph::postDraw | ( | ) |
| void agxRender::Graph::preDraw | ( | ) |
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
|
inline |
Definition at line 230 of file Graph.h.
References agxOSG::addText().
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
| void agxRender::Graph::setEnable | ( | bool | flag | ) |
|
inline |
Definition at line 204 of file Graph.h.
References agxRender::Graph::GraphRenderer::m_graph.
|
inline |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
| bool agxRender::Graph::validate | ( | ) | const |
Will check so that the number of channels for the associated GraphRenderer has equal # channels as this graph.
|
staticinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.