vizkit3d
Classes | Public Slots | Signals | Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
vizkit3d::Vizkit3DWidget Class Reference

#include <Vizkit3DWidget.hpp>

Inheritance diagram for vizkit3d::Vizkit3DWidget:

Public Slots

void addPlugin (QObject *plugin, QObject *parent=NULL)
 
void removePlugin (QObject *plugin)
 
QString getRootVisualizationFrame () const
 
void setVisualizationFrame (const QString &frame, bool update)
 
void setVisualizationFrame (const QString &frame)
 
void setRootFrame (QString frame)
 
QStringList * getVisualizationFramesRuby () const
 
QStringList getVisualizationFrames () const
 
QString getVisualizationFrame () const
 
void setPluginDataFrame (const QString &frame, QObject *plugin)
 
QString getPluginDataFrame (QObject *plugin) const
 
void setTransformation (const QString &source_frame, const QString &target_frame, const QVector3D &position, const QQuaternion &orientation)
 
void getTransformation (const QString &source_frame, const QString &target_frame, QVector3D &position, QQuaternion &orientation) const
 
QString getWorldName () const
 
void setCameraLookAt (double x, double y, double z)
 
void setCameraEye (double x, double y, double z)
 
void setCameraUp (double x, double y, double z)
 
void getCameraView (QVector3D &eye, QVector3D &lookAt, QVector3D &up)
 
void setSmallFeatureCullingPixelSize (float val)
 
QColor getBackgroundColor () const
 
void setBackgroundColor (QColor color)
 
void collapsePropertyBrowser ()
 
QWidget * getPropertyWidget () const
 
bool isTransformer () const
 
void setTransformer (bool value)
 
float getTransformerTextSize () const
 
void setTransformerTextSize (float value)
 
bool isAxes () const
 
void setAxes (bool value)
 
bool isAxesLabels () const
 
void setAxesLabels (bool value)
 
void enableGrabbing ()
 
void disableGrabbing ()
 
QImage grab ()
 
QString findPluginPath (QString plugin_name)
 
QString findLibPath (QString lib_name)
 
QObject * loadPlugin (QString lib_name, QString plugin_name)
 
QStringList * getAvailablePlugins ()
 
void setCameraManipulator (QString manipulator, bool resetToDefaultHome=false)
 
void setCameraManipulator (CAMERA_MANIPULATORS manipulator, bool resetToDefaultHome=false)
 
QString getCameraManipulatorName () const
 
CAMERA_MANIPULATORS getCameraManipulator () const
 
void setEnvironmentPlugin (QObject *plugin)
 
void setEnvironmentPluginEnabled (bool enabled)
 
bool isEnvironmentPluginEnabled () const
 
void clearEnvironmentPlugin ()
 

Signals

void addPlugins (QObject *plugin, QObject *parent)
 
void removePlugins (QObject *plugin)
 
void propertyChanged (QString propertyName)
 

Public Member Functions

 Vizkit3DWidget (QWidget *parent=0, const QString &world_name="world_osg", bool auto_update=true)
 
 ~Vizkit3DWidget ()
 
osg::Group * getRootNode () const
 
void setTrackedNode (osg::Node *node, QString tracked_object_name)
 
void setTrackedNode (vizkit3d::VizPluginBase *plugin)
 
QSize sizeHint () const
 
void setCameraManipulator (osg::ref_ptr< osgGA::CameraManipulator > manipulator, bool resetToDefaultHome=false)
 

Static Public Attributes

static osg::Vec3d const DEFAULT_EYE
 
static osg::Vec3d const DEFAULT_CENTER
 
static osg::Vec3d const DEFAULT_UP
 

Protected Member Functions

virtual void paintEvent (QPaintEvent *event)
 

Friends

class VizPluginBase
 

Constructor & Destructor Documentation

Vizkit3DWidget::Vizkit3DWidget ( QWidget *  parent = 0,
const QString &  world_name = "world_osg",
bool  auto_update = true 
)
Vizkit3DWidget::~Vizkit3DWidget ( )

Defined to avoid unnecessary dependencies in the headers

If it is not defined explicitely, GCC will try to emit it inline, which means that the types used in the osg_ptr below must be defined.

Member Function Documentation

void Vizkit3DWidget::addPlugin ( QObject *  plugin,
QObject *  parent = NULL 
)
slot

Puts the plugin in a list and emits a signal. Adding the new Plugin will be handled by the main thread.

Parameters
pluginVizkit Plugin
void vizkit3d::Vizkit3DWidget::addPlugins ( QObject *  plugin,
QObject *  parent 
)
signal
void Vizkit3DWidget::clearEnvironmentPlugin ( )
slot

Removes the current environment plugin

This removes the environment-rendering role of the plugin currently set by setEnvironmentPlugin. Note that it does not remove the plugin itself

void Vizkit3DWidget::collapsePropertyBrowser ( )
slot
void Vizkit3DWidget::disableGrabbing ( )
slot

Disables grabbing

You will have to call enableGrabbing() again before you can use grab()

void Vizkit3DWidget::enableGrabbing ( )
slot

Enables grabbing

Must be called before grab()

QString Vizkit3DWidget::findLibPath ( QString  lib_name)
slot
QString Vizkit3DWidget::findPluginPath ( QString  plugin_name)
slot
QStringList * Vizkit3DWidget::getAvailablePlugins ( )
slot
QColor Vizkit3DWidget::getBackgroundColor ( ) const
slot
CAMERA_MANIPULATORS Vizkit3DWidget::getCameraManipulator ( ) const
slot

Returns the current camera manipulator

QString Vizkit3DWidget::getCameraManipulatorName ( ) const
slot
void Vizkit3DWidget::getCameraView ( QVector3D &  eye,
QVector3D &  lookAt,
QVector3D &  up 
)
slot
QString Vizkit3DWidget::getPluginDataFrame ( QObject *  plugin) const
slot
QWidget * Vizkit3DWidget::getPropertyWidget ( ) const
slot
osg::Group * Vizkit3DWidget::getRootNode ( ) const
QString Vizkit3DWidget::getRootVisualizationFrame ( ) const
slot

The frame name of the OSG visualization's root frame

void Vizkit3DWidget::getTransformation ( const QString &  source_frame,
const QString &  target_frame,
QVector3D &  position,
QQuaternion &  orientation 
) const
slot
float Vizkit3DWidget::getTransformerTextSize ( ) const
slot
QString Vizkit3DWidget::getVisualizationFrame ( ) const
slot
QStringList Vizkit3DWidget::getVisualizationFrames ( ) const
slot
QStringList * Vizkit3DWidget::getVisualizationFramesRuby ( ) const
slot
QString Vizkit3DWidget::getWorldName ( ) const
slot
QImage Vizkit3DWidget::grab ( )
slot

Captures the current state of the 3D view

You must call enableGrabbing() first. Will return an empty image if you did not do so.

bool Vizkit3DWidget::isAxes ( ) const
slot
bool Vizkit3DWidget::isAxesLabels ( ) const
slot
bool Vizkit3DWidget::isEnvironmentPluginEnabled ( ) const
slot

Tests whether the current environment plugin is enabled or not

It returns false if no environment plugin has been selected at all

bool Vizkit3DWidget::isTransformer ( ) const
slot
QObject * Vizkit3DWidget::loadPlugin ( QString  lib_name,
QString  plugin_name 
)
slot
void Vizkit3DWidget::paintEvent ( QPaintEvent *  event)
protectedvirtual
void vizkit3d::Vizkit3DWidget::propertyChanged ( QString  propertyName)
signal
void Vizkit3DWidget::removePlugin ( QObject *  plugin)
slot

Puts the plugin in a list and emits a signal. Removing the new Plugin will be handled by the main thread.

Parameters
pluginVizkit Plugin
void vizkit3d::Vizkit3DWidget::removePlugins ( QObject *  plugin)
signal
void Vizkit3DWidget::setAxes ( bool  value)
slot
void Vizkit3DWidget::setAxesLabels ( bool  value)
slot
void Vizkit3DWidget::setBackgroundColor ( QColor  color)
slot
void Vizkit3DWidget::setCameraEye ( double  x,
double  y,
double  z 
)
slot
void Vizkit3DWidget::setCameraLookAt ( double  x,
double  y,
double  z 
)
slot
void Vizkit3DWidget::setCameraManipulator ( osg::ref_ptr< osgGA::CameraManipulator >  manipulator,
bool  resetToDefaultHome = false 
)

Sets the current camera manipulator

Unlike the two setCameraManipulator overloads, calling this method will not change the manipulator's property as displayed in the widget. Use only if you know what you are doing

void Vizkit3DWidget::setCameraManipulator ( QString  manipulator,
bool  resetToDefaultHome = false 
)
slot

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void Vizkit3DWidget::setCameraManipulator ( CAMERA_MANIPULATORS  manipulator,
bool  resetToDefaultHome = false 
)
slot

Sets the current camera manipulator among those available

void Vizkit3DWidget::setCameraUp ( double  x,
double  y,
double  z 
)
slot
void Vizkit3DWidget::setEnvironmentPlugin ( QObject *  plugin)
slot

This sets one of the plugins to be the environment-rendering plugin

The plugin object needs to be a subclass of EnvPluginBase. It will be automatically added if it is not already.

The environment rendering can be enabled/disabled normally using setPluginEnabled

void Vizkit3DWidget::setEnvironmentPluginEnabled ( bool  enabled)
slot

Enables or disables the currently selected environment plugin

It does nothing if there are no selected environment plugin

void Vizkit3DWidget::setPluginDataFrame ( const QString &  frame,
QObject *  plugin 
)
slot

Sets frame plugin data for a given plugin. The pluging data frame is the frame in which the plugin expects the data to be. e.g. in case of the LaserScanVisualization 'laser'

void Vizkit3DWidget::setRootFrame ( QString  frame)
slot

Require the given frame to be directly attached to the root

void Vizkit3DWidget::setSmallFeatureCullingPixelSize ( float  val)
slot
void Vizkit3DWidget::setTrackedNode ( osg::Node *  node,
QString  tracked_object_name 
)

Sets the camera to track this node's reference position

  • tracked_object_name the name of the object being tracked, to be reported in getCameraManipulatorName (and therefore in the property browser view)
void Vizkit3DWidget::setTrackedNode ( vizkit3d::VizPluginBase plugin)
void Vizkit3DWidget::setTransformation ( const QString &  source_frame,
const QString &  target_frame,
const QVector3D &  position,
const QQuaternion &  orientation 
)
slot
void Vizkit3DWidget::setTransformer ( bool  value)
slot
void Vizkit3DWidget::setTransformerTextSize ( float  value)
slot
void vizkit3d::Vizkit3DWidget::setVisualizationFrame ( const QString &  frame,
bool  update 
)
inlineslot
Deprecated:
the update parameter is unused now, use setVisualizationFrame(QString) instead
void Vizkit3DWidget::setVisualizationFrame ( const QString &  frame)
slot

Sets the camera to be centered on this frame (and fixed in this frame)

QSize Vizkit3DWidget::sizeHint ( ) const

Friends And Related Function Documentation

friend class VizPluginBase
friend

Member Data Documentation

osg::Vec3d const Vizkit3DWidget::DEFAULT_CENTER
static
osg::Vec3d const Vizkit3DWidget::DEFAULT_EYE
static
osg::Vec3d const Vizkit3DWidget::DEFAULT_UP
static

The documentation for this class was generated from the following files: