|
vizkit3d
|
#include <Vizkit3DPlugin.hpp>
Classes | |
| class | CallbackAdapter |
Public Slots | |
| virtual bool | isPluginEnabled () |
| virtual void | setPluginEnabled (bool enabled) |
| virtual const QString | getPluginName () const |
| virtual void | setPluginName (const QString &name) |
| virtual void | click (float x, float y) |
| QObject * | getRubyAdapterCollection () |
| void | setKeepOldData (bool value) |
| bool | isKeepOldDataEnabled () |
| virtual void | clearVisualization () |
| void | deleteOldData () |
| int | getMaxOldData () const |
Signals | |
| void | propertyChanged (QString property_name) |
| void | childrenChanged () |
| void | pluginActivityChanged (bool) |
| void | clicked (float x, float y) |
| void | picked (float x, float y, float z) |
Public Member Functions | |
| VizPluginBase (QObject *parent=NULL) | |
| virtual | ~VizPluginBase () |
| Vizkit3DWidget * | getWidget () const |
| virtual bool | isDirty () const |
| void | setDirty () |
| osg::ref_ptr< osg::Group > | getVizNode () const |
| osg::ref_ptr< osg::Group > | getRootNode () const |
| std::vector< QDockWidget * > | getDockWidgets () |
| void | setMaxOldData (int value) |
| void | setPose (const QVector3D &position, const QQuaternion &orientation) |
| QStringList | getVisualizationFrames () const |
| QString | getVisualizationFrame () const |
| void | setVisualizationFrameFromList (const QStringList &frames) |
| void | setVisualizationFrame (const QString &frame) |
| double | getScale () const |
| void | setScale (double scale) |
Protected Member Functions | |
| virtual void | updateMainNode (osg::Node *node)=0 |
| virtual osg::ref_ptr< osg::Node > | createMainNode () |
| virtual void | createDockWidgets () |
| virtual osg::ref_ptr< osg::Node > | cloneCurrentViz () |
Protected Attributes | |
| boost::mutex | updateMutex |
| std::vector< QDockWidget * > | dockWidgets |
| VizPluginRubyAdapterCollection | adapterCollection |
Properties | |
| QString | vizkit3d_plugin_name |
| bool | enabled |
| bool | KeepOldData |
| int | MaxOldData |
| QStringList | frame |
| double | scale |
Friends | |
| class | PickHandler |
Interface class for all visualization plugins based on vizkit3d. All plugins provide an osg::Group() node, which can be added to an osg render tree for visualisation using getMainNode().
The dirty handling works as such, that whenever the class is flagged dirty, the virtual updateMainNode() function will be called when it is safe to modify the node. Any plugin needs to implement this function to update the visualisation. The osg node must not be modified at any other time.
The updateMainNode() is guarded by a mutex, so it is generally a good idea to guard any updates to the internal state of the plugin, that is required within the updateMainNode(). Note that updateMainNode() is most likely called from a different thread context than the rest.
| VizPluginBase::VizPluginBase | ( | QObject * | parent = NULL | ) |
|
virtual |
|
signal |
Must be emitted when children are added/removed from this plugin
|
virtualslot |
Clears the visualization of the plugin
|
virtualslot |
Emits signal 'clicked(float, float)' if the plugin has a Vizkit3DWidget as an ancestor.
|
signal |
Signals when this plugin has been clicked. x and y are in Vizkit3DWidget coordinates. That is the container widget of the OSG viewer and the property browser.
|
protectedvirtual |
override this method to provide your own clone for the current visualization
|
protectedvirtual |
override this method to provide your own QDockWidgets. The QDockWidgets will automatically attached to the main window.
|
protectedvirtual |
override this method to provide your own main node.
Reimplemented in vizkit3d::VizPluginAdapter< T >.
|
slot |
deletes all copies of the osg graph which were genereted by keepCurrentViz
| std::vector< QDockWidget *> VizPluginBase::getDockWidgets | ( | ) |
|
inlineslot |
|
virtualslot |
| osg::ref_ptr< osg::Group > VizPluginBase::getRootNode | ( | ) | const |
|
slot |
| double VizPluginBase::getScale | ( | ) | const |
Returns the scale of the plugin (1.0 by default)
| QString VizPluginBase::getVisualizationFrame | ( | ) | const |
Returns the frame at which this plugin is attached
| QStringList VizPluginBase::getVisualizationFrames | ( | ) | const |
Returns the list of available visualization frames
It is used for the relevant Q_PROPERTY to get a combobox
| osg::ref_ptr< osg::Group > VizPluginBase::getVizNode | ( | ) | const |
| Vizkit3DWidget * VizPluginBase::getWidget | ( | ) | const |
The underlying Vizkit3D Widget
May be NULL if the plugin is e.g. built as a child of another plugin
|
virtual |
|
slot |
|
virtualslot |
|
signal |
Signals when this plugin has been clicked. x,y,z are in world coordinates.
|
signal |
will emitted if the plugin activity changes
|
signal |
must be emitted if a property of an inherited plugin changes
| void VizPluginBase::setDirty | ( | ) |
mark the internal state as modified
|
slot |
clones the current osg graphs and adds it to the root node. this is usefull to keep visualisation over time
| void VizPluginBase::setMaxOldData | ( | int | value | ) |
|
virtualslot |
| enabled | set plugin enabled or disabled |
|
virtualslot |
| void VizPluginBase::setPose | ( | const QVector3D & | position, |
| const QQuaternion & | orientation | ||
| ) |
| void VizPluginBase::setScale | ( | double | scale | ) |
Sets the scale of the plugin (1.0 by default)
| void VizPluginBase::setVisualizationFrame | ( | const QString & | frame | ) |
Set the name of the frame which is the origin of this plugin
| void VizPluginBase::setVisualizationFrameFromList | ( | const QStringList & | frames | ) |
|
protectedpure virtual |
override this function to update the visualisation.
| node | contains a point to the node which can be modified. |
Implemented in vizkit3d::VizPluginAdapter< T >.
|
friend |
|
protected |
|
protected |
|
protected |
lock this mutex outside updateMainNode if you update the internal state of the visualization.
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
read |
1.8.13