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

Common/vtkRayCastStructures.h

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