ezEngine  Milestone 9
ezView Class Reference

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>

Inheritance diagram for ezView:

Public Member Functions

ezViewHandle GetHandle () const
 
void SetName (const char *szName)
 
const char * GetName () const
 
void SetWorld (ezWorld *pWorld)
 
ezWorldGetWorld ()
 
const ezWorldGetWorld () const
 
void SetRenderTargetSetup (ezGALRenderTagetSetup &renderTargetSetup)
 
const ezGALRenderTagetSetupGetRenderTargetSetup () const
 
void SetRenderPipelineResource (ezRenderPipelineResourceHandle hPipeline)
 
ezRenderPipelineResourceHandle GetRenderPipelineResource () const
 
void SetCamera (ezCamera *pCamera)
 
ezCameraGetCamera ()
 
const ezCameraGetCamera () const
 
void SetCullingCamera (ezCamera *pCamera)
 
ezCameraGetCullingCamera ()
 
const ezCameraGetCullingCamera () const
 
ezEnum< ezCameraUsageHintGetCameraUsageHint () const
 Returns the camera usage hint for the view.
 
void SetCameraUsageHint (ezEnum< ezCameraUsageHint > 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 (ezEnum< ezViewRenderMode > value)
 
ezEnum< ezViewRenderModeGetViewRenderMode () const
 
void SetViewport (const ezRectFloat &viewport)
 
const ezRectFloatGetViewport () const
 
const ezViewDataGetData () const
 
bool IsValid () const
 
void ExtractData ()
 Extracts all relevant data from the world to render the view.
 
ezTaskGetExtractTask ()
 Returns a task implementation that calls ExtractData on this view.
 
ezResult ComputePickingRay (float fScreenPosX, float fScreenPosY, ezVec3 &out_RayStartPos, ezVec3 &out_RayDir) const
 Returns the start position and direction (in world space) of the picking ray through the screen position in this view. More...
 
ezResult ComputeScreenSpacePos (const ezVec3 &vPoint, ezVec3 &out_vScreenPos) const
 
const ezMat4GetProjectionMatrix (ezCameraEye eye) const
 Returns the current projection matrix.
 
const ezMat4GetInverseProjectionMatrix (ezCameraEye eye) const
 Returns the current inverse projection matrix.
 
const ezMat4GetViewMatrix (ezCameraEye eye) const
 Returns the current view matrix (camera orientation).
 
const ezMat4GetInverseViewMatrix (ezCameraEye eye) const
 Returns the current inverse view matrix (inverse camera orientation).
 
const ezMat4GetViewProjectionMatrix (ezCameraEye eye) const
 Returns the current view-projection matrix.
 
const ezMat4GetInverseViewProjectionMatrix (ezCameraEye eye) const
 Returns the current inverse view-projection matrix.
 
void ComputeCullingFrustum (ezFrustum &out_Frustum) const
 Returns the frustum that should be used for determine visible objects for this view.
 
void SetRenderPassProperty (const char *szPassName, const char *szPropertyName, const ezVariant &value)
 
void SetExtractorProperty (const char *szPassName, const char *szPropertyName, const ezVariant &value)
 
void SetRenderPassReadBackProperty (const char *szPassName, const char *szPropertyName, const ezVariant &value)
 
ezVariant GetRenderPassReadBackProperty (const char *szPassName, const char *szPropertyName)
 
bool IsRenderPassReadBackPropertyExisting (const char *szPassName, const char *szPropertyName) const
 
void UpdateViewData (ezUInt32 uiDataIndex)
 Pushes the view and camera data into the extracted data of the pipeline. More...
 
- Public Member Functions inherited from ezNode
void InitializePins ()
 
ezHashedString GetPinName (const ezNodePin *pPin) const
 
const ezNodePinGetPinByName (const char *szName) const
 
const ezNodePinGetPinByName (ezHashedString sName) const
 
const ezArrayPtr< const ezNodePin *const > GetInputPins () const
 
const ezArrayPtr< const ezNodePin *const > GetOutputPins () const
 
- Public Member Functions inherited from ezReflectedClass
virtual const ezRTTIGetDynamicRTTI () const
 
EZ_ALWAYS_INLINE 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.
 

Public Attributes

ezTagSet m_IncludeTags
 
ezTagSet m_ExcludeTags
 

Friends

class ezRenderWorld
 
class ezMemoryUtils
 

Additional Inherited Members

- Static Public Member Functions inherited from ezNoBase
static const ezRTTIGetStaticRTTI ()
 

Detailed Description

Encapsulates a view on the given world through the given camera and rendered with the specified RenderPipeline into the given render target setup.

Member Function Documentation

◆ ComputePickingRay()

EZ_FORCE_INLINE ezResult ezView::ComputePickingRay ( float  fScreenPosX,
float  fScreenPosY,
ezVec3 out_RayStartPos,
ezVec3 out_RayDir 
) const

Returns the start position and direction (in world space) of the picking ray through the screen position in this view.

fScreenPosX and fScreenPosY are expected to be in [0; 1] range (normalized pixel coordinates). If no ray can be computed, EZ_FAILURE is returned.

◆ UpdateViewData()

void ezView::UpdateViewData ( ezUInt32  uiDataIndex)

Pushes the view and camera data into the extracted data of the pipeline.

Use ezRenderWorld::GetDataIndexForExtraction() to update the data from the extraction thread. Can't be used if this view is currently extracted. Use ezRenderWorld::GetDataIndexForRendering() to update the data from the render thread.


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