25 template <
typename Real>
32 Real
const* Z, Real
const* F, Real smooth,
bool transformToUnitCube);
74 template <
typename Real>
76 Real
const* Y, Real
const* Z, Real
const* F, Real smooth,
77 bool transformToUnitCube)
87 if (numPoints < 4 || !X || !Y || !Z || !F || smooth < (Real)0)
95 if (transformToUnitCube)
100 auto extreme = std::minmax_element(X, X +
mNumPoints);
101 mXMin = *extreme.first;
102 mXMax = *extreme.second;
109 extreme = std::minmax_element(Y, Y + mNumPoints);
110 mYMin = *extreme.first;
111 mYMax = *extreme.second;
118 extreme = std::minmax_element(Z, Z + mNumPoints);
119 mZMin = *extreme.first;
120 mZMax = *extreme.second;
161 Real
t = sqrt(dx * dx + dy * dy + dz * dz);
162 AMat(row, col) =
Kernel(t);
171 BMat(row, 0) = (Real)1;
172 BMat(row, 1) =
mX[
row];
173 BMat(row, 2) =
mY[
row];
174 BMat(row, 3) =
mZ[
row];
200 for (row = 0; row < 4; ++
row)
205 prod[
row] += PMat(row, i) * F[i];
210 for (row = 0; row < 4; ++
row)
213 for (i = 0; i < 4; ++i)
215 mB[
row] += invQMat(row, i) * prod[i];
220 std::vector<Real> tmp(mNumPoints);
224 for (i = 0; i < 4; ++i)
226 tmp[
row] -= BMat(row, i) *
mB[i];
236 mA[
row] += invAMat(row, i) * tmp[i];
243 template <
typename Real>
249 template <
typename Real>
265 Real
t = sqrt(dx*dx + dy*dy + dz*dz);
271 return std::numeric_limits<Real>::max();
274 template <
typename Real>
277 Real functional = (Real)0;
291 Real
t = sqrt(dx * dx + dy * dy + dz * dz);
305 template <
typename Real>
Real operator()(Real x, Real y, Real z) const
gte::BSNumber< UIntegerType > abs(gte::BSNumber< UIntegerType > const &number)
bool IsInitialized() const
static Real Kernel(Real t)
GMatrix< Real > MultiplyATB(GMatrix< Real > const &A, GMatrix< Real > const &B)
GLenum GLenum GLsizei void * row
#define LogError(message)
GLdouble GLdouble GLdouble z
Real ComputeFunctional() const
IntpThinPlateSpline3(int numPoints, Real const *X, Real const *Y, Real const *Z, Real const *F, Real smooth, bool transformToUnitCube)
Quaternion< Real > Inverse(Quaternion< Real > const &d)