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 =========================================================================*/
41 #ifndef vtkCylinder_h
42 #define vtkCylinder_h
43 
44 #include "vtkCommonDataModelModule.h" // For export macro
45 #include "vtkImplicitFunction.h"
46 
47 class VTKCOMMONDATAMODEL_EXPORT vtkCylinder : public vtkImplicitFunction
48 {
49 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
57  static vtkCylinder* New();
58 
60 
64  double EvaluateFunction(double x[3]) override;
66 
70  void EvaluateGradient(double x[3], double g[3]) override;
71 
73 
76  vtkSetMacro(Radius, double);
77  vtkGetMacro(Radius, double);
79 
81 
84  vtkSetVector3Macro(Center, double);
85  vtkGetVector3Macro(Center, double);
87 
89 
94  void SetAxis(double ax, double ay, double az);
95  void SetAxis(double a[3]);
96  vtkGetVector3Macro(Axis, double);
98 
99 protected:
100  vtkCylinder();
101  ~vtkCylinder() override = default;
102 
103  double Radius;
104  double Center[3];
105  double Axis[3];
106 
107 private:
108  vtkCylinder(const vtkCylinder&) = delete;
109  void operator=(const vtkCylinder&) = delete;
110 };
111 
112 #endif
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
virtual void EvaluateGradient(double x[3], double g[3])=0
Evaluate function gradient at position x-y-z and pass back vector.
a simple class to control print indentation
Definition: vtkIndent.h:39
implicit function for a cylinder
Definition: vtkCylinder.h:47
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double Radius
Definition: vtkCylinder.h:103