add convenience method to 3d viewer to disable selection
This commit is contained in:
@@ -1669,6 +1669,18 @@ const std::vector<SbVec2s>& View3DInventorViewer::getPolygon(SelectionRole* role
|
||||
return navigation->getPolygon(role);
|
||||
}
|
||||
|
||||
void View3DInventorViewer::setSelectionEnabled(const SbBool enable)
|
||||
{
|
||||
SoNode* root = getSceneGraph();
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(enable);
|
||||
}
|
||||
|
||||
SbBool View3DInventorViewer::isSelectionEnabled(void) const
|
||||
{
|
||||
SoNode* root = getSceneGraph();
|
||||
return static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.getValue();
|
||||
}
|
||||
|
||||
SbVec2f View3DInventorViewer::screenCoordsOfPath(SoPath* path) const
|
||||
{
|
||||
// Generate a matrix (well, a SoGetMatrixAction) that
|
||||
|
||||
@@ -236,6 +236,8 @@ public:
|
||||
std::vector<SbVec2f> getGLPolygon(SelectionRole* role=0) const;
|
||||
std::vector<SbVec2f> getGLPolygon(const std::vector<SbVec2s>&) const;
|
||||
const std::vector<SbVec2s>& getPolygon(SelectionRole* role=0) const;
|
||||
void setSelectionEnabled(const SbBool enable);
|
||||
SbBool isSelectionEnabled(void) const;
|
||||
//@}
|
||||
|
||||
/// Returns the screen coordinates of the origin of the path's tail object
|
||||
|
||||
Reference in New Issue
Block a user