15#ifndef DVRSTAGE_H_6014714286
16#define DVRSTAGE_H_6014714286
109 const std::unique_ptr< Details > pimpl;
117 const static unsigned int ROLE_INTENSITIES = 0;
123 const static unsigned int ROLE_NORMALS = 1;
145 (
unsigned int geometryType
146 ,
unsigned int colorMapResolution = base::ColorMap::DEFAULT_RESOLUTION );
212 virtual const std::string&
uniformName(
unsigned int role )
const override;
Defines LibCarna::base::ColorMap.
Contains forward-declarations.
Defines LibCarna::presets::VolumeRenderingStage.
Represents a mapping of intensity values to RGBA colors, that can be queried in a shader.
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.
Performs direct volume renderings of the volume geometries in the scene.
float translucency() const
Tells current translucency.
virtual const base::ShaderProgram & acquireShader() override
Acquires the dvr shader from the base::ShaderManager.
virtual void reshape(base::FrameRenderer &fr, unsigned int width, unsigned int height) override
Orders this stage to reshape its buffers according to the specified width and height.
virtual void renderPass(const base::math::Matrix4f &viewTransform, base::RenderTask &rt, const base::Viewport &vp) override
Triggers the volume rendering.
bool isLightingUsed() const
Tells whether lighting was used during the last rendering. The return value is undefined if nothing w...
void setDiffuseLight(float diffuseLight)
Sets the diffuse light amount to diffuseLight and the ambient light amount to one minus diffuseLight.
virtual const std::string & uniformName(unsigned int role) const override
Maps ROLE_INTENSITIES to intensities and ROLE_NORMALS to normalMap.
static const float DEFAULT_TRANSLUCENCY
Holds the default translucency.
base::ColorMap colorMap
The color map used for the rendering.
virtual void configureShader() override
Performs custom shader configuration on a per-pass level.
virtual ~DVRStage()
Deletes.
void setTranslucency(float translucency)
Sets the translucency property.
virtual unsigned int loadVideoResources() override
Loads video resources when rendering is triggered for the first time. Override this method if you nee...
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...
virtual void configureShader(const base::Renderable &) override
Computes and uploads the normals transformation matrix.
DVRStage(unsigned int geometryType, unsigned int colorMapResolution=base::ColorMap::DEFAULT_RESOLUTION)
Instantiates. The created stage will render such base::Geometry scene graph nodes,...
float diffuseLight() const
Tells the diffuse light amount. The ambient light amount is one minus the diffuse light amount.
static const float DEFAULT_DIFFUSE_LIGHT
Holds the default diffuse light amount. The ambient light amount is always one minus the diffuse ligh...
Defines abstract base class for rendering stages that render volume geometries in the scene.
Eigen::Matrix< float, 4, 4, Eigen::ColMajor > Matrix4f
Defines matrix.