![]() |
XII Release 0.1.0
|
Encapsulates a view on the given world through the given camera and rendered with the specified RenderPipeline into the given render target setup. More...
#include <View.h>
Public Member Functions | |
| xiiViewHandle | GetHandle () const |
| void | SetName (xiiStringView sName) |
| xiiStringView | GetName () const |
| void | SetWorld (xiiWorld *pWorld) |
| xiiWorld * | GetWorld () |
| const xiiWorld * | GetWorld () const |
| void | SetSwapChain (xiiGALSwapChain *pSwapChain) |
| Sets the swapchain that this view will be rendering into. Can be invalid in case the render target is an off-screen buffer in which case SetRenderTargets needs to be called. Setting the swap-chain is necessary in order to acquire and present the image to the window. SetSwapChain and SetRenderTargets are mutually exclusive. Calling this function will reset the render targets. | |
| xiiGALSwapChain * | GetSwapChain () const |
| void | SetRenderTargets (const xiiRenderTargets &renderTargets) |
| Sets the off-screen render targets. Use SetSwapChain if rendering to a window. SetSwapChain and SetRenderTargets are mutually exclusive. Calling this function will reset the swap chain. | |
| const xiiRenderTargets & | GetRenderTargets () const |
| const xiiRenderTargets & | GetActiveRenderTargets () const |
| Returns the render targets that were either set via the swapchain or via the manually set render targets. | |
| void | SetRenderPipelineResource (xiiRenderPipelineResourceHandle hPipeline) |
| xiiRenderPipelineResourceHandle | GetRenderPipelineResource () const |
| void | SetCamera (xiiCamera *pCamera) |
| xiiCamera * | GetCamera () |
| const xiiCamera * | GetCamera () const |
| void | SetCullingCamera (const xiiCamera *pCamera) |
| const xiiCamera * | GetCullingCamera () const |
| void | SetLodCamera (const xiiCamera *pCamera) |
| const xiiCamera * | GetLodCamera () const |
| xiiEnum< xiiCameraUsageHint > | GetCameraUsageHint () const |
| Returns the camera usage hint for the view. | |
| void | SetCameraUsageHint (xiiEnum< xiiCameraUsageHint > val) |
| Sets the camera usage hint for the view. If not 'None', the camera component of the same usage will be auto-connected to this view. | |
| void | SetViewRenderMode (xiiEnum< xiiViewRenderMode > value) |
| xiiEnum< xiiViewRenderMode > | GetViewRenderMode () const |
| void | SetViewport (const xiiRectFloat &viewport) |
| const xiiRectFloat & | GetViewport () const |
| void | ForceUpdate () |
| Forces the render pipeline to be rebuilt. | |
| const xiiViewData & | GetData () const |
| bool | IsValid () const |
| void | ExtractData () |
| Extracts all relevant data from the world to render the view. | |
| const xiiSharedPtr< xiiTask > & | GetExtractTask () |
| Returns a task implementation that calls ExtractData on this view. | |
| xiiResult | ComputePickingRay (float fNormalizedScreenPosX, float fNormalizedScreenPosY, xiiVec3 &out_vRayStartPos, xiiVec3 &out_vRayDir) const |
| Calculates the start position and direction (in world space) of the picking ray through the screen position in this view. | |
| xiiResult | ComputeScreenSpacePos (const xiiVec3 &vWorldPos, xiiVec3 &out_vScreenPosNormalized) const |
| Calculates the normalized screen-space coordinate ([0; 1] range) that the given world-space point projects to. | |
| xiiResult | ComputeWorldSpacePos (float fNormalizedScreenPosX, float fNormalizedScreenPosY, xiiVec3 &out_vWorldPos) const |
| Calculates the world-space position that the given normalized screen-space coordinate maps to. | |
| void | ConvertScreenPixelPosToNormalizedPos (xiiVec3 &inout_vPixelPos) |
| Converts a screen-space position from pixel coordinates to normalized coordinates. | |
| void | ConvertScreenNormalizedPosToPixelPos (xiiVec3 &inout_vNormalizedPos) |
| Converts a screen-space position from normalized coordinates to pixel coordinates. | |
| const xiiMat4 & | GetProjectionMatrix (xiiCameraEye eye) const |
| Returns the current projection matrix. | |
| const xiiMat4 & | GetInverseProjectionMatrix (xiiCameraEye eye) const |
| Returns the current inverse projection matrix. | |
| const xiiMat4 & | GetViewMatrix (xiiCameraEye eye) const |
| Returns the current view matrix (camera orientation). | |
| const xiiMat4 & | GetInverseViewMatrix (xiiCameraEye eye) const |
| Returns the current inverse view matrix (inverse camera orientation). | |
| const xiiMat4 & | GetViewProjectionMatrix (xiiCameraEye eye) const |
| Returns the current view-projection matrix. | |
| const xiiMat4 & | GetInverseViewProjectionMatrix (xiiCameraEye eye) const |
| Returns the current inverse view-projection matrix. | |
| void | ComputeCullingFrustum (xiiFrustum &out_frustum) const |
| Returns the frustum that should be used for determine visible objects for this view. | |
| void | SetShaderPermutationVariable (xiiStringView sName, xiiStringView sValue) |
| void | SetRenderPassProperty (xiiStringView sPassName, xiiStringView sPropertyName, const xiiVariant &value) |
| void | SetExtractorProperty (xiiStringView sPassName, xiiStringView sPropertyName, const xiiVariant &value) |
| void | ResetRenderPassProperties () |
| void | ResetExtractorProperties () |
| void | SetRenderPassReadBackProperty (xiiStringView sPassName, xiiStringView sPropertyName, const xiiVariant &value) |
| xiiVariant | GetRenderPassReadBackProperty (xiiStringView sPassName, xiiStringView sPropertyName) |
| bool | IsRenderPassReadBackPropertyExisting (xiiStringView sPassName, xiiStringView sPropertyName) const |
| void | UpdateViewData (xiiUInt32 uiDataIndex) |
| Pushes the view and camera data into the extracted data of the pipeline. | |
Public Member Functions inherited from xiiRenderPipelineNode | |
| void | InitializePins () |
| Populates the internal arrays of input and output pins. | |
| xiiHashedString | GetPinName (const xiiRenderPipelineNodePin *pPin) const |
| Returns the hashed name associated with a given pin. | |
| const xiiRenderPipelineNodePin * | GetPinByName (xiiStringView sName) const |
| Finds a pin by its string name. | |
| const xiiRenderPipelineNodePin * | GetPinByName (xiiHashedString sName) const |
| Finds a pin by its hashed name. | |
| XII_ALWAYS_INLINE const xiiArrayPtr< const xiiRenderPipelineNodePin *const > | GetInputPins () const |
| Retrieves all input pins of this node. | |
| XII_ALWAYS_INLINE const xiiArrayPtr< const xiiRenderPipelineNodePin *const > | GetOutputPins () const |
| Retrieves all output pins of this node. | |
Public Member Functions inherited from xiiReflectedClass | |
| virtual const xiiRTTI * | GetDynamicRTTI () 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. | |
Public Attributes | |
| xiiTagSet | m_IncludeTags |
| xiiTagSet | m_ExcludeTags |
Friends | |
| class | xiiRenderWorld |
| class | xiiMemoryUtils |
Additional Inherited Members | |
Static Public Member Functions inherited from xiiNoBase | |
| static const xiiRTTI * | GetStaticRTTI () |
Encapsulates a view on the given world through the given camera and rendered with the specified RenderPipeline into the given render target setup.
| xiiResult xiiView::ComputePickingRay | ( | float | fNormalizedScreenPosX, |
| float | fNormalizedScreenPosY, | ||
| xiiVec3 & | out_vRayStartPos, | ||
| xiiVec3 & | out_vRayDir ) const |
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). If no ray can be computed, EZ_FAILURE is returned.
| xiiResult xiiView::ComputeScreenSpacePos | ( | const xiiVec3 & | vWorldPos, |
| xiiVec3 & | out_vScreenPosNormalized ) const |
Calculates the normalized screen-space coordinate ([0; 1] range) that the given world-space point projects to.
Returns EZ_FAILURE, if the point could not be projected into screen-space.
| void xiiView::UpdateViewData | ( | xiiUInt32 | uiDataIndex | ) |
Pushes the view and camera data into the extracted data of the pipeline.
Use xiiRenderWorld::GetDataIndexForExtraction() to update the data from the extraction thread. Can't be used if this view is currently extracted. Use xiiRenderWorld::GetDataIndexForRendering() to update the data from the render thread.