#include <nurbsMatrixVector.h>
Public Member Functions | |
NurbsMatrixVector () | |
~NurbsMatrixVector () | |
int | get_num_segments () const |
Returns the number of piecewise continuous segments in the curve. | |
float | get_start_t () const |
Returns the first legal value of t on the curve. | |
float | get_end_t () const |
Returns the last legal value of t on the curve. | |
int | get_vertex_index (int segment) const |
Returns the vertex index of the nth segment. | |
float | get_from (int segment) const |
Returns the t value of the beginning of this segment. | |
float | get_to (int segment) const |
Returns the t value of the end of this segment. | |
const LMatrix4f & | get_matrix (int segment) const |
Returns the matrix associated with the nth segment. | |
float | scale_t (int segment, float t) const |
Scales the value of t into the range [0, 1] corresponding to [from, to]. | |
void | clear () |
Removes all the segments from the curve. | |
void | append_segment (int order, int vertex_index, const float knots[]) |
Computes a NURBS basis for one segment of the curve and appends it to the set of basis matrices. | |
void | compose_segment (const NurbsMatrixVector &basis, int segment, const LMatrix4f &geom) |
Appends a new segment to the vector by composing the indicated geometry matrix with the indicated basis matrix from the given vector. | |
Private Types | |
typedef pvector< Segment > | Segments |
Static Private Member Functions | |
LVecBase4f | nurbs_blending_function (int order, int i, int j, const float knots[]) |
Recursively computes the appropriate blending function for the indicated knot vector. | |
Private Attributes | |
Segments | _segments |
This is not related to NurbsCurve, ClassicNurbsCurve, CubicCurveseg or any of the ParametricCurve-derived objects in this module. It is a completely parallel implementation of NURBS curves, and will probably eventually replace the whole ParametricCurve class hierarchy.
Definition at line 55 of file nurbsMatrixVector.h.
|
Definition at line 88 of file nurbsMatrixVector.h. |
|
Definition at line 31 of file nurbsMatrixVector.I. References INLINE. |
|
Definition at line 42 of file nurbsMatrixVector.I. |
|
Computes a NURBS basis for one segment of the curve and appends it to the set of basis matrices.
Definition at line 48 of file nurbsMatrixVector.cxx. |
|
Removes all the segments from the curve.
Definition at line 33 of file nurbsMatrixVector.cxx. References nassertv. |
|
Appends a new segment to the vector by composing the indicated geometry matrix with the indicated basis matrix from the given vector.
Definition at line 91 of file nurbsMatrixVector.cxx. References nurbs_blending_function(). |
|
Returns the last legal value of t on the curve.
Definition at line 85 of file nurbsMatrixVector.I. References _segments, INLINE, and nassertr. Referenced by NurbsCurveResult::get_start_t(). |
|
Returns the t value of the beginning of this segment.
Definition at line 117 of file nurbsMatrixVector.I. References _segments, INLINE, nassertr, and t. Referenced by NurbsCurveResult::eval_segment_tangent(), and NurbsCurveResult::eval_tangent(). |
|
Returns the matrix associated with the nth segment.
Definition at line 145 of file nurbsMatrixVector.I. |
|
Returns the number of piecewise continuous segments in the curve.
Definition at line 56 of file nurbsMatrixVector.I. |
|
Returns the first legal value of t on the curve. Usually this is 0.0. Definition at line 71 of file nurbsMatrixVector.I. References _segments, INLINE, and nassertr. Referenced by NurbsCurveResult::~NurbsCurveResult(). |
|
Returns the t value of the end of this segment.
Definition at line 131 of file nurbsMatrixVector.I. Referenced by NurbsCurveResult::eval_segment_tangent(), and NurbsCurveResult::eval_tangent(). |
|
Returns the vertex index of the nth segment. This is the index number of the first associated control vertex within the source NurbsCurveEvaluator object. Definition at line 103 of file nurbsMatrixVector.I. References _segments. |
|
Recursively computes the appropriate blending function for the indicated knot vector.
Definition at line 116 of file nurbsMatrixVector.cxx. Referenced by compose_segment(). |
|
Scales the value of t into the range [0, 1] corresponding to [from, to]. Returns the scaled value. Definition at line 163 of file nurbsMatrixVector.I. Referenced by NurbsCurveResult::eval_point(), and NurbsCurveResult::get_end_t(). |
|
Definition at line 89 of file nurbsMatrixVector.h. Referenced by get_end_t(), get_from(), get_num_segments(), get_start_t(), get_vertex_index(), and ~NurbsMatrixVector(). |