Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkVolumeRayCastStructures.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkVolumeRayCastStructures.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00016 
00030 #ifndef __vtkVolumeRayCastStructures_h
00031 #define __vtkVolumeRayCastStructures_h
00032 
00033 class vtkVolume;
00034 
00035 typedef struct 
00036 {
00037   // A pointer to the volume
00038   vtkVolume                    *Volume;
00039 
00040   // Matrices for switching from view to volume coordinate, and back
00041   float                        WorldToVolumeMatrix[16];
00042   float                        VolumeToWorldMatrix[16];
00043   float                        ViewToVolumeMatrix[16];
00044 
00045   // The distance from the camera to the center of the volume
00046   // To be used as a simple depth return value
00047   float                        CenterDistance;
00048 
00049   // The type of the data and a pointer to it, and the information
00050   // about its size, spacing, origin and precomputed increment
00051   int                          ScalarDataType;
00052   void                         *ScalarDataPointer;
00053   int                          DataIncrement[3];
00054   int                          DataSize[3];
00055   float                        DataSpacing[3];
00056   float                        DataOrigin[3];
00057 
00058   // Information from the vtkVolumeProperty
00059   int                          Shading;
00060   int                          ColorChannels;
00061   float                        Color[3];
00062   int                          InterpolationType;
00063   float                        RGBTextureCoefficient;
00064 
00065   // The shading tables from the vtkEncodedGradientShader
00066   // that will be used for shading the volume.
00067   float                        *RedDiffuseShadingTable;
00068   float                        *GreenDiffuseShadingTable;
00069   float                        *BlueDiffuseShadingTable;
00070   float                        *RedSpecularShadingTable;
00071   float                        *GreenSpecularShadingTable;
00072   float                        *BlueSpecularShadingTable;
00073 
00074   // Info needed to do solid textures - a pointer to the texture
00075   // and info about its size, spacing, origin, and precomputed 
00076   // increments
00077   unsigned char                *RGBDataPointer;
00078   int                          RGBDataIncrement[3];
00079   int                          RGBDataSize[3];
00080   float                        RGBDataSpacing[3];
00081   float                        RGBDataOrigin[3];
00082 
00083   // Info needed from the gradient estimator
00084   unsigned short               *EncodedNormals;
00085   unsigned char                *GradientMagnitudes;
00086 
00087 } vtkRayCastVolumeInfo;
00088 
00089 
00090 #endif