![]() |
XII Release 0.1.0
|
Public Member Functions | |
void | SetResolution (xiiUInt32 uiWidth, xiiUInt32 uiHeight, float fAspectRatio) |
Changes the resolution of the view. Has to be called at least once before starting to render anything. | |
xiiUInt32 | GetResolutionX () const |
xiiUInt32 | 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 (xiiArrayPtr< xiiColorLinearUB > targetBuffer) const |
Writes an RGBA8 representation of the depth values to targetBuffer. | |
void | SetCamera (const xiiCamera *pCamera) |
Sets the camera from which to extract the rendering position, direction and field-of-view. | |
void | AddObject (const xiiRasterizerObject *pObject, const xiiTransform &transform) |
Adds an object as an occluder to the scene. Once all occluders have been rasterized, visibility queries can be done. | |
bool | IsVisible (const xiiSimdBBox &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. | |
bool xiiRasterizerView::IsVisible | ( | const xiiSimdBBox & | aabb | ) | const |
Checks whether a box would be visible, or is fully occluded by the existing scene geometry.
Note: This only works after EndScene().
void xiiRasterizerView::ReadBackFrame | ( | xiiArrayPtr< xiiColorLinearUB > | targetBuffer | ) | const |
Writes an RGBA8 representation of the depth values to targetBuffer.
The buffer must be large enough for the chosen resolution.