Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Rendering/vtkEncodedGradientShader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00047 #ifndef __vtkEncodedGradientShader_h
00048 #define __vtkEncodedGradientShader_h
00049
00050 #include "vtkObject.h"
00051
00052 class vtkVolume;
00053 class vtkRenderer;
00054 class vtkEncodedGradientEstimator;
00055
00056 #define VTK_MAX_SHADING_TABLES 100
00057
00058 class VTK_RENDERING_EXPORT vtkEncodedGradientShader : public vtkObject
00059 {
00060 public:
00061 static vtkEncodedGradientShader *New();
00062 vtkTypeRevisionMacro(vtkEncodedGradientShader,vtkObject);
00063
00065 void PrintSelf( ostream& os, vtkIndent indent );
00066
00068
00070 vtkSetClampMacro( ZeroNormalDiffuseIntensity, float, 0.0, 1.0);
00071 vtkGetMacro( ZeroNormalDiffuseIntensity, float );
00072 vtkSetClampMacro( ZeroNormalSpecularIntensity, float, 0.0, 1.0);
00073 vtkGetMacro( ZeroNormalSpecularIntensity, float );
00075
00077
00078 void UpdateShadingTable( vtkRenderer *ren, vtkVolume *vol,
00079 vtkEncodedGradientEstimator *gradest);
00081
00083
00084 float *GetRedDiffuseShadingTable( vtkVolume *vol );
00085 float *GetGreenDiffuseShadingTable( vtkVolume *vol );
00086 float *GetBlueDiffuseShadingTable( vtkVolume *vol );
00087 float *GetRedSpecularShadingTable( vtkVolume *vol );
00088 float *GetGreenSpecularShadingTable( vtkVolume *vol );
00089 float *GetBlueSpecularShadingTable( vtkVolume *vol );
00091
00092 protected:
00093 vtkEncodedGradientShader();
00094 ~vtkEncodedGradientShader();
00095
00097
00109 void BuildShadingTable( int index,
00110 float lightDirection[3],
00111 float lightColor[3],
00112 float lightIntensity,
00113 float viewDirection[3],
00114 float material[4],
00115 int twoSided,
00116 vtkEncodedGradientEstimator *gradest,
00117 int updateFlag );
00119
00120
00121
00122
00123
00124
00125 float *ShadingTable[VTK_MAX_SHADING_TABLES][6];
00126 vtkVolume *ShadingTableVolume[VTK_MAX_SHADING_TABLES];
00127 int ShadingTableSize[VTK_MAX_SHADING_TABLES];
00128
00129
00130
00131 float ZeroNormalDiffuseIntensity;
00132 float ZeroNormalSpecularIntensity;
00133 private:
00134 vtkEncodedGradientShader(const vtkEncodedGradientShader&);
00135 void operator=(const vtkEncodedGradientShader&);
00136 };
00137
00138
00139 #endif