XII Release 0.1.0
Loading...
Searching...
No Matches
xiiEngineProcessViewContext Class Referenceabstract

Represents a view context in the engine process that is used to render a view for an editor document. It is responsible for creating a view, setting up the render target and handling view messages from the editor process. More...

#include <EngineProcessViewContext.h>

Inheritance diagram for xiiEngineProcessViewContext:
[legend]

Public Member Functions

 xiiEngineProcessViewContext (xiiEngineProcessDocumentContext *pContext)
 Copyright (c) Theophilus Eriata. All Rights Reserved.
void SetViewID (xiiUInt32 uiId)
xiiEngineProcessDocumentContext * GetDocumentContext () const
virtual void HandleViewMessage (const xiiEditorEngineViewMsg *pMsg)
virtual void SetupRenderTarget (xiiSharedPtr< xiiGALSwapChain > pSwapChain, xiiGALTextureView *pRenderTargetView, xiiUInt16 uiWidth, xiiUInt16 uiHeight)
virtual void Redraw (bool bRenderEditorGizmos)
virtual void SuspendRendering ()
 Consumes this frame's redraw request without discarding camera or pipeline state.
xiiRegisteredWindowHandle GetWindowHandle () const
xiiViewHandle GetViewHandle () const
void SetRenderPipelineProfile (const xiiPlatformProfile *profile)
void SetRenderPipelineResourceReference (xiiStringView resource)

Static Public Member Functions

static bool FocusCameraOnObject (xiiCamera &inout_camera, const xiiBoundingBoxSphere &objectBounds, float fFov, const xiiVec3 &vViewDir)
 Focuses camera on the given object.

Protected Member Functions

xiiView * GetView () const
xiiResult ResolveRenderPipeline (xiiRenderPipelineUsage::Enum usage, xiiRenderPipelineResourceHandle &out_pipeline)
void UpdateRenderPipeline (xiiView &view)
xiiResult DrawGrid (float fSpacing, const xiiTransform &transform=xiiTransform::MakeIdentity(), bool bGlobal=true)
 Submits reusable grid geometry to this view's regular debug-render passes.
xiiResult PickGizmoAtPixel (xiiUInt32 x, xiiUInt32 y, xiiViewPickingResultMsgToEditor &out_result) const
void SendViewMessage (xiiEditorEngineViewMsg *pViewMsg)
void HandleWindowUpdate (xiiWindowHandle hWnd, xiiUInt16 uiWidth, xiiUInt16 uiHeight)
void OnSwapChainChanged (xiiSharedPtr< xiiGALSwapChain > pSwapChain, xiiSizeU32 size)
virtual void SetCamera (const xiiViewRedrawMsgToEngine *pMsg)
virtual xiiViewHandle CreateView ()=0
 Create the actual view.

Protected Attributes

xiiCamera m_Camera
xiiViewHandle m_hView
xiiUInt32 m_uiViewID
xiiRegisteredWindowHandle m_hEditorWindow

Detailed Description

Represents a view context in the engine process that is used to render a view for an editor document. It is responsible for creating a view, setting up the render target and handling view messages from the editor process.

Member Function Documentation

◆ CreateView()

◆ GetView()

xiiView * xiiEngineProcessViewContext::GetView ( ) const
protected

Resolves the view through its owning document world. The caller must hold the world's access marker for the entire use of the returned non-owning pointer.

◆ HandleViewMessage()

void xiiEngineProcessViewContext::HandleViewMessage ( const xiiEditorEngineViewMsg * pMsg)
virtual

◆ PickGizmoAtPixel()

xiiResult xiiEngineProcessViewContext::PickGizmoAtPixel ( xiiUInt32 x,
xiiUInt32 y,
xiiViewPickingResultMsgToEditor & out_result ) const
protected

Picks synchronized handles at a window pixel center, accounting for viewport offsets. Clears all hit fields on failure; document and view routing fields remain unchanged. Gizmos do not report a surface normal. The caller sends or combines the result.

◆ SetRenderPipelineProfile()

void xiiEngineProcessViewContext::SetRenderPipelineProfile ( const xiiPlatformProfile * profile)
inline

The profile is application-owned and must outlive the context. An explicit resource reference overrides its policy without modifying the shared resource definition.

◆ SuspendRendering()

void xiiEngineProcessViewContext::SuspendRendering ( )
virtual

Consumes this frame's redraw request without discarding camera or pipeline state.

Reimplemented in xiiSceneViewContext.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Editor/EditorEngineProcessFramework/EngineProcess/EngineProcessViewContext.h
  • /home/runner/work/XII/XII/Source/Editor/EditorEngineProcessFramework/EngineProcess/Implementation/EngineProcessViewContext.cpp