VTK  9.3.0
vtkCylinder.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
29#ifndef vtkCylinder_h
30#define vtkCylinder_h
31
32#include "vtkCommonDataModelModule.h" // For export macro
33#include "vtkImplicitFunction.h"
34
35VTK_ABI_NAMESPACE_BEGIN
36class VTKCOMMONDATAMODEL_EXPORT vtkCylinder : public vtkImplicitFunction
37{
38public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
46 static vtkCylinder* New();
47
49
53 double EvaluateFunction(double x[3]) override;
55
59 void EvaluateGradient(double x[3], double g[3]) override;
60
62
65 vtkSetMacro(Radius, double);
66 vtkGetMacro(Radius, double);
68
70
73 vtkSetVector3Macro(Center, double);
74 vtkGetVector3Macro(Center, double);
76
78
83 void SetAxis(double ax, double ay, double az);
84 void SetAxis(double a[3]);
85 vtkGetVector3Macro(Axis, double);
87
88protected:
90 ~vtkCylinder() override = default;
91
92 double Radius;
93 double Center[3];
94 double Axis[3];
95
96private:
97 vtkCylinder(const vtkCylinder&) = delete;
98 void operator=(const vtkCylinder&) = delete;
99};
100
101VTK_ABI_NAMESPACE_END
102#endif
implicit function for a cylinder
Definition vtkCylinder.h:37
static vtkCylinder * New()
Construct cylinder radius of 0.5; centered at origin with axis along y coordinate axis.
~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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double Radius
Definition vtkCylinder.h:92
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:29