|
AGXDynamics
2.31.1.0
|
#include <GraphRenderer.h>
Inheritance diagram for agxOSG::GraphRenderer:Classes | |
| struct | OSGChannel |
Public Member Functions | |
| GraphRenderer (agxRender::RenderManager *renderManager) | |
| void | addChannel () |
| 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 |
| void | clear () |
| Destruction of any data for this graph. More... | |
| void | drawData (size_t channelIndex, const agxRender::Graph::DataVector &data) |
| Update the line geometry for a specified channel given the data (points) More... | |
| void | drawLine (const agx::Vec2 &p1, const agx::Vec2 &p2) const |
Draw a line from p1 to p2. More... | |
| void | drawText (const agx::Vec2 &pos, const agx::String &str) |
| Called when text should be drawn. More... | |
| osg::Node * | getNode () |
| size_t | getNumChannels () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| void | postDraw () |
| If the rendering of this graph requires some cleanup to be done it can be done in this method. More... | |
| void | preDraw () |
| 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... | |
| void | removeChannel () |
| Tear down data for the last added channel. More... | |
| void | setColor (const agx::Vec4 &color) |
| Set the current color for items to be drawn next. More... | |
| virtual void | setEnable (bool flag) |
| Implement functionality for enabling/disabling the rendering of this graph. More... | |
| void | setRenderManager (agxRender::RenderManager *mgr) |
| 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 Types | |
| typedef agx::Vector< OSGChannel > | Channels |
Protected Member Functions | |
| virtual | ~GraphRenderer () |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | updateLineGeometry (size_t channelIndex, const agxRender::Graph::DataVector &data) |
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 | |
| Channels | m_channels |
| agx::Vec4 | m_currentColor |
| agx::observer_ptr< Graph > | m_graph |
| agxRender::RenderManager * | m_mgr |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| osg::ref_ptr< osg::Group > | m_parent |
| AtomicValue | m_refCount |
Definition at line 36 of file GraphRenderer.h.
|
protected |
Definition at line 77 of file GraphRenderer.h.
| agxOSG::GraphRenderer::GraphRenderer | ( | agxRender::RenderManager * | renderManager | ) |
|
protectedvirtual |
Reimplemented from agxRender::Graph::GraphRenderer.
|
virtual |
Setup structures/data for another data channel.
Will later be indexed from the drawData method.
Implements agxRender::Graph::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(), and agx::InternalData::getOrCreate().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
virtual |
Destruction of any data for this graph.
After this, no more calls to draw will be done.
Implements agxRender::Graph::GraphRenderer.
|
protectedinherited |
|
virtual |
Update the line geometry for a specified channel given the data (points)
Implements agxRender::Graph::GraphRenderer.
Draw a line from p1 to p2.
Implements agxRender::Graph::GraphRenderer.
|
virtual |
Called when text should be drawn.
\param pos - position in x,y in the range [0..1]
| str | - text to draw |
Implements agxRender::Graph::GraphRenderer.
|
staticprotectedinherited |
|
inline |
Definition at line 54 of file GraphRenderer.h.
|
virtual |
Implements agxRender::Graph::GraphRenderer.
|
inherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
|
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.
Implements agxRender::Graph::GraphRenderer.
|
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
Implements agxRender::Graph::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.
Referenced by agxData::Val< UInt >::Val().
|
virtual |
Tear down data for the last added channel.
Implements agxRender::Graph::GraphRenderer.
Set the current color for items to be drawn next.
| color | - Color to draw |
Implements agxRender::Graph::GraphRenderer.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
virtual |
Implement functionality for enabling/disabling the rendering of this graph.
Might involve removing stuff from your specific scenegraph or similar.
Implements agxRender::Graph::GraphRenderer.
|
inline |
Definition at line 58 of file GraphRenderer.h.
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.
|
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.
|
protected |
|
staticinherited |
|
protected |
Definition at line 78 of file GraphRenderer.h.
|
protected |
Definition at line 67 of file GraphRenderer.h.
|
protectedinherited |
Definition at line 113 of file Graph.h.
Referenced by agxRender::Graph::setRenderer().
|
protected |
Definition at line 66 of file GraphRenderer.h.
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
protected |
Definition at line 65 of file GraphRenderer.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.