Cutout Vis2012
TUWienVisualisierung2(SS2012)-AdaptiveCutaways
|
#include <JumpFlooding.h>
Static Public Member Functions | |
static void | init () |
static void | createDistanceTransformBuffers (Framebuffer &fbo1, Framebuffer &fbo2, int width, int height) |
static Framebuffer * | applyDistanceTransform (Framebuffer *src, Framebuffer *dst) |
static void | beginMeshWriting (Framebuffer *src, Framebuffer *dst) |
static void | endMeshWriting () |
static Shader * | getMeshShader () |
Implements a generalized distance transform on greyscale images on the GPU, as detailed in this thesis.
|
static |
Takes two Framebuffers that have been initialized by createDistanceTransformBuffers
together. src contains the input texture. The Framebuffer that contains the end result is returned. Depending on the number of iterations, this can be either src or dst. GL_DEPTH_TEST is disabled by the method. Viewport is set to the size of src.
The src Framebuffer should only have been drawn to with the Shader returned by getMeshShader
.
|
static |
Call before drawing models into the source buffer. The shader and framebuffer will be bound by this function. Between the begin and end call, render meshes and set the modelView, perspective, maxTheta, directional and edgeCompression uniform in the mesh shader.
|
static |
Takes two uninitialized framebuffer objects and initializes them to be used for distance transforms
|
static |
Call to finish writing data into the src Framebuffer
|
static |
Returns the shader bound by beginMeshWriting(), use it to set modelView and perspective matrices
|
static |
Call this before any other methods from this class