Gui::View3DInventorViewer Class Reference

GUI view into a 3D scene provided by View3DInventor. More...

#include <View3DInventorViewer.h>

Public Types

enum  SelectionMode {
  Lasso = 0 , Rectangle = 1 , Rubberband = 2 , BoxZoom = 3 ,
  Clip = 4
}
 Pick modes for picking points in the scene. More...
 
Modus handling of the viewer

Here you can switch several features on/off and modes of the Viewer

enum  ViewerMod {
  ShowCoord =1 , ShowFPS =2 , SimpleBackground =4 , DisallowRotation =8 ,
  DisallowPanning =16 , DisallowZooming =32
}
 
Anti-Aliasing modes of the rendered 3D scene

Specifies Anti-Aliasing (AA) method

  • Smoothing enables OpenGL line and vertex smoothing (basically deprecated)
  • MSAA is hardware multi sampling (with 2, 4 or 8 passes), a quite common and efficient AA technique
enum  AntiAliasing { }
 

Public Member Functions

Handling of view providers
SbBool hasViewProvider (ViewProvider *) const
 Checks if the view provider is a top-level object of the scene. More...
 
SbBool containsViewProvider (const ViewProvider *) const
 Checks if the view provider is part of the scene. More...
 
void addViewProvider (ViewProvider *)
 adds an ViewProvider to the view, e.g. from a feature More...
 
void removeViewProvider (ViewProvider *)
 remove a ViewProvider More...
 
ViewProvidergetViewProviderByPath (SoPath *) const
 get view provider by path More...
 
ViewProvidergetViewProviderByPathFromTail (SoPath *) const
 
std::vector< ViewProvider * > getViewProvidersOfType (const Base::Type &typeId) const
 get all view providers of given type More...
 
void setEditingViewProvider (Gui::ViewProvider *p, int ModNum)
 set the ViewProvider in special edit mode More...
 
SbBool isEditingViewProvider () const
 return whether a view provider is edited More...
 
void resetEditingViewProvider ()
 reset from edit mode More...
 
void setupEditingRoot (SoNode *node=nullptr, const Base::Matrix4D *mat=nullptr)
 
void resetEditingRoot (bool updateLinks=true)
 
void setEditingTransform (const Base::Matrix4D &mat)
 
SoPickedPoint * getPointOnRay (const SbVec2s &pos, const ViewProvider *vp) const
 Helper method to get picked entities while editing. More...
 
SoPickedPoint * getPointOnRay (const SbVec3f &pos, const SbVec3f &dir, const ViewProvider *vp) const
 Helper method to get picked entities while editing. More...
 
void setOverrideMode (const std::string &mode)
 display override mode More...
 
void updateOverrideMode (const std::string &mode)
 update override mode. doesn't affect providers More...
 
std::string getOverrideMode () const
 
Making pictures
void savePicture (int w, int h, int s, const QColor &, QImage &) const
 Creates an image with width w and height h of the current scene graph using a multi-sampling of s and exports the rendered scenegraph to an image. More...
 
void saveGraphic (int pagesize, const QColor &, SoVectorizeAction *va) const
 
bool dumpToFile (SoNode *node, const char *filename, bool binary) const
 Writes the current scenegraph to an Inventor file, either in ascii or binary. More...
 
Selection methods
void startSelection (SelectionMode=Lasso)
 
void abortSelection ()
 
void stopSelection ()
 
bool isSelecting () const
 
std::vector< SbVec2f > getGLPolygon (SelectionRole *role=nullptr) const
 
std::vector< SbVec2f > getGLPolygon (const std::vector< SbVec2s > &) const
 
const std::vector< SbVec2s > & getPolygon (SelectionRole *role=nullptr) const
 
void setSelectionEnabled (const SbBool enable)
 
SbBool isSelectionEnabled (void) const
 
SbVec2f screenCoordsOfPath (SoPath *path) const
 Returns the screen coordinates of the origin of the path's tail object. More...
 
Edit methods
void setEditing (SbBool edit)
 
SbBool isEditing () const
 
void setEditingCursor (const QCursor &cursor)
 
void setComponentCursor (const QCursor &cursor)
 
void setRedirectToSceneGraph (SbBool redirect)
 
SbBool isRedirectedToSceneGraph () const
 
void setRedirectToSceneGraphEnabled (SbBool enable)
 
SbBool isRedirectToSceneGraphEnabled (void) const
 
Pick actions
bool pickPoint (const SbVec2s &pos, SbVec3f &point, SbVec3f &norm) const
 This method picks the closest point to the camera in the underlying scenegraph and returns its location and normal. More...
 
SoPickedPoint * pickPoint (const SbVec2s &pos) const
 This method is provided for convenience and does basically the same as method above unless that it returns an SoPickedPoint object with additional information. More...
 
const SoPickedPoint * getPickedPoint (SoEventCallback *n) const
 
SbBool pubSeekToPoint (const SbVec2s &pos)
 
void pubSeekToPoint (const SbVec3f &pos)
 
void addEventCallback (SoType eventtype, SoEventCallbackCB *cb, void *userdata=nullptr)
 Set up a callback function cb which will be invoked for the given eventtype. More...
 
void removeEventCallback (SoType eventtype, SoEventCallbackCB *cb, void *userdata=nullptr)
 Unregister the given callback function cb. More...
 
Clipping plane, near and far plane
SbVec3f getViewDirection () const
 Returns the view direction from the user's eye point in direction to the viewport which is actually the negative normal of the near plane. More...
 
void setViewDirection (SbVec3f)
 
SbVec3f getUpDirection () const
 Returns the up direction. More...
 
SbRotation getCameraOrientation () const
 Returns the orientation of the camera. More...
 
SbVec3f getPointOnFocalPlane (const SbVec2s &) const
 Returns the 3d point on the focal plane to the given 2d point. More...
 
SbVec2s getPointOnScreen (const SbVec3f &) const
 Returns the 2d coordinates on the screen to the given 3d point. More...
 
void getNearPlane (SbVec3f &rcPt, SbVec3f &rcNormal) const
 Returns the near plane represented by its normal and base point. More...
 
void getFarPlane (SbVec3f &rcPt, SbVec3f &rcNormal) const
 Returns the far plane represented by its normal and base point. More...
 
void toggleClippingPlane (int toggle=-1, bool beforeEditing=false, bool noManip=false, const Base::Placement &pla=Base::Placement())
 Adds or remove a manipulator to/from the scenegraph. More...
 
bool hasClippingPlane () const
 Checks whether a clipping plane is set or not. More...
 
SbVec3f projectOnNearPlane (const SbVec2f &) const
 Project the given normalized 2d point onto the near plane. More...
 
SbVec3f projectOnFarPlane (const SbVec2f &) const
 Project the given normalized 2d point onto the far plane. More...
 
void projectPointToLine (const SbVec2s &, SbVec3f &pt1, SbVec3f &pt2) const
 Project the given 2d point to a line. More...
 
SbVec2f getNormalizedPosition (const SbVec2s &) const
 Get the normalized position of the 2d point. More...
 
- Public Member Functions inherited from Gui::SelectionObserver
void attachSelection ()
 Attaches to the selection. More...
 
bool blockSelection (bool block)
 
void detachSelection ()
 Detaches from the selection. More...
 
bool isSelectionAttached () const
 
bool isSelectionBlocked () const
 
 SelectionObserver (bool attach=true, ResolveMode resolve=ResolveMode::OldStyleElement)
 Constructor. More...
 
 SelectionObserver (const Gui::ViewProviderDocumentObject *vp, bool attach=true, ResolveMode resolve=ResolveMode::OldStyleElement)
 Constructor. More...
 
virtual ~SelectionObserver ()
 

Render mode

enum  RenderType { Native , Framebuffer , Image }
 
 View3DInventorViewer (QWidget *parent, const QtGLWidget *sharewidget=nullptr)
 
 View3DInventorViewer (const QtGLFormat &format, QWidget *parent, const QtGLWidget *sharewidget=nullptr)
 
virtual ~View3DInventorViewer ()
 
void init ()
 
virtual void onSelectionChanged (const SelectionChanges &Reason)
 Observer message from the Selection. More...
 
void checkGroupOnTop (const SelectionChanges &Reason)
 
void clearGroupOnTop ()
 
SoDirectionalLight * getBacklight (void) const
 
void setBacklight (SbBool on)
 
SbBool isBacklight (void) const
 
void setSceneGraph (SoNode *root)
 
SbBool searchNode (SoNode *) const
 
void setAnimationEnabled (const SbBool enable)
 
SbBool isAnimationEnabled (void) const
 
void setPopupMenuEnabled (const SbBool on)
 
SbBool isPopupMenuEnabled (void) const
 
void startAnimating (const SbVec3f &axis, float velocity)
 
void stopAnimating (void)
 
SbBool isAnimating (void) const
 
void setFeedbackVisibility (const SbBool enable)
 
SbBool isFeedbackVisible (void) const
 
void setFeedbackSize (const int size)
 
int getFeedbackSize (void) const
 
void setRenderType (const RenderType type)
 
RenderType getRenderType () const
 
void renderToFramebuffer (QtGLFramebufferObject *)
 
QImage grabFramebuffer ()
 
void imageFromFramebuffer (int width, int height, int samples, const QColor &bgcolor, QImage &img)
 
virtual void setViewing (SbBool enable)
 
virtual void setCursorEnabled (SbBool enable)
 
void addGraphicsItem (GLGraphicsItem *)
 
void removeGraphicsItem (GLGraphicsItem *)
 
std::list< GLGraphicsItem * > getGraphicsItems () const
 
std::list< GLGraphicsItem * > getGraphicsItemsOfType (const Base::Type &) const
 
void clearGraphicsItems ()
 
static int getNumSamples ()
 Get the preferred samples from the user settings. More...
 

Dimension controls

the "turn*" functions are wired up to parameter groups through view3dinventor.

don't call them directly. instead set the parameter groups.

See also
TaskDimension
class NavigationStyle
 
class GLPainter
 
class ViewerEventFilter
 
void turnAllDimensionsOn ()
 
void turnAllDimensionsOff ()
 
void turn3dDimensionsOn ()
 
void turn3dDimensionsOff ()
 
void turnDeltaDimensionsOn ()
 
void turnDeltaDimensionsOff ()
 
void eraseAllDimensions ()
 
void addDimension3d (SoNode *node)
 
void addDimensionDelta (SoNode *node)
 
void setCameraOrientation (const SbRotation &rot, SbBool moveTocenter=false)
 Set the camera's orientation. More...
 
void setCameraType (SoType t)
 
void moveCameraTo (const SbRotation &rot, const SbVec3f &pos, int steps, int ms)
 
void boxZoom (const SbBox2s &)
 Zooms the viewport to the size of the bounding box. More...
 
void viewAll ()
 Reposition the current camera so we can see the complete scene. More...
 
void viewAll (float factor)
 
void viewVR (void)
 Breaks out a VR window for a Rift. More...
 
SbBox3f getBoundingBox () const
 Returns the bounding box of the scene graph. More...
 
void viewSelection ()
 Reposition the current camera so we can see all selected objects of the scene. More...
 
void setGradientBackground (bool b)
 
bool hasGradientBackground () const
 
void setGradientBackgroundColor (const SbColor &fromColor, const SbColor &toColor)
 
void setGradientBackgroundColor (const SbColor &fromColor, const SbColor &toColor, const SbColor &midColor)
 
void setNavigationType (Base::Type)
 
void setAxisCross (bool b)
 
bool hasAxisCross (void)
 
void setEnabledFPSCounter (bool b)
 
void setEnabledNaviCube (bool b)
 
bool isEnabledNaviCube (void) const
 
void setNaviCubeCorner (int)
 
NaviCubegetNavigationCube () const
 
void setEnabledVBO (bool b)
 
bool isEnabledVBO () const
 
void setRenderCache (int)
 
NavigationStylenavigationStyle () const
 
void setDocument (Gui::Document *pcDocument)
 
Gui::DocumentgetDocument ()
 
virtual PyObjectgetPyObject (void)
 
GLenum getInternalTextureFormat () const
 
void renderScene ()
 
void renderFramebuffer ()
 
void renderGLImage ()
 
void animatedViewAll (int steps, int ms)
 
virtual void actualRedraw (void)
 
virtual void setSeekMode (SbBool enable)
 
virtual void afterRealizeHook (void)
 
virtual bool processSoEvent (const SoEvent *ev)
 
void dropEvent (QDropEvent *e)
 Drops the event e and loads the files into the given document. More...
 
void dragEnterEvent (QDragEnterEvent *e)
 
void dragMoveEvent (QDragMoveEvent *e)
 
void dragLeaveEvent (QDragLeaveEvent *e)
 
SbBool processSoEventBase (const SoEvent *const ev)
 
void printDimension ()
 
void selectAll ()
 

Detailed Description

GUI view into a 3D scene provided by View3DInventor.

Member Enumeration Documentation

◆ AntiAliasing

Enumerator
Smoothing 
MSAA2x 
MSAA4x 
MSAA8x 

◆ RenderType

Enumerator
Native 
Framebuffer 
Image 

◆ SelectionMode

Pick modes for picking points in the scene.

Enumerator
Lasso 

Select objects using a lasso.

Rectangle 

Select objects using a rectangle.

Rubberband 

Select objects using a rubberband.

BoxZoom 

Perform a box zoom.

Clip 

Clip objects using a lasso.

◆ ViewerMod

Enumerator
ShowCoord 

Enables the Coordinate system in the corner.

ShowFPS 

Enables the Frams per Second counter.

SimpleBackground 

switch to a simple background.

DisallowRotation 

switch off the rotation.

DisallowPanning 

switch off the panning.

DisallowZooming 

switch off the zooming.

Constructor & Destructor Documentation

◆ View3DInventorViewer() [1/2]

View3DInventorViewer::View3DInventorViewer ( QWidget parent,
const QtGLWidget sharewidget = nullptr 
)

References init(), and Gui::NoResolve.

◆ View3DInventorViewer() [2/2]

View3DInventorViewer::View3DInventorViewer ( const QtGLFormat &  format,
QWidget parent,
const QtGLWidget sharewidget = nullptr 
)

References init(), and Gui::NoResolve.

◆ ~View3DInventorViewer()

Member Function Documentation

◆ abortSelection()

void View3DInventorViewer::abortSelection ( )

◆ actualRedraw()

void View3DInventorViewer::actualRedraw ( void  )
protectedvirtual

◆ addDimension3d()

void View3DInventorViewer::addDimension3d ( SoNode node)

◆ addDimensionDelta()

void View3DInventorViewer::addDimensionDelta ( SoNode node)

◆ addEventCallback()

void View3DInventorViewer::addEventCallback ( SoType  eventtype,
SoEventCallbackCB *  cb,
void *  userdata = nullptr 
)

Set up a callback function cb which will be invoked for the given eventtype.

userdata will be given as the first argument to the callback function.

Referenced by Gui::View3DInventorPy::addEventCallback(), Gui::View3DInventorPy::addEventCallbackPivy(), MeshPartGui::CurveOnMeshHandler::enableCallback(), and setEditingViewProvider().

◆ addGraphicsItem()

void View3DInventorViewer::addGraphicsItem ( GLGraphicsItem item)

◆ addViewProvider()

◆ afterRealizeHook()

void View3DInventorViewer::afterRealizeHook ( void  )
protectedvirtual

◆ animatedViewAll()

void View3DInventorViewer::animatedViewAll ( int  steps,
int  ms 
)
protected

◆ boxZoom()

void View3DInventorViewer::boxZoom ( const SbBox2s &  box)

Zooms the viewport to the size of the bounding box.

References Gui::NavigationStyle::boxZoom().

Referenced by Gui::View3DInventorPy::boxZoom().

◆ checkGroupOnTop()

◆ clearGraphicsItems()

void View3DInventorViewer::clearGraphicsItems ( )

◆ clearGroupOnTop()

void View3DInventorViewer::clearGroupOnTop ( )

References Gui::coinRemoveAllChildren().

Referenced by checkGroupOnTop().

◆ containsViewProvider()

SbBool View3DInventorViewer::containsViewProvider ( const ViewProvider vp) const

Checks if the view provider is part of the scene.

In contrast to hasViewProvider() this method also checks if the view provider is a child of another view provider

References Gui::ViewProvider::getRoot().

◆ dragEnterEvent()

void View3DInventorViewer::dragEnterEvent ( QDragEnterEvent *  e)
protected

◆ dragLeaveEvent()

void View3DInventorViewer::dragLeaveEvent ( QDragLeaveEvent *  e)
protected

◆ dragMoveEvent()

void View3DInventorViewer::dragMoveEvent ( QDragMoveEvent *  e)
protected

◆ dropEvent()

void View3DInventorViewer::dropEvent ( QDropEvent *  e)
protected

Drops the event e and loads the files into the given document.

References Gui::Document::getDocument(), Gui::getMainWindow(), and Gui::MainWindow::loadUrls().

◆ dumpToFile()

bool View3DInventorViewer::dumpToFile ( SoNode node,
const char *  filename,
bool  binary 
) const

Writes the current scenegraph to an Inventor file, either in ascii or binary.

References Base::FileInfo::hasExtension(), saveGraphic(), and Gui::SoFCDB::writeToFile().

◆ eraseAllDimensions()

void View3DInventorViewer::eraseAllDimensions ( )

◆ getBacklight()

SoDirectionalLight * View3DInventorViewer::getBacklight ( void  ) const

◆ getBoundingBox()

SbBox3f View3DInventorViewer::getBoundingBox ( ) const

Returns the bounding box of the scene graph.

Referenced by animatedViewAll(), toggleClippingPlane(), and viewAll().

◆ getCameraOrientation()

SbRotation View3DInventorViewer::getCameraOrientation ( ) const

Returns the orientation of the camera.

Referenced by Gui::View3DInventorPy::getCameraOrientation().

◆ getDocument()

◆ getFarPlane()

void View3DInventorViewer::getFarPlane ( SbVec3f &  rcPt,
SbVec3f &  rcNormal 
) const

Returns the far plane represented by its normal and base point.

◆ getFeedbackSize()

int View3DInventorViewer::getFeedbackSize ( void  ) const

Return the size of the feedback axis cross. Default is 10.

Referenced by Gui::View3DInventorPy::getCornerCrossSize().

◆ getGLPolygon() [1/2]

std::vector< SbVec2f > View3DInventorViewer::getGLPolygon ( const std::vector< SbVec2s > &  pnts) const

◆ getGLPolygon() [2/2]

std::vector< SbVec2f > View3DInventorViewer::getGLPolygon ( SelectionRole role = nullptr) const

◆ getGraphicsItems()

std::list< GLGraphicsItem * > View3DInventorViewer::getGraphicsItems ( ) const

◆ getGraphicsItemsOfType()

std::list< GLGraphicsItem * > View3DInventorViewer::getGraphicsItemsOfType ( const Base::Type type) const

◆ getInternalTextureFormat()

GLenum View3DInventorViewer::getInternalTextureFormat ( ) const
protected

◆ getNavigationCube()

NaviCube * View3DInventorViewer::getNavigationCube ( ) const

◆ getNearPlane()

void View3DInventorViewer::getNearPlane ( SbVec3f &  rcPt,
SbVec3f &  rcNormal 
) const

Returns the near plane represented by its normal and base point.

Referenced by MeshGui::ViewProviderMeshNode::handleEvent().

◆ getNormalizedPosition()

SbVec2f View3DInventorViewer::getNormalizedPosition ( const SbVec2s &  pnt) const

Get the normalized position of the 2d point.

Referenced by getPointOnFocalPlane(), and projectPointToLine().

◆ getNumSamples()

◆ getOverrideMode()

std::string Gui::View3DInventorViewer::getOverrideMode ( ) const

◆ getPickedPoint()

const SoPickedPoint * View3DInventorViewer::getPickedPoint ( SoEventCallback *  n) const

◆ getPointOnFocalPlane()

SbVec3f View3DInventorViewer::getPointOnFocalPlane ( const SbVec2s &  pnt) const

Returns the 3d point on the focal plane to the given 2d point.

References getNormalizedPosition().

Referenced by Gui::View3DInventorPy::getPointOnFocalPlane().

◆ getPointOnRay() [1/2]

SoPickedPoint * View3DInventorViewer::getPointOnRay ( const SbVec2s &  pos,
const ViewProvider vp 
) const

Helper method to get picked entities while editing.

It's in the responsibility of the caller to delete the returned instance.

References Gui::ViewProvider::getRoot().

◆ getPointOnRay() [2/2]

SoPickedPoint * View3DInventorViewer::getPointOnRay ( const SbVec3f &  pos,
const SbVec3f &  dir,
const ViewProvider vp 
) const

Helper method to get picked entities while editing.

It's in the responsibility of the caller to delete the returned instance.

References Gui::ViewProvider::getRoot().

◆ getPointOnScreen()

SbVec2s View3DInventorViewer::getPointOnScreen ( const SbVec3f &  pnt) const

Returns the 2d coordinates on the screen to the given 3d point.

Referenced by Gui::View3DInventorPy::getPointOnScreen().

◆ getPolygon()

const std::vector< SbVec2s > & View3DInventorViewer::getPolygon ( SelectionRole role = nullptr) const

◆ getPyObject()

PyObject * View3DInventorViewer::getPyObject ( void  )
virtual

◆ getRenderType()

View3DInventorViewer::RenderType View3DInventorViewer::getRenderType ( ) const

◆ getUpDirection()

SbVec3f View3DInventorViewer::getUpDirection ( ) const

Returns the up direction.

◆ getViewDirection()

SbVec3f View3DInventorViewer::getViewDirection ( ) const

Returns the view direction from the user's eye point in direction to the viewport which is actually the negative normal of the near plane.

The vector is normalized to length of 1.

Referenced by Gui::View3DInventorPy::getViewDirection().

◆ getViewProviderByPath()

ViewProvider * View3DInventorViewer::getViewProviderByPath ( SoPath *  path) const

◆ getViewProviderByPathFromTail()

ViewProvider * View3DInventorViewer::getViewProviderByPathFromTail ( SoPath *  path) const

◆ getViewProvidersOfType()

std::vector< ViewProvider * > View3DInventorViewer::getViewProvidersOfType ( const Base::Type typeId) const

get all view providers of given type

Referenced by Gui::View3DInventorPy::getViewProvidersOfType().

◆ grabFramebuffer()

QImage View3DInventorViewer::grabFramebuffer ( )

◆ hasAxisCross()

bool View3DInventorViewer::hasAxisCross ( void  )

◆ hasClippingPlane()

bool View3DInventorViewer::hasClippingPlane ( ) const

Checks whether a clipping plane is set or not.

◆ hasGradientBackground()

bool View3DInventorViewer::hasGradientBackground ( ) const

Referenced by imageFromFramebuffer().

◆ hasViewProvider()

SbBool View3DInventorViewer::hasViewProvider ( ViewProvider pcProvider) const

Checks if the view provider is a top-level object of the scene.

◆ imageFromFramebuffer()

void View3DInventorViewer::imageFromFramebuffer ( int  width,
int  height,
int  samples,
const QColor &  bgcolor,
QImage &  img 
)

◆ init()

◆ isAnimating()

SbBool View3DInventorViewer::isAnimating ( void  ) const

Query if the model in the viewer is currently in spinning mode after a user drag.

References Gui::NavigationStyle::isAnimating().

Referenced by renderScene(), and setSeekMode().

◆ isAnimationEnabled()

SbBool View3DInventorViewer::isAnimationEnabled ( void  ) const

Query whether or not it is possible to start a spinning animation by releasing the left mouse button while dragging the mouse.

References Gui::NavigationStyle::isAnimationEnabled().

Referenced by Gui::View3DInventorPy::isAnimationEnabled(), and viewAll().

◆ isBacklight()

SbBool View3DInventorViewer::isBacklight ( void  ) const

◆ isEditing()

◆ isEditingViewProvider()

SbBool View3DInventorViewer::isEditingViewProvider ( ) const

return whether a view provider is edited

reset from edit mode

Referenced by Gui::Document::getInEdit().

◆ isEnabledNaviCube()

bool View3DInventorViewer::isEnabledNaviCube ( void  ) const

◆ isEnabledVBO()

bool View3DInventorViewer::isEnabledVBO ( ) const

◆ isFeedbackVisible()

SbBool View3DInventorViewer::isFeedbackVisible ( void  ) const

Check if the feedback axis cross is visible.

Referenced by Gui::View3DInventorPy::isCornerCrossVisible(), and setFeedbackSize().

◆ isPopupMenuEnabled()

SbBool View3DInventorViewer::isPopupMenuEnabled ( void  ) const

◆ isRedirectedToSceneGraph()

SbBool Gui::View3DInventorViewer::isRedirectedToSceneGraph ( ) const

Referenced by processSoEvent().

◆ isRedirectToSceneGraphEnabled()

SbBool Gui::View3DInventorViewer::isRedirectToSceneGraphEnabled ( void  ) const

◆ isSelecting()

bool View3DInventorViewer::isSelecting ( ) const

◆ isSelectionEnabled()

SbBool View3DInventorViewer::isSelectionEnabled ( void  ) const

◆ moveCameraTo()

void View3DInventorViewer::moveCameraTo ( const SbRotation &  rot,
const SbVec3f &  pos,
int  steps,
int  ms 
)

◆ navigationStyle()

◆ onSelectionChanged()

virtual void Gui::View3DInventorViewer::onSelectionChanged ( const SelectionChanges Reason)
virtual

Observer message from the Selection.

Implements Gui::SelectionObserver.

Referenced by setDocument().

◆ pickPoint() [1/2]

SoPickedPoint * View3DInventorViewer::pickPoint ( const SbVec2s &  pos) const

This method is provided for convenience and does basically the same as method above unless that it returns an SoPickedPoint object with additional information.

Note
It is in the response of the client programmer to delete the returned SoPickedPoint object.

◆ pickPoint() [2/2]

bool View3DInventorViewer::pickPoint ( const SbVec2s &  pos,
SbVec3f &  point,
SbVec3f &  norm 
) const

This method picks the closest point to the camera in the underlying scenegraph and returns its location and normal.

If no point was picked false is returned.

Referenced by PartGui::ViewProviderCurveNet::handleEvent().

◆ printDimension()

◆ processSoEvent()

bool View3DInventorViewer::processSoEvent ( const SoEvent ev)
protectedvirtual

◆ processSoEventBase()

SbBool View3DInventorViewer::processSoEventBase ( const SoEvent *const  ev)
protected

◆ projectOnFarPlane()

SbVec3f View3DInventorViewer::projectOnFarPlane ( const SbVec2f &  pt) const

Project the given normalized 2d point onto the far plane.

◆ projectOnNearPlane()

SbVec3f View3DInventorViewer::projectOnNearPlane ( const SbVec2f &  pt) const

Project the given normalized 2d point onto the near plane.

◆ projectPointToLine()

void View3DInventorViewer::projectPointToLine ( const SbVec2s &  pt,
SbVec3f &  pt1,
SbVec3f &  pt2 
) const

Project the given 2d point to a line.

References getNormalizedPosition().

Referenced by Gui::View3DInventorPy::projectPointToLine(), and Gui::NavigationStyle::viewAll().

◆ pubSeekToPoint() [1/2]

SbBool View3DInventorViewer::pubSeekToPoint ( const SbVec2s &  pos)

◆ pubSeekToPoint() [2/2]

void View3DInventorViewer::pubSeekToPoint ( const SbVec3f &  pos)

◆ removeEventCallback()

void View3DInventorViewer::removeEventCallback ( SoType  eventtype,
SoEventCallbackCB *  cb,
void *  userdata = nullptr 
)

◆ removeGraphicsItem()

void View3DInventorViewer::removeGraphicsItem ( GLGraphicsItem item)

◆ removeViewProvider()

◆ renderFramebuffer()

void View3DInventorViewer::renderFramebuffer ( )
protected

◆ renderGLImage()

void View3DInventorViewer::renderGLImage ( )
protected

◆ renderScene()

◆ renderToFramebuffer()

void View3DInventorViewer::renderToFramebuffer ( QtGLFramebufferObject *  fbo)

◆ resetEditingRoot()

◆ resetEditingViewProvider()

void View3DInventorViewer::resetEditingViewProvider ( )

◆ saveGraphic()

void View3DInventorViewer::saveGraphic ( int  pagesize,
const QColor &  bgcolor,
SoVectorizeAction va 
) const

◆ savePicture()

◆ screenCoordsOfPath()

SbVec2f View3DInventorViewer::screenCoordsOfPath ( SoPath *  path) const

Returns the screen coordinates of the origin of the path's tail object.

Return value is in floating-point pixels, origin at bottom-left.

◆ searchNode()

SbBool View3DInventorViewer::searchNode ( SoNode node) const

◆ selectAll()

◆ setAnimationEnabled()

void View3DInventorViewer::setAnimationEnabled ( const SbBool  enable)

Decide if it should be possible to start a spin animation of the model in the viewer by releasing the mouse button while dragging.

If the enable flag is false and we're currently animating, the spin will be stopped.

References Gui::NavigationStyle::setAnimationEnabled().

Referenced by Gui::View3DInventorPy::setAnimationEnabled().

◆ setAxisCross()

void View3DInventorViewer::setAxisCross ( bool  b)

◆ setBacklight()

void View3DInventorViewer::setBacklight ( SbBool  on)

◆ setCameraOrientation()

◆ setCameraType()

void View3DInventorViewer::setCameraType ( SoType  t)

◆ setComponentCursor()

void View3DInventorViewer::setComponentCursor ( const QCursor &  cursor)

◆ setCursorEnabled()

void View3DInventorViewer::setCursorEnabled ( SbBool  enable)
virtual

Decide whether or not the mouse pointer cursor should be visible in the rendering canvas.

References Gui::NavigationStyle::getViewingMode().

Referenced by abortSelection(), and stopSelection().

◆ setDocument()

◆ setEditing()

void View3DInventorViewer::setEditing ( SbBool  edit)

◆ setEditingCursor()

void View3DInventorViewer::setEditingCursor ( const QCursor &  cursor)

◆ setEditingTransform()

void View3DInventorViewer::setEditingTransform ( const Base::Matrix4D mat)

◆ setEditingViewProvider()

void View3DInventorViewer::setEditingViewProvider ( Gui::ViewProvider p,
int  ModNum 
)

◆ setEnabledFPSCounter()

void View3DInventorViewer::setEnabledFPSCounter ( bool  b)

◆ setEnabledNaviCube()

void View3DInventorViewer::setEnabledNaviCube ( bool  b)

◆ setEnabledVBO()

void View3DInventorViewer::setEnabledVBO ( bool  b)

◆ setFeedbackSize()

void View3DInventorViewer::setFeedbackSize ( const int  size)

Set the size of the feedback axiscross. The value is interpreted as an approximate percentage chunk of the dimensions of the total canvas.

References isFeedbackVisible().

Referenced by Gui::View3DInventorPy::setCornerCrossSize().

◆ setFeedbackVisibility()

void View3DInventorViewer::setFeedbackVisibility ( const SbBool  enable)

Set the flag deciding whether or not to show the axis cross.

Referenced by Gui::View3DInventorPy::setCornerCrossVisible().

◆ setGradientBackground()

void View3DInventorViewer::setGradientBackground ( bool  b)

Referenced by imageFromFramebuffer(), and init().

◆ setGradientBackgroundColor() [1/2]

void View3DInventorViewer::setGradientBackgroundColor ( const SbColor &  fromColor,
const SbColor &  toColor 
)

◆ setGradientBackgroundColor() [2/2]

void View3DInventorViewer::setGradientBackgroundColor ( const SbColor &  fromColor,
const SbColor &  toColor,
const SbColor &  midColor 
)

◆ setNaviCubeCorner()

void View3DInventorViewer::setNaviCubeCorner ( int  c)

References NaviCube::setCorner().

◆ setNavigationType()

◆ setOverrideMode()

void View3DInventorViewer::setOverrideMode ( const std::string &  mode)

◆ setPopupMenuEnabled()

void View3DInventorViewer::setPopupMenuEnabled ( const SbBool  on)

◆ setRedirectToSceneGraph()

void Gui::View3DInventorViewer::setRedirectToSceneGraph ( SbBool  redirect)

◆ setRedirectToSceneGraphEnabled()

void Gui::View3DInventorViewer::setRedirectToSceneGraphEnabled ( SbBool  enable)

◆ setRenderCache()

void View3DInventorViewer::setRenderCache ( int  mode)

◆ setRenderType()

void View3DInventorViewer::setRenderType ( const RenderType  type)

◆ setSceneGraph()

void View3DInventorViewer::setSceneGraph ( SoNode root)

◆ setSeekMode()

◆ setSelectionEnabled()

void View3DInventorViewer::setSelectionEnabled ( const SbBool  enable)

◆ setupEditingRoot()

◆ setViewDirection()

void View3DInventorViewer::setViewDirection ( SbVec3f  dir)

◆ setViewing()

void View3DInventorViewer::setViewing ( SbBool  enable)
virtual

◆ startAnimating()

void View3DInventorViewer::startAnimating ( const SbVec3f &  axis,
float  velocity 
)

Starts programmatically the viewer in animation mode. The given axis direction is always in screen coordinates, not in world coordinates.

References Gui::NavigationStyle::startAnimating().

Referenced by Gui::View3DInventorPy::startAnimating().

◆ startSelection()

void View3DInventorViewer::startSelection ( View3DInventorViewer::SelectionMode  mode = Lasso)

◆ stopAnimating()

void View3DInventorViewer::stopAnimating ( void  )

◆ stopSelection()

void View3DInventorViewer::stopSelection ( )

◆ toggleClippingPlane()

void View3DInventorViewer::toggleClippingPlane ( int  toggle = -1,
bool  beforeEditing = false,
bool  noManip = false,
const Base::Placement pla = Base::Placement() 
)

◆ turn3dDimensionsOff()

void View3DInventorViewer::turn3dDimensionsOff ( )

◆ turn3dDimensionsOn()

void View3DInventorViewer::turn3dDimensionsOn ( )

◆ turnAllDimensionsOff()

void View3DInventorViewer::turnAllDimensionsOff ( )

◆ turnAllDimensionsOn()

void View3DInventorViewer::turnAllDimensionsOn ( )

◆ turnDeltaDimensionsOff()

void View3DInventorViewer::turnDeltaDimensionsOff ( )

◆ turnDeltaDimensionsOn()

void View3DInventorViewer::turnDeltaDimensionsOn ( )

◆ updateOverrideMode()

void View3DInventorViewer::updateOverrideMode ( const std::string &  mode)

update override mode. doesn't affect providers

◆ viewAll() [1/2]

void View3DInventorViewer::viewAll ( )

◆ viewAll() [2/2]

◆ viewSelection()

◆ viewVR()

void View3DInventorViewer::viewVR ( void  )

Breaks out a VR window for a Rift.

Friends And Related Function Documentation

◆ GLPainter

friend class GLPainter
friend

◆ NavigationStyle

friend class NavigationStyle
friend

◆ ViewerEventFilter

friend class ViewerEventFilter
friend

Referenced by init().


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