NurbsCurveResult
from panda3d.core import NurbsCurveResult
- class NurbsCurveResult
Bases:
ReferenceCount
The result of a NurbsCurveEvaluator. This object represents a curve in a particular coordinate space. It can return the point and/or tangent to the curve at any point.
This is not related to NurbsCurve, 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.
Inheritance diagram
- __init__(*args, **kwargs)
- adaptiveSample()
C++ Interface: adaptive_sample(const NurbsCurveResult self, float tolerance)
- /**
Determines the set of subdivisions necessary to approximate the curve with
a set of linear segments, no point of which is farther than tolerance units
from the actual curve.
After this call, you may walk through the resulting set of samples with
get_num_samples(), get_sample_t(), and get_sample_point().
*/
- adaptive_sample()
C++ Interface: adaptive_sample(const NurbsCurveResult self, float tolerance)
- /**
Determines the set of subdivisions necessary to approximate the curve with
a set of linear segments, no point of which is farther than tolerance units
from the actual curve.
After this call, you may walk through the resulting set of samples with
get_num_samples(), get_sample_t(), and get_sample_point().
*/
- evalExtendedPoint()
C++ Interface: eval_extended_point(const NurbsCurveResult self, float t, int d)
- /**
Evaluates the curve in n-dimensional space according to the extended
vertices associated with the curve in the indicated dimension.
*/
- evalExtendedPoints()
C++ Interface: eval_extended_points(const NurbsCurveResult self, float t, int d, buffer result, int num_values)
- /**
Simultaneously performs eval_extended_point on a contiguous sequence of
dimensions. The dimensions evaluated are d through (d + num_values - 1);
the results are filled into the num_values elements in the indicated result
array.
*/
- evalPoint()
C++ Interface: eval_point(const NurbsCurveResult self, float t, LVecBase3f point)
- /**
Computes the point on the curve corresponding to the indicated value in
parametric time. Returns true if the t value is valid, false otherwise.
*/
- evalSegmentExtendedPoint()
C++ Interface: eval_segment_extended_point(NurbsCurveResult self, int segment, float t, int d)
- /**
Evaluates the curve in n-dimensional space according to the extended
vertices associated with the curve in the indicated dimension.
*/
- evalSegmentExtendedPoints()
C++ Interface: eval_segment_extended_points(NurbsCurveResult self, int segment, float t, int d, buffer result, int num_values)
- /**
Simultaneously performs eval_extended_point on a contiguous sequence of
dimensions. The dimensions evaluated are d through (d + num_values - 1);
the results are filled into the num_values elements in the indicated result
array.
*/
- evalSegmentPoint()
C++ Interface: eval_segment_point(NurbsCurveResult self, int segment, float t, LVecBase3f point)
- /**
Evaluates the point on the curve corresponding to the indicated value in
parametric time within the indicated curve segment. t should be in the
range [0, 1].
The curve is internally represented as a number of connected (or possibly
unconnected) piecewise continuous segments. The exact number of segments
for a particular curve depends on the knot vector, and is returned by
get_num_segments(). Normally, eval_point() is used to evaluate a point
along the continuous curve, but when you care more about local continuity,
you can use eval_segment_point() to evaluate the points along each segment.
*/
- evalSegmentTangent()
C++ Interface: eval_segment_tangent(NurbsCurveResult self, int segment, float t, LVecBase3f tangent)
- /**
As eval_segment_point, but computes the tangent to the curve at the
indicated point. The tangent vector will not necessarily be normalized,
and could be zero, particularly at the endpoints.
*/
- evalTangent()
C++ Interface: eval_tangent(const NurbsCurveResult self, float t, LVecBase3f tangent)
- /**
Computes the tangent to the curve at the indicated point in parametric
time. This tangent vector will not necessarily be normalized, and could be
zero. See also eval_point().
*/
- eval_extended_point()
C++ Interface: eval_extended_point(const NurbsCurveResult self, float t, int d)
- /**
Evaluates the curve in n-dimensional space according to the extended
vertices associated with the curve in the indicated dimension.
*/
- eval_extended_points()
C++ Interface: eval_extended_points(const NurbsCurveResult self, float t, int d, buffer result, int num_values)
- /**
Simultaneously performs eval_extended_point on a contiguous sequence of
dimensions. The dimensions evaluated are d through (d + num_values - 1);
the results are filled into the num_values elements in the indicated result
array.
*/
- eval_point()
C++ Interface: eval_point(const NurbsCurveResult self, float t, LVecBase3f point)
- /**
Computes the point on the curve corresponding to the indicated value in
parametric time. Returns true if the t value is valid, false otherwise.
*/
- eval_segment_extended_point()
C++ Interface: eval_segment_extended_point(NurbsCurveResult self, int segment, float t, int d)
- /**
Evaluates the curve in n-dimensional space according to the extended
vertices associated with the curve in the indicated dimension.
*/
- eval_segment_extended_points()
C++ Interface: eval_segment_extended_points(NurbsCurveResult self, int segment, float t, int d, buffer result, int num_values)
- /**
Simultaneously performs eval_extended_point on a contiguous sequence of
dimensions. The dimensions evaluated are d through (d + num_values - 1);
the results are filled into the num_values elements in the indicated result
array.
*/
- eval_segment_point()
C++ Interface: eval_segment_point(NurbsCurveResult self, int segment, float t, LVecBase3f point)
- /**
Evaluates the point on the curve corresponding to the indicated value in
parametric time within the indicated curve segment. t should be in the
range [0, 1].
The curve is internally represented as a number of connected (or possibly
unconnected) piecewise continuous segments. The exact number of segments
for a particular curve depends on the knot vector, and is returned by
get_num_segments(). Normally, eval_point() is used to evaluate a point
along the continuous curve, but when you care more about local continuity,
you can use eval_segment_point() to evaluate the points along each segment.
*/
- eval_segment_tangent()
C++ Interface: eval_segment_tangent(NurbsCurveResult self, int segment, float t, LVecBase3f tangent)
- /**
As eval_segment_point, but computes the tangent to the curve at the
indicated point. The tangent vector will not necessarily be normalized,
and could be zero, particularly at the endpoints.
*/
- eval_tangent()
C++ Interface: eval_tangent(const NurbsCurveResult self, float t, LVecBase3f tangent)
- /**
Computes the tangent to the curve at the indicated point in parametric
time. This tangent vector will not necessarily be normalized, and could be
zero. See also eval_point().
*/
- getEndT()
C++ Interface: get_end_t(NurbsCurveResult self)
- /**
Returns the last legal value of t on the curve.
*/
- getNumSamples()
C++ Interface: get_num_samples(NurbsCurveResult self)
- /**
Returns the number of sample points generated by the previous call to
adaptive_sample().
*/
- getNumSegments()
C++ Interface: get_num_segments(NurbsCurveResult self)
- /**
Returns the number of piecewise continuous segments within the curve. This
number is usually not important unless you plan to call
eval_segment_point().
*/
- getSamplePoint()
C++ Interface: get_sample_point(NurbsCurveResult self, int n)
- /**
Returns the point on the curve of the nth sample point generated by the
previous call to adaptive_sample().
For tangents, or extended points, you should use get_sample_t() and pass it
into eval_tangent() or eval_extended_point().
*/
- getSamplePoints()
- getSampleT()
C++ Interface: get_sample_t(NurbsCurveResult self, int n)
- /**
Returns the t value of the nth sample point generated by the previous call
to adaptive_sample().
*/
- getSampleTs()
- getSegmentT()
C++ Interface: get_segment_t(NurbsCurveResult self, int segment, float t)
- /**
Accepts a t value in the range [0, 1], and assumed to be relative to the
indicated segment (as in eval_segment_point()), and returns the
corresponding t value in the entire curve (as in eval_point()).
*/
- getStartT()
C++ Interface: get_start_t(NurbsCurveResult self)
- /**
Returns the first legal value of t on the curve. Usually this is 0.0.
*/
- get_end_t()
C++ Interface: get_end_t(NurbsCurveResult self)
- /**
Returns the last legal value of t on the curve.
*/
- get_num_samples()
C++ Interface: get_num_samples(NurbsCurveResult self)
- /**
Returns the number of sample points generated by the previous call to
adaptive_sample().
*/
- get_num_segments()
C++ Interface: get_num_segments(NurbsCurveResult self)
- /**
Returns the number of piecewise continuous segments within the curve. This
number is usually not important unless you plan to call
eval_segment_point().
*/
- get_sample_point()
C++ Interface: get_sample_point(NurbsCurveResult self, int n)
- /**
Returns the point on the curve of the nth sample point generated by the
previous call to adaptive_sample().
For tangents, or extended points, you should use get_sample_t() and pass it
into eval_tangent() or eval_extended_point().
*/
- get_sample_points()
- get_sample_t()
C++ Interface: get_sample_t(NurbsCurveResult self, int n)
- /**
Returns the t value of the nth sample point generated by the previous call
to adaptive_sample().
*/
- get_sample_ts()