Main Page | Packages | Class Hierarchy | Class List | Directories | Class Members

IDVR.VolumeRenderer.SWVolumeRenderer.ShadingModels.PhongShadingModelSW Class Reference

#include <PhongShadingModelSW.h>

Inheritance diagram for IDVR.VolumeRenderer.SWVolumeRenderer.ShadingModels.PhongShadingModelSW:

IDVR.Interfaces.IShadingModel List of all members.

Detailed Description

Class for the phong shading model.

Namespace: IDVR.VolumeRenderer.SWVolumeRenderer.ShadingModels

Baseclass: IDVR.Interfaces.IShadingModel

This class calculates the color value of a given raysample. The color depends on various attributes like ambient part or specular exponent, but also on values like light color and gradient.

See also:
ContourShadingModelSW - the contour shading model

MipShadingModelSW - the mip shading model

ToneShadingModelSW - the tone shading model

Author:
Christopher Thurnher
Version:
1.0
Date:
02-18-2005


Public Member Functions

 PhongShadingModelSW (void)
 Standard constructor.
 PhongShadingModelSW (double n_Ambient, double n_Diffuse, double n_Specular, double n_SpExponent)
 Constructor.
 PhongShadingModelSW (double n_Ambient, double n_Diffuse, double n_Specular, double n_SpExponent, double n_DepthCue1, double n_DepthCue2, Transferfunction *n_TransferFunc)
 Constructor.
virtual RaySampledoShading (RaySample *n_RaySample)
 Calculates the Color value for a given raysample.
__property void set_ViewingDirection (Vector3 *n_ViewDirection)
 Sets the current view direction.
__property void set_ImagePlanePoint (Vector3 *n_ImagePlanePoint)
 Sets an arbitrary image plane point (needed for calculation of normal voxel to plane distance).
__property void set_LightModel (Light *n_Light)
 Sets the current light.
__property Transferfunctionget_TransferFunc (void)
 Returns the transfer function.
__property double get_Ambient (void)
 Returns the ambient value.
__property double get_Diffuse (void)
 Returns the diffuse value.
__property double get_Specular (void)
 Returns the specular value.
__property double get_SpExponent (void)
 Returns the specular exponent.
__property double get_DepthK1 (void)
 Returns the first value for depth cueing.
__property double get_DepthK2 (void)
 Returns the second value for depth cueing.
void setViewLightParameters (Vector3 *n_ViewDirection, Vector3 *n_ImagePlanePoint, Light *n_Light)
 Initialize viewing and lighting parameter all together to the given values.

Private Member Functions

void calculateHalfwayVector (void)
 Returns the halfway vector.
void calculateVoxelToPlaneDistance (Vector3 *n_SampleCoords)
 Calculates the normal voxel to plane distance of a given point.

Private Attributes

double k_a
 k_a-value
double k_d
 k_d-value
double k_s
 k_s-value
double n
 n-value
double d
 d-value
double k_1
 k_1-value
double k_2
 k_2-value
float c_p __gc []
 c_p-value
Vector3L
 L-vector.
Vector3V
 V-vector.
Vector3H
 H-vector.
Vector3m_imgePlanePoint
 point on the image plane
Transferfunctionm_TransferFunc
 the transfer function


Constructor & Destructor Documentation

PhongShadingModelSW::PhongShadingModelSW void   ) 
 

Standard constructor.

PhongShadingModelSW::PhongShadingModelSW double  n_Ambient,
double  n_Diffuse,
double  n_Specular,
double  n_SpExponent
 

Constructor.

Parameters:
n_Ambient ambient part.
n_Diffuse diffuse part.
n_Specular specular part.
n_SpExponent specular exponent.

PhongShadingModelSW::PhongShadingModelSW double  n_Ambient,
double  n_Diffuse,
double  n_Specular,
double  n_SpExponent,
double  n_DepthCue1,
double  n_DepthCue2,
Transferfunction n_TransferFunc
 

Constructor.

Parameters:
n_Ambient ambient part.
n_Diffuse diffuse part.
n_Specular specular part.
n_SpExponent specular exponent.
n_DepthCue1 depth cueing constant 1.
n_DepthCue2 depth cueing constant 2.
n_TransferFunc transfer function.


Member Function Documentation

void PhongShadingModelSW::calculateHalfwayVector void   )  [private]
 

Returns the halfway vector.

void PhongShadingModelSW::calculateVoxelToPlaneDistance Vector3 n_SampleCoords  )  [private]
 

Calculates the normal voxel to plane distance of a given point.

Parameters:
n_SampleCoords the coordinates of the point

RaySample * PhongShadingModelSW::doShading RaySample n_RaySample  )  [virtual]
 

Calculates the Color value for a given raysample.

Parameters:
n_RaySample the specified raysample.
Returns:
The modified raysample.

double PhongShadingModelSW::get_Ambient void   ) 
 

Returns the ambient value.

Returns:
The ambient value.

double PhongShadingModelSW::get_DepthK1 void   ) 
 

Returns the first value for depth cueing.

Returns:
The first value for depth cueing.

double PhongShadingModelSW::get_DepthK2 void   ) 
 

Returns the second value for depth cueing.

Returns:
The second value for depth cueing.

double PhongShadingModelSW::get_Diffuse void   ) 
 

Returns the diffuse value.

Returns:
The diffuse value.

double PhongShadingModelSW::get_Specular void   ) 
 

Returns the specular value.

Returns:
The specular value.

double PhongShadingModelSW::get_SpExponent void   ) 
 

Returns the specular exponent.

Returns:
The specular exponent.

Transferfunction * PhongShadingModelSW::get_TransferFunc void   ) 
 

Returns the transfer function.

Returns:
The transfer function.

void PhongShadingModelSW::set_ImagePlanePoint Vector3 n_ImagePlanePoint  ) 
 

Sets an arbitrary image plane point (needed for calculation of normal voxel to plane distance).

Parameters:
n_ImagePlanePoint an arbitrary image plane point.

void PhongShadingModelSW::set_LightModel Light n_Light  ) 
 

Sets the current light.

Parameters:
n_Light the current light.

void PhongShadingModelSW::set_ViewingDirection Vector3 n_ViewDirection  ) 
 

Sets the current view direction.

Parameters:
n_ViewDirection the current view direction.

void PhongShadingModelSW::setViewLightParameters Vector3 n_ViewDirection,
Vector3 n_ImagePlanePoint,
Light n_Light
 

Initialize viewing and lighting parameter all together to the given values.

Parameters:
n_ViewDirection the current view direction.
n_ImagePlanePoint an arbitrary image plane point.
n_Light the current light.


The documentation for this class was generated from the following files:
Generated on Sat Apr 9 11:51:02 2005 for RayCaster wiht Importance Driven Volume Rendering (IDVR) by  doxygen 1.4.1