00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkRayCastStructures.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 __vtkRayCastStructures_h 00031 #define __vtkRayCastStructures_h 00032 00033 typedef struct 00034 { 00035 // These are the input values that define the ray. Depending on 00036 // whether we are casting a WorldRay or a ViewRay, these are in 00037 // world coordinates or view coordinates. 00038 float Origin[3]; 00039 float Direction[3]; 00040 00041 // The pixel location for the ray that is being cast can be 00042 // important, for example if hardware ray bounding is being used 00043 // and the location in the depth buffer must be matched to this 00044 // ray. 00045 int Pixel[2]; 00046 00047 // The world coordinate location of the camera is important for the 00048 // ray caster to be able to return a Z value for the intersection 00049 float CameraPosition[3]; 00050 00051 // This input value defines the size of the image 00052 int ImageSize[2]; 00053 00054 // These are input values for clipping but may be changed 00055 // along the way 00056 float NearClip; 00057 float FarClip; 00058 00059 // These are the return values - RGBA and Z 00060 float Color[4]; 00061 float Depth; 00062 00063 00064 // Some additional space that may be useful for the 00065 // specific implementation of the ray caster. This structure 00066 // is a convenient place to put it, since there is one 00067 // per thread so that writing to these locations is safe 00068 00069 // Ray information transformed into local coordinates 00070 float TransformedStart[4]; 00071 float TransformedEnd[4]; 00072 float TransformedDirection[4]; 00073 float TransformedIncrement[3]; 00074 00075 // The number of steps we want to take if this is 00076 // a ray caster that takes steps 00077 int NumberOfStepsToTake; 00078 00079 // The number of steps we actually take if this is 00080 // a ray caster that takes steps 00081 int NumberOfStepsTaken; 00082 00083 } vtkRayCastRayInfo; 00084 00085 #endif