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 
26 #ifndef vtkRayCastStructures_h
27 #define vtkRayCastStructures_h
28 
29 typedef struct
30 {
31  // These are the input values that define the ray. Depending on
32  // whether we are casting a WorldRay or a ViewRay, these are in
33  // world coordinates or view coordinates.
34  float Origin[3];
35  float Direction[3];
36 
37  // The pixel location for the ray that is being cast can be
38  // important, for example if hardware ray bounding is being used
39  // and the location in the depth buffer must be matched to this
40  // ray.
41  int Pixel[2];
42 
43  // The world coordinate location of the camera is important for the
44  // ray caster to be able to return a Z value for the intersection
45  float CameraPosition[3];
46 
47  // This input value defines the size of the image
48  int ImageSize[2];
49 
50  // These are input values for clipping but may be changed
51  // along the way
52  float NearClip;
53  float FarClip;
54 
55  // These are the return values - RGBA and Z
56  float Color[4];
57  float Depth;
58 
59 
60  // Some additional space that may be useful for the
61  // specific implementation of the ray caster. This structure
62  // is a convenient place to put it, since there is one
63  // per thread so that writing to these locations is safe
64 
65  // Ray information transformed into local coordinates
66  float TransformedStart[4];
67  float TransformedEnd[4];
68  float TransformedDirection[4];
69  float TransformedIncrement[3];
70 
71  // The number of steps we want to take if this is
72  // a ray caster that takes steps
74 
75  // The number of steps we actually take if this is
76  // a ray caster that takes steps
78 
80 
81 #endif
82 // VTK-HeaderTest-Exclude: vtkRayCastStructures.h