VTK  9.7.1
vtkCone.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 
24 #ifndef vtkCone_h
25 #define vtkCone_h
26 
27 #include "vtkCommonDataModelModule.h" // For export macro
28 #include "vtkImplicitFunction.h"
29 
30 VTK_ABI_NAMESPACE_BEGIN
31 class VTKCOMMONDATAMODEL_EXPORT vtkCone : public vtkImplicitFunction
32 {
33 public:
37  static vtkCone* New();
38 
39  vtkTypeMacro(vtkCone, vtkImplicitFunction);
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
44 
47  double EvaluateFunction(double x[3]) override;
49 
53  void EvaluateGradient(double x[3], double g[3]) override;
54 
56 
60  vtkSetClampMacro(Angle, double, 0.0, 89.0);
61  vtkGetMacro(Angle, double);
63 
65 
69  void SetOrigin(double x, double y, double z);
70  void SetOrigin(const double xyz[3]);
71  vtkGetVector3Macro(Origin, double);
73 
75 
82  void SetAxis(double x, double y, double z);
83  void SetAxis(double axis[3]);
84  vtkGetVector3Macro(Axis, double);
86 
88 
93  vtkSetMacro(IsDoubleCone, bool);
94  vtkGetMacro(IsDoubleCone, bool);
95  vtkBooleanMacro(IsDoubleCone, bool);
97 
98 protected:
99  vtkCone() = default;
100  ~vtkCone() override = default;
101 
102  double Angle = 45.0;
103  double Origin[3] = { 0.0, 0.0, 0.0 };
104  double Axis[3] = { 1.0, 0.0, 0.0 };
105  bool IsDoubleCone = true;
106 
107 private:
108  vtkCone(const vtkCone&) = delete;
109  void operator=(const vtkCone&) = delete;
110 
115  void UpdateTransform();
116 };
117 
118 VTK_ABI_NAMESPACE_END
119 #endif
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
implicit function for a cone
Definition: vtkCone.h:31
virtual void EvaluateGradient(double x[3], double g[3])=0
Evaluate function gradient at position x-y-z and pass back vector.
a simple class to control print indentation
Definition: vtkIndent.h:28
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.