17 INLINE EggNurbsSurface::
18 EggNurbsSurface(
const std::string &name) :
EggSurface(name) {
26 INLINE EggNurbsSurface::
29 _u_knots(copy._u_knots),
30 _v_knots(copy._v_knots),
31 _u_order(copy._u_order),
32 _v_order(copy._v_order)
41 EggSurface::operator = (copy);
42 _u_knots = copy._u_knots;
43 _v_knots = copy._v_knots;
44 _u_order = copy._u_order;
45 _v_order = copy._v_order;
57 nassertv(u_order >= 1 && u_order <= 4);
69 nassertv(v_order >= 1 && v_order <= 4);
80 nassertv(k >= 0 && k < (
int)_u_knots.size());
91 nassertv(k >= 0 && k < (
int)_v_knots.size());
147 INLINE
int EggNurbsSurface::
148 get_num_u_knots()
const {
149 return _u_knots.size();
155 INLINE
int EggNurbsSurface::
156 get_num_v_knots()
const {
157 return _v_knots.size();
204 nassertr(vertex_index >= 0 && vertex_index <
get_num_cvs(), 0);
216 nassertr(vertex_index >= 0 && vertex_index <
get_num_cvs(), 0);
236 nassertr(k >= 0 && k < (
int)_u_knots.size(), 0.0);
245 nassertr(k >= 0 && k < (
int)_v_knots.size(), 0.0);
get_num_v_knots
Returns the number of knots in the V direction.
get_num_u_knots
Returns the number of knots in the U direction.
int get_u_degree() const
Returns the degree of the surface in the U direction.
int get_num_u_cvs() const
Returns the number of control vertices that should be present in the U direction.
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.
void set_u_knot(int k, double value)
Resets the value of the indicated knot as indicated.
get_v_knot
Returns the nth knot value defined in the V direction.
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,...
get_vertex
Returns a particular index based on its index number.
int get_num_v_cvs() const
Returns the number of control vertices that should be present in the V direction.
set_vertex
Replaces a particular vertex based on its index number in the list of vertices.
int get_u_order() const
Returns the order of the surface in the U direction.
void set_v_knot(int k, double value)
Resets the value of the indicated knot as indicated.
int get_num_cvs() const
Returns the total number of control vertices that *should* be defined for the surface.
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal.
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.
void set_cv(int ui, int vi, EggVertex *vertex)
Redefines the control vertex associated with a particular u, v coordinate pair.
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_v_order() const
Returns the order of the surface in the V direction.
get_u_knot
Returns the nth knot value defined in the U direction.
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...
A parametric surface of some kind.
int get_v_degree() const
Returns the degree of the surface in the V direction.
EggVertex * get_cv(int ui, int vi) const
Returns the control vertex at the indicate U, V position.