Plasma Engine  2.0
Loading...
Searching...
No Matches
plRasterizerView Class Referencefinal

Public Member Functions

void SetResolution (plUInt32 uiWidth, plUInt32 uiHeight, float fAspectRatio)
 Changes the resolution of the view. Has to be called at least once before starting to render anything.
 
plUInt32 GetResolutionX () const
 
plUInt32 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 (plArrayPtr< plColorLinearUB > targetBuffer) const
 Writes an RGBA8 representation of the depth values to targetBuffer.
 
void SetCamera (const plCamera *pCamera)
 Sets the camera from which to extract the rendering position, direction and field-of-view.
 
void AddObject (const plRasterizerObject *pObject, const plTransform &transform)
 Adds an object as an occluder to the scene. Once all occluders have been rasterized, visibility queries can be done.
 
bool IsVisible (const plSimdBBox &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 plRasterizerView::IsVisible ( const plSimdBBox & 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 plRasterizerView::ReadBackFrame ( plArrayPtr< plColorLinearUB > 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: