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
24#ifndef vtkQuadric_h
25#define vtkQuadric_h
26
27#include "vtkCommonDataModelModule.h" // For export macro
28#include "vtkImplicitFunction.h"
29
30VTK_ABI_NAMESPACE_BEGIN
31class VTKCOMMONDATAMODEL_EXPORT vtkQuadric : public vtkImplicitFunction
32{
33public:
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
40 static vtkQuadric* New();
41
43
47 double EvaluateFunction(double x[3]) override;
49
53 void EvaluateGradient(double x[3], double g[3]) override;
54
56
59 void SetCoefficients(double a[10]);
60 void SetCoefficients(double a0, double a1, double a2, double a3, double a4, double a5, double a6,
61 double a7, double a8, double a9);
62 vtkGetVectorMacro(Coefficients, double, 10);
64
65protected:
67 ~vtkQuadric() override = default;
68
69 double Coefficients[10];
70
71private:
72 vtkQuadric(const vtkQuadric&) = delete;
73 void operator=(const vtkQuadric&) = delete;
74};
75
76VTK_ABI_NAMESPACE_END
77#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:38
evaluate implicit quadric function
Definition vtkQuadric.h:32
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkQuadric * New()
Construct quadric with all coefficients = 1.
~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.