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::Vizkit3DWidget ( QWidget *  parent = 0,
const QString &  world_name = "world_osg",
bool  auto_update = true 
)

◆ ~Vizkit3DWidget()

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

◆ addPlugin

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

◆ addPlugins

void vizkit3d::Vizkit3DWidget::addPlugins ( QObject *  plugin,
QObject *  parent 
)
signal

◆ clearEnvironmentPlugin

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

◆ collapsePropertyBrowser

void Vizkit3DWidget::collapsePropertyBrowser ( )
slot

◆ disableGrabbing

void Vizkit3DWidget::disableGrabbing ( )
slot

Disables grabbing

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

◆ enableGrabbing

void Vizkit3DWidget::enableGrabbing ( )
slot

Enables grabbing

Must be called before grab()

◆ findLibPath

QString Vizkit3DWidget::findLibPath ( QString  lib_name)
slot

◆ findPluginPath

QString Vizkit3DWidget::findPluginPath ( QString  plugin_name)
slot

◆ getAvailablePlugins

QStringList * Vizkit3DWidget::getAvailablePlugins ( )
slot

◆ getBackgroundColor

QColor Vizkit3DWidget::getBackgroundColor ( ) const
slot

◆ getCameraManipulator

CAMERA_MANIPULATORS Vizkit3DWidget::getCameraManipulator ( ) const
slot

Returns the current camera manipulator

◆ getCameraManipulatorName

QString Vizkit3DWidget::getCameraManipulatorName ( ) const
slot

◆ getCameraView

void Vizkit3DWidget::getCameraView ( QVector3D &  eye,
QVector3D &  lookAt,
QVector3D &  up 
)
slot

◆ getPluginDataFrame

QString Vizkit3DWidget::getPluginDataFrame ( QObject *  plugin) const
slot

◆ getPropertyWidget

QWidget * Vizkit3DWidget::getPropertyWidget ( ) const
slot

◆ getRootNode()

osg::Group * Vizkit3DWidget::getRootNode ( ) const

◆ getRootVisualizationFrame

QString Vizkit3DWidget::getRootVisualizationFrame ( ) const
slot

The frame name of the OSG visualization's root frame

◆ getTransformation

void Vizkit3DWidget::getTransformation ( const QString &  source_frame,
const QString &  target_frame,
QVector3D &  position,
QQuaternion &  orientation 
) const
slot

◆ getTransformerTextSize

float Vizkit3DWidget::getTransformerTextSize ( ) const
slot

◆ getVisualizationFrame

QString Vizkit3DWidget::getVisualizationFrame ( ) const
slot

◆ getVisualizationFrames

QStringList Vizkit3DWidget::getVisualizationFrames ( ) const
slot

◆ getVisualizationFramesRuby

QStringList * Vizkit3DWidget::getVisualizationFramesRuby ( ) const
slot

◆ getWorldName

QString Vizkit3DWidget::getWorldName ( ) const
slot

◆ grab

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.

◆ isAxes

bool Vizkit3DWidget::isAxes ( ) const
slot

◆ isAxesLabels

bool Vizkit3DWidget::isAxesLabels ( ) const
slot

◆ isEnvironmentPluginEnabled

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

◆ isTransformer

bool Vizkit3DWidget::isTransformer ( ) const
slot

◆ loadPlugin

QObject * Vizkit3DWidget::loadPlugin ( QString  lib_name,
QString  plugin_name 
)
slot

◆ paintEvent()

void Vizkit3DWidget::paintEvent ( QPaintEvent *  event)
protectedvirtual

◆ propertyChanged

void vizkit3d::Vizkit3DWidget::propertyChanged ( QString  propertyName)
signal

◆ removePlugin

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

◆ removePlugins

void vizkit3d::Vizkit3DWidget::removePlugins ( QObject *  plugin)
signal

◆ setAxes

void Vizkit3DWidget::setAxes ( bool  value)
slot

◆ setAxesLabels

void Vizkit3DWidget::setAxesLabels ( bool  value)
slot

◆ setBackgroundColor

void Vizkit3DWidget::setBackgroundColor ( QColor  color)
slot

◆ setCameraEye

void Vizkit3DWidget::setCameraEye ( double  x,
double  y,
double  z 
)
slot

◆ setCameraLookAt

void Vizkit3DWidget::setCameraLookAt ( double  x,
double  y,
double  z 
)
slot

◆ setCameraManipulator() [1/3]

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

◆ setCameraManipulator [2/3]

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.

◆ setCameraManipulator [3/3]

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

Sets the current camera manipulator among those available

◆ setCameraUp

void Vizkit3DWidget::setCameraUp ( double  x,
double  y,
double  z 
)
slot

◆ setEnvironmentPlugin

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

◆ setEnvironmentPluginEnabled

void Vizkit3DWidget::setEnvironmentPluginEnabled ( bool  enabled)
slot

Enables or disables the currently selected environment plugin

It does nothing if there are no selected environment plugin

◆ setPluginDataFrame

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'

◆ setRootFrame

void Vizkit3DWidget::setRootFrame ( QString  frame)
slot

Require the given frame to be directly attached to the root

◆ setSmallFeatureCullingPixelSize

void Vizkit3DWidget::setSmallFeatureCullingPixelSize ( float  val)
slot

◆ setTrackedNode() [1/2]

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)

◆ setTrackedNode() [2/2]

void Vizkit3DWidget::setTrackedNode ( vizkit3d::VizPluginBase plugin)

◆ setTransformation

void Vizkit3DWidget::setTransformation ( const QString &  source_frame,
const QString &  target_frame,
const QVector3D &  position,
const QQuaternion &  orientation 
)
slot

◆ setTransformer

void Vizkit3DWidget::setTransformer ( bool  value)
slot

◆ setTransformerTextSize

void Vizkit3DWidget::setTransformerTextSize ( float  value)
slot

◆ setVisualizationFrame [1/2]

void vizkit3d::Vizkit3DWidget::setVisualizationFrame ( const QString &  frame,
bool  update 
)
inlineslot
Deprecated:
the update parameter is unused now, use setVisualizationFrame(QString) instead

◆ setVisualizationFrame [2/2]

void Vizkit3DWidget::setVisualizationFrame ( const QString &  frame)
slot

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

◆ sizeHint()

QSize Vizkit3DWidget::sizeHint ( ) const

Friends And Related Function Documentation

◆ VizPluginBase

friend class VizPluginBase
friend

Member Data Documentation

◆ DEFAULT_CENTER

osg::Vec3d const Vizkit3DWidget::DEFAULT_CENTER
static

◆ DEFAULT_EYE

osg::Vec3d const Vizkit3DWidget::DEFAULT_EYE
static

◆ DEFAULT_UP

osg::Vec3d const Vizkit3DWidget::DEFAULT_UP
static

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