![]() |
XII Release 0.1.0
|
Copyright (c) Theophilus Eriata. All Rights Reserved. More...
#include <ViewData.h>
Public Member Functions | |
| xiiResult | ComputePickingRay (float fNormalizedScreenPosX, float fNormalizedScreenPosY, xiiVec3 &out_vRayStartPos, xiiVec3 &out_vRayDir, xiiCameraEye eye=xiiCameraEye::Left) const |
| Copyright (c) Theophilus Eriata. All Rights Reserved. | |
| XII_ALWAYS_INLINE xiiResult | ComputeScreenSpacePos (const xiiVec3 &vWorldPos, xiiVec3 &out_vScreenPosNormalized, xiiCameraEye eye=xiiCameraEye::Left) const |
| xiiResult | ComputeWorldSpacePos (float fNormalizedScreenPosX, float fNormalizedScreenPosY, xiiVec3 &out_vWorldPos, xiiCameraEye eye=xiiCameraEye::Left) const |
| XII_ALWAYS_INLINE void | ConvertScreenPixelPosToNormalizedPos (xiiVec3 &inout_vPixelPos) const |
| Converts a screen-space position from pixel coordinates to normalized coordinates. | |
| XII_ALWAYS_INLINE void | ConvertScreenNormalizedPosToPixelPos (xiiVec3 &inout_vNormalizedPos) const |
| Converts a screen-space position from normalized coordinates to pixel coordinates. | |
Public Attributes | |
| xiiRectFloat | m_ViewPortRect |
| xiiEnum< xiiViewRenderMode > | m_ViewRenderMode |
| xiiEnum< xiiRenderPath > | m_RenderPath |
| xiiEnum< xiiCameraUsageHint > | m_CameraUsageHint |
| float | m_fRenderResolutionScale |
| Dynamic internal render scale applied to this view (1.0 = native viewport resolution). | |
| xiiUInt32 | m_uiRenderResolutionWidth |
| Dynamic internal render resolution in pixels. | |
| xiiUInt32 | m_uiRenderResolutionHeight |
| xiiMat4 | m_ViewMatrix [2] |
| xiiMat4 | m_InverseViewMatrix [2] |
| xiiMat4 | m_ProjectionMatrix [2] |
| xiiMat4 | m_InverseProjectionMatrix [2] |
| xiiMat4 | m_ViewProjectionMatrix [2] |
| xiiMat4 | m_InverseViewProjectionMatrix [2] |
Copyright (c) Theophilus Eriata. All Rights Reserved.
Holds native rendering view data. Projection matrices use ZeroToOne reversed Z: near depth is one, far/background depth is zero. Core cameras retain conventional depth.
| xiiResult xiiViewData::ComputePickingRay | ( | float | fNormalizedScreenPosX, |
| float | fNormalizedScreenPosY, | ||
| xiiVec3 & | out_vRayStartPos, | ||
| xiiVec3 & | out_vRayDir, | ||
| xiiCameraEye | eye = xiiCameraEye::Left ) const |
Copyright (c) Theophilus Eriata. All Rights Reserved.
Calculates the start position and direction (in world space) of the picking ray through the screen position in this view.
fNormalizedScreenPosX and fNormalizedScreenPosY are expected to be in [0; 1] range (normalized screen coordinates). The ray starts on the near plane and points into the scene. If no finite ray can be computed, XII_FAILURE is returned and outputs remain unchanged.
|
inline |
Calculates the normalized screen-space coordinate ([0; 1] range) that the given world-space point projects to.
Returns XII_FAILURE, if the point could not be projected into screen-space.
| xiiResult xiiViewData::ComputeWorldSpacePos | ( | float | fNormalizedScreenPosX, |
| float | fNormalizedScreenPosY, | ||
| xiiVec3 & | out_vWorldPos, | ||
| xiiCameraEye | eye = xiiCameraEye::Left ) const |
Calculates the near-plane world position at the normalized screen coordinates. Failure leaves the output unchanged.