17 template <
int N,
typename Real>
40 virtual void Evaluate(Real
t,
unsigned int maxOrder,
53 template <
int N,
typename Real>
58 template <
int N,
typename Real>
66 if (degree < 2 || !controls)
85 for (
int i = 0; i < mNumControls - 2; ++i)
94 for (
int i = 0; i < mNumControls - 3; ++i)
106 for (
int i = 2; i <=
mDegree; ++i)
110 for (
int j = 1; j < i; ++j)
119 template <
int N,
typename Real>
inline 125 template <
int N,
typename Real>
inline 131 template <
int N,
typename Real>
inline 137 template <
int N,
typename Real>
152 Real omt = (Real)1 - t;
153 values[0] =
Compute(t, omt, 0);
157 values[1] =
Compute(t, omt, 1);
161 values[2] =
Compute(t, omt, 2);
162 if (maxOrder >= 3 &&
mDegree >= 3)
165 values[3] =
Compute(t, omt, 3);
175 template <
int N,
typename Real>
183 for (
int i = 1; i < isup; ++i)
186 result = (result + c * mControls[
order][i]) * omt;
189 result = (result + tpow * mControls[
order][isup]);
192 for (
int i = 0; i <
order; ++i)
196 result *= (Real)multiplier;
GLfixed GLfixed GLint GLint order
int GetNumControls() const
GLenum GLsizei GLsizei GLint * values
virtual void Evaluate(Real t, unsigned int maxOrder, Vector< N, Real > values[4]) const
#define LogError(message)
Vector< N, Real > Compute(Real t, Real omt, int order) const
Vector< N, Real > const * GetControls() const
BezierCurve(int degree, Vector< N, Real > const *controls)
std::vector< Vector< N, Real > > mControls[4]