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
38#ifndef vtkCylinder_h
39#define vtkCylinder_h
40
41#include "vtkCommonDataModelModule.h" // For export macro
42#include "vtkImplicitFunction.h"
43
44VTK_ABI_NAMESPACE_BEGIN
45class VTKCOMMONDATAMODEL_EXPORT vtkCylinder : public vtkImplicitFunction
46{
47public:
49 void PrintSelf(ostream& os, vtkIndent indent) override;
50
55 static vtkCylinder* New();
56
58
62 double EvaluateFunction(double x[3]) override;
64
68 void EvaluateGradient(double x[3], double g[3]) override;
69
71
74 vtkSetMacro(Radius, double);
75 vtkGetMacro(Radius, double);
77
79
82 vtkSetVector3Macro(Center, double);
83 vtkGetVector3Macro(Center, double);
85
87
92 void SetAxis(double ax, double ay, double az);
93 void SetAxis(double a[3]);
94 vtkGetVector3Macro(Axis, double);
96
97protected:
99 ~vtkCylinder() override = default;
100
101 double Radius;
102 double Center[3];
103 double Axis[3];
104
105private:
106 vtkCylinder(const vtkCylinder&) = delete;
107 void operator=(const vtkCylinder&) = delete;
108};
109
110VTK_ABI_NAMESPACE_END
111#endif
implicit function for a cylinder
Definition vtkCylinder.h:46
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
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:38