VTK  9.4.20250102
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
68#ifndef vtkCylinder_h
69#define vtkCylinder_h
70
71#include "vtkCommonDataModelModule.h" // For export macro
72#include "vtkImplicitFunction.h"
73
74VTK_ABI_NAMESPACE_BEGIN
75class VTKCOMMONDATAMODEL_EXPORT vtkCylinder : public vtkImplicitFunction
76{
77public:
79 void PrintSelf(ostream& os, vtkIndent indent) override;
80
85 static vtkCylinder* New();
86
88
92 double EvaluateFunction(double x[3]) override;
94
98 void EvaluateGradient(double x[3], double g[3]) override;
99
101
104 vtkSetClampMacro(Radius, double, 0, VTK_DOUBLE_MAX);
105 vtkGetMacro(Radius, double);
107
109
112 vtkSetVector3Macro(Center, double);
113 vtkGetVector3Macro(Center, double);
115
117
122 void SetAxis(double ax, double ay, double az);
123 void SetAxis(double a[3]);
124 vtkGetVector3Macro(Axis, double);
126
127protected:
129 ~vtkCylinder() override = default;
130
131 double Radius;
132 double Center[3];
133 double Axis[3];
134
135private:
136 vtkCylinder(const vtkCylinder&) = delete;
137 void operator=(const vtkCylinder&) = delete;
138};
139
140VTK_ABI_NAMESPACE_END
141#endif
implicit function for a cylinder
Definition vtkCylinder.h:76
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:108
#define VTK_DOUBLE_MAX
Definition vtkType.h:154