The navigation style base class. More...
#include <NavigationStyle.h>
Public Types | |
enum OrbitStyle { Turntable, Trackball } | |
enum RotationCenterMode { ScenePointAtCursor, FocalPointAtCursor } | |
enum SelectionMode { Lasso = 0, Rectangle = 1, Rubberband = 2, BoxZoom = 3, Clip = 4 } | |
enum ViewerMode { IDLE, INTERACT, ZOOMING, BOXZOOM, PANNING, DRAGGING, SPINNING, SEEK_WAIT_MODE, SEEK_MODE, SELECTION } | |
Public Member Functions | |
void boxZoom (const SbBox2s &box) | |
SbVec3f getFocalPoint () const | |
OrbitStyle getOrbitStyle () const | |
const std::vector< SbVec2s > & getPolygon (SelectionRole *role=0) const | |
RotationCenterMode getRotationCenterMode () const | |
float getSensitivity () const | |
int getViewingMode () const | |
SbBool isAnimating (void) const | |
SbBool isAnimationEnabled (void) const | |
SbBool isDragAtCursor () const | |
SbBool isPopupMenuEnabled (void) const | |
SbBool isResetCursorPosition () const | |
SbBool isSelecting () const | |
SbBool isZoomAtCursor () const | |
SbBool isZoomInverted () const | |
void lookAtPoint (const SbVec3f &) | |
NavigationStyle () | |
NavigationStyle & operator= (const NavigationStyle &ns) | |
virtual SbBool processEvent (const SoEvent *const ev) | |
virtual SbBool processMotionEvent (const SoMotion3Event *const ev) | |
void redraw () | |
void setAnimationEnabled (const SbBool enable) | |
void setCameraOrientation (const SbRotation &rot, SbBool moveTocenter=false) | |
void setDragAtCursor (SbBool) | |
void setOrbitStyle (OrbitStyle style) | |
void setPopupMenuEnabled (const SbBool on) | |
void setResetCursorPosition (SbBool) | |
void setRotationCenter (const SbVec3f &cnt) | |
void setRotationCenterMode (RotationCenterMode) | |
void setSensitivity (float) | |
void setViewer (View3DInventorViewer *) | |
void setViewingMode (const ViewerMode newmode) | |
void setZoomAtCursor (SbBool) | |
void setZoomInverted (SbBool) | |
void setZoomStep (float) | |
void startAnimating (const SbVec3f &axis, float velocity) | |
void startSelection (AbstractMouseSelection *) | |
void startSelection (SelectionMode=Lasso) | |
void stopAnimating (void) | |
void stopSelection () | |
void updateAnimation () | |
virtual void viewAll () | |
void zoomIn () | |
void zoomOut () | |
virtual ~NavigationStyle () | |
![]() | |
BaseClass () | |
Construction. More... | |
virtual PyObject * getPyObject (void) | |
This method returns the Python wrapper for a C++ object. More... | |
virtual Type getTypeId (void) const | |
bool isDerivedFrom (const Type type) const | |
virtual void setPyObject (PyObject *) | |
virtual ~BaseClass () | |
Destruction. More... | |
Protected Member Functions | |
void addToLog (const SbVec2s pos, const SbTime time) | |
void clearLog (void) | |
void doRotate (SoCamera *camera, float angle, const SbVec2f &pos) | |
SbBool doSpin () | |
void doZoom (SoCamera *camera, float logzoomfactor, const SbVec2f &pos) | |
NavigationStyle::doZoom Zooms in or out by specified factor, keeping the point on screen specified by parameter pos fixed or not according to user preference (NavigationStyle::zoomAtCursor). Ignores invertZoom user preference. More... | |
void doZoom (SoCamera *camera, SbBool forward, const SbVec2f &pos) | |
void finalize () | |
int getInteractiveCount (void) const | |
SbVec3f getRotationCenter (SbBool *) const | |
SbBool handleEventInForeground (const SoEvent *const e) | |
void initialize () | |
void interactiveCountDec (void) | |
void interactiveCountInc (void) | |
SbBool isSeekMode (void) const | |
SbBool isViewing (void) const | |
SbBool lookAtPoint (const SbVec2s screenpos) | |
void moveCursorPosition () | |
SbVec2f normalizePixelPos (SbVec2f pixpos) | |
SbVec2f normalizePixelPos (SbVec2s pixpos) | |
virtual void openPopupMenu (const SbVec2s &position) | |
void pan (SoCamera *camera) | |
void panCamera (SoCamera *camera, float vpaspect, const SbPlane &panplane, const SbVec2f &previous, const SbVec2f ¤t) | |
void panToCenter (const SbPlane &pplane, const SbVec2f &currpos) | |
virtual SbBool processSoEvent (const SoEvent *const ev) | |
void reorientCamera (SoCamera *camera, const SbRotation &rot) | |
Rotate the camera by the given amount, then reposition it so we're still pointing at the same focal point. More... | |
void saveCursorPosition (const SoEvent *const ev) | |
SbBool seekToPoint (const SbVec2s screenpos) | |
void seekToPoint (const SbVec3f &scenepos) | |
void setSeekMode (SbBool enable) | |
void setViewing (SbBool) | |
void spin (const SbVec2f &pointerpos) | |
Uses the sphere sheet projector to map the mouseposition onto a 3D point and find a rotation from this and the last calculated point. More... | |
void spin_simplified (SoCamera *cam, SbVec2f curpos, SbVec2f prevpos) | |
NavigationStyle::spin_simplified is a simplified version of NavigationStyle::spin(..), which uses less global variables. Doesn't support starting an animated spinning. More... | |
void syncWithEvent (const SoEvent *const ev) | |
void zoom (SoCamera *camera, float diffvalue) | |
Dependent on the camera type this will either shrink or expand the height of the viewport (orthogonal camera) or move the camera closer or further away from the focal point in the scene. More... | |
void zoomByCursor (const SbVec2f &thispos, const SbVec2f &prevpos) | |
Protected Attributes | |
SbBool altdown | |
SbBool button1down | |
SbBool button2down | |
SbBool button3down | |
SbTime centerTime | |
SbBool ctrldown | |
ViewerMode currentmode | |
SbVec2s globalPos | |
SbBool invertZoom | |
SbVec2f lastmouseposition | |
SbVec2s localPos | |
SbBool lockrecenter | |
struct { | |
short historysize | |
SbVec2s * position | |
short size | |
SbTime * time | |
} log | |
SbBool menuenabled | |
SbPlane panningplane | |
SbTime prevRedrawTime | |
SbBool shiftdown | |
View3DInventorViewer * viewer | |
SbBool zoomAtCursor | |
float zoomStep | |
Mouse model | |
AbstractMouseSelection * mouseSelection | |
std::vector< SbVec2s > pcPolygon | |
SelectionRole selectedRole | |
Spinning data | |
SbBool spinanimatingallowed | |
int spinsamplecounter | |
SbRotation spinincrement | |
SbRotation spinRotation | |
SbSphereSheetProjector * spinprojector | |
struct NavigationStyleP | |
Additional Inherited Members | |
![]() | |
static void * create (void) | |
static Type getClassTypeId (void) | |
static void init (void) | |
![]() | |
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) | |
Detailed Description
The navigation style base class.
Member Enumeration Documentation
◆ OrbitStyle
◆ RotationCenterMode
◆ SelectionMode
◆ ViewerMode
Constructor & Destructor Documentation
◆ NavigationStyle()
NavigationStyle::NavigationStyle | ( | ) |
References Gui::NavigationStyleP::viewAnimationCB().
◆ ~NavigationStyle()
|
virtual |
References finalize().
Member Function Documentation
◆ addToLog()
|
protected |
◆ boxZoom()
void NavigationStyle::boxZoom | ( | const SbBox2s & | box | ) |
References panCamera(), DraftVecUtils::scale(), and viewer.
Referenced by Gui::View3DInventorViewer::boxZoom().
◆ clearLog()
|
protected |
References log.
Referenced by setViewingMode().
◆ doRotate()
|
protected |
References panCamera(), viewer, and zoomAtCursor.
Referenced by Gui::MayaGestureNavigationStyle::processSoEvent().
◆ doSpin()
|
protected |
References lastmouseposition, log, spinanimatingallowed, spinprojector, spinRotation, and viewer.
Referenced by Gui::InventorNavigationStyle::processSoEvent(), and Gui::CADNavigationStyle::processSoEvent().
◆ doZoom() [1/2]
|
protected |
NavigationStyle::doZoom Zooms in or out by specified factor, keeping the point on screen specified by parameter pos fixed or not according to user preference (NavigationStyle::zoomAtCursor). Ignores invertZoom user preference.
References panCamera(), viewer, zoom(), and zoomAtCursor.
◆ doZoom() [2/2]
|
protected |
References invertZoom, and zoomStep.
Referenced by Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), and Gui::OpenCascadeNavigationStyle::processSoEvent().
◆ finalize()
|
protected |
References log, and spinprojector.
Referenced by Gui::MayaGestureNavigationStyle::processSoEvent(), draftguitools.gui_trackers.ghostTracker::update(), and ~NavigationStyle().
◆ getFocalPoint()
SbVec3f NavigationStyle::getFocalPoint | ( | ) | const |
References viewer.
◆ getInteractiveCount()
|
protected |
References viewer.
◆ getOrbitStyle()
NavigationStyle::OrbitStyle NavigationStyle::getOrbitStyle | ( | ) | const |
References FCSphereSheetProjector::getOrbitStyle(), and spinprojector.
◆ getPolygon()
const std::vector< SbVec2s > & NavigationStyle::getPolygon | ( | SelectionRole * | role = 0 | ) | const |
References pcPolygon, and selectedRole.
Referenced by Gui::View3DInventorViewer::getGLPolygon(), and Gui::View3DInventorViewer::getPolygon().
◆ getRotationCenter()
|
protected |
◆ getRotationCenterMode()
NavigationStyle::RotationCenterMode NavigationStyle::getRotationCenterMode | ( | ) | const |
◆ getSensitivity()
float NavigationStyle::getSensitivity | ( | ) | const |
Referenced by spin(), and spin_simplified().
◆ getViewingMode()
int NavigationStyle::getViewingMode | ( | ) | const |
References currentmode.
Referenced by Gui::View3DInventorViewer::afterRealizeHook(), and Gui::View3DInventorViewer::setCursorEnabled().
◆ handleEventInForeground()
|
protected |
References viewer.
Referenced by Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), and Gui::OpenCascadeNavigationStyle::processSoEvent().
◆ initialize()
|
protected |
References altdown, button1down, button2down, button3down, ctrldown, currentmode, App::GetApplication(), ParameterGrp::GetBool(), ParameterGrp::GetFloat(), App::Application::GetParameterGroupByPath(), IDLE, invertZoom, log, menuenabled, prevRedrawTime, shiftdown, spinanimatingallowed, spinincrement, spinprojector, spinRotation, spinsamplecounter, zoomAtCursor, and zoomStep.
◆ interactiveCountDec()
|
protected |
References viewer.
Referenced by lookAtPoint(), Gui::GestureNavigationStyle::onSetRotationCenter(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), setCameraOrientation(), setViewingMode(), and Gui::NavigationStyleP::viewAnimationCB().
◆ interactiveCountInc()
|
protected |
References viewer.
Referenced by lookAtPoint(), setCameraOrientation(), and setViewingMode().
◆ isAnimating()
SbBool NavigationStyle::isAnimating | ( | void | ) | const |
Query if the model in the viewer is currently in spinning mode after a user drag.
References currentmode, and SPINNING.
Referenced by Gui::View3DInventorViewer::isAnimating(), lookAtPoint(), Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), setAnimationEnabled(), setCameraOrientation(), and updateAnimation().
◆ isAnimationEnabled()
SbBool NavigationStyle::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 spinanimatingallowed.
Referenced by Gui::View3DInventorViewer::isAnimationEnabled(), lookAtPoint(), setCameraOrientation(), and startAnimating().
◆ isDragAtCursor()
SbBool NavigationStyle::isDragAtCursor | ( | ) | const |
◆ isPopupMenuEnabled()
SbBool NavigationStyle::isPopupMenuEnabled | ( | void | ) | const |
References menuenabled.
Referenced by Gui::View3DInventorViewer::isPopupMenuEnabled(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), and Gui::OpenCascadeNavigationStyle::processSoEvent().
◆ isResetCursorPosition()
SbBool NavigationStyle::isResetCursorPosition | ( | ) | const |
Referenced by moveCursorPosition().
◆ isSeekMode()
|
protected |
References viewer.
Referenced by Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and syncWithEvent().
◆ isSelecting()
SbBool NavigationStyle::isSelecting | ( | ) | const |
References mouseSelection.
Referenced by Gui::View3DInventorViewer::isSelecting(), and startSelection().
◆ isViewing()
|
protected |
References viewer.
Referenced by Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and stopAnimating().
◆ isZoomAtCursor()
SbBool NavigationStyle::isZoomAtCursor | ( | ) | const |
References zoomAtCursor.
◆ isZoomInverted()
SbBool NavigationStyle::isZoomInverted | ( | ) | const |
References invertZoom.
◆ lookAtPoint() [1/2]
|
protected |
References interactiveCountInc(), lookAtPoint(), and viewer.
◆ lookAtPoint() [2/2]
void NavigationStyle::lookAtPoint | ( | const SbVec3f & | pos | ) |
References interactiveCountDec(), interactiveCountInc(), isAnimating(), isAnimationEnabled(), spinRotation, stopAnimating(), and viewer.
Referenced by lookAtPoint(), Gui::GestureNavigationStyle::onSetRotationCenter(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), and Gui::MayaGestureNavigationStyle::processSoEvent().
◆ moveCursorPosition()
|
protected |
References globalPos, isResetCursorPosition(), localPos, and log.
Referenced by Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), and Gui::OpenCascadeNavigationStyle::processSoEvent().
◆ normalizePixelPos() [1/2]
◆ normalizePixelPos() [2/2]
|
protected |
Referenced by Gui::MayaGestureNavigationStyle::processSoEvent().
◆ openPopupMenu()
|
protectedvirtual |
References Base::Type::fromName(), Gui::MenuManager::getInstance(), Base::BaseClass::getTypeId(), Gui::UserNavigationStyle::getUserFriendlyNames(), Gui::Application::Instance, position, Gui::MenuManager::setupContextMenu(), Gui::Application::setupContextMenu(), and viewer.
Referenced by Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), and Gui::OpenCascadeNavigationStyle::processSoEvent().
◆ operator=()
NavigationStyle & NavigationStyle::operator= | ( | const NavigationStyle & | ns | ) |
◆ pan()
|
protected |
References panningplane, and viewer.
Referenced by Gui::MayaGestureNavigationStyle::processSoEvent(), and setViewingMode().
◆ panCamera()
|
protected |
Referenced by boxZoom(), doRotate(), doZoom(), panToCenter(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and spin().
◆ panToCenter()
|
protected |
◆ processEvent()
|
virtual |
References Gui::AbstractMouseSelection::Cancel, Gui::SelectionSingleton::clearSelection(), Gui::AbstractMouseSelection::Continue, currentmode, Gui::AbstractMouseSelection::Finish, Gui::AbstractMouseSelection::getPositions(), Gui::AbstractMouseSelection::handleEvent(), IDLE, mouseSelection, pcPolygon, processSoEvent(), Gui::AbstractMouseSelection::Restart, Gui::AbstractMouseSelection::selectedRole(), selectedRole, SELECTION, Gui::Selection(), syncWithEvent(), and viewer.
Referenced by Gui::View3DInventorViewer::processSoEvent().
◆ processMotionEvent()
|
virtual |
References DraftVecUtils::scale(), and viewer.
Referenced by Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), and Gui::OpenCascadeNavigationStyle::processSoEvent().
◆ processSoEvent()
|
protectedvirtual |
Reimplemented in Gui::GestureNavigationStyle, Gui::OpenCascadeNavigationStyle, Gui::TouchpadNavigationStyle, Gui::MayaGestureNavigationStyle, Gui::BlenderNavigationStyle, Gui::RevitNavigationStyle, Gui::CADNavigationStyle, and Gui::InventorNavigationStyle.
References Gui::View3DInventorViewer::processSoEventBase(), and viewer.
Referenced by processEvent(), Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and Gui::GestureNavigationStyle::processSoEvent_bypass().
◆ redraw()
void NavigationStyle::redraw | ( | ) |
◆ reorientCamera()
|
protected |
Rotate the camera by the given amount, then reposition it so we're still pointing at the same focal point.
Referenced by spin(), spin_simplified(), and updateAnimation().
◆ saveCursorPosition()
|
protected |
References FocalPointAtCursor, globalPos, localPos, ScenePointAtCursor, setRotationCenter(), and viewer.
Referenced by Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), and Gui::OpenCascadeNavigationStyle::processSoEvent().
◆ seekToPoint() [1/2]
|
protected |
References viewer.
Referenced by Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), and Gui::OpenCascadeNavigationStyle::processSoEvent().
◆ seekToPoint() [2/2]
|
protected |
References viewer.
◆ setAnimationEnabled()
void NavigationStyle::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 isAnimating(), spinanimatingallowed, and stopAnimating().
Referenced by Gui::View3DInventorViewer::setAnimationEnabled().
◆ setCameraOrientation()
void NavigationStyle::setCameraOrientation | ( | const SbRotation & | rot, |
SbBool | moveTocenter = false |
||
) |
References interactiveCountDec(), interactiveCountInc(), isAnimating(), isAnimationEnabled(), spinRotation, stopAnimating(), and viewer.
Referenced by Gui::View3DInventorViewer::setCameraOrientation().
◆ setDragAtCursor()
void NavigationStyle::setDragAtCursor | ( | SbBool | on | ) |
◆ setOrbitStyle()
void NavigationStyle::setOrbitStyle | ( | NavigationStyle::OrbitStyle | style | ) |
References FCSphereSheetProjector::setOrbitStyle(), and spinprojector.
Referenced by operator=().
◆ setPopupMenuEnabled()
void NavigationStyle::setPopupMenuEnabled | ( | const SbBool | on | ) |
References menuenabled.
Referenced by Gui::View3DInventorViewer::setPopupMenuEnabled().
◆ setResetCursorPosition()
void NavigationStyle::setResetCursorPosition | ( | SbBool | on | ) |
◆ setRotationCenter()
void NavigationStyle::setRotationCenter | ( | const SbVec3f & | cnt | ) |
Referenced by saveCursorPosition().
◆ setRotationCenterMode()
void NavigationStyle::setRotationCenterMode | ( | NavigationStyle::RotationCenterMode | mode | ) |
◆ setSeekMode()
|
protected |
References Gui::View3DInventorViewer::setSeekMode(), and viewer.
◆ setSensitivity()
void NavigationStyle::setSensitivity | ( | float | val | ) |
◆ setViewer()
void NavigationStyle::setViewer | ( | View3DInventorViewer * | view | ) |
References viewer.
Referenced by Gui::View3DInventorViewer::setNavigationType().
◆ setViewing()
|
protected |
References Gui::View3DInventorViewer::setViewing(), and viewer.
Referenced by Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and startAnimating().
◆ setViewingMode()
void NavigationStyle::setViewingMode | ( | const ViewerMode | newmode | ) |
References BOXZOOM, clearLog(), currentmode, DRAGGING, interactiveCountDec(), interactiveCountInc(), lastmouseposition, pan(), PANNING, SPINNING, spinprojector, viewer, and ZOOMING.
Referenced by Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), Gui::View3DInventorViewer::setSeekMode(), Gui::View3DInventorViewer::setViewing(), startAnimating(), and stopAnimating().
◆ setZoomAtCursor()
void NavigationStyle::setZoomAtCursor | ( | SbBool | on | ) |
References zoomAtCursor.
◆ setZoomInverted()
void NavigationStyle::setZoomInverted | ( | SbBool | on | ) |
References invertZoom.
◆ setZoomStep()
void NavigationStyle::setZoomStep | ( | float | val | ) |
References zoomStep.
◆ spin()
|
protected |
Uses the sphere sheet projector to map the mouseposition onto a 3D point and find a rotation from this and the last calculated point.
References getSensitivity(), localPos, log, panCamera(), reorientCamera(), spinincrement, spinprojector, spinsamplecounter, and viewer.
Referenced by Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), and Gui::OpenCascadeNavigationStyle::processSoEvent().
◆ spin_simplified()
|
protected |
NavigationStyle::spin_simplified is a simplified version of NavigationStyle::spin(..), which uses less global variables. Doesn't support starting an animated spinning.
- Parameters
-
cam the camera to affect. The rotation amount is determined by delta (curpos-prevpos), and rotation axis is also affected by average pos. curpos current normalized position or mouse pointer prevpos previous normalized position of mouse pointer
References getSensitivity(), reorientCamera(), spinprojector, and viewer.
Referenced by Gui::MayaGestureNavigationStyle::processSoEvent().
◆ startAnimating()
void NavigationStyle::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 isAnimationEnabled(), prevRedrawTime, setViewing(), setViewingMode(), spinincrement, SPINNING, and spinRotation.
Referenced by Gui::View3DInventorViewer::startAnimating().
◆ startSelection() [1/2]
void NavigationStyle::startSelection | ( | AbstractMouseSelection * | mouse | ) |
References Gui::AbstractMouseSelection::grabMouseModel(), mouseSelection, and viewer.
Referenced by Gui::View3DInventorViewer::startSelection().
◆ startSelection() [2/2]
void NavigationStyle::startSelection | ( | NavigationStyle::SelectionMode | mode = Lasso | ) |
References BoxZoom, Clip, Gui::AbstractMouseSelection::grabMouseModel(), isSelecting(), Lasso, mouseSelection, Rectangle, Rubberband, stopSelection(), and viewer.
◆ stopAnimating()
void NavigationStyle::stopAnimating | ( | void | ) |
References currentmode, IDLE, INTERACT, isViewing(), setViewingMode(), and SPINNING.
Referenced by lookAtPoint(), setAnimationEnabled(), setCameraOrientation(), and Gui::View3DInventorViewer::stopAnimating().
◆ stopSelection()
void NavigationStyle::stopSelection | ( | ) |
References mouseSelection, pcPolygon, and Gui::AbstractMouseSelection::releaseMouseModel().
Referenced by startSelection(), and Gui::View3DInventorViewer::stopSelection().
◆ syncWithEvent()
|
protected |
References altdown, button1down, button2down, button3down, ctrldown, isSeekMode(), and shiftdown.
Referenced by processEvent().
◆ updateAnimation()
void NavigationStyle::updateAnimation | ( | ) |
References isAnimating(), prevRedrawTime, reorientCamera(), spinRotation, and viewer.
Referenced by Gui::View3DInventorViewer::renderScene().
◆ viewAll()
|
virtual |
References viewer.
◆ zoom()
|
protected |
Dependent on the camera type this will either shrink or expand the height of the viewport (orthogonal camera) or move the camera closer or further away from the focal point in the scene.
Referenced by doZoom(), Gui::OpenCascadeNavigationStyle::processSoEvent(), zoomByCursor(), zoomIn(), and zoomOut().
◆ zoomByCursor()
|
protected |
References invertZoom, viewer, and zoom().
Referenced by Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), and Gui::TouchpadNavigationStyle::processSoEvent().
◆ zoomIn()
◆ zoomOut()
Friends And Related Function Documentation
◆ NavigationStyleP
|
friend |
Member Data Documentation
◆ altdown
|
protected |
Referenced by draftguitools.gui_dimensions.Dimension::action(), initialize(), Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and syncWithEvent().
◆ button1down
|
protected |
Referenced by initialize(), Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and syncWithEvent().
◆ button2down
|
protected |
Referenced by initialize(), Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and syncWithEvent().
◆ button3down
|
protected |
Referenced by initialize(), Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and syncWithEvent().
◆ centerTime
|
protected |
◆ ctrldown
|
protected |
Referenced by initialize(), Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and syncWithEvent().
◆ currentmode
|
protected |
Referenced by getViewingMode(), initialize(), isAnimating(), processEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), setViewingMode(), and stopAnimating().
◆ globalPos
|
protected |
Referenced by moveCursorPosition(), and saveCursorPosition().
◆ historysize
short Gui::NavigationStyle::historysize |
◆ invertZoom
|
protected |
Referenced by doZoom(), initialize(), isZoomInverted(), Gui::OpenCascadeNavigationStyle::processSoEvent(), setZoomInverted(), and zoomByCursor().
◆ lastmouseposition
|
protected |
Referenced by doSpin(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and setViewingMode().
◆ localPos
|
protected |
Referenced by moveCursorPosition(), saveCursorPosition(), and spin().
◆ lockrecenter
|
protected |
◆ log
struct { ... } Gui::NavigationStyle::log |
Referenced by addToLog(), clearLog(), doSpin(), finalize(), initialize(), moveCursorPosition(), and spin().
◆ menuenabled
|
protected |
Referenced by initialize(), isPopupMenuEnabled(), operator=(), and setPopupMenuEnabled().
◆ mouseSelection
|
protected |
Referenced by isSelecting(), processEvent(), redraw(), startSelection(), and stopSelection().
◆ panningplane
|
protected |
◆ pcPolygon
|
protected |
Referenced by getPolygon(), processEvent(), and stopSelection().
◆ position
SbVec2s* Gui::NavigationStyle::position |
Referenced by WorkingPlane.Plane::alignToPointAndAxis(), WorkingPlane.Plane::alignToPointAndAxis_SVG(), WorkingPlane.Plane::copy(), ifc2x3.ifcsweptsurface::dim(), ifc2x3.ifcelementarysurface::dim(), WorkingPlane.Plane::getGlobalCoords(), WorkingPlane.Plane::getLocalCoords(), WorkingPlane.Plane::getPlacement(), WorkingPlane.Plane::offsetToPoint(), openPopupMenu(), WorkingPlane.Plane::restore(), WorkingPlane.Plane::save(), and WorkingPlane.Plane::setFromPlacement().
◆ prevRedrawTime
|
protected |
Referenced by initialize(), startAnimating(), and updateAnimation().
◆ selectedRole
|
protected |
Referenced by getPolygon(), and processEvent().
◆ shiftdown
|
protected |
Referenced by initialize(), Gui::GestureNavigationStyle::processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and syncWithEvent().
◆ size
short Gui::NavigationStyle::size |
Referenced by gzip_utf8.GzipFile::close(), PathScripts.PostUtils.GCodeEditorDialog::done(), normalizePixelPos(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), and gzip_utf8.GzipFile::write().
◆ spinanimatingallowed
|
protected |
Referenced by doSpin(), initialize(), isAnimationEnabled(), operator=(), and setAnimationEnabled().
◆ spinincrement
|
protected |
Referenced by initialize(), spin(), and startAnimating().
◆ spinprojector
|
protected |
Referenced by doSpin(), finalize(), getOrbitStyle(), initialize(), operator=(), setOrbitStyle(), setViewingMode(), spin(), and spin_simplified().
◆ spinRotation
|
protected |
◆ spinsamplecounter
|
protected |
Referenced by initialize(), and spin().
◆ time
SbTime* Gui::NavigationStyle::time |
Referenced by addToLog().
◆ viewer
|
protected |
Referenced by boxZoom(), doRotate(), doSpin(), doZoom(), getFocalPoint(), getInteractiveCount(), handleEventInForeground(), interactiveCountDec(), interactiveCountInc(), Gui::GestureNavigationStyle::is2DViewing(), Gui::GestureNavigationStyle::isDraggerUnderCursor(), isSeekMode(), isViewing(), lookAtPoint(), normalizePixelPos(), openPopupMenu(), pan(), panToCenter(), processEvent(), processMotionEvent(), Gui::GestureNavigationStyle::processSoEvent(), processSoEvent(), Gui::InventorNavigationStyle::processSoEvent(), Gui::CADNavigationStyle::processSoEvent(), Gui::RevitNavigationStyle::processSoEvent(), Gui::BlenderNavigationStyle::processSoEvent(), Gui::MayaGestureNavigationStyle::processSoEvent(), Gui::TouchpadNavigationStyle::processSoEvent(), Gui::OpenCascadeNavigationStyle::processSoEvent(), saveCursorPosition(), seekToPoint(), setCameraOrientation(), setSeekMode(), setViewer(), setViewing(), setViewingMode(), spin(), spin_simplified(), startSelection(), updateAnimation(), viewAll(), Gui::NavigationStyleP::viewAnimationCB(), zoomByCursor(), zoomIn(), and zoomOut().
◆ zoomAtCursor
|
protected |
Referenced by doRotate(), doZoom(), initialize(), isZoomAtCursor(), Gui::MayaGestureNavigationStyle::processSoEvent(), and setZoomAtCursor().
◆ zoomStep
|
protected |
Referenced by doZoom(), initialize(), and setZoomStep().
The documentation for this class was generated from the following files:
- src/Gui/NavigationStyle.h
- src/Gui/NavigationStyle.cpp