16 template <
int N,
typename Real>
46 virtual void Evaluate(Real u, Real
v,
unsigned int maxOrder,
52 int iumin,
int iumax,
int ivmin,
int ivmax)
const;
60 template <
int N,
typename Real>
66 for (
int i = 0; i < 2; ++i)
90 std::copy(controls, controls + numControls,
mControls.begin());
99 template <
int N,
typename Real>
105 template <
int N,
typename Real>
111 template <
int N,
typename Real>
117 template <
int N,
typename Real>
123 template <
int N,
typename Real>
133 template <
int N,
typename Real>
146 template <
int N,
typename Real>
153 for (
int i = 0; i < 6; ++i)
160 int iumin, iumax, ivmin, ivmax;
165 values[0] =
Compute(0, 0, iumin, iumax, ivmin, ivmax);
169 values[1] =
Compute(1, 0, iumin, iumax, ivmin, ivmax);
170 values[2] =
Compute(0, 1, iumin, iumax, ivmin, ivmax);
174 values[3] =
Compute(2, 0, iumin, iumax, ivmin, ivmax);
175 values[4] =
Compute(1, 1, iumin, iumax, ivmin, ivmax);
176 values[5] =
Compute(0, 2, iumin, iumax, ivmin, ivmax);
181 template <
int N,
typename Real>
183 unsigned int vOrder,
int iumin,
int iumax,
int ivmin,
int ivmax)
const 193 for (
int iv = ivmin; iv <= ivmax; ++iv)
196 int jv = (iv >= numControls1 ? iv - numControls1 : iv);
197 for (
int iu = iumin; iu <= iumax; ++iu)
200 int ju = (iu >= numControls0 ? iu - numControls0 : iu);
201 result += (tmpu * tmpv) *
mControls[ju + numControls0 * jv];
Vector< N, Real > * GetControls()
BasisFunction< Real > const & GetBasisFunction(int dim) const
int GetNumControls(int dim) const
void SetControl(int i0, int i1, Vector< N, Real > const &control)
GLenum GLsizei GLsizei GLint * values
virtual void Evaluate(Real u, Real v, unsigned int maxOrder, Vector< N, Real > values[6]) const
BSplineSurface(BasisFunctionInput< Real > const input[2], Vector< N, Real > const *controls)
std::array< BasisFunction< Real >, 2 > mBasisFunction
Vector< N, Real > Compute(unsigned int uOrder, unsigned int vOrder, int iumin, int iumax, int ivmin, int ivmax) const
std::array< int, 2 > mNumControls
GLenum GLenum GLenum input
Vector< N, Real > const & GetControl(int i0, int i1) const
std::vector< Vector< N, Real > > mControls