Plasma Engine  2.0
Loading...
Searching...
No Matches
plOrbitCameraContext Class Reference

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

#include <OrbitCameraContext.h>

Inheritance diagram for plOrbitCameraContext:

Public Member Functions

 plOrbitCameraContext (plQtEngineDocumentWindow *pOwnerWindow, plQtEngineViewWidget *pOwnerView)
 
void SetCamera (plCamera *pCamera)
 
plCameraGetCamera () const
 
void SetDefaultCameraRelative (const plVec3 &vDirection, float fDistanceScale)
 
void SetDefaultCameraFixed (const plVec3 &vPosition)
 
void MoveCameraToDefaultPosition ()
 
void SetOrbitVolume (const plVec3 &vCenterPos, const plVec3 &vHalfBoxSize)
 Defines the box in which the user may move the camera around.
 
plVec3 GetVolumeCenter () const
 The center point around which the camera can be moved and rotated.
 
plVec3 GetVolumeHalfSize () const
 The half-size of the volume in which the camera may move around.
 
- Public Member Functions inherited from plEditorInputContext
void FocusLost (bool bCancel)
 
plEditorInput KeyPressEvent (QKeyEvent *e)
 
plEditorInput KeyReleaseEvent (QKeyEvent *e)
 
plEditorInput MousePressEvent (QMouseEvent *e)
 
plEditorInput MouseReleaseEvent (QMouseEvent *e)
 
plEditorInput MouseMoveEvent (QMouseEvent *e)
 
plEditorInput WheelEvent (QWheelEvent *e)
 
void MakeActiveInputContext (bool bActive=true)
 
bool IsActiveInputContext () const
 
void SetOwner (plQtEngineDocumentWindow *pOwnerWindow, plQtEngineViewWidget *pOwnerView)
 
plQtEngineDocumentWindowGetOwnerWindow () const
 
plQtEngineViewWidgetGetOwnerView () 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
 
plVec2I32 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.
 
plVec2I32 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 (plQtEngineDocumentWindow *pWindow)
 
- Public Member Functions inherited from plReflectedClass
virtual const plRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const plRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
PL_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 plEditorInput DoMousePressEvent (QMouseEvent *e) override
 
virtual plEditorInput DoMouseReleaseEvent (QMouseEvent *e) override
 
virtual plEditorInput DoMouseMoveEvent (QMouseEvent *e) override
 
virtual plEditorInput DoWheelEvent (QWheelEvent *e) override
 
virtual plEditorInput DoKeyPressEvent (QKeyEvent *e) override
 
virtual plEditorInput DoKeyReleaseEvent (QKeyEvent *e) override
 
virtual void OnSetOwner (plQtEngineDocumentWindow *pOwnerWindow, plQtEngineViewWidget *pOwnerView) override
 

Additional Inherited Members

- Public Types inherited from plEditorInputContext
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 plEditorInputContext
static void SetActiveInputContext (plEditorInputContext *pContext)
 
static bool IsAnyInputContextActive ()
 
static plEditorInputContextGetActiveInputContext ()
 
static void UpdateActiveInputContext ()
 
- Static Public Member Functions inherited from plNoBase
static const plRTTIGetStaticRTTI ()
 

Detailed Description

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

Member Function Documentation

◆ DoFocusLost()

void plOrbitCameraContext::DoFocusLost ( bool bCancel)
overrideprotectedvirtual

Reimplemented from plEditorInputContext.

◆ DoKeyPressEvent()

plEditorInput plOrbitCameraContext::DoKeyPressEvent ( QKeyEvent * e)
overrideprotectedvirtual

Reimplemented from plEditorInputContext.

◆ DoKeyReleaseEvent()

plEditorInput plOrbitCameraContext::DoKeyReleaseEvent ( QKeyEvent * e)
overrideprotectedvirtual

Reimplemented from plEditorInputContext.

◆ DoMouseMoveEvent()

plEditorInput plOrbitCameraContext::DoMouseMoveEvent ( QMouseEvent * e)
overrideprotectedvirtual

Reimplemented from plEditorInputContext.

◆ DoMousePressEvent()

plEditorInput plOrbitCameraContext::DoMousePressEvent ( QMouseEvent * e)
overrideprotectedvirtual

Reimplemented from plEditorInputContext.

◆ DoMouseReleaseEvent()

plEditorInput plOrbitCameraContext::DoMouseReleaseEvent ( QMouseEvent * e)
overrideprotectedvirtual

Reimplemented from plEditorInputContext.

◆ DoWheelEvent()

plEditorInput plOrbitCameraContext::DoWheelEvent ( QWheelEvent * e)
overrideprotectedvirtual

Reimplemented from plEditorInputContext.

◆ OnSetOwner()

virtual void plOrbitCameraContext::OnSetOwner ( plQtEngineDocumentWindow * pOwnerWindow,
plQtEngineViewWidget * pOwnerView )
inlineoverrideprotectedvirtual

Implements plEditorInputContext.

◆ UpdateContext()

void plOrbitCameraContext::UpdateContext ( )
overrideprivatevirtual

Reimplemented from plEditorInputContext.


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