00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkVolumeRayCastStructures.h,v $ 00005 Language: C++ 00006 00007 00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 00009 All rights reserved. 00010 00011 Redistribution and use in source and binary forms, with or without 00012 modification, are permitted provided that the following conditions are met: 00013 00014 * Redistributions of source code must retain the above copyright notice, 00015 this list of conditions and the following disclaimer. 00016 00017 * Redistributions in binary form must reproduce the above copyright notice, 00018 this list of conditions and the following disclaimer in the documentation 00019 and/or other materials provided with the distribution. 00020 00021 * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names 00022 of any contributors may be used to endorse or promote products derived 00023 from this software without specific prior written permission. 00024 00025 * Modified source versions must be plainly marked as such, and must not be 00026 misrepresented as being the original software. 00027 00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' 00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR 00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00038 00039 =========================================================================*/ 00040 00054 #ifndef __vtkVolumeRayCastStructures_h 00055 #define __vtkVolumeRayCastStructures_h 00056 00057 class vtkVolume; 00058 00059 typedef struct 00060 { 00061 // A pointer to the volume 00062 vtkVolume *Volume; 00063 00064 // Matrices for switching from view to volume coordinate, and back 00065 float WorldToVolumeMatrix[16]; 00066 float VolumeToWorldMatrix[16]; 00067 float ViewToVolumeMatrix[16]; 00068 00069 // The distance from the camera to the center of the volume 00070 // To be used as a simple depth return value 00071 float CenterDistance; 00072 00073 // The type of the data and a pointer to it, and the information 00074 // about its size, spacing, origin and precomputed increment 00075 int ScalarDataType; 00076 void *ScalarDataPointer; 00077 int DataIncrement[3]; 00078 int DataSize[3]; 00079 float DataSpacing[3]; 00080 float DataOrigin[3]; 00081 00082 // Information from the vtkVolumeProperty 00083 int Shading; 00084 int ColorChannels; 00085 float Color[3]; 00086 int InterpolationType; 00087 float RGBTextureCoefficient; 00088 00089 // The shading tables from the vtkEncodedGradientShader 00090 // that will be used for shading the volume. 00091 float *RedDiffuseShadingTable; 00092 float *GreenDiffuseShadingTable; 00093 float *BlueDiffuseShadingTable; 00094 float *RedSpecularShadingTable; 00095 float *GreenSpecularShadingTable; 00096 float *BlueSpecularShadingTable; 00097 00098 // Info needed to do solid textures - a pointer to the texture 00099 // and info about its size, spacing, origin, and precomputed 00100 // increments 00101 unsigned char *RGBDataPointer; 00102 int RGBDataIncrement[3]; 00103 int RGBDataSize[3]; 00104 float RGBDataSpacing[3]; 00105 float RGBDataOrigin[3]; 00106 00107 // Info needed from the gradient estimator 00108 unsigned short *EncodedNormals; 00109 unsigned char *GradientMagnitudes; 00110 00111 } VTKRayCastVolumeInfo; 00112 00113 00114 #endif