93 double b0 = (1 - t) * (1 - t) * (1 - t);
94 double b1 = 3 * t * (1 - t) * (1 - t);
95 double b2 = 3 * t * t * (1 - t);
96 double b3 = t * t * t;
98 return (P[0] * b0 + P[1] * b1 + P[2] * b2 + P[3] * b3);
121 for (
int i = 0; i < 4; ++i)
146 const double t = a_t;
148 return ((-3 * (1 - t) * (1 - t) * P[0] +
149 (3 * (1 - t) * (1 - t) - 6 * t * (1 - t)) * P[1] +
150 (6 * t * (1 - t) - 3 * t * t) * P[2] +
176 for (
int i = 0; i < 4; ++i) {
177 P[0] = a_controlPoints[i];
178 P[1] = a_controlPoints[4 + i];
179 P[2] = a_controlPoints[8 + i];
180 P[3] = a_controlPoints[12 + i];
208 for (
int i = 0; i < 4; ++i) {
252 //------------------------------------------------------------------------------ This class implements a 3D vector.
Definition: CVector3d.h:88
cVector3d cEvalBezierCurve(const cVector3d *a_controlPoints, double a_t)
This function determines the position of a point along a Bezier curve.
Definition: CBezier.h:88
Implements general math utility functions.
cVector3d cDerivVBezier(const cVector3d *a_controlPoints, double a_u, double a_v)
This function determines the derivative of a point on a Bezier patch along the v parametric direction...
Definition: CBezier.h:205
void normalize()
This method normalizes this vector to length 1.
Definition: CVector3d.h:1054
cVector3d cDerivUBezier(const cVector3d *a_controlPoints, double a_u, double a_v)
This function determines the derivative of a point on a Bezier patch along the u parametric direction...
Definition: CBezier.h:172
cVector3d cDerivBezier(const cVector3d *a_controlPoints, double a_t)
This function determines the derivative of a point along a Bezier curve.
Definition: CBezier.h:143
cVector3d cEvalBezierPatch(const cVector3d *a_controlPoints, double a_u, double a_v)
This function determines the position of a point along a Bezier patch.
Definition: CBezier.h:118
cVector3d cCross(const cVector3d &a_vector1, const cVector3d &a_vector2)
This function computes the cross product between two vectors.
Definition: CMaths.h:881
Definition: CAudioBuffer.cpp:56
cVector3d cSurfaceNormalBezier(const cVector3d *a_controlPoints, double a_u, double a_v)
This function determines the surface normal at a point on a Bezier patch.
Definition: CBezier.h:232