24 template <
typename Real>
30 Real xSpacing, Real yMin, Real ySpacing, Real zMin, Real zSpacing,
31 Real
const* F,
bool catmullRom);
38 inline Real
const*
GetF()
const;
57 Real
operator()(
int xOrder,
int yOrder,
int zOrder, Real x, Real y,
70 template <
typename Real>
72 Real xMin, Real xSpacing, Real yMin, Real ySpacing, Real zMin,
73 Real zSpacing, Real
const* F,
bool catmullRom)
104 mBlend[0][1] = (Real)-0.5;
106 mBlend[0][3] = (Real)-0.5;
109 mBlend[1][2] = (Real)-2.5;
114 mBlend[2][3] = (Real)-1.5;
117 mBlend[3][2] = (Real)-0.5;
122 mBlend[0][0] = (Real)1 / (Real)6;
123 mBlend[0][1] = (Real)-3 / (Real)6;
124 mBlend[0][2] = (Real)3 / (Real)6;
125 mBlend[0][3] = (Real)-1 / (Real)6;;
126 mBlend[1][0] = (Real)4 / (Real)6;
127 mBlend[1][1] = (Real)0 / (Real)6;
128 mBlend[1][2] = (Real)-6 / (Real)6;
129 mBlend[1][3] = (Real)3 / (Real)6;
130 mBlend[2][0] = (Real)1 / (Real)6;
131 mBlend[2][1] = (Real)3 / (Real)6;
132 mBlend[2][2] = (Real)3 / (Real)6;
133 mBlend[2][3] = (Real)-3 / (Real)6;
134 mBlend[3][0] = (Real)0 / (Real)6;
135 mBlend[3][1] = (Real)0 / (Real)6;
136 mBlend[3][2] = (Real)0 / (Real)6;
137 mBlend[3][3] = (Real)1 / (Real)6;
141 template <
typename Real>
inline 147 template <
typename Real>
inline 153 template <
typename Real>
inline 159 template <
typename Real>
inline 165 template <
typename Real>
inline 171 template <
typename Real>
inline 177 template <
typename Real>
inline 183 template <
typename Real>
inline 189 template <
typename Real>
inline 195 template <
typename Real>
inline 201 template <
typename Real>
inline 207 template <
typename Real>
inline 213 template <
typename Real>
inline 219 template <
typename Real>
inline 225 template <
typename Real>
230 int ix =
static_cast<int>(xIndex);
242 int iy =
static_cast<int>(yIndex);
254 int iz =
static_cast<int>(zIndex);
283 Real P[4], Q[4], R[4];
289 for (
int col = 0; col < 4; ++col)
303 for (
int slice = 0; slice < 4; ++slice)
305 int zClamp = iz + slice;
317 int yClamp = iy +
row;
327 for (
int col = 0; col < 4; ++col)
329 int xClamp = ix + col;
339 result += P[col] * Q[
row] * R[slice] *
348 template <
typename Real>
350 Real
x, Real
y, Real
z)
const 354 int ix =
static_cast<int>(xIndex);
366 int iy =
static_cast<int>(yIndex);
378 int iz =
static_cast<int>(zIndex);
388 Real U[4], dx, xMult;
403 U[2] = ((Real)2) * dx;
404 U[3] = ((Real)3) * dx * dx;
412 U[3] = ((Real)6) * dx;
426 Real V[4], dy, yMult;
441 V[2] = ((Real)2) * dy;
442 V[3] = ((Real)3) * dy * dy;
450 V[3] = ((Real)6) * dy;
464 Real W[4], dz, zMult;
479 W[2] = ((Real)2) * dz;
480 W[3] = ((Real)3) * dz * dz;
488 W[3] = ((Real)6) * dz;
503 Real P[4], Q[4], R[4];
509 for (
int col = 0; col < 4; ++col)
523 for (
int slice = 0; slice < 4; ++slice)
525 int zClamp = iz + slice;
537 int yClamp = iy +
row;
547 for (
int col = 0; col < 4; ++col)
549 int xClamp = ix + col;
559 result += P[col] * Q[
row] * R[slice] *
564 result *= xMult * yMult * zMult;
#define LogAssert(condition, message)
Real const * GetF() const
Real operator()(Real x, Real y, Real z) const
GLenum GLenum GLsizei void * row
GLdouble GLdouble GLdouble z
IntpTricubic3(int xBound, int yBound, int zBound, Real xMin, Real xSpacing, Real yMin, Real ySpacing, Real zMin, Real zSpacing, Real const *F, bool catmullRom)