# Curves [Math Module]

## Classes

class  common::CubicBezierCurveIntegral< T >

## Functions

template<typename T >
void common::EvalCatmullRomCurve (T *out, const T &a, const T &b, const T &c, const T &d, float t)
Calculates value of Catmull-Rom curve at given point t = 0..1 between points b and c.
template<typename T >
void common::EvalCatmullRomCurveDiff (T *out, const T &a, const T &b, const T &c, const T &d, float t)
Evaluates tangent (not normalized) of Catmull-Rom curve at given point t = 0..1 between points b and c.
template<typename T >
void common::EvalQuadraticBezierCurve (T *out, const T &a, const T &b, const T &c, float t)
Calculates value of quadratic Bezier curve at given point t = 0..1 between points a and c.
template<typename T >
void common::EvalCubicBezierCurve (T *out, const T &a, const T &b, const T &c, const T &d, float t)
Calculates value of cubic Bezier curve at given point t = 0..1 between points a and d.
template<typename T >
void common::EvalCubicBezierCurveDiff (T *out, const T &a, const T &b, const T &c, const T &d, float t)
Evaluates tangent (not normalized) of cubic Bezier curve at given point t = 0..1 between points a and d.
template<typename T >
void common::SplitCubicBezierCurve (T out1[4], T out2[4], const T &a, const T &b, const T &c, const T &d)
Splits cubic Bezier curve in the middle (at t=0.5) into two cubic Bezier curves.
template<typename T >
void common::SplitCubicBezierCurve (T out1[4], T out2[4], const T &a, const T &b, const T &c, const T &d, float t)
Splits cubic Bezier curve in the given point (at parameter t) into two cubic Bezier curves.
float common::CalcCubicBezierCurveLength (const VEC3 &a, const VEC3 &b, const VEC3 &c, const VEC3 &d, float t1, float t2)
float common::GetCubicBezierCurveArcLengthParam (const VEC3 &a, const VEC3 &b, const VEC3 &c, const VEC3 &d, float len, float epsilon)
bool common::IntersectCubicBezierCurve2DWithX (const VEC2 curve[4], float x, float eps, float *outY, float *outT, float t0=0.f, float t1=1.f)
Calculates Y value and T parameter of cubic Bezier curve intersected with axis-aligned line x.

## Function Documentation

 float common::CalcCubicBezierCurveLength ( const VEC3 & a, const VEC3 & b, const VEC3 & c, const VEC3 & d, float t1, float t2 )
template<typename T >
 void common::EvalCatmullRomCurve ( T * out, const T & a, const T & b, const T & c, const T & d, float t ) ` [inline]`

Calculates value of Catmull-Rom curve at given point t = 0..1 between points b and c.

Params a, b, c, d are four control points.
Use types like float, VEC2, VEC3, VEC4 as T.

template<typename T >
 void common::EvalCatmullRomCurveDiff ( T * out, const T & a, const T & b, const T & c, const T & d, float t ) ` [inline]`

Evaluates tangent (not normalized) of Catmull-Rom curve at given point t = 0..1 between points b and c.

Params a, b, c, d are four control points.
Use types like float, VEC2, VEC3, VEC4 as T.

template<typename T >
 void common::EvalCubicBezierCurve ( T * out, const T & a, const T & b, const T & c, const T & d, float t ) ` [inline]`

Calculates value of cubic Bezier curve at given point t = 0..1 between points a and d.

Params b, c are control points of the curve.
Use types like float, VEC2, VEC3, VEC4 as T.

template<typename T >
 void common::EvalCubicBezierCurveDiff ( T * out, const T & a, const T & b, const T & c, const T & d, float t ) ` [inline]`

Evaluates tangent (not normalized) of cubic Bezier curve at given point t = 0..1 between points a and d.

Params b, c are control points of the curve.
Use types like float, VEC2, VEC3, VEC4 as T.

template<typename T >
 void common::EvalQuadraticBezierCurve ( T * out, const T & a, const T & b, const T & c, float t ) ` [inline]`

Calculates value of quadratic Bezier curve at given point t = 0..1 between points a and c.

Param b is a control points of the curve.
Use types like float, VEC2, VEC3, VEC4 as T.

 float common::GetCubicBezierCurveArcLengthParam ( const VEC3 & a, const VEC3 & b, const VEC3 & c, const VEC3 & d, float len, float epsilon )
 bool common::IntersectCubicBezierCurve2DWithX ( const VEC2 curve[4], float x, float eps, float * outY, float * outT, float t0 = `0.f`, float t1 = `1.f` )

Calculates Y value and T parameter of cubic Bezier curve intersected with axis-aligned line x.

template<typename T >
 void common::SplitCubicBezierCurve ( T out1[4], T out2[4], const T & a, const T & b, const T & c, const T & d, float t ) ` [inline]`

Splits cubic Bezier curve in the given point (at parameter t) into two cubic Bezier curves.

a, b, c, d are points of the input curve.
out1[0], out1[1], out1[2], out1[3] will be points of the first output curve.
out2[0], out2[1], out2[2], out2[3] will be points of the second output curve. Use types like float, VEC2, VEC3, VEC4 as T.

template<typename T >
 void common::SplitCubicBezierCurve ( T out1[4], T out2[4], const T & a, const T & b, const T & c, const T & d ) ` [inline]`

Splits cubic Bezier curve in the middle (at t=0.5) into two cubic Bezier curves.

a, b, c, d are points of the input curve.
out1[0], out1[1], out1[2], out1[3] will be points of the first output curve.
out2[0], out2[1], out2[2], out2[3] will be points of the second output curve. Use types like float, VEC2, VEC3, VEC4 as T.

Generated on Wed Dec 16 20:44:53 2009 for CommonLib by  1.6.1