PCL
|
Two-dimensional interpolating/approximating surface polynomial. More...
#include <SurfacePolynomial.h>
Public Types | |
using | scalar = typename vector_type::scalar |
using | vector_type = GenericVector< T > |
Public Member Functions | |
SurfacePolynomial ()=default | |
SurfacePolynomial (const SurfacePolynomial &)=default | |
SurfacePolynomial (SurfacePolynomial &&)=default | |
virtual | ~SurfacePolynomial () |
void | Clear () |
int | Degree () const |
template<typename T1 > | |
void | Evaluate (T1 *Z, const T1 *X, const T1 *Y, size_type n) const |
bool | HasFastVectorEvaluation () const |
void | Initialize (const T *x, const T *y, const T *z, int n) |
bool | IsValid () const |
T | operator() (double x, double y) const |
SurfacePolynomial & | operator= (const SurfacePolynomial &)=default |
SurfacePolynomial & | operator= (SurfacePolynomial &&)=default |
void | SetDegree (int degree) |
SurfacePolynomial implements interpolating surface polynomials for arbitrarily distributed input nodes in two dimensions.
Compared to surface splines (also known as thin plates), surface polynomials are much more rigid, that is, much less adaptable to local function variations. This can be a desirable property in some scenarios. An important drawback of polynomials is that they are prone to oscillations, especially for relatively high interpolation orders greater than three. An important advantage is that they are fast even for very large data sets.
Definition at line 86 of file SurfacePolynomial.h.
using pcl::SurfacePolynomial< T >::scalar = typename vector_type::scalar |
The numeric type used to represent coordinates, function values and polynomial coefficients.
Definition at line 100 of file SurfacePolynomial.h.
using pcl::SurfacePolynomial< T >::vector_type = GenericVector<T> |
Represents a vector of coordinates, function values or polynomial coefficients.
Definition at line 94 of file SurfacePolynomial.h.
|
default |
Default constructor. Constructs an empty, two-dimensional interpolating surface polynomial of third degree.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inlinevirtual |
Virtual destructor.
Definition at line 121 of file SurfacePolynomial.h.
|
inline |
Resets this surface polynomial interpolation, deallocating all internal working structures.
Definition at line 323 of file SurfacePolynomial.h.
|
inline |
Returns the degree of this surface polynomial.
Definition at line 147 of file SurfacePolynomial.h.
|
inline |
Surface polynomial interpolation for a set of points in 2-D space specified as the X and Y contiguous sequences of n coordinates. Stores the corresponding function values in the specified array Z.
Definition at line 339 of file SurfacePolynomial.h.
|
inline |
Returns true iff this object can be evaluated for vectors of points in 2-D space efficiently by calling the Evaluate() member functions. This function always returns false for this class.
Definition at line 357 of file SurfacePolynomial.h.
|
inline |
Generation of a two-dimensional surface polynomial.
x | X node coordinates. |
y | Y node coordinates. |
z | Node values. |
n | Number of nodes. Must be ≥ 3 (3 nodes * 2 coordinates = six degrees of freedom). |
The input nodes can be arbitrarily distributed, and they don't need to follow any specific order. However, all nodes must be distinct with respect to the machine epsilon for the floating point type T.
Definition at line 188 of file SurfacePolynomial.h.
|
inline |
Returns true iff this surface polynomial is valid. A valid surface polynomial has been initialized with a sufficient number of nodes.
Definition at line 139 of file SurfacePolynomial.h.
|
inline |
Two-dimensional surface polynomial interpolation. Returns an interpolated value at the specified x and y coordinates.
Definition at line 300 of file SurfacePolynomial.h.
|
default |
Copy assignment operator. Returns a reference to this object.
|
default |
Move assignment operator. Returns a reference to this object.
|
inline |
Sets the degree of this surface polynomial.
degree | Polynomial degree. Must be ≥ 1. |
Calling this member function implicitly resets this SurfacePolynomial object and destroys all internal working structures.
High-degree polynomials, especially for degrees higher than three, tend to oscillate and may generate artifacts in the interpolated surface.
The default degree is 3. Recommended values are 2, 3 and 4.
Definition at line 165 of file SurfacePolynomial.h.