OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkCone.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkCone.h,v $
5   Language:  C++
6   Date:      $Date: 2003/01/06 20:36:14 $
7   Version:   $Revision: 1.38 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
13      This software is distributed WITHOUT ANY WARRANTY; without even 
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15      PURPOSE.  See the above copyright notice for more information.
16
17 =========================================================================*/
18 // .NAME vtkCone - implicit function for a cone
19 // .SECTION Description
20 // vtkCone computes the implicit function and function gradient for a cone.
21 // vtkCone is a concrete implementation of vtkImplicitFunction. The cone vertex
22 // is located at the origin with axis of rotation coincident with x-axis. (Use
23 // the superclass' vtkImplicitFunction transformation matrix if necessary to 
24 // reposition.) The angle specifies the angle between the axis of rotation 
25 // and the side of the cone.
26
27 // .SECTION Caveats
28 // The cone is infinite in extent. To truncate the cone use the 
29 // vtkImplicitBoolean in combination with clipping planes.
30
31 #ifndef __vtkCone_h
32 #define __vtkCone_h
33
34 #include "vtkImplicitFunction.h"
35
36 class VTK_FILTERING_EXPORT vtkCone : public vtkImplicitFunction
37 {
38 public:
39   // Description
40   // Construct cone with angle of 45 degrees.
41   static vtkCone *New();
42
43   vtkTypeRevisionMacro(vtkCone,vtkImplicitFunction);
44   void PrintSelf(ostream& os, vtkIndent indent);
45   
46   // Description
47   // Evaluate cone equation.
48   float EvaluateFunction(float x[3]);
49   float EvaluateFunction(float x, float y, float z)
50     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
51
52   // Description
53   // Evaluate cone normal.
54   void EvaluateGradient(float x[3], float g[3]);
55
56   // Description:
57   // Set/Get the cone angle (expressed in degrees).
58   vtkSetClampMacro(Angle,float,0.0f,89.0f);
59   vtkGetMacro(Angle,float);
60
61 protected:
62   vtkCone();
63   ~vtkCone() {};
64
65   float Angle;
66
67 private:
68   vtkCone(const vtkCone&);  // Not implemented.
69   void operator=(const vtkCone&);  // Not implemented.
70 };
71
72 #endif
73
74