Common/vtkRayCastStructures.h Source File

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