17 INLINE NurbsCurveResult::
43 int segment = find_segment(t);
59 int segment = find_segment(t);
74 int segment = find_segment(t);
90 int segment = find_segment(t);
124 INLINE
int NurbsCurveResult::
125 get_num_samples()
const {
126 return (
int)_adaptive_result.size();
135 nassertr(n >= 0 && n < (
int)_adaptive_result.size(), 0.0f);
136 return _adaptive_result[n]._t;
148 nassertr(n >= 0 && n < (
int)_adaptive_result.size(), LPoint3::zero());
149 return _adaptive_result[n]._point;
157 INLINE NurbsCurveResult::AdaptiveSample::
158 AdaptiveSample(PN_stdfloat t,
const LPoint3 &point) :
void eval_segment_extended_points(int segment, PN_stdfloat t, int d, PN_stdfloat result[], int num_values) const
Simultaneously performs eval_extended_point on a contiguous sequence of dimensions.
PN_stdfloat eval_segment_extended_point(int segment, PN_stdfloat t, int d) const
Evaluates the curve in n-dimensional space according to the extended vertices associated with the cur...
int get_num_segments() const
Returns the number of piecewise continuous segments in the curve.
PN_stdfloat get_from(int segment) const
Returns the t value of the beginning of this segment.
get_sample_point
Returns the point on the curve of the nth sample point generated by the previous call to adaptive_sam...
get_sample_t
Returns the t value of the nth sample point generated by the previous call to adaptive_sample().
PN_stdfloat get_to(int segment) const
Returns the t value of the end of this segment.
PN_stdfloat get_start_t() const
Returns the first legal value of t on the curve.
bool eval_tangent(PN_stdfloat t, LVecBase3 &tangent)
Computes the tangent to the curve at the indicated point in parametric time.
void eval_segment_tangent(int segment, PN_stdfloat t, LVecBase3 &tangent) const
As eval_segment_point, but computes the tangent to the curve at the indicated point.
void eval_segment_point(int segment, PN_stdfloat t, LVecBase3 &point) const
Evaluates the point on the curve corresponding to the indicated value in parametric time within the i...
PN_stdfloat get_segment_t(int segment, PN_stdfloat t) const
Accepts a t value in the range [0, 1], and assumed to be relative to the indicated segment (as in eva...
PN_stdfloat scale_t(int segment, PN_stdfloat t) const
Scales the value of t into the range [0, 1] corresponding to [from, to].
PN_stdfloat eval_extended_point(PN_stdfloat t, int d)
Evaluates the curve in n-dimensional space according to the extended vertices associated with the cur...
bool eval_point(PN_stdfloat t, LVecBase3 &point)
Computes the point on the curve corresponding to the indicated value in parametric time.
int get_num_segments() const
Returns the number of piecewise continuous segments within the curve.
PN_stdfloat get_start_t() const
Returns the first legal value of t on the curve.
PN_stdfloat get_end_t() const
Returns the last legal value of t on the curve.
PN_stdfloat get_end_t() const
Returns the last legal value of t on the curve.
bool eval_extended_points(PN_stdfloat t, int d, PN_stdfloat result[], int num_values)
Simultaneously performs eval_extended_point on a contiguous sequence of dimensions.