VTK  9.2.6
vtkCylinder.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkCylinder.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
37
38#ifndef vtkCylinder_h
39#define vtkCylinder_h
40
41#include "vtkCommonDataModelModule.h" // For export macro
42#include "vtkImplicitFunction.h"
43
44class VTKCOMMONDATAMODEL_EXPORT vtkCylinder : public vtkImplicitFunction
45{
46public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
54 static vtkCylinder* New();
55
57
61 double EvaluateFunction(double x[3]) override;
63
67 void EvaluateGradient(double x[3], double g[3]) override;
68
70
73 vtkSetMacro(Radius, double);
74 vtkGetMacro(Radius, double);
76
78
81 vtkSetVector3Macro(Center, double);
82 vtkGetVector3Macro(Center, double);
84
86
91 void SetAxis(double ax, double ay, double az);
92 void SetAxis(double a[3]);
93 vtkGetVector3Macro(Axis, double);
95
96protected:
98 ~vtkCylinder() override = default;
99
100 double Radius;
101 double Center[3];
102 double Axis[3];
103
104private:
105 vtkCylinder(const vtkCylinder&) = delete;
106 void operator=(const vtkCylinder&) = delete;
107};
108
109#endif
static vtkCylinder * New()
Construct cylinder radius of 0.5; centered at origin with axis along y coordinate axis.
~vtkCylinder() override=default
double Center[3]
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.
double Axis[3]
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.
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:34