panda3d.core.NurbsSurfaceResult

class NurbsSurfaceResult

Bases: ReferenceCount

The result of a NurbsSurfaceEvaluator. This object represents a surface in a particular coordinate space. It can return the point and/or normal to the surface at any point.

Inheritance diagram

Inheritance diagram of NurbsSurfaceResult

__init__(param0: NurbsSurfaceResult) → None
evalExtendedPoint(u: float, v: float, d: int) → float

Evaluates the surface in n-dimensional space according to the extended vertices associated with the surface in the indicated dimension.

evalExtendedPoints(u: float, v: float, d: int, result: PN_stdfloat_[], num_values: int) → bool

Simultaneously performs evalExtendedPoint() 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.

evalNormal(u: float, v: float, normal: LVecBase3) → bool

Computes the normal to the surface at the indicated point in parametric time. This normal vector will not necessarily be normalized, and could be zero. See also evalPoint().

evalPoint(u: float, v: float, point: LVecBase3) → bool

Computes the point on the surface corresponding to the indicated value in parametric time. Returns true if the u, v values are valid, false otherwise.

evalSegmentExtendedPoint(ui: int, vi: int, u: float, v: float, d: int) → float

Evaluates the surface in n-dimensional space according to the extended vertices associated with the surface in the indicated dimension.

evalSegmentExtendedPoints(ui: int, vi: int, u: float, v: float, d: int, result: PN_stdfloat_[], num_values: int) → None

Simultaneously performs evalExtendedPoint() 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.

evalSegmentNormal(ui: int, vi: int, u: float, v: float, normal: LVecBase3) → None

As evalSegmentPoint(), but computes the normal to the surface at the indicated point. The normal vector will not necessarily be normalized, and could be zero.

evalSegmentPoint(ui: int, vi: int, u: float, v: float, point: LVecBase3) → None

Evaluates the point on the surface corresponding to the indicated value in parametric time within the indicated surface segment. u and v should be in the range [0, 1].

The surface is internally represented as a number of connected (or possibly unconnected) piecewise continuous segments. The exact number of segments for a particular surface depends on the knot vector, and is returned by get_num_segments(). Normally, evalPoint() is used to evaluate a point along the continuous surface, but when you care more about local continuity, you can use evalSegmentPoint() to evaluate the points along each segment.

getEndU() → float

Returns the last legal value of u on the surface.

getEndV() → float

Returns the last legal value of v on the surface.

getNumUSegments() → int

Returns the number of piecewise continuous segments within the surface in the U direction. This number is usually not important unless you plan to call evalSegmentPoint().

getNumVSegments() → int

Returns the number of piecewise continuous segments within the surface in the V direction. This number is usually not important unless you plan to call evalSegmentPoint().

getSegmentU(ui: int, u: float) → float

Accepts a u value in the range [0, 1], and assumed to be relative to the indicated segment (as in evalSegmentPoint()), and returns the corresponding u value in the entire surface (as in evalPoint()).

getSegmentV(vi: int, v: float) → float

Accepts a v value in the range [0, 1], and assumed to be relative to the indicated segment (as in evalSegmentPoint()), and returns the corresponding v value in the entire surface (as in evalPoint()).

getStartU() → float

Returns the first legal value of u on the surface. Usually this is 0.0.

getStartV() → float

Returns the first legal value of v on the surface. Usually this is 0.0.