VTK
vtkRayCastStructures.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRayCastStructures.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
27 #ifndef vtkRayCastStructures_h
28 #define vtkRayCastStructures_h
29 
30 typedef struct
31 {
32  // These are the input values that define the ray. Depending on
33  // whether we are casting a WorldRay or a ViewRay, these are in
34  // world coordinates or view coordinates.
35  float Origin[3];
36  float Direction[3];
37 
38  // The pixel location for the ray that is being cast can be
39  // important, for example if hardware ray bounding is being used
40  // and the location in the depth buffer must be matched to this
41  // ray.
42  int Pixel[2];
43 
44  // The world coordinate location of the camera is important for the
45  // ray caster to be able to return a Z value for the intersection
46  float CameraPosition[3];
47 
48  // This input value defines the size of the image
49  int ImageSize[2];
50 
51  // These are input values for clipping but may be changed
52  // along the way
53  float NearClip;
54  float FarClip;
55 
56  // These are the return values - RGBA and Z
57  float Color[4];
58  float Depth;
59 
60 
61  // Some additional space that may be useful for the
62  // specific implementation of the ray caster. This structure
63  // is a convenient place to put it, since there is one
64  // per thread so that writing to these locations is safe
65 
66  // Ray information transformed into local coordinates
67  float TransformedStart[4];
68  float TransformedEnd[4];
69  float TransformedDirection[4];
70  float TransformedIncrement[3];
71 
72  // The number of steps we want to take if this is
73  // a ray caster that takes steps
75 
76  // The number of steps we actually take if this is
77  // a ray caster that takes steps
79 
81 
82 #endif
83 // VTK-HeaderTest-Exclude: vtkRayCastStructures.h