Core 1.0
BezierCurve Class Reference

Bézier curves. More...

#include <bezier.h>

Public Member Functions

 BezierCurve ()
 Empty.
 
 BezierCurve (const QVector< Vector > &)
 Create a Bézier curve.
 
 ~BezierCurve ()
 Empty.
 
int Degree () const
 Return the degree of the curve.
 
Vector Vertex (int) const
 Return the control point.
 
Vector Point (const double &) const
 Compute a point on the curve.
 
Vector Tangent (const double &) const
 Compute the tangent at a given point on the curve.
 
Vector Second (const double &) const
 Compute the secondary derivative a given point on the curve.
 
Vector DeCasteljau (const double &) const
 Compute a point on the curve using De Casteljau's algorithm.
 
Box GetBox () const
 Return the bounding box.
 
void Rotate (const Matrix &)
 Rotates a patch.
 
void Translate (const Vector &)
 Translation.
 
void Scale (const Vector &)
 Scale.
 
void Transform (const Frame &)
 Transforms the curve.
 

Protected Attributes

QVector< Vectorc
 Control points.
 

Detailed Description

Bézier curves.

Constructor & Destructor Documentation

◆ BezierCurve()

BezierCurve::BezierCurve ( const QVector< Vector > & c)
explicit

Create a Bézier curve.

Parameters
cSet of control points.

Member Function Documentation

◆ DeCasteljau()

Vector BezierCurve::DeCasteljau ( const double & u) const

Compute a point on the curve using De Casteljau's algorithm.

Parameters
uCoordinates.

◆ Point()

Vector BezierCurve::Point ( const double & u) const

Compute a point on the curve.

Parameters
uCoordinates.

◆ Rotate()

void BezierCurve::Rotate ( const Matrix & r)

Rotates a patch.

Parameters
rRotation matrix.

◆ Scale()

void BezierCurve::Scale ( const Vector & s)

Scale.

Parameters
sScaling vector.

◆ Second()

Vector BezierCurve::Second ( const double & u) const

Compute the secondary derivative a given point on the curve.

Parameters
uCoordinates.

◆ Tangent()

Vector BezierCurve::Tangent ( const double & u) const

Compute the tangent at a given point on the curve.

Parameters
uCoordinates.

◆ Transform()

void BezierCurve::Transform ( const Frame & frame)

Transforms the curve.

Parameters
frameTransformation.

◆ Translate()

void BezierCurve::Translate ( const Vector & t)

Translation.

Parameters
tTranslation vector.

◆ Vertex()

Vector BezierCurve::Vertex ( int i) const
inline

Return the control point.

Parameters
iIndex.