VolVis::VolumeRendering::Raycasting Class Reference

#include <Raycasting.h>


Detailed Description

This class provides the functionality and the data which is the same for all raycasting render modes. Because the raycasting render modes use this as a member variable, they can all use the same object. This major task is the creation of the direction cubes. Additional, it provides the data for lighting and material properties.


Public Types

enum  Plane { XY, XZ, YZ }

Public Member Functions

void createTextures (Eigen::Vector3f dimension)
const Shader::RenderTargetgetEntryRenderTarget () const
GLuint getEntryTexture ()
const Shader::RenderTargetgetExitRenderTarget () 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


Member Enumeration Documentation

enum VolVis::VolumeRendering::Raycasting::Plane

This enumeration is used for defining a clipping plane.


Constructor & Destructor Documentation

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.

Parameters:
width width of rendering viewport
height height of rendering viewport

VolVis::VolumeRendering::Raycasting::~Raycasting (  ) 

Destructor. Deletes the shader object.


Member Function Documentation

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.

Parameters:
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.

Returns:
render target for entry points

GLuint VolVis::VolumeRendering::Raycasting::getEntryTexture (  ) 

Returns the texture where the entry points have been rendered to.

Returns:
texture id of entry points

const Shader::RenderTarget& VolVis::VolumeRendering::Raycasting::getExitRenderTarget (  )  const

Returns the render target used for rendering the exit points.

Returns:
render target for exit points

GLuint VolVis::VolumeRendering::Raycasting::getExitTexture (  ) 

Returns the texture where the exit points have been rendered to.

Returns:
texture id of exit points

unsigned int VolVis::VolumeRendering::Raycasting::getHeight (  ) 

Returns the height of the used render targets.

Returns:
height of render targets

double VolVis::VolumeRendering::Raycasting::getKa (  )  const

Returns the ambient term of material reflection

Returns:
ambient term

double VolVis::VolumeRendering::Raycasting::getKd (  )  const

Returns the diffuse term of material reflection

Returns:
diffuse term

double VolVis::VolumeRendering::Raycasting::getKs (  )  const

Returns the specular term of material reflection

Returns:
specular term

const Eigen::Vector3d& VolVis::VolumeRendering::Raycasting::getLightPosition (  )  const

Returns the position of the light

Returns:
light position

double VolVis::VolumeRendering::Raycasting::getShininess (  )  const

Returns the shininess of the material reflection

Returns:
shininess

unsigned int VolVis::VolumeRendering::Raycasting::getWidth (  ) 

Returns the width of the used render targets.

Returns:
width of 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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
ka ambient term of reflection
kd diffuse term of reflection
ks specular term of reflection
shininess shininess of reflection


The documentation for this class was generated from the following file:
Generated on Wed Dec 5 12:27:31 2007 for VolVis by  doxygen 1.5.1-p1