Point Cloud Viewer
1.00
A Viewer to display point clouds with phong shading by converting them to splats.
|
A Render Pass that stores attributes for later deferred shading. More...
#include <attributepass.h>
Inherits RenderPass.
Public Member Functions | |
void | render () override |
Uses the input data to generate the output. More... | |
void | cleanup () override |
Resets the Render Pass to the state after creation but before initialization. More... | |
void | addObjectInput (VaoChannel &vaoChannel) |
Adds a model to the geometry input list. More... | |
void | removeObjectInput (VaoChannel &vaoChannel) |
Removes a model from the geometry input list. More... | |
void | clearObjectInput () |
Removes all models from the geometry input list. | |
void | setDepthMapInput (TextureChannel &textureChannel) |
Sets the depth map that shall be used during rendering. More... | |
TextureChannel & | getNormalMapOutput () |
Returns the normal map. More... | |
bool | normalMapToScreen () |
Changes the output mode. The normal map is now drawn onto the screen. More... | |
TextureChannel & | getColorMapOutput () |
Returns the color map. More... | |
bool | colorMapToScreen () |
Changes the output mode. The color map is now drawn onto the screen. More... | |
void | removeInput () override |
Removes all input channels except for VaoChannels. If the Render Pass uses VaoChannels as input use the provided clearObjectInput() function to remove all VaoChannels. | |
void | updateResolution () override |
Must be called after the screen resolution has changed. More... | |
void | linkSplatScale (float &scale) |
Links the splat scale. More... | |
Public Member Functions inherited from RenderPass | |
virtual | ~RenderPass () |
Calls cleanup() More... | |
Static Public Member Functions | |
static void | linkVpMat (QMatrix4x4 &vp) |
Links the view projection matrix that shall be used during rendering. More... | |
static void | linkVMat (QMatrix4x4 &v) |
Links the view matrix that shall be used during rendering. More... | |
static void | linkPointSizeCoeff (float &coeff) |
Links the point size coefficient. More... | |
Static Public Member Functions inherited from RenderPass | |
static void | cleanupHelpers () |
Removes helper variables. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from RenderPass | |
template<class C > | |
bool | helperMultiChannelContains (std::list< C * > &list, C &channel) |
template<class C > | |
void | helperMultiChannelAdd (std::list< C * > &list, C &channel) |
template<class C > | |
bool | helperMultiChannelRemove (std::list< C * > &list, C &channel) |
template<class C > | |
void | helperMultiChannelClean (std::list< C * > &list) |
template<class C > | |
void | helperMultiChannelClear (std::list< C * > &list) |
Static Protected Member Functions inherited from RenderPass | |
static bool | loadShader (std::string &path, GLuint id) |
static bool | noGlErrors () |
static bool | checkFbo () |
static void | drawUnitQuad () |
A Render Pass that stores attributes for later deferred shading.
This Render Pass takes a depth map and the geometry as input. It creates a color map and a normal map. The geometry's colors and normals are used. Using the given depth map, all visible geometry's attributes are summed and stored into the output. A normalization using the alpha values has to be done before using the stored color and normal values.
void AttributePass::addObjectInput | ( | VaoChannel & | vaoChannel | ) |
Adds a model to the geometry input list.
vaoChannel | The channel containing the geometry. |
|
overridevirtual |
Resets the Render Pass to the state after creation but before initialization.
Might use OpenGL calls. If no other instances of this Render Pass are currently initialized the shader program is removed from the GPU.
Implements RenderPass.
bool AttributePass::colorMapToScreen | ( | ) |
Changes the output mode. The color map is now drawn onto the screen.
Might use OpenGL calls. Unlike in other Render Passes, the output channels remain active. Further computations on these channels have to be prevented manually if not needed (call removeInput on Render Passes that used the output channels).
RenderPass::TextureChannel & AttributePass::getColorMapOutput | ( | ) |
Returns the color map.
Might use OpenGL calls.
RenderPass::TextureChannel & AttributePass::getNormalMapOutput | ( | ) |
Returns the normal map.
Might use OpenGL calls.
|
static |
void AttributePass::linkSplatScale | ( | float & | scale | ) |
Links the splat scale.
The higher the value the bigger the drawn splats. Should be the same as the value used for generating the depth map. A value of 1 leads to no splat scaling. Does not copy the value. The responisbility for deletion remains at the caller.
scale | The scaling coefficient. Must poit to a valid float whenever render() is called. |
|
static |
Links the view matrix that shall be used during rendering.
Does not copy the matrix. The responsibility for deletion remains at the caller.
v | The view matrix. Must point to a valid matrix whenever render() is called. |
|
static |
Links the view projection matrix that shall be used during rendering.
Does not copy the matrix. The responsibility for deletion remains at the caller.
vp | The view projection matrix. Must point to a valid matrix whenever render() is called. |
bool AttributePass::normalMapToScreen | ( | ) |
Changes the output mode. The normal map is now drawn onto the screen.
Might use OpenGL calls. Unlike in other Render Passes, the output channels remain active. Further computations on these channels have to be prevented manually if not needed (call removeInput on Render Passes that used the output channels).
void AttributePass::removeObjectInput | ( | VaoChannel & | vaoChannel | ) |
Removes a model from the geometry input list.
vaoChannel | The channel containing the geometry that shall not be rendered anymore. |
|
overridevirtual |
Uses the input data to generate the output.
Uses OpenGL calls if initialized.
Implements RenderPass.
void AttributePass::setDepthMapInput | ( | RenderPass::TextureChannel & | textureChannel | ) |
Sets the depth map that shall be used during rendering.
Uses OpenGL calls.
textureChannel | The channel containing the depth map. |
|
overridevirtual |
Must be called after the screen resolution has changed.
Might use OpenGL calls.
Implements RenderPass.