VTK: Common/DataModel/vtkQuadric.h Source File

| VTK 9.3.1

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
30 VTK_ABI_NAMESPACE_BEGIN
31 class VTKCOMMONDATAMODEL_EXPORT vtkQuadric : public vtkImplicitFunction
32 {
33 public:
34 vtkTypeMacro(vtkQuadric, vtkImplicitFunction);
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
40 static vtkQuadric* New();
41
43
46 using vtkImplicitFunction::EvaluateFunction;
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
65 protected:
66 vtkQuadric();
67 ~vtkQuadric() override = default;
68
69 double Coefficients[10];
70
71 private:
72 vtkQuadric(const vtkQuadric&) = delete;
73 void operator=(const vtkQuadric&) = delete;
74 };
75
76 VTK_ABI_NAMESPACE_END
77 #endif
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:59
vtkImplicitFunction::EvaluateFunction
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkQuadric
evaluate implicit quadric function
Definition: vtkQuadric.h:32
vtkQuadric::New
static vtkQuadric * New()
Construct quadric with all coefficients = 1.
vtkQuadric::vtkQuadric
vtkQuadric()
vtkQuadric::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkQuadric::~vtkQuadric
~vtkQuadric() override=default
vtkQuadric::EvaluateGradient
void EvaluateGradient(double x[3], double g[3]) override
Evaluate the gradient to the quadric equation.
vtkQuadric::SetCoefficients
void SetCoefficients(double a[10])
Set / get the 10 coefficients of the quadric equation.
vtkQuadric::EvaluateFunction
double EvaluateFunction(double x[3]) override
Evaluate quadric equation.
vtkQuadric::SetCoefficients
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.
vtkImplicitFunction.h