1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkCone.h,v $
6 Date: $Date: 2003/01/06 20:36:14 $
7 Version: $Revision: 1.38 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
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.
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.
28 // The cone is infinite in extent. To truncate the cone use the
29 // vtkImplicitBoolean in combination with clipping planes.
34 #include "vtkImplicitFunction.h"
36 class VTK_FILTERING_EXPORT vtkCone : public vtkImplicitFunction
40 // Construct cone with angle of 45 degrees.
41 static vtkCone *New();
43 vtkTypeRevisionMacro(vtkCone,vtkImplicitFunction);
44 void PrintSelf(ostream& os, vtkIndent indent);
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); } ;
53 // Evaluate cone normal.
54 void EvaluateGradient(float x[3], float g[3]);
57 // Set/Get the cone angle (expressed in degrees).
58 vtkSetClampMacro(Angle,float,0.0f,89.0f);
59 vtkGetMacro(Angle,float);
68 vtkCone(const vtkCone&); // Not implemented.
69 void operator=(const vtkCone&); // Not implemented.