OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkTextureMapToBox.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkTextureMapToBox.h,v $
5   Language:  C++
6   Date:      $Date: 2002/02/01 06:39:47 $
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 vtkTextureMapToBox - generate 3D texture coordinates by mapping points into bounding box
43 // .SECTION Description
44 // vtkTextureMapToBox is a filter that generates 3D texture coordinates
45 // by mapping input dataset points onto a bounding box. The bounding box
46 // can either be user specified or generated automatically. If the box
47 // is generated automatically, all points will lie inside of it. If a
48 // point lies outside the bounding box (only for manual box 
49 // specification), its generated texture coordinate will be mapped
50 // into the r-s-t texture coordinate range.
51
52 // .SECTION See Also
53 // vtkTextureMapToPlane vtkTextureMapToCylinder vtkTextureMapToSphere
54 // vtkThresholdTextureCoords
55
56 #ifndef __vtkTextureMapToBox_h
57 #define __vtkTextureMapToBox_h
58
59 #include "vtkDataSetToDataSetFilter.h"
60
61 class VTK_EXPORT vtkTextureMapToBox : public vtkDataSetToDataSetFilter 
62 {
63 public:
64   vtkTypeMacro(vtkTextureMapToBox,vtkDataSetToDataSetFilter);
65   void PrintSelf(ostream& os, vtkIndent indent);
66
67   // Description:
68   // Construct with r-s-t range=(0,1) and automatic box generation turned on.
69   static vtkTextureMapToBox *New();
70   
71   // Description:
72   // Specify the bounding box to map into.
73   void SetBox(float xmin, float xmax, float ymin, float ymax, 
74               float zmin, float zmax);
75   void SetBox(float *box);
76   vtkGetVectorMacro(Box,float,6);
77
78   // Description:
79   // Specify r-coordinate range for texture r-s-t coordinate triplet.
80   vtkSetVector2Macro(RRange,float);
81   vtkGetVectorMacro(RRange,float,2);
82
83   // Description:
84   // Specify s-coordinate range for texture r-s-t coordinate triplet.
85   vtkSetVector2Macro(SRange,float);
86   vtkGetVectorMacro(SRange,float,2);
87
88   // Description:
89   // Specify t-coordinate range for texture r-s-t coordinate triplet.
90   vtkSetVector2Macro(TRange,float);
91   vtkGetVectorMacro(TRange,float,2);
92
93   // Description:
94   // Turn on/off automatic bounding box generation.
95   vtkSetMacro(AutomaticBoxGeneration,int);
96   vtkGetMacro(AutomaticBoxGeneration,int);
97   vtkBooleanMacro(AutomaticBoxGeneration,int);
98
99 protected:
100   vtkTextureMapToBox();
101   ~vtkTextureMapToBox() {};
102   vtkTextureMapToBox(const vtkTextureMapToBox&) {};
103   void operator=(const vtkTextureMapToBox&) {};
104
105   void Execute();
106   float Box[6];
107   float RRange[2];
108   float SRange[2];
109   float TRange[2];
110   int AutomaticBoxGeneration;
111 };
112
113 #endif
114
115