|
Core 1.0
|
Piecewise cubic curves. More...
#include <curveset.h>
Public Member Functions | |
| CubicCurveSet () | |
| Creates an empty piecewise quadric curve. | |
| CubicCurveSet (const QVector< CubicCurve > &) | |
| Creates the piecewise cubic curve given a set. | |
| CubicCurveSet (const QVector< Vector > &, const Vector &=Vector::Null, const Vector &=Vector::Null) | |
| Creates the piecewise cubic curve given a set of control points with the Cattmul-Rom construction. | |
| ~CubicCurveSet () | |
| Empty. | |
| Matrix | GetMatrix (const double &) const |
| Compute the Frenet vectors at a given point on the curve. | |
| Frame | GetFrame (const double &) const |
| Compute the Frenet frame at a given point on the curve. | |
| int | Size () const |
| Return the number of elements of the piecewise cubic curve. | |
| Box | GetBox () const |
| Compute the bounding box of the curve. | |
| QuadricCurveSet | Approximate (double) const |
| Approximate a piecewise cubic curve by a piecewise quadric curve. | |
| double | GetLength () const |
| Return the length of the curve. | |
| double | GetLength (int) const |
| Return the length of the sub-curve. | |
| QVector< Vector > | GetDiscretisation (const double &) const |
| Generates a discretization of the curve with a linear curvilign absisca parameterization. | |
| QVector< Vector > | Discretize (const double &, QVector< Vector > &) const |
| Generates a discretization of the curve with a linear curvilign absisca parameterization. | |
| QVector< Vector > | Discretize2 (const double &t) const |
| Generates a discretization of the curve. | |
| int | UCC (const double &, double &) const |
| Compute the parameter of the curve corresponding to the input length. | |
| double | R (const Vector &, double &, int &) const |
| Computes the squared distance between a point and a set of cubic curves. | |
Protected Attributes | |
| QVector< CubicCurve > | curve |
| Set of cubic (spline) curves. | |
| QVector< double > | qlengths |
| Length of every curve (internal optimization). | |
| double | qqlength = 0.0 |
| Total length (internal optimization). | |
Piecewise cubic curves.
|
explicit |
Creates the piecewise cubic curve given a set.
| control | Set of cubic curves. |
|
explicit |
Creates the piecewise cubic curve given a set of control points with the Cattmul-Rom construction.
| control | Set of points. |
| ta | Starting tangent vector |
| tb | Ending tangent vector |
| QuadricCurveSet CubicCurveSet::Approximate | ( | double | gamma | ) | const |
Approximate a piecewise cubic curve by a piecewise quadric curve.
There are twice as many quadric curves as cubic curves.
| gamma | Subdision parameter, in [0,1]. |
| QVector< Vector > CubicCurveSet::Discretize | ( | const double & | t, |
| QVector< Vector > & | tangents ) const |
Generates a discretization of the curve with a linear curvilign absisca parameterization.
| t | Stepping distance. |
| tangents | Tangents to the curve at sample points. |
< Parameter on the curve.
< Point on the curve.
< Cumulated length
| QVector< Vector > CubicCurveSet::Discretize2 | ( | const double & | t | ) | const |
Generates a discretization of the curve.
Uses a linear curvilign absisca parameterization approximation.
| t | Step. |
< Parameter on the curve.
< Point on the curve.
< Cumulated length
| QVector< Vector > CubicCurveSet::GetDiscretisation | ( | const double & | s | ) | const |
Generates a discretization of the curve with a linear curvilign absisca parameterization.
| s | Stepping distance. |
| Frame CubicCurveSet::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 CubicCurveSet::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, normal and binormal vectors.
| u | Parameter. |
| double CubicCurveSet::R | ( | const Vector & | p, |
| double & | u, | ||
| int & | k ) const |
Computes the squared distance between a point and a set of cubic 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. |
| int CubicCurveSet::UCC | ( | 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. |