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 00053 #ifndef __vtkVolumeRayCastStructures_h 00054 #define __vtkVolumeRayCastStructures_h 00055 00056 class vtkVolume; 00057 00058 typedef struct 00059 { 00060 // A pointer to the volume 00061 vtkVolume *Volume; 00062 00063 // Matrices for switching from view to volume coordinate, and back 00064 float WorldToVolumeMatrix[16]; 00065 float VolumeToWorldMatrix[16]; 00066 float ViewToVolumeMatrix[16]; 00067 00068 // The distance from the camera to the center of the volume 00069 // To be used as a simple depth return value 00070 float CenterDistance; 00071 00072 // The type of the data and a pointer to it, and the information 00073 // about its size, spacing, origin and precomputed increment 00074 int ScalarDataType; 00075 void *ScalarDataPointer; 00076 int DataIncrement[3]; 00077 int DataSize[3]; 00078 float DataSpacing[3]; 00079 float DataOrigin[3]; 00080 00081 // Information from the vtkVolumeProperty 00082 int Shading; 00083 int ColorChannels; 00084 float Color[3]; 00085 int InterpolationType; 00086 float RGBTextureCoefficient; 00087 00088 // The shading tables from the vtkEncodedGradientShader 00089 // that will be used for shading the volume. 00090 float *RedDiffuseShadingTable; 00091 float *GreenDiffuseShadingTable; 00092 float *BlueDiffuseShadingTable; 00093 float *RedSpecularShadingTable; 00094 float *GreenSpecularShadingTable; 00095 float *BlueSpecularShadingTable; 00096 00097 // Info needed to do solid textures - a pointer to the texture 00098 // and info about its size, spacing, origin, and precomputed 00099 // increments 00100 unsigned char *RGBDataPointer; 00101 int RGBDataIncrement[3]; 00102 int RGBDataSize[3]; 00103 float RGBDataSpacing[3]; 00104 float RGBDataOrigin[3]; 00105 00106 // Info needed from the gradient estimator 00107 unsigned short *EncodedNormals; 00108 unsigned char *GradientMagnitudes; 00109 00110 } VTKRayCastVolumeInfo; 00111 00112 00113 #endif