#include <Raycasting.h>
Public Types | |
| enum | Plane { XY, XZ, YZ } |
Public Member Functions | |
| void | createTextures (Eigen::Vector3f dimension) |
| const Shader::RenderTarget & | getEntryRenderTarget () const |
| GLuint | getEntryTexture () |
| const Shader::RenderTarget & | getExitRenderTarget () const |
| GLuint | getExitTexture () |
| unsigned int | getHeight () |
| double | getKa () const |
| double | getKd () const |
| double | getKs () const |
| const Eigen::Vector3d & | getLightPosition () const |
| double | getShininess () const |
| unsigned int | getWidth () |
| Raycasting (unsigned int width, unsigned int height) | |
| void | setClippingPlane (Plane p, bool enable, bool negative, float translate) |
| void | setLightPosition (Eigen::Vector3d &lightPosition) |
| void | setRenderSize (unsigned int width, unsigned int height) |
| void | setShading (double ka, double kd, double ks, int shininess) |
| ~Raycasting () | |
Static Public Member Functions | |
| static void | renderImagePlane () |
Data Structures | |
| struct | ClippingPlane |
This enumeration is used for defining a clipping plane.
| VolVis::VolumeRendering::Raycasting::Raycasting | ( | unsigned int | width, | |
| unsigned int | height | |||
| ) |
Constructor. Defines the width and height (which should always match the rendering viewport). Further it creates the render targets and the shader object needed for the direction cubes.
| width | width of rendering viewport | |
| height | height of rendering viewport |
| VolVis::VolumeRendering::Raycasting::~Raycasting | ( | ) |
Destructor. Deletes the shader object.
| void VolVis::VolumeRendering::Raycasting::createTextures | ( | Eigen::Vector3f | dimension | ) |
Renders the direction cubes (for the entry points and the exit points) into the according render targets. The boxes have the size of the bounding box of the volume.
| dimension | defines the bounding box of the volume, where the largest texture dimension is 1.0 |
| const Shader::RenderTarget& VolVis::VolumeRendering::Raycasting::getEntryRenderTarget | ( | ) | const |
Returns the render target used for rendering the entry points.
| GLuint VolVis::VolumeRendering::Raycasting::getEntryTexture | ( | ) |
Returns the texture where the entry points have been rendered to.
| const Shader::RenderTarget& VolVis::VolumeRendering::Raycasting::getExitRenderTarget | ( | ) | const |
Returns the render target used for rendering the exit points.
| GLuint VolVis::VolumeRendering::Raycasting::getExitTexture | ( | ) |
Returns the texture where the exit points have been rendered to.
| unsigned int VolVis::VolumeRendering::Raycasting::getHeight | ( | ) |
Returns the height of the used render targets.
| double VolVis::VolumeRendering::Raycasting::getKa | ( | ) | const |
Returns the ambient term of material reflection
| double VolVis::VolumeRendering::Raycasting::getKd | ( | ) | const |
Returns the diffuse term of material reflection
| double VolVis::VolumeRendering::Raycasting::getKs | ( | ) | const |
Returns the specular term of material reflection
| const Eigen::Vector3d& VolVis::VolumeRendering::Raycasting::getLightPosition | ( | ) | const |
Returns the position of the light
| double VolVis::VolumeRendering::Raycasting::getShininess | ( | ) | const |
Returns the shininess of the material reflection
| unsigned int VolVis::VolumeRendering::Raycasting::getWidth | ( | ) |
Returns the width of the used render targets.
| static void VolVis::VolumeRendering::Raycasting::renderImagePlane | ( | ) | [static] |
Renders a plane from (-1,-1,0) to (1,1,0). You have to apply the correct shader to convert it to an image plane yourself.
| void VolVis::VolumeRendering::Raycasting::setClippingPlane | ( | Plane | p, | |
| bool | enable, | |||
| bool | negative, | |||
| float | translate | |||
| ) |
Clipping planes in orthographic directions can be enabled or disabled with this method.
| p | Defines which clippling plane (xy, yz, xz) is changed. | |
| enable | Enables or disables the clipping plane. | |
| negative | Defines if the negative or positive half of the volume is clipped | |
| translate | Translates the clipping plane. Values between -1 and 1 are accepted. |
| void VolVis::VolumeRendering::Raycasting::setLightPosition | ( | Eigen::Vector3d & | lightPosition | ) |
Defines the light position in world coordinates.
| lightPosition | the position of the light |
| void VolVis::VolumeRendering::Raycasting::setRenderSize | ( | unsigned int | width, | |
| unsigned int | height | |||
| ) |
Defines a new render size. Call this method after the viewport for rendering has been changed.
| width | new render width | |
| height | new render height |
| void VolVis::VolumeRendering::Raycasting::setShading | ( | double | ka, | |
| double | kd, | |||
| double | ks, | |||
| int | shininess | |||
| ) |
Defines the values for the material properties.
| ka | ambient term of reflection | |
| kd | diffuse term of reflection | |
| ks | specular term of reflection | |
| shininess | shininess of reflection |
1.5.1-p1