VTK  9.4.20250102
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
47#ifndef vtkAnnulus_h
48#define vtkAnnulus_h
49
50#include "vtkCommonDataModelModule.h" // For export macro
51#include "vtkImplicitFunction.h"
52#include "vtkNew.h" // For vtkNew
53#include "vtkVector.h" // For vtkVector3d
54
55VTK_ABI_NAMESPACE_BEGIN
56class vtkCylinder;
58
59class VTKCOMMONDATAMODEL_EXPORT vtkAnnulus : public vtkImplicitFunction
60{
61public:
62 static vtkAnnulus* New();
64 void PrintSelf(ostream& os, vtkIndent indent) override;
65
67
71 double EvaluateFunction(double x[3]) override;
73
77 void EvaluateGradient(double x[3], double g[3]) override;
78
80
83 void SetInnerRadius(double radius);
84 double GetInnerRadius() const;
86
88
91 void SetOuterRadius(double radius);
92 double GetOuterRadius() const;
94
96
99 void SetCenter(double x, double y, double z);
100 void SetCenter(const double xyz[3]);
101 void SetCenter(const vtkVector3d& xyz);
102 void GetCenter(double& x, double& y, double& z);
103 void GetCenter(double xyz[3]);
106
108
114 void SetAxis(double x, double y, double z);
115 void SetAxis(double axis[3]);
116 void SetAxis(const vtkVector3d& axis);
117 void GetAxis(double& x, double& y, double& z);
118 void GetAxis(double xyz[3]);
119 double* GetAxis() VTK_SIZEHINT(3);
121
122protected:
124 ~vtkAnnulus() override;
125
126private:
127 vtkAnnulus(const vtkAnnulus&) = delete;
128 void operator=(const vtkAnnulus&) = delete;
129
130 void UpdateTransform();
131
132 vtkVector3d Center = { 0.0, 0.0, 0.0 };
133 vtkVector3d Axis = { 0.0, 1.0, 0.0 };
134
135 vtkNew<vtkCylinder> InnerCylinder;
136 vtkNew<vtkCylinder> OuterCylinder;
138};
139
140VTK_ABI_NAMESPACE_END
141#endif
implicit function for a annulus
Definition vtkAnnulus.h:60
double GetOuterRadius() const
Set/Get the outer annulus radius.
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.
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:76
implicit function consisting of boolean combinations of implicit functions
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
Allocate and hold a VTK object.
Definition vtkNew.h:167
#define VTK_SIZEHINT(...)