Piecewise cubic curves.
More...
#include <curveset.h>
|
| CubicCurveSet () |
| Creates an empty piecewise quadric curve.
|
|
| CubicCurveSet (const QVector< CubicCurve > &) |
| Creates the piecewise quadric curve given a set of CubicCurves. More...
|
|
| 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. More...
|
|
| ~CubicCurveSet () |
| 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 |
| 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. More...
|
|
double | GetLength () const |
| Return the length of the curve.
|
|
double | GetLength (int) const |
| Return the length of the sub-curve. More...
|
|
QVector< Vector > | GetDiscretisation (const double &) const |
| Generates a discretization of the curve with a linear curvilign absisca parameterization. More...
|
|
QVector< Vector > | GetDiscretisation (const double &, QVector< Vector > &) 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 |
| Computes the squared distance between a point and a set of cubic curves. More...
|
|
|
QVector< CubicCurve > | curve |
| Set of cubic (spline) curves.
|
|
QVector< double > | lengths |
| Length of every curve (internal optimization).
|
|
double | length = 0.0 |
| Total length (internal optimization).
|
|
◆ CubicCurveSet() [1/2]
CubicCurveSet::CubicCurveSet |
( |
const QVector< CubicCurve > & |
control | ) |
|
|
explicit |
Creates the piecewise quadric curve given a set of CubicCurves.
- Parameters
-
control | Set of cubic curves. |
◆ CubicCurveSet() [2/2]
Creates the piecewise cubic curve given a set of control points with the Cattmul-Rom construction.
- Parameters
-
control | Set of points. |
ta | Starting tangent vector |
tb | Ending tangent vector |
◆ Approximate()
Approximate a piecewise cubic curve by a piecewise quadric curve.
There are twice as many quadric curves as cubic curves.
- See also
- CubicCurve::Approximate
- Parameters
-
gamma | Subdision parameter, in [0,1]. |
◆ GetDiscretisation() [1/2]
QVector< Vector > CubicCurveSet::GetDiscretisation |
( |
const double & |
s | ) |
const |
Generates a discretization of the curve with a linear curvilign absisca parameterization.
- Parameters
-
◆ GetDiscretisation() [2/2]
QVector< Vector > CubicCurveSet::GetDiscretisation |
( |
const double & |
s, |
|
|
QVector< Vector > & |
tangents |
|
) |
| const |
Generates a discretization of the curve with a linear curvilign absisca parameterization.
- Parameters
-
s | Stepping distance. |
tangents | Tangents to the curve at sample points. |
◆ GetFrame()
Frame CubicCurveSet::GetFrame |
( |
const double & |
u | ) |
const |
Compute the Frenet frame at a given point on the curve.
- Parameters
-
◆ GetLength()
double CubicCurveSet::GetLength |
( |
int |
k | ) |
const |
|
inline |
Return the length of the sub-curve.
- Parameters
-
◆ GetMatrix()
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, binormal and normal vectors.
- Parameters
-
◆ R()
double CubicCurveSet::R |
( |
const Vector & |
p, |
|
|
double & |
u, |
|
|
int & |
k |
|
) |
| const |
Computes the squared distance between a point and a set of cubic curves.
- See also
- CubicCurve::R()
- Parameters
-
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. |
◆ U()
int CubicCurveSet::U |
( |
const double & |
s, |
|
|
double & |
u |
|
) |
| const |
Compute the parameter of the curve corresponding to the input length.
- Parameters
-
s | Input length. |
u | Parameter of the i-th curve. |
- Returns
- Identifier of the curve in the piecewise definition.