Skip to content

Commit

Permalink
Merge pull request #65 from rock-core/transformerroot
Browse files Browse the repository at this point in the history
make the root of the transformer display selectable
  • Loading branch information
planthaber authored Feb 23, 2023
2 parents e8e4060 + 752eba0 commit 986b657
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Vizkit3DWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ bool Vizkit3DConfig::isAxesLabels() const
return getWidget()->isAxesLabels();
}

void Vizkit3DConfig::setTransformerRootFrame (const QStringList &frames) {
return getWidget()->setRootFrame(frames.front());
}

namespace
{
struct ManipulatorDefinition
Expand Down Expand Up @@ -924,6 +928,7 @@ void Vizkit3DWidget::setTransformation(const QString &source_frame,const QString
registerClickHandler(target_frame.toStdString());

emit propertyChanged("frame");
emit propertyChanged("transformerroot");
// first: VizPluginBase*
// second: osg::ref_ptr<osg::Group>

Expand Down
3 changes: 3 additions & 0 deletions src/Vizkit3DWidget.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ namespace vizkit3d
Q_PROPERTY( bool axes_labels READ isAxesLabels WRITE setAxesLabels)
Q_PROPERTY( QColor background READ getBackgroundColor WRITE setBackgroundColor)
Q_PROPERTY( QStringList frame READ getVisualizationFrames WRITE setVisualizationFrame)
Q_PROPERTY( QStringList transformerroot READ getVisualizationFrames WRITE setTransformerRootFrame)
Q_PROPERTY( bool environment READ isEnvironmentPluginEnabled WRITE setEnvironmentPluginEnabled)
Q_PROPERTY( bool transformer READ isTransformer WRITE setTransformer)
Q_ENUMS( CAMERA_MANIPULATORS )
Expand Down Expand Up @@ -186,6 +187,8 @@ namespace vizkit3d
QColor getBackgroundColor()const;
void setBackgroundColor(QColor color);

void setTransformerRootFrame (const QStringList &frames);

/** Converts a manipulator ID to its name */
static QString manipulatorIDToName(CAMERA_MANIPULATORS id);
/** Converts a manipulator name to its ID */
Expand Down

0 comments on commit 986b657

Please sign in to comment.