VTK  9.2.6
vtkCylinder.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCylinder.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
50 #ifndef vtkCylinder_h
51 #define vtkCylinder_h
52 
53 #include "vtkCommonDataModelModule.h" // For export macro
54 #include "vtkImplicitFunction.h"
55 
56 class VTKCOMMONDATAMODEL_EXPORT vtkCylinder : public vtkImplicitFunction
57 {
58 public:
60  void PrintSelf(ostream& os, vtkIndent indent) override;
61 
66  static vtkCylinder* New();
67 
69 
73  double EvaluateFunction(double x[3]) override;
75 
79  void EvaluateGradient(double x[3], double g[3]) override;
80 
82 
85  vtkSetMacro(Radius, double);
86  vtkGetMacro(Radius, double);
88 
90 
93  vtkSetVector3Macro(Center, double);
94  vtkGetVector3Macro(Center, double);
96 
98 
103  void SetAxis(double ax, double ay, double az);
104  void SetAxis(double a[3]);
105  vtkGetVector3Macro(Axis, double);
107 
108 protected:
110  ~vtkCylinder() override = default;
111 
112  double Radius;
113  double Center[3];
114  double Axis[3];
115 
116 private:
117  vtkCylinder(const vtkCylinder&) = delete;
118  void operator=(const vtkCylinder&) = delete;
119 };
120 
121 #endif
implicit function for a cylinder
Definition: vtkCylinder.h:57
~vtkCylinder() override=default
void SetAxis(double a[3])
Set/Get the axis of the cylinder.
void SetAxis(double ax, double ay, double az)
Set/Get the axis of the cylinder.
static vtkCylinder * New()
Construct cylinder radius of 0.5; centered at origin with axis along y coordinate axis.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double Radius
Definition: vtkCylinder.h:112
double EvaluateFunction(double x[3]) override
Evaluate cylinder equation F(r) = r^2 - Radius^2.
void EvaluateGradient(double x[3], double g[3]) override
Evaluate cylinder function gradient.
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
a simple class to control print indentation
Definition: vtkIndent.h:49