VTK  9.2.5
vtkQuadric.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuadric.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
116 #ifndef vtkQuadric_h
117 #define vtkQuadric_h
118 
119 #include "vtkCommonDataModelModule.h" // For export macro
120 #include "vtkImplicitFunction.h"
121 
122 class VTKCOMMONDATAMODEL_EXPORT vtkQuadric : public vtkImplicitFunction
123 {
124 public:
126  void PrintSelf(ostream& os, vtkIndent indent) override;
127 
131  static vtkQuadric* New();
132 
134 
138  double EvaluateFunction(double x[3]) override;
140 
144  void EvaluateGradient(double x[3], double g[3]) override;
145 
147 
150  void SetCoefficients(double a[10]);
151  void SetCoefficients(double a0, double a1, double a2, double a3, double a4, double a5, double a6,
152  double a7, double a8, double a9);
153  vtkGetVectorMacro(Coefficients, double, 10);
155 
156 protected:
158  ~vtkQuadric() override = default;
159 
160  double Coefficients[10];
161 
162 private:
163  vtkQuadric(const vtkQuadric&) = delete;
164  void operator=(const vtkQuadric&) = delete;
165 };
166 
167 #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:119
evaluate implicit quadric function
Definition: vtkQuadric.h:123
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.