OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkRayBounder.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkRayBounder.h,v $
5   Language:  C++
6   Date:      $Date: 2002/02/01 06:39:53 $
7   Version:   $Revision: 1.1.1.1 $
8
9
10 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
11 All rights reserved.
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
15
16  * Redistributions of source code must retain the above copyright notice,
17    this list of conditions and the following disclaimer.
18
19  * Redistributions in binary form must reproduce the above copyright notice,
20    this list of conditions and the following disclaimer in the documentation
21    and/or other materials provided with the distribution.
22
23  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
24    of any contributors may be used to endorse or promote products derived
25    from this software without specific prior written permission.
26
27  * Modified source versions must be plainly marked as such, and must not be
28    misrepresented as being the original software.
29
30 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
31 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
34 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
36 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
37 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
38 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40
41 =========================================================================*/
42 // .NAME vtkRayBounder - An abstract class for bounding rays
43 // .SECTION Description
44 // vtkRayBounder is an abstract class for bounding view rays during
45 // ray casting. Each concrete subclass must have a GetRayBounds 
46 // method which, given a renderer, produces a floating point array
47 // that is w*h*2 (w = width of viewport, h = height of viewport).
48 // For each pixel, this array contains the near and far clipping
49 // values for the corresponding ray. A value of -1 means no clipping
50 // should be performed on that ray.
51
52 // .SECTION see also
53 // 
54
55 #ifndef __vtkRayBounder_h
56 #define __vtkRayBounder_h
57
58 #include "vtkObject.h"
59 #include "vtkRenderer.h"
60
61 class vtkWindow;
62
63 class VTK_EXPORT vtkRayBounder : public vtkObject
64 {
65 public:
66   vtkTypeMacro(vtkRayBounder,vtkObject);
67
68   // Description:
69   // Get the ray bounds - a floating point array with two
70   // values for every pixel in the viewport. These values
71   // indicate near and far clipping distances, or -1 for
72   // no clipping.
73   virtual float *GetRayBounds( vtkRenderer *ren )=0;
74
75
76   // Description:
77   // Release any graphics resources that are being consumed by this ray bounder.
78   // The parameter window could be used to determine which graphic
79   // resources to release.
80   virtual void ReleaseGraphicsResources(vtkWindow *) {};
81
82   
83 protected:
84   vtkRayBounder() {};
85   ~vtkRayBounder() {};
86   vtkRayBounder(const vtkRayBounder &) {};
87   void operator=(const vtkRayBounder &) {};
88 };
89
90 #endif
91