Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::ViewportInteraction::ViewportInteractionRequests Class Referenceabstract

Requests that can be made to the viewport to query and modify its state. More...

#include <ViewportMessages.h>

Public Member Functions

virtual AzFramework::CameraState GetCameraState ()=0
 Returns the current camera state for this viewport.
 
virtual AzFramework::ScreenPoint ViewportWorldToScreen (const AZ::Vector3 &worldPosition)=0
 Transforms a point in world space to screen space coordinates in viewport pixel space.
 
virtual AZ::Vector3 ViewportScreenToWorld (const AzFramework::ScreenPoint &screenPosition)=0
 
virtual ProjectedViewportRay ViewportScreenToWorldRay (const AzFramework::ScreenPoint &screenPosition)=0
 
virtual float DeviceScalingFactor ()=0
 Gets the DPI scaling factor that translates Qt widget space into viewport pixel space.
 

Detailed Description

Requests that can be made to the viewport to query and modify its state.

Member Function Documentation

◆ ViewportScreenToWorld()

virtual AZ::Vector3 AzToolsFramework::ViewportInteraction::ViewportInteractionRequests::ViewportScreenToWorld ( const AzFramework::ScreenPoint &  screenPosition)
pure virtual

Transforms a point in viewport pixel space to world space based on the given clip space depth. Returns the world space position if successful.

◆ ViewportScreenToWorldRay()

virtual ProjectedViewportRay AzToolsFramework::ViewportInteraction::ViewportInteractionRequests::ViewportScreenToWorldRay ( const AzFramework::ScreenPoint &  screenPosition)
pure virtual

Casts a point in screen space to a ray in world space originating from the viewport camera frustum's near plane. Returns a ray containing the ray's origin and a direction normal, if successful.


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