Panda3D
Public Member Functions

NurbsVertex Class Reference

This represents a single control vertex in a NurbsEvaluator. More...

#include "nurbsVertex.h"

List of all members.

Public Member Functions

 NurbsVertex (const NurbsVertex &copy)
PN_stdfloat get_extended_vertex (int d) const
 Returns an n-dimensional vertex value.
NodePath get_space (const NodePath &rel_to) const
const LVecBase4get_vertex () const
void operator= (const NurbsVertex &copy)
void set_extended_vertex (int d, PN_stdfloat value)
 Sets an n-dimensional vertex value.
void set_space (const string &space)
 Sets the space of this vertex as a relative path from the rel_to node.
void set_space (const NodePath &space)
 Sets the space of this vertex as a fixed NodePath.
void set_vertex (const LVecBase4 &vertex)

Detailed Description

This represents a single control vertex in a NurbsEvaluator.

It may be relative to a particular coordinate space; or its coordinate space may be unspecified.

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.

Definition at line 36 of file nurbsVertex.h.


Member Function Documentation

PN_stdfloat NurbsVertex::get_extended_vertex ( int  d) const

Returns an n-dimensional vertex value.

See set_extended_vertex(). This returns the value set for the indicated dimension, or 0.0 if nothing has been set.

Definition at line 54 of file nurbsVertex.cxx.

Referenced by NurbsCurveResult::eval_segment_extended_point(), NurbsSurfaceResult::eval_segment_extended_point(), NurbsSurfaceResult::eval_segment_extended_points(), NurbsCurveResult::eval_segment_extended_points(), and NurbsSurfaceEvaluator::get_extended_vertex().

void NurbsVertex::set_extended_vertex ( int  d,
PN_stdfloat  value 
)

Sets an n-dimensional vertex value.

This allows definition of a NURBS surface or curve in a sparse n-dimensional space, typically used for associating additional properties (like color or joint membership) with each vertex of a surface.

The value d is an arbitrary integer value and specifies the dimension of question for this particular vertex. Any number of dimensions may be specified, and they need not be consecutive. If a value for a given dimension is not specified, is it implicitly 0.0.

The value is implicitly scaled by the homogenous weight value--that is, the fourth component of the value passed to set_vertex(). This means the ordinary vertex must be set first, before the extended vertices can be set.

Definition at line 41 of file nurbsVertex.cxx.

Referenced by NurbsSurfaceEvaluator::set_extended_vertex(), and NurbsSurfaceEvaluator::set_extended_vertices().

void NurbsVertex::set_space ( const NodePath space) [inline]

Sets the space of this vertex as a fixed NodePath.

Definition at line 85 of file nurbsVertex.I.

Referenced by NurbsSurfaceEvaluator::set_vertex_space().

void NurbsVertex::set_space ( const string &  space) [inline]

Sets the space of this vertex as a relative path from the rel_to node.

Definition at line 97 of file nurbsVertex.I.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations