Core 1.0
|
Piecewise quadric curves. More...
#include <curveset.h>
Public Member Functions | |
QuadricCurveSet () | |
Creates an empty piecewise quadric curve. | |
QuadricCurveSet (const QVector< Vector > &) | |
Creates the piecewise quadric curve given a set of control points. More... | |
QuadricCurveSet (const QVector< QuadricCurve > &) | |
Create a set of quadric curves. More... | |
~QuadricCurveSet () | |
Empty. | |
Matrix | GetMatrix (const double &) const |
Compute the Frenet vectors at a given point on the curve. More... | |
Frame | GetFrame (const double &) const |
Compute the Frenet frame at a given point on the curve. More... | |
int | Size () const |
Returns the number of elements of the piecewise quadric curve. More... | |
QuadricCurve | operator() (int) const |
Read only access to the elements of the piecewise quadric curve. | |
QVector< Vector > | GetDiscretisation (const double &) const |
Generates a discretization of the curve with a linear curvilign absisca parameterization. More... | |
int | U (const double &, double &) const |
Compute the parameter of the curve corresponding to the input length. More... | |
double | R (const Vector &, double &, int &) const |
This function returns the squared distance between a point and a set of quadric curves. More... | |
Box | GetBox () const |
Compute the bounding box of the curve. | |
double | GetLength () const |
Return the length of the curve. | |
double | GetLength (int) const |
Return the length of the sub-curve. More... | |
QuadricCurveSet & | operator+= (const QuadricCurveSet &) |
Appends a piecewise cubic curve to an existing piecewise cubic curve. More... | |
Protected Attributes | |
QVector< QuadricCurve > | curve |
Set of quadric curves. | |
QVector< double > | lengths |
Length of every curve (internal optimization) | |
double | length = 0.0 |
Total length (internal optimization) | |
Piecewise quadric curves.
The array of quadric curves is stored using a QVector container so as to simplify memory management.
|
explicit |
Creates the piecewise quadric curve given a set of control points.
p | Control vertices. |
|
explicit |
Create a set of quadric curves.
s | Set of quadric curves. |
QVector< Vector > QuadricCurveSet::GetDiscretisation | ( | const double & | step | ) | const |
Generates a discretization of the curve with a linear curvilign absisca parameterization.
step | Stepping distance. |
Frame QuadricCurveSet::GetFrame | ( | const double & | u | ) | const |
Compute the Frenet frame at a given point on the curve.
u | Parameter. |
|
inline |
Return the length of the sub-curve.
k | Curve index. |
Matrix QuadricCurveSet::GetMatrix | ( | const double & | u | ) | const |
Compute the Frenet vectors at a given point on the curve.
The columns of the returned matrix contain the tangent, binormal and normal vectors.
u | Parameter. |
QuadricCurveSet & QuadricCurveSet::operator+= | ( | const QuadricCurveSet & | c | ) |
Appends a piecewise cubic curve to an existing piecewise cubic curve.
c | Argument piecewise cubic curve. |
double QuadricCurveSet::R | ( | const Vector & | p, |
double & | u, | ||
int & | k | ||
) | const |
This function returns the squared distance between a point and a set of quadric curves.
p | Point. |
u | Parameter defining the coordinate of the projection of the argument vertex onto the curve. |
k | Index of the curve for which the minimum distance was found. |
|
inline |
Returns the number of elements of the piecewise quadric curve.
k | Curve index. |
int QuadricCurveSet::U | ( | const double & | s, |
double & | u | ||
) | const |
Compute the parameter of the curve corresponding to the input length.
s | Input length. |
u | Parameter of the i-th curve. |