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

vtkRayCastStructures.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkRayCastStructures.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 
00036 #ifndef __vtkRayCastStructures_h
00037 #define __vtkRayCastStructures_h
00038 
00039 typedef struct 
00040 {
00041   // These are the input values that define the ray. Depending on
00042   // whether we are casting a WorldRay or a ViewRay, these are in
00043   // world coordinates or view coordinates.
00044   float Origin[3];
00045   float Direction[3];
00046 
00047   // The pixel location for the ray that is being cast can be
00048   // important, for example if hardware ray bounding is being used
00049   // and the location in the depth buffer must be matched to this
00050   // ray.
00051   int   Pixel[2];
00052 
00053   // The world coordinate location of the camera is important for the
00054   // ray caster to be able to return a Z value for the intersection
00055   float CameraPosition[3];
00056 
00057   // This input value defines the size of the image
00058   int   ImageSize[2];
00059 
00060   // These are input values for clipping but may be changed
00061   // along the way
00062   float NearClip;
00063   float FarClip;
00064 
00065   // These are the return values - RGBA and Z
00066   float Color[4];
00067   float Depth;
00068 
00069 
00070   // Some additional space that may be useful for the
00071   // specific implementation of the ray caster. This structure
00072   // is a convenient place to put it, since there is one
00073   // per thread so that writing to these locations is safe
00074 
00075   // Ray information transformed into local coordinates
00076   float                        TransformedStart[4];
00077   float                        TransformedEnd[4];
00078   float                        TransformedDirection[4];
00079   float                        TransformedIncrement[3];
00080   
00081   // The number of steps we want to take if this is
00082   // a ray caster that takes steps
00083   int                          NumberOfStepsToTake;
00084   
00085   // The number of steps we actually take if this is
00086   // a ray caster that takes steps
00087   int                          NumberOfStepsTaken;
00088 
00089 } vtkRayCastRayInfo;
00090 
00091 #endif