20 INLINE EggNurbsSurface::
21 EggNurbsSurface(
const string &name) :
EggSurface(name) {
31 INLINE EggNurbsSurface::
34 _u_knots(copy._u_knots),
35 _v_knots(copy._v_knots),
36 _u_order(copy._u_order),
37 _v_order(copy._v_order)
48 EggSurface::operator = (copy);
49 _u_knots = copy._u_knots;
50 _v_knots = copy._v_knots;
51 _u_order = copy._u_order;
52 _v_order = copy._v_order;
68 nassertv(u_order >= 1 && u_order <= 4);
84 nassertv(v_order >= 1 && v_order <= 4);
98 nassertv(k >= 0 && k < (
int)_u_knots.size());
112 nassertv(k >= 0 && k < (
int)_v_knots.size());
187 return _u_knots.size();
197 return _v_knots.size();
259 nassertr(vertex_index >= 0 && vertex_index <
get_num_cvs(), 0);
274 nassertr(vertex_index >= 0 && vertex_index <
get_num_cvs(), 0);
299 nassertr(k >= 0 && k < (
int)_u_knots.size(), 0.0);
311 nassertr(k >= 0 && k < (
int)_v_knots.size(), 0.0);
int get_u_degree() const
Returns the degree of the surface in the U direction.
int get_num_u_knots() const
Returns the number of knots in the U direction.
double get_u_knot(int k) const
Returns the nth knot value defined in the U direction.
void set_vertex(int index, EggVertex *vertex)
Replaces a particular vertex based on its index number in the list of vertices.
void set_u_knot(int k, double value)
Resets the value of the indicated knot as indicated.
void set_v_knot(int k, double value)
Resets the value of the indicated knot as indicated.
EggVertex * get_cv(int ui, int vi) const
Returns the control vertex at the indicate U, V position.
int get_v_order() const
Returns the order of the surface in the V direction.
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal...
void set_cv(int ui, int vi, EggVertex *vertex)
Redefines the control vertex associated with a particular u, v coordinate pair.
int get_v_degree() const
Returns the degree of the surface in the V direction.
void set_u_order(int u_order)
Directly changes the order in the U direction to the indicated value (which must be an integer in the...
int get_num_cvs() const
Returns the total number of control vertices that should* be defined for the surface.
int get_vertex_index(int ui, int vi) const
Returns the index number within the EggPrimitive's list of the control vertex at position ui...
A parametric NURBS surface.
void set_v_order(int v_order)
Directly changes the order in the V direction to the indicated value (which must be an integer in the...
int get_v_index(int vertex_index) const
Returns the V index number of the given vertex within the EggPrimitive's linear list of vertices...
int get_num_u_cvs() const
Returns the number of control vertices that should be present in the U direction. ...
A parametric surface of some kind.
int get_u_index(int vertex_index) const
Returns the U index number of the given vertex within the EggPrimitive's linear list of vertices...
EggVertex * get_vertex(int index) const
Returns a particular index based on its index number.
int get_num_v_knots() const
Returns the number of knots in the V direction.
double get_v_knot(int k) const
Returns the nth knot value defined in the V direction.
int get_num_v_cvs() const
Returns the number of control vertices that should be present in the V direction. ...
int get_u_order() const
Returns the order of the surface in the U direction.