21 INLINE NurbsCurveResult::
55 int segment = find_segment(t);
74 int segment = find_segment(t);
92 int segment = find_segment(t);
111 int segment = find_segment(t);
155 return (
int)_adaptive_result.size();
166 nassertr(n >= 0 && n < (
int)_adaptive_result.size(), 0.0f);
167 return _adaptive_result[n]._t;
183 nassertr(n >= 0 && n < (
int)_adaptive_result.size(),
LPoint3::zero());
184 return _adaptive_result[n]._point;
195 INLINE NurbsCurveResult::AdaptiveSample::
196 AdaptiveSample(PN_stdfloat t,
const LPoint3 &point) :
int get_num_segments() const
Returns the number of piecewise continuous segments within the curve.
This is the base class for all three-component vectors and points.
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.
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 scale_t(int segment, PN_stdfloat t) const
Scales the value of t into the range [0, 1] corresponding to [from, to].
static const LPoint3f & zero()
Returns a zero-length point.
PN_stdfloat get_sample_t(int n) const
Returns the t value of the nth sample point generated by the previous call to adaptive_sample().
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
PN_stdfloat get_end_t() const
Returns the last legal value of t on the curve.
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.
const LPoint3 & get_sample_point(int n) const
Returns the point on the curve of the nth sample point generated by the previous call to adaptive_sam...
bool eval_tangent(PN_stdfloat t, LVecBase3 &tangent)
Computes the tangent to the curve at the indicated point in parametric time.
int get_num_samples() const
Returns the number of sample points generated by the previous call to adaptive_sample().
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...
PN_stdfloat get_start_t() const
Returns the first legal value of t on the curve.
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...
PN_stdfloat get_end_t() const
Returns the last legal value of t on the curve.
PN_stdfloat get_to(int segment) const
Returns the t value of the end of this segment.
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 get_start_t() const
Returns the first 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.