ezEngine  Milestone 7
ezView Class Reference

Encapsulates a view on the given world through the given camera and rendered with the specified RenderPipeline. More...

#include <View.h>

Inheritance diagram for ezView:

Public Member Functions

void SetName (const char *szName)
 
const char * GetName () const
 
void SetWorld (ezWorld *pWorld)
 
ezWorldGetWorld ()
 
const ezWorldGetWorld () const
 
void SetRenderPipeline (ezUniquePtr< ezRenderPipeline > &&pRenderPipeline)
 
ezRenderPipelineGetRenderPipeline () const
 
void SetLogicCamera (const ezCamera *pCamera)
 
const ezCameraGetLogicCamera () const
 
void SetRenderCamera (const ezCamera *pCamera)
 
const ezCameraGetRenderCamera () 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)
 Returns the start position and direction (in world space) of the picking ray through the screen position in this view. More...
 
const ezMat4GetProjectionMatrix () const
 Returns the current projection matrix.
 
const ezMat4GetInverseProjectionMatrix () const
 Returns the current inverse projection matrix.
 
const ezMat4GetViewMatrix () const
 Returns the current view matrix (camera orientation).
 
const ezMat4GetInverseViewMatrix () const
 Returns the current inverse view matrix (inverse camera orientation).
 
const ezMat4GetViewProjectionMatrix () const
 Returns the current view-projection matrix.
 
const ezMat4GetInverseViewProjectionMatrix () const
 Returns the current inverse view-projection matrix.
 
- Public Member Functions inherited from ezNode
void InitializePins ()
 
const ezNodePinGetPinByName (const char *szName) const
 
- Public Member Functions inherited from ezReflectedClass
EZ_FORCE_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_FORCE_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 
virtual void Serialize (ezArchiveWriter &stream) const
 This function is called to serialize the instance. More...
 
virtual void Deserialize (ezArchiveReader &stream)
 This function is called to deserialize the instance. More...
 
virtual void OnDeserialized ()
 This function is called after all objects are deserialized and thus all references to other objects are valid. More...
 

Public Attributes

ezTagSet m_IncludeTags
 
ezTagSet m_ExcludeTags
 

Private Member Functions

 EZ_ADD_DYNAMIC_REFLECTION (ezView)
 
 ezView ()
 Use ezRenderLoop::CreateView to create a view.
 
void UpdateCachedMatrices () const
 

Private Attributes

ezHashedString m_sName
 
ezProfilingId m_ExtractDataProfilingID
 
ezDelegateTask< void > m_ExtractTask
 
ezWorldm_pWorld
 
ezUniquePtr< ezRenderPipelinem_pRenderPipeline
 
const ezCameram_pLogicCamera
 
const ezCameram_pRenderCamera
 
ezInputNodePin m_PinRenderTarget0
 
ezInputNodePin m_PinRenderTarget1
 
ezInputNodePin m_PinRenderTarget2
 
ezInputNodePin m_PinRenderTarget3
 
ezInputNodePin m_PinDepthStencil
 
ezUInt32 m_uiLastCameraSettingsModification
 
ezUInt32 m_uiLastCameraOrientationModification
 
float m_fLastViewportAspectRatio
 
ezViewData m_Data
 

Friends

class ezRenderLoop
 

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.

Member Function Documentation

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

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.


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