#include <Rendering.h>
Inheritance diagram for VolVis::VolumeRendering::Rendering:
Public Member Functions | |
void | bindGradientTransferFunction (TransferFunction *tf) |
void | bindTransferFunction (TransferFunction *tf) |
void | bindVolume (VolumeData *volume) |
void | enableGradientTransferFunction (bool enable) |
void | enableHighQualityRendering (bool enable) |
void | enableMotionRendering (bool enable) |
void | enableTransferFunction (bool enable) |
const std::string & | getName () const |
TransferFunction * | getTransferFunction () |
virtual void | prepareForRender (bool viewChanged) |
virtual void | render ()=0 |
Rendering (const std::string &name) | |
Rendering () | |
Protected Attributes | |
bool | m_gradientTfEnabled |
bool | m_highQualityRendering |
bool | m_motionRendering |
TransferFunction * | m_pGradientTransferFunction |
TransferFunction * | m_pTransferFunction |
VolumeData * | m_pVolumeData |
bool | m_tfEnabled |
VolVis::VolumeRendering::Rendering::Rendering | ( | ) | [inline] |
Standard Constructor. Sets the volume data and transfer function to 0.
VolVis::VolumeRendering::Rendering::Rendering | ( | const std::string & | name | ) | [inline] |
Constructor. The name of the render mode is defined. Volume data and tranfer function are not defined.
name | Name of the render mode, needed for gui |
void VolVis::VolumeRendering::Rendering::bindGradientTransferFunction | ( | TransferFunction * | tf | ) | [inline] |
Binds a transfer function for the gradient magnitude values to this render mode.
tf | new gradient transfer function which is bound to this render mode |
void VolVis::VolumeRendering::Rendering::bindTransferFunction | ( | TransferFunction * | tf | ) | [inline] |
Binds a transfer function (for the intensity values) to this render mode.
tf | new intensity transfer function which is bound to this render mode |
void VolVis::VolumeRendering::Rendering::bindVolume | ( | VolumeData * | volume | ) | [inline] |
Binds a new volume to the rendering. Doesn't take ownership of the volume.
volume | the new volume data which will be rendered. |
void VolVis::VolumeRendering::Rendering::enableGradientTransferFunction | ( | bool | enable | ) | [inline] |
This enables or disables the transfer function for gradient magnitude values for this render mode. If the transfer function is disabled, a value of 1 is assumed for all gradient magnitudes.
enable | defines if the transfer function for gradient magnitude values is enabled (true) or disabled (false) |
void VolVis::VolumeRendering::Rendering::enableHighQualityRendering | ( | bool | enable | ) | [inline] |
This method allows to enable or disable high quality rendering. Low quality normally means a lower step size for the raycasting render modes. This can be e.g. used when a user is adjusting parameters and the sytem should quickly respond.
enable | true, if high quality rendering should be enabled |
void VolVis::VolumeRendering::Rendering::enableMotionRendering | ( | bool | enable | ) | [inline] |
This method allows to enable or disable a special render mode when the user is interacting. Normally, the rendering will be done in lower quality if motion is active. Otherwise, if no motion is done, direction cubes for raycasting need not be updated.
enable | if true, motion rendering is enabled |
void VolVis::VolumeRendering::Rendering::enableTransferFunction | ( | bool | enable | ) | [inline] |
This enables or disables the transfer function to be used in this render mode. If the transfer function is disabled, the density values are rendered directly.
enable | defines if the transfer function is enabled (true) or disabled (false) |
const std::string& VolVis::VolumeRendering::Rendering::getName | ( | ) | const [inline] |
Returns the name of the render mode. This can e.g. be used for the gui.
TransferFunction* VolVis::VolumeRendering::Rendering::getTransferFunction | ( | ) | [inline] |
Returns bounded transfer function.
virtual void VolVis::VolumeRendering::Rendering::prepareForRender | ( | bool | viewChanged | ) | [inline, virtual] |
This method should contain the code which prepares something for rendering, but might not needs to be updated every frame. E.g. the setup of the direction cubes for the raycasting should be done in this method.
viewChanged | If the view has changed, there may be some special adjustments necessary (mainly the creation of new direction cubes in raycasting render modes) |
Reimplemented in VolVis::VolumeRendering::RaycastRendering.
virtual void VolVis::VolumeRendering::Rendering::render | ( | ) | [pure virtual] |
This method should contain the rendering code of the particular render mode and has to be implemented by sub classes. It's highly recommended to avoid any renderings into render targets because otherwise the high resolution rendering won't work.
Implemented in VolVis::VolumeRendering::Averaging, VolVis::VolumeRendering::Compositing, VolVis::VolumeRendering::FirstHit, VolVis::VolumeRendering::MaximumIntensity, and VolVis::VolumeRendering::Slicing.
bool VolVis::VolumeRendering::Rendering::m_gradientTfEnabled [protected] |
Defines if the transfer function for gradient magnitude values should be used.
bool VolVis::VolumeRendering::Rendering::m_highQualityRendering [protected] |
Defines if high quality rendering is activated.
bool VolVis::VolumeRendering::Rendering::m_motionRendering [protected] |
Defines if motion rendering is activated.
Render modes can use a transfer function for the gradient magnitude values.
All render modes use a transfer function for the intensity values.
Pointer to the volume data which will be rendered.
bool VolVis::VolumeRendering::Rendering::m_tfEnabled [protected] |
Defines if the transfer function for intensity values should be used.