14#ifndef NURBSBASISVECTOR_H
15#define NURBSBASISVECTOR_H
33class EXPCL_PANDA_PARAMETRICS NurbsBasisVector {
35 INLINE NurbsBasisVector();
36 INLINE ~NurbsBasisVector();
45 INLINE PN_stdfloat
get_from(
int segment)
const;
46 INLINE PN_stdfloat
get_to(
int segment)
const;
47 INLINE
const LMatrix4 &
get_basis(
int segment)
const;
48 INLINE PN_stdfloat
scale_t(
int segment, PN_stdfloat t)
const;
50 void clear(
int order);
56 static LVecBase4 nurbs_blending_function(
int order,
int i,
int j,
57 const PN_stdfloat knots[]);
70 typedef epvector<Segment> Segments;
void transpose()
Transposes the basis matrices stored in the vector.
int get_num_segments() const
Returns the number of piecewise continuous segments in the curve.
PN_stdfloat get_start_t() const
Returns the first legal value of t on the curve.
void append_segment(int vertex_index, const PN_stdfloat knots[])
Computes a NURBS basis for one segment of the curve and appends it to the set of basis matrices.
PN_stdfloat get_end_t() const
Returns the last legal value of t on the curve.
int get_order() const
Returns the order of the segments in the curve.
const LMatrix4 & get_basis(int segment) const
Returns the basis matrix associated with the nth segment.
PN_stdfloat get_to(int segment) const
Returns the t value of the end of this segment.
int get_vertex_index(int segment) const
Returns the vertex index of the nth segment.
void clear(int order)
Removes all the segments from the curve.
PN_stdfloat get_from(int segment) const
Returns the t value of the beginning of this segment.
PN_stdfloat scale_t(int segment, PN_stdfloat t) const
Scales the value of t into the range [0, 1] corresponding to [from, to].
This represents a single control vertex in a NurbsEvaluator.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.