VTK  9.6.1
vtkAnnulus.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
3
27
28#ifndef vtkAnnulus_h
29#define vtkAnnulus_h
30
31#include "vtkCommonDataModelModule.h" // For export macro
32#include "vtkImplicitFunction.h"
33#include "vtkNew.h" // For vtkNew
34#include "vtkVector.h" // For vtkVector3d
35
36VTK_ABI_NAMESPACE_BEGIN
37class vtkCylinder;
39
40class VTKCOMMONDATAMODEL_EXPORT vtkAnnulus : public vtkImplicitFunction
41{
42public:
43 static vtkAnnulus* New();
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
52 double EvaluateFunction(double x[3]) override;
54
58 void EvaluateGradient(double x[3], double g[3]) override;
59
61
64 void SetInnerRadius(double radius);
65 double GetInnerRadius() const;
67
69
72 void SetOuterRadius(double radius);
73 double GetOuterRadius() const;
75
77
80 void SetCenter(double x, double y, double z);
81 void SetCenter(const double xyz[3]);
82 void SetCenter(const vtkVector3d& xyz);
83 void GetCenter(double& x, double& y, double& z);
84 void GetCenter(double xyz[3]);
85 double* GetCenter() VTK_SIZEHINT(3);
87
89
95 void SetAxis(double x, double y, double z);
96 void SetAxis(double axis[3]);
97 void SetAxis(const vtkVector3d& axis);
98 void GetAxis(double& x, double& y, double& z);
99 void GetAxis(double xyz[3]);
100 double* GetAxis() VTK_SIZEHINT(3);
102
103protected:
105 ~vtkAnnulus() override;
106
107private:
108 vtkAnnulus(const vtkAnnulus&) = delete;
109 void operator=(const vtkAnnulus&) = delete;
110
111 void UpdateTransform();
112
113 vtkVector3d Center = { 0.0, 0.0, 0.0 };
114 vtkVector3d Axis = { 0.0, 1.0, 0.0 };
115
116 vtkNew<vtkCylinder> InnerCylinder;
117 vtkNew<vtkCylinder> OuterCylinder;
118 vtkNew<vtkImplicitBoolean> BooleanOp;
119};
120
121VTK_ABI_NAMESPACE_END
122#endif
double GetOuterRadius() const
Set/Get the outer annulus radius.
void SetAxis(double x, double y, double z)
Set/Get the axis of the annulus.
double GetInnerRadius() const
Set/Get the inner annulus radius.
void GetCenter(double &x, double &y, double &z)
Set/Get the annulus center.
void SetInnerRadius(double radius)
Set/Get the inner annulus radius.
void EvaluateGradient(double x[3], double g[3]) override
Evaluate annulus function gradient.
void GetAxis(double &x, double &y, double &z)
Set/Get the axis of the annulus.
static vtkAnnulus * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetCenter(const double xyz[3])
Set/Get the annulus center.
void SetCenter(double x, double y, double z)
Set/Get the annulus center.
double * GetCenter()
Set/Get the annulus center.
double EvaluateFunction(double x[3]) override
Evaluate annulus equation.
void GetCenter(double xyz[3])
Set/Get the annulus center.
void SetCenter(const vtkVector3d &xyz)
Set/Get the annulus center.
void SetOuterRadius(double radius)
Set/Get the outer annulus radius.
implicit function for a cylinder
Definition vtkCylinder.h:37
implicit function consisting of boolean combinations of 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
#define VTK_SIZEHINT(...)