VTK  9.3.20240328
vtkQuadric.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
104 #ifndef vtkQuadric_h
105 #define vtkQuadric_h
106 
107 #include "vtkCommonDataModelModule.h" // For export macro
108 #include "vtkImplicitFunction.h"
109 
110 VTK_ABI_NAMESPACE_BEGIN
111 class VTKCOMMONDATAMODEL_EXPORT vtkQuadric : public vtkImplicitFunction
112 {
113 public:
115  void PrintSelf(ostream& os, vtkIndent indent) override;
116 
120  static vtkQuadric* New();
121 
123 
127  double EvaluateFunction(double x[3]) override;
129 
133  void EvaluateGradient(double x[3], double g[3]) override;
134 
136 
139  void SetCoefficients(double a[10]);
140  void SetCoefficients(double a0, double a1, double a2, double a3, double a4, double a5, double a6,
141  double a7, double a8, double a9);
142  vtkGetVectorMacro(Coefficients, double, 10);
144 
145 protected:
147  ~vtkQuadric() override = default;
148 
149  double Coefficients[10];
150 
151 private:
152  vtkQuadric(const vtkQuadric&) = delete;
153  void operator=(const vtkQuadric&) = delete;
154 };
155 
156 VTK_ABI_NAMESPACE_END
157 #endif
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
evaluate implicit quadric function
Definition: vtkQuadric.h:112
static vtkQuadric * New()
Construct quadric with all coefficients = 1.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkQuadric() override=default
void EvaluateGradient(double x[3], double g[3]) override
Evaluate the gradient to the quadric equation.
void SetCoefficients(double a[10])
Set / get the 10 coefficients of the quadric equation.
double EvaluateFunction(double x[3]) override
Evaluate quadric equation.
void SetCoefficients(double a0, double a1, double a2, double a3, double a4, double a5, double a6, double a7, double a8, double a9)
Set / get the 10 coefficients of the quadric equation.