|
AGXDynamics
2.31.1.0
|
Abstract base class that acts as an interface and can render the data from a Graph. More...
#include <Graph.h>
Inheritance diagram for agxRender::Graph::GraphRenderer:Public Member Functions | |
| GraphRenderer () | |
| virtual void | addChannel ()=0 |
| Setup structures/data for another data channel. More... | |
| 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 |
| virtual void | clear ()=0 |
| Destruction of any data for this graph. More... | |
| virtual void | drawData (size_t channelIndex, const Graph::DataVector &data)=0 |
| Update the line geometry for a specified channel given the data (points) More... | |
| virtual void | drawLine (const agx::Vec2 &p1, const agx::Vec2 &p2) const =0 |
Draw a line from p1 to p2. More... | |
| virtual void | drawText (const agx::Vec2 &pos, const agx::String &str)=0 |
| Called when text should be drawn. More... | |
| virtual size_t | getNumChannels () const =0 |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| virtual void | postDraw ()=0 |
| If the rendering of this graph requires some cleanup to be done it can be done in this method. More... | |
| virtual void | preDraw ()=0 |
| If the rendering of this graph requires some pre-state to be set (orthographic projection etc) this can be done in this method. More... | |
| 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... | |
| virtual void | removeChannel ()=0 |
| Tear down data for the last added channel. More... | |
| virtual void | setColor (const agx::Vec4 &color)=0 |
| Set the current color for items to be drawn next. More... | |
| virtual void | setEnable (bool flag)=0 |
| Implement functionality for enabling/disabling the rendering of this graph. More... | |
| 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... | |
Static Public Member Functions | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| virtual | ~GraphRenderer () |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () 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 | |
| agx::observer_ptr< Graph > | m_graph |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Abstract base class that acts as an interface and can render the data from a Graph.
This class has to be implemented for each rendering engine.
|
inline |
Definition at line 48 of file Graph.h.
References agxTerrain::Profiler::clear().
|
inlineprotectedvirtual |
Reimplemented in agxOSG::GraphRenderer.
|
pure virtual |
Setup structures/data for another data channel.
Will later be indexed from the drawData method.
Implemented in agxOSG::GraphRenderer.
|
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 |
|
pure virtual |
Destruction of any data for this graph.
After this, no more calls to draw will be done.
Implemented in agxOSG::GraphRenderer.
|
protectedinherited |
|
pure virtual |
Update the line geometry for a specified channel given the data (points)
Implemented in agxOSG::GraphRenderer.
|
pure virtual |
Draw a line from p1 to p2.
Implemented in agxOSG::GraphRenderer.
|
pure virtual |
Called when text should be drawn.
| pos | - position in x,y in the range [0..1] |
| str | - text to draw |
Implemented in agxOSG::GraphRenderer.
|
staticprotectedinherited |
|
pure virtual |
Implemented in agxOSG::GraphRenderer.
|
inherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
|
pure virtual |
If the rendering of this graph requires some cleanup to be done it can be done in this method.
It will be called AFTER any draw* calls.
Implemented in agxOSG::GraphRenderer.
|
pure virtual |
If the rendering of this graph requires some pre-state to be set (orthographic projection etc) this can be done in this method.
It will be called before any draw* methods
Implemented in agxOSG::GraphRenderer.
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.
|
pure virtual |
Tear down data for the last added channel.
Implemented in agxOSG::GraphRenderer.
Set the current color for items to be drawn next.
| color | - Color to draw |
Implemented in agxOSG::GraphRenderer.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
pure virtual |
Implement functionality for enabling/disabling the rendering of this graph.
Might involve removing stuff from your specific scenegraph or similar.
Implemented in agxOSG::GraphRenderer.
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.
|
staticinherited |
|
protected |
Definition at line 113 of file Graph.h.
Referenced by agxRender::Graph::setRenderer().
|
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.