23 template <
typename InputType,
typename ComputeType,
typename RationalType>
32 IntpSphere2(
int numPoints, InputType
const* theta, InputType
const* phi,
42 InputType& theta, InputType& phi);
47 bool operator()(InputType theta, InputType phi, InputType& F)
const;
56 std::unique_ptr<IntpQuadraticNonuniform2<InputType, TriangleMesh>>
mInterp;
60 template <
typename InputType,
typename ComputeType,
typename RationalType>
65 template <
typename InputType,
typename ComputeType,
typename RationalType>
67 InputType
const* theta, InputType
const* phi, InputType
const* F)
73 int totalPoints = 3 * numPoints;
75 mWrapF.resize(totalPoints);
76 for (
int i = 0; i < numPoints; ++i)
84 int i0 = 0, i1 = numPoints, i2 = 2 * numPoints;
85 for (; i0 < numPoints; ++i0, ++i1, ++i2)
89 mWrapAngles[i1][1] = mWrapAngles[i0][1];
90 mWrapAngles[i2][1] = mWrapAngles[i0][1];
96 mInterp = std::make_unique<IntpQuadraticNonuniform2<InputType, TriangleMesh>>(
100 template <
typename InputType,
typename ComputeType,
typename RationalType>
103 InputType& theta, InputType& phi)
108 if (z < (InputType)1)
110 if (z > -(InputType)1)
128 template <
typename InputType,
typename ComputeType,
typename RationalType>
130 InputType theta, InputType phi, InputType& F)
const 133 InputType thetaDeriv, phiDeriv;
134 return (*
mInterp)(angles, F, thetaDeriv, phiDeriv);
std::unique_ptr< IntpQuadraticNonuniform2< InputType, TriangleMesh > > mInterp
static void GetSphericalCoordinates(InputType x, InputType y, InputType z, InputType &theta, InputType &phi)
Delaunay2< InputType, ComputeType > mDelaunay
std::vector< InputType > mWrapF
IntpSphere2(int numPoints, InputType const *theta, InputType const *phi, InputType const *F)
GLdouble GLdouble GLdouble z
bool operator()(InputType theta, InputType phi, InputType &F) const
Delaunay2Mesh< InputType, ComputeType, RationalType > TriangleMesh
std::vector< Vector2< InputType > > mWrapAngles