VTK  9.3.0
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
15 #ifndef vtkQuadric_h
16 #define vtkQuadric_h
17 
18 #include "vtkCommonDataModelModule.h" // For export macro
19 #include "vtkImplicitFunction.h"
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class VTKCOMMONDATAMODEL_EXPORT vtkQuadric : public vtkImplicitFunction
23 {
24 public:
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
31  static vtkQuadric* New();
32 
34 
38  double EvaluateFunction(double x[3]) override;
40 
44  void EvaluateGradient(double x[3], double g[3]) override;
45 
47 
50  void SetCoefficients(double a[10]);
51  void SetCoefficients(double a0, double a1, double a2, double a3, double a4, double a5, double a6,
52  double a7, double a8, double a9);
53  vtkGetVectorMacro(Coefficients, double, 10);
55 
56 protected:
58  ~vtkQuadric() override = default;
59 
60  double Coefficients[10];
61 
62 private:
63  vtkQuadric(const vtkQuadric&) = delete;
64  void operator=(const vtkQuadric&) = delete;
65 };
66 
67 VTK_ABI_NAMESPACE_END
68 #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:29
evaluate implicit quadric function
Definition: vtkQuadric.h:23
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.