Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the root of the transformer display selectable #65

Merged
merged 1 commit into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -926,6 +930,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