XII Release 0.1.0
Loading...
Searching...
No Matches
xiiOrbitCameraContext Class Reference

A simple orbit camera. Use LMB to rotate, wheel to zoom, Alt to slow down. More...

#include <OrbitCameraContext.h>

Inheritance diagram for xiiOrbitCameraContext:
[legend]

Public Member Functions

 xiiOrbitCameraContext (xiiQtEngineDocumentWindow *pOwnerWindow, xiiQtEngineViewWidget *pOwnerView)
 
void SetCamera (xiiCamera *pCamera)
 
xiiCameraGetCamera () const
 
void SetDefaultCameraRelative (const xiiVec3 &vDirection, float fDistanceScale)
 
void SetDefaultCameraFixed (const xiiVec3 &vPosition)
 
void MoveCameraToDefaultPosition ()
 
void SetOrbitVolume (const xiiVec3 &vCenterPos, const xiiVec3 &vHalfBoxSize)
 Defines the box in which the user may move the camera around.
 
xiiVec3 GetVolumeCenter () const
 The center point around which the camera can be moved and rotated.
 
xiiVec3 GetVolumeHalfSize () const
 The half-size of the volume in which the camera may move around.
 
- Public Member Functions inherited from xiiEditorInputContext
void FocusLost (bool bCancel)
 
xiiEditorInput KeyPressEvent (QKeyEvent *e)
 
xiiEditorInput KeyReleaseEvent (QKeyEvent *e)
 
xiiEditorInput MousePressEvent (QMouseEvent *e)
 
xiiEditorInput MouseReleaseEvent (QMouseEvent *e)
 
xiiEditorInput MouseMoveEvent (QMouseEvent *e)
 
xiiEditorInput WheelEvent (QWheelEvent *e)
 
void MakeActiveInputContext (bool bActive=true)
 
bool IsActiveInputContext () const
 
void SetOwner (xiiQtEngineDocumentWindow *pOwnerWindow, xiiQtEngineViewWidget *pOwnerView)
 
xiiQtEngineDocumentWindowGetOwnerWindow () const
 
xiiQtEngineViewWidgetGetOwnerView () const
 
bool GetShortcutsDisabled () const
 
void SetShortcutsDisabled (bool bDisabled)
 If set to true, the surrounding window will ensure to block all shortcuts and instead send keypress events to the input context.
 
virtual bool IsPickingSelectedAllowed () const
 
xiiVec2I32 SetMouseMode (MouseMode mode)
 Sets how the mouse will act when it reaches the screen border. UpdateMouseMode() must be called on every mouseMoveEvent to update the state.
 
xiiVec2I32 UpdateMouseMode (QMouseEvent *e)
 Updates the mouse position. Can always be called but will only have an effect if SetMouseMode() was called with one of the wrap modes.
 
virtual void UpdateStatusBarText (xiiQtEngineDocumentWindow *pWindow)
 
- Public Member Functions inherited from xiiReflectedClass
virtual const xiiRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const xiiRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T>
XII_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Protected Member Functions

virtual void DoFocusLost (bool bCancel) override
 
virtual xiiEditorInput DoMousePressEvent (QMouseEvent *e) override
 
virtual xiiEditorInput DoMouseReleaseEvent (QMouseEvent *e) override
 
virtual xiiEditorInput DoMouseMoveEvent (QMouseEvent *e) override
 
virtual xiiEditorInput DoWheelEvent (QWheelEvent *e) override
 
virtual xiiEditorInput DoKeyPressEvent (QKeyEvent *e) override
 
virtual xiiEditorInput DoKeyReleaseEvent (QKeyEvent *e) override
 
virtual void OnSetOwner (xiiQtEngineDocumentWindow *pOwnerWindow, xiiQtEngineViewWidget *pOwnerView) override
 
- Protected Member Functions inherited from xiiEditorInputContext
virtual void OnActivated ()
 
virtual void OnDeactivated ()
 

Additional Inherited Members

- Public Types inherited from xiiEditorInputContext
enum class  MouseMode { Normal , WrapAtScreenBorders , HideAndWrapAtScreenBorders }
 How the mouse position is updated when the mouse cursor reaches the screen borders. More...
 
- Static Public Member Functions inherited from xiiEditorInputContext
static void SetActiveInputContext (xiiEditorInputContext *pContext)
 
static bool IsAnyInputContextActive ()
 
static xiiEditorInputContextGetActiveInputContext ()
 
static void UpdateActiveInputContext ()
 
- Static Public Member Functions inherited from xiiNoBase
static const xiiRTTIGetStaticRTTI ()
 

Detailed Description

A simple orbit camera. Use LMB to rotate, wheel to zoom, Alt to slow down.

Member Function Documentation

◆ DoFocusLost()

void xiiOrbitCameraContext::DoFocusLost ( bool bCancel)
overrideprotectedvirtual

Reimplemented from xiiEditorInputContext.

◆ DoKeyPressEvent()

xiiEditorInput xiiOrbitCameraContext::DoKeyPressEvent ( QKeyEvent * e)
overrideprotectedvirtual

Reimplemented from xiiEditorInputContext.

◆ DoKeyReleaseEvent()

xiiEditorInput xiiOrbitCameraContext::DoKeyReleaseEvent ( QKeyEvent * e)
overrideprotectedvirtual

Reimplemented from xiiEditorInputContext.

◆ DoMouseMoveEvent()

xiiEditorInput xiiOrbitCameraContext::DoMouseMoveEvent ( QMouseEvent * e)
overrideprotectedvirtual

Reimplemented from xiiEditorInputContext.

◆ DoMousePressEvent()

xiiEditorInput xiiOrbitCameraContext::DoMousePressEvent ( QMouseEvent * e)
overrideprotectedvirtual

Reimplemented from xiiEditorInputContext.

◆ DoMouseReleaseEvent()

xiiEditorInput xiiOrbitCameraContext::DoMouseReleaseEvent ( QMouseEvent * e)
overrideprotectedvirtual

Reimplemented from xiiEditorInputContext.

◆ DoWheelEvent()

xiiEditorInput xiiOrbitCameraContext::DoWheelEvent ( QWheelEvent * e)
overrideprotectedvirtual

Reimplemented from xiiEditorInputContext.

◆ OnSetOwner()

virtual void xiiOrbitCameraContext::OnSetOwner ( xiiQtEngineDocumentWindow * pOwnerWindow,
xiiQtEngineViewWidget * pOwnerView )
inlineoverrideprotectedvirtual

Implements xiiEditorInputContext.

◆ UpdateContext()

void xiiOrbitCameraContext::UpdateContext ( )
overrideprivatevirtual

Reimplemented from xiiEditorInputContext.


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