Sceneview
 All Classes Functions Variables Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
sv::ViewHandlerHorizontal Class Reference

A view handler that has a notion of a fundamental plane (e.g., a ground plane) and a zenith direction (i.e., an absolute "up" direction). More...

#include <sceneview/view_handler_horizontal.hpp>

Inheritance diagram for sv::ViewHandlerHorizontal:
sv::InputHandler

Public Member Functions

 ViewHandlerHorizontal (Viewport *viewport, const QVector3D &zenith_dir, QObject *parent=nullptr)
 Constructor. More...
 
QString Name () const
 Retrieve the name of this view handler.
 
void SetZenithDir (const QVector3D &dir)
 Sets the zenith direction.
 
const QVector3D & ZenithDir () const
 Retrieve the zenith direction.
 
void MousePressEvent (QMouseEvent *event) override
 Handles a mouse press event. More...
 
void MouseMoveEvent (QMouseEvent *event) override
 Handles a mouse movement event. More...
 
void WheelEvent (QWheelEvent *event) override
 Handles a mouse wheel event. More...
 
void KeyPressEvent (QKeyEvent *event) override
 Handles a key press event. More...
 
QWidget * GetWidget () override
 Retrieve the widget for the input handler. More...
 
void SetShowLookAtPoint (bool val)
 Set whether or not the look at point is shown in the scene during a mouse or key event. More...
 
void SetAllowAzimuthElevationControl (bool val)
 Enables / disables azimuth and elevation control. More...
 
- Public Member Functions inherited from sv::InputHandler
virtual void Activated ()
 Called when the input handler is activated and given control.
 
virtual void Deactivated ()
 Called when the input handler is deactivated.
 
virtual void InitializeGL ()
 Called when the OpenGL context is ready for use.
 
virtual void ShutdownGL ()
 Called when the OpenGL context is shutting down (usually, right before destruction).
 
virtual void MouseReleaseEvent (QMouseEvent *event)
 Called when the mouse is released in the viewport.
 
virtual void MouseDoubleClickEvent (QMouseEvent *event)
 Called when the mouse is double-clicked in the viewport.
 
virtual void KeyReleaseEvent (QKeyEvent *event)
 Called when a key is released in the viewport.
 
virtual QVariant SaveState ()
 Called by the viewport to save the InputHandler state. More...
 
virtual void LoadState (const QVariant &val)
 Called by the viewport to restore the InputHandler state. More...
 

Detailed Description

A view handler that has a notion of a fundamental plane (e.g., a ground plane) and a zenith direction (i.e., an absolute "up" direction).

Camera orientation is controlled as azimuth and elevation.

Interactions:

Click-dragging with the left mouse button moves the camera in a plane parallel to the fundamental plane.

Click-dragging with the middle mouse button moves the camera perpendicular to the fundamental plane.

Click-dragging with the right mouse button orbits the camera about the look at point, azimuth-elevation style.

Scrolling the wheel moves the camera closer to or farther from the look at point.

Keyboard up and down arrows move the camera perpendicular to the fundamental plane (i.e., similar to click-dragging with the middle mouse button).

Customizability

Constructor & Destructor Documentation

sv::ViewHandlerHorizontal::ViewHandlerHorizontal ( Viewport viewport,
const QVector3D &  zenith_dir,
QObject *  parent = nullptr 
)

Constructor.

Parameters
viewportthe viewport that the view handler is associated with.
zenith_dirthe zenith direction.
parentthe QObject parent.

Member Function Documentation

QWidget* sv::ViewHandlerHorizontal::GetWidget ( )
overridevirtual

Retrieve the widget for the input handler.

This is typically invoked by InputHandlerWidgetStack.

Reimplemented from sv::InputHandler.

void sv::ViewHandlerHorizontal::KeyPressEvent ( QKeyEvent *  event)
overridevirtual

Handles a key press event.

This is generally invoked by Viewport.

Reimplemented from sv::InputHandler.

void sv::ViewHandlerHorizontal::MouseMoveEvent ( QMouseEvent *  event)
overridevirtual

Handles a mouse movement event.

This is generally invoked by Viewport.

Reimplemented from sv::InputHandler.

void sv::ViewHandlerHorizontal::MousePressEvent ( QMouseEvent *  event)
overridevirtual

Handles a mouse press event.

This is generally invoked by Viewport.

Reimplemented from sv::InputHandler.

void sv::ViewHandlerHorizontal::SetAllowAzimuthElevationControl ( bool  val)

Enables / disables azimuth and elevation control.

If disabled, then azimuth and elevation control is not allowed.

void sv::ViewHandlerHorizontal::SetShowLookAtPoint ( bool  val)

Set whether or not the look at point is shown in the scene during a mouse or key event.

If enabled, the look at point is shown as a visual reference for the user when interacting with the scene.

void sv::ViewHandlerHorizontal::WheelEvent ( QWheelEvent *  event)
overridevirtual

Handles a mouse wheel event.

This is generally invoked by Viewport.

Reimplemented from sv::InputHandler.


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