ezEngine Release 26.3
Loading...
Searching...
No Matches
ezRasterizerView Class Referencefinal

Public Member Functions

void SetResolution (ezUInt32 uiWidth, ezUInt32 uiHeight, float fAspectRatio)
 Changes the resolution of the view. Has to be called at least once before starting to render anything.
 
ezUInt32 GetResolutionX () const
 
ezUInt32 GetResolutionY () const
 
void BeginScene ()
 Prepares the view to rasterize a new scene.
 
void EndScene ()
 Finishes rasterizing the scene. Visibility queries only work after this.
 
void ReadBackFrame (ezArrayPtr< ezColorLinearUB > targetBuffer) const
 Writes an RGBA8 representation of the depth values to targetBuffer.
 
void SetCamera (const ezCamera *pCamera)
 Sets the camera from which to extract the rendering position, direction and field-of-view.
 
void AddObject (const ezRasterizerObject *pObject, const ezTransform &transform)
 Adds an object as an occluder to the scene. Once all occluders have been rasterized, visibility queries can be done.
 
bool IsVisible (const ezSimdBBox &aabb) const
 Checks whether a box would be visible, or is fully occluded by the existing scene geometry.
 
bool HasRasterizedAnyOccluders () const
 Wether any occluder was actually added and also rasterized. If not, no need to do any visibility checks.
 

Member Function Documentation

◆ IsVisible()

bool ezRasterizerView::IsVisible ( const ezSimdBBox aabb) const

Checks whether a box would be visible, or is fully occluded by the existing scene geometry.

Note: This only works after EndScene().

◆ ReadBackFrame()

void ezRasterizerView::ReadBackFrame ( ezArrayPtr< ezColorLinearUB targetBuffer) const

Writes an RGBA8 representation of the depth values to targetBuffer.

The buffer must be large enough for the chosen resolution.


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