12#ifndef MIPSTAGE_H_6014714286
13#define MIPSTAGE_H_6014714286
16#include <Carna/Carna.h>
68 const std::unique_ptr< Details > pimpl;
76 const static unsigned int ROLE_INTENSITIES = 0;
81 explicit MIPStage(
unsigned int geometryType );
138 virtual const std::string&
uniformName(
unsigned int role )
const override;
Defines Carna::presets::VolumeRenderingStage.
Defines logic for rendering frames from given scenes.
Invokes the rendering stages of the frame renderer successively.
Represents a Geometry object that has been queued into a RenderQueue. The object's model-view transfo...
Maintains an OpenGL texture sampler object. This class realizes the RAII-idiom.
Maintains an OpenGL shader program. Realizes the RAII-idiom.
Defines a rendering viewport. The viewport is a property of the current OpenGL context.
Defines an intensity range and the way it is visualized by a maximum intensity projection.
Renders maximum intensity projections of volume geometries in the scene.
const MIPLayer & layer(std::size_t layerIndex) const
MIPLayer * removeLayer(const MIPLayer &layer)
Removes layer from the layers list. The ownership is transferred to the caller.
void clearLayers()
Clears the layers list.
virtual ~MIPStage()
Deletes.
virtual void renderPass(const base::math::Matrix4f &viewTransform, base::RenderTask &rt, const base::Viewport &vp) override
Triggers the volume rendering.
std::size_t layersCount() const
Tells number of layers.
virtual const base::ShaderProgram & acquireShader() override
Acquires the shader from the base::ShaderManager, that is to be used for rendering the slices.
virtual const std::string & uniformName(unsigned int role) const override
Tells the name of the uniform variable, that the role texture is to be bound to. Use configureShader ...
virtual void configureShader() override
Performs custom shader configuration on a per-pass level.
MIPLayer & layer(std::size_t layerIndex)
References the layer with layerIndex.
virtual void configureShader(const base::Renderable &) override
Does nothing.
MIPStage(unsigned int geometryType)
Instantiates.
virtual void createVolumeSamplers(const std::function< void(unsigned int, base::Sampler *) > ®isterSampler) override
Creates texture samplers for volume textures and uses registerSampler to assign them to the roles tha...
MIPStage * clone() const override
Returns same RenderStage implementation with same configuration.
virtual void reshape(base::FrameRenderer &fr, unsigned int width, unsigned int height) override
Orders this stage to reshape its buffers according to the specified dimensions.
void appendLayer(MIPLayer *layer)
Appends layer to the layers list and takes it's ownership.
void ascendLayer(const MIPLayer &layer)
Swaps positions of layer with it's successor in the layers list.
Defines abstract base class for rendering stages that render volume geometries in the scene.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.