1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkTextureMapToBox.h,v $
6 Date: $Date: 2002/02/01 06:39:47 $
7 Version: $Revision: 1.1.1.1 $
10 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
16 * Redistributions of source code must retain the above copyright notice,
17 this list of conditions and the following disclaimer.
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.
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.
27 * Modified source versions must be plainly marked as such, and must not be
28 misrepresented as being the original software.
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.
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.
53 // vtkTextureMapToPlane vtkTextureMapToCylinder vtkTextureMapToSphere
54 // vtkThresholdTextureCoords
56 #ifndef __vtkTextureMapToBox_h
57 #define __vtkTextureMapToBox_h
59 #include "vtkDataSetToDataSetFilter.h"
61 class VTK_EXPORT vtkTextureMapToBox : public vtkDataSetToDataSetFilter
64 vtkTypeMacro(vtkTextureMapToBox,vtkDataSetToDataSetFilter);
65 void PrintSelf(ostream& os, vtkIndent indent);
68 // Construct with r-s-t range=(0,1) and automatic box generation turned on.
69 static vtkTextureMapToBox *New();
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);
79 // Specify r-coordinate range for texture r-s-t coordinate triplet.
80 vtkSetVector2Macro(RRange,float);
81 vtkGetVectorMacro(RRange,float,2);
84 // Specify s-coordinate range for texture r-s-t coordinate triplet.
85 vtkSetVector2Macro(SRange,float);
86 vtkGetVectorMacro(SRange,float,2);
89 // Specify t-coordinate range for texture r-s-t coordinate triplet.
90 vtkSetVector2Macro(TRange,float);
91 vtkGetVectorMacro(TRange,float,2);
94 // Turn on/off automatic bounding box generation.
95 vtkSetMacro(AutomaticBoxGeneration,int);
96 vtkGetMacro(AutomaticBoxGeneration,int);
97 vtkBooleanMacro(AutomaticBoxGeneration,int);
100 vtkTextureMapToBox();
101 ~vtkTextureMapToBox() {};
102 vtkTextureMapToBox(const vtkTextureMapToBox&) {};
103 void operator=(const vtkTextureMapToBox&) {};
110 int AutomaticBoxGeneration;