ezEngine Release 25.08
Loading...
Searching...
No Matches
ezOrbitCameraContext Class Reference

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

#include <OrbitCameraContext.h>

Inheritance diagram for ezOrbitCameraContext:

Public Member Functions

 ezOrbitCameraContext (ezQtEngineDocumentWindow *pOwnerWindow, ezQtEngineViewWidget *pOwnerView)
 
void SetCamera (ezCamera *pCamera)
 
ezCameraGetCamera () const
 
void SetDefaultCameraRelative (const ezVec3 &vDirection, float fDistanceScale)
 
void SetDefaultCameraFixed (const ezVec3 &vPosition)
 
void MoveCameraToDefaultPosition ()
 
void SetOrbitVolume (const ezVec3 &vCenterPos, const ezVec3 &vHalfBoxSize)
 Defines the box in which the user may move the camera around.
 
ezVec3 GetVolumeCenter () const
 The center point around which the camera can be moved and rotated.
 
ezVec3 GetVolumeHalfSize () const
 The half-size of the volume in which the camera may move around.
 
- Public Member Functions inherited from ezEditorInputContext
void FocusLost (bool bCancel)
 
ezEditorInput KeyPressEvent (QKeyEvent *e)
 
ezEditorInput KeyReleaseEvent (QKeyEvent *e)
 
ezEditorInput MousePressEvent (QMouseEvent *e)
 
ezEditorInput MouseReleaseEvent (QMouseEvent *e)
 
ezEditorInput MouseMoveEvent (QMouseEvent *e)
 
ezEditorInput WheelEvent (QWheelEvent *e)
 
void MakeActiveInputContext (bool bActive=true)
 
bool IsActiveInputContext () const
 
void SetOwner (ezQtEngineDocumentWindow *pOwnerWindow, ezQtEngineViewWidget *pOwnerView)
 
ezQtEngineDocumentWindowGetOwnerWindow () const
 
ezQtEngineViewWidgetGetOwnerView () 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
 
ezVec2I32 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.
 
ezVec2I32 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 (ezQtEngineDocumentWindow *pWindow)
 
- Public Member Functions inherited from ezReflectedClass
virtual const ezRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const ezRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
EZ_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 ezEditorInput DoMousePressEvent (QMouseEvent *e) override
 
virtual ezEditorInput DoMouseReleaseEvent (QMouseEvent *e) override
 
virtual ezEditorInput DoMouseMoveEvent (QMouseEvent *e) override
 
virtual ezEditorInput DoWheelEvent (QWheelEvent *e) override
 
virtual ezEditorInput DoKeyPressEvent (QKeyEvent *e) override
 
virtual ezEditorInput DoKeyReleaseEvent (QKeyEvent *e) override
 
virtual void OnSetOwner (ezQtEngineDocumentWindow *pOwnerWindow, ezQtEngineViewWidget *pOwnerView) override
 
- Protected Member Functions inherited from ezEditorInputContext
virtual void OnActivated ()
 
virtual void OnDeactivated ()
 

Additional Inherited Members

- Public Types inherited from ezEditorInputContext
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 ezEditorInputContext
static void SetActiveInputContext (ezEditorInputContext *pContext)
 
static bool IsAnyInputContextActive ()
 
static ezEditorInputContextGetActiveInputContext ()
 
static void UpdateActiveInputContext ()
 
- Static Public Member Functions inherited from ezNoBase
static const ezRTTIGetStaticRTTI ()
 

Detailed Description

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

Member Function Documentation

◆ DoFocusLost()

void ezOrbitCameraContext::DoFocusLost ( bool  bCancel)
overrideprotectedvirtual

Reimplemented from ezEditorInputContext.

◆ DoKeyPressEvent()

ezEditorInput ezOrbitCameraContext::DoKeyPressEvent ( QKeyEvent *  e)
overrideprotectedvirtual

Reimplemented from ezEditorInputContext.

◆ DoKeyReleaseEvent()

ezEditorInput ezOrbitCameraContext::DoKeyReleaseEvent ( QKeyEvent *  e)
overrideprotectedvirtual

Reimplemented from ezEditorInputContext.

◆ DoMouseMoveEvent()

ezEditorInput ezOrbitCameraContext::DoMouseMoveEvent ( QMouseEvent *  e)
overrideprotectedvirtual

Reimplemented from ezEditorInputContext.

◆ DoMousePressEvent()

ezEditorInput ezOrbitCameraContext::DoMousePressEvent ( QMouseEvent *  e)
overrideprotectedvirtual

Reimplemented from ezEditorInputContext.

◆ DoMouseReleaseEvent()

ezEditorInput ezOrbitCameraContext::DoMouseReleaseEvent ( QMouseEvent *  e)
overrideprotectedvirtual

Reimplemented from ezEditorInputContext.

◆ DoWheelEvent()

ezEditorInput ezOrbitCameraContext::DoWheelEvent ( QWheelEvent *  e)
overrideprotectedvirtual

Reimplemented from ezEditorInputContext.

◆ OnSetOwner()

virtual void ezOrbitCameraContext::OnSetOwner ( ezQtEngineDocumentWindow pOwnerWindow,
ezQtEngineViewWidget pOwnerView 
)
inlineoverrideprotectedvirtual

Implements ezEditorInputContext.

◆ UpdateContext()

void ezOrbitCameraContext::UpdateContext ( )
overrideprivatevirtual

Reimplemented from ezEditorInputContext.


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