OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / ALPHALINUX5 / util / ALPHALINUX5 / include / vtk / vtkTextureMapToSphere.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkTextureMapToSphere.h,v $
5   Language:  C++
6   Date:      $Date: 2002/02/01 06:35:51 $
7   Version:   $Revision: 1.1.1.1 $
8
9
10 Copyright (c) 1993-1998 Ken Martin, Will Schroeder, Bill Lorensen.
11
12 This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
13 The following terms apply to all files associated with the software unless
14 explicitly disclaimed in individual files. This copyright specifically does
15 not apply to the related textbook "The Visualization Toolkit" ISBN
16 013199837-4 published by Prentice Hall which is covered by its own copyright.
17
18 The authors hereby grant permission to use, copy, and distribute this
19 software and its documentation for any purpose, provided that existing
20 copyright notices are retained in all copies and that this notice is included
21 verbatim in any distributions. Additionally, the authors grant permission to
22 modify this software and its documentation for any purpose, provided that
23 such modifications are not distributed without the explicit consent of the
24 authors and that existing copyright notices are retained in all copies. Some
25 of the algorithms implemented by this software are patented, observe all
26 applicable patent law.
27
28 IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
29 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
30 OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
31 EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
33 THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
34 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
35 PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON AN
36 "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
37 MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
38
39
40 =========================================================================*/
41 // .NAME vtkTextureMapToSphere - generate texture coordinates by mapping points to sphere
42 // .SECTION Description
43 // vtkTextureMapToSphere is a filter that generates 2D texture coordinates
44 // by mapping input dataset points onto a sphere. The sphere can either be
45 // user specified or generated automatically. (The sphere is generated 
46 // automatically by computing the center (i.e., averaged coordinates) of the sphere.)
47 // Note that the generated texture coordinates range beween (0,1). The s-coordinate
48 // lies in the angular direction around the z-axis, measured counter-clockwise from the
49 // x-axis. The t-coordinate lies in the angular direction measured down from the north
50 // pole towards the south pole.
51 //
52 // A special ivar controls how the s-coordinate is generated. If PreventSeam
53 // is set to true, the s-texture varies from 0->1 and then 1->0 (corresponding
54 // to angles of 0->180 and 180->360).
55
56 // .Section Caveats
57 // The resulting texture coordinates will lie between (0,1), and the texture coordinates
58 // are determined with respect to the modeller's x-y-z coordinate system. Use the class 
59 // vtkTransformTextureCoords to linearly scale and shift the origin of the texture
60 // coordinates (if necessary).
61
62 // .SECTION See Also
63 // vtkTextureMapToPlane vtkTextureMapToCylinder vtkTextureMapToBox
64 // vtkTransformTexture vtkThresholdTextureCoords
65
66 #ifndef __vtkTextureMapToSphere_h
67 #define __vtkTextureMapToSphere_h
68
69 #include "vtkDataSetToDataSetFilter.h"
70
71 class VTK_EXPORT vtkTextureMapToSphere : public vtkDataSetToDataSetFilter 
72 {
73 public:
74   vtkTextureMapToSphere();
75   static vtkTextureMapToSphere *New() {return new vtkTextureMapToSphere;};
76   const char *GetClassName() {return "vtkTextureMapToSphere";};
77   void PrintSelf(ostream& os, vtkIndent indent);
78
79   // Description:
80   // Specify a point defining the center of the sphere.
81   vtkSetVector3Macro(Center,float);
82   vtkGetVectorMacro(Center,float,3);
83
84   // Description:
85   // Turn on/off automatic sphere generation. This means it automatically finds 
86   // the sphere center.
87   vtkSetMacro(AutomaticSphereGeneration,int);
88   vtkGetMacro(AutomaticSphereGeneration,int);
89   vtkBooleanMacro(AutomaticSphereGeneration,int);
90
91   // Description:
92   // Control how the texture coordinates are generated. If PreventSeam is set, the
93   // s-coordinate ranges from 0->1 and 1->0 corresponding to the theta angle variation
94   // between 0->180 and 180->0 degrees. Otherwise, the s-ccordinate ranges from 0->1 
95   // between 0->360 degrees.
96   vtkSetMacro(PreventSeam,int);
97   vtkGetMacro(PreventSeam,int);
98   vtkBooleanMacro(PreventSeam,int);
99
100 protected:
101   void Execute();
102
103   float Center[3];
104   int AutomaticSphereGeneration;
105   int PreventSeam;
106
107 };
108
109 #endif
110
111