Panda3D
Public Member Functions | List of all members
NurbsSurfaceResult Class Reference

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. More...

Inheritance diagram for NurbsSurfaceResult:
ReferenceCount MemoryBase

Public Member Functions

float evalExtendedPoint (float u, float v, int d)
 Evaluates the surface in n-dimensional space according to the extended vertices associated with the surface in the indicated dimension. More...
 
bool evalNormal (float u, float v, LVecBase3 normal)
 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 eval_point(). More...
 
bool evalPoint (float u, float v, LVecBase3 point)
 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. More...
 
float evalSegmentExtendedPoint (int ui, int vi, float u, float v, int d)
 Evaluates the surface in n-dimensional space according to the extended vertices associated with the surface in the indicated dimension. More...
 
 evalSegmentNormal (int ui, int vi, float u, float v, LVecBase3 normal)
 As eval_segment_point, but computes the normal to the surface at the indicated point. The normal vector will not necessarily be normalized, and could be zero. More...
 
 evalSegmentPoint (int ui, int vi, float u, float v, LVecBase3 point)
 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]. More...
 
float getEndU ()
 Returns the last legal value of u on the surface. More...
 
float getEndV ()
 Returns the last legal value of v on the surface. More...
 
int getNumUSegments ()
 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 eval_segment_point(). More...
 
int getNumVSegments ()
 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 eval_segment_point(). More...
 
float getSegmentU (int ui, float u)
 Accepts a u value in the range [0, 1], and assumed to be relative to the indicated segment (as in eval_segment_point()), and returns the corresponding u value in the entire surface (as in eval_point()). More...
 
float getSegmentV (int vi, float v)
 Accepts a v value in the range [0, 1], and assumed to be relative to the indicated segment (as in eval_segment_point()), and returns the corresponding v value in the entire surface (as in eval_point()). More...
 
float getStartU ()
 Returns the first legal value of u on the surface. Usually this is 0.0. More...
 
float getStartV ()
 Returns the first legal value of v on the surface. Usually this is 0.0. More...
 
- Public Member Functions inherited from ReferenceCount
int getRefCount ()
 Returns the current reference count. More...
 
 ref ()
 Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. More...
 
bool testRefCountIntegrity ()
 Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise. More...
 
bool testRefCountNonzero ()
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise. More...
 
bool unref ()
 Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic.) However, see the helper function unref_delete(). More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ReferenceCount
static TypeHandle getClassType ()
 

Detailed Description

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.

Member Function Documentation

◆ evalExtendedPoint()

float evalExtendedPoint ( float  u,
float  v,
int  d 
)

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

◆ evalNormal()

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

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 eval_point().

◆ evalPoint()

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

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()

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

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

◆ evalSegmentNormal()

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

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

◆ evalSegmentPoint()

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

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, eval_point() is used to evaluate a point along the continuous surface, but when you care more about local continuity, you can use eval_segment_point() to evaluate the points along each segment.

◆ getEndU()

float getEndU ( )

Returns the last legal value of u on the surface.

◆ getEndV()

float getEndV ( )

Returns the last legal value of v on the surface.

◆ getNumUSegments()

int getNumUSegments ( )

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 eval_segment_point().

◆ getNumVSegments()

int getNumVSegments ( )

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 eval_segment_point().

◆ getSegmentU()

float getSegmentU ( int  ui,
float  u 
)

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

◆ getSegmentV()

float getSegmentV ( int  vi,
float  v 
)

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

◆ getStartU()

float getStartU ( )

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

◆ getStartV()

float getStartV ( )

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