#include <CutawaySurface.h>
|
void | init (int w, int h, float z_near, float z_far, float angle, float cut) |
|
void | update (int w, int h, float z_near, float z_far, float angle, float c) |
|
void | prepareZBufferPass () |
|
void | endZBufferPass () |
|
void | quadPass (int step, glm::mat4 &vp) |
|
void | prepareRenderPass (int unit) |
|
glm::vec2 | getDimension () |
|
GLuint | getTextureHandle (int tex) |
|
GLuint | getFBOHandle (int fbo) |
|
void | clearBuffers () |
|
Creation of cutaway surface and usage of resulting frame buffer objects or textures.
void CutawaySurface::clearBuffers |
( |
| ) |
|
Clear all used frame buffer objects and reset binding.
void CutawaySurface::endZBufferPass |
( |
| ) |
|
Reset to default frame buffer object and appropriate OpenGL depth test.
vec2 CutawaySurface::getDimension |
( |
| ) |
|
Dimension of cutaway surface plane in screen coordinates.
- Returns
- 2D vector of cutaway surface plane dimension
GLuint CutawaySurface::getFBOHandle |
( |
int |
fbo | ) |
|
Return frame buffer object handle according to index.
- Parameters
-
fbo | frame buffer object index |
- Returns
- frame buffer object handle according to index
GLuint CutawaySurface::getTextureHandle |
( |
int |
tex | ) |
|
Return texture handle according to index.
- Parameters
-
- Returns
- texture handle according to index
void CutawaySurface::init |
( |
int |
w, |
|
|
int |
h, |
|
|
float |
z_near, |
|
|
float |
z_far, |
|
|
float |
angle, |
|
|
float |
cut |
|
) |
| |
Init two frame buffer objects and attached textures and create z buffer shader and quad shader.
- Parameters
-
w | width of cutaway surface in screen coordinates |
h | height of cutaway surface in screen coordinates |
z_near | distance of near plane |
z_far | distance of far plane |
angle | drill angle of cutaway surface cones |
cut | true if intersection with cutaway surfaces should be performed |
void CutawaySurface::prepareRenderPass |
( |
int |
unit | ) |
|
Prepare for rendering. Activate texture unit and choose right texture of frame buffer objects which is generated in last quad pass.
- Parameters
-
unit | texture unit to activate |
void CutawaySurface::prepareZBufferPass |
( |
| ) |
|
Clear frame buffer object 1 and set appropriate OpenGL depth test.
void CutawaySurface::quadPass |
( |
int |
step, |
|
|
glm::mat4 & |
vp |
|
) |
| |
Bind QuadShader to execute one round of jump flooding. Switch between two frame buffer objects back and forth in every pass.
- Parameters
-
step | step size of current jump flooding iteration |
vp | current view projection matrix |
void CutawaySurface::update |
( |
int |
w, |
|
|
int |
h, |
|
|
float |
z_near, |
|
|
float |
z_far, |
|
|
float |
angle, |
|
|
float |
c |
|
) |
| |
Update z buffer shader and quad shader.
- Parameters
-
w | width of cutaway surface in screen coordinates |
h | height of cutaway surface in screen coordinates |
z_near | distance of near plane |
z_far | distance of far plane |
angle | drill angle of cutaway surface cones |
cut | true if intersection with cutaway surfaces should be performed |
float CutawaySurface::cut |
Flag that defines if intersection with cutaway surface should be performed.
Quad* CutawaySurface::quad |
Quad used for neighbour coordinate interpolation.
Quad shader that implements the jump flood algorithm.
Z buffer shader used for depth image calculation. Draws backfaces in depth image.
The documentation for this class was generated from the following files: