29 _u_knots_dirty =
true;
30 _u_basis_dirty =
true;
57 _v_knots_dirty =
true;
58 _v_basis_dirty =
true;
81 return _num_u_vertices;
93 return _num_v_vertices;
107 nassertv(ui >= 0 && ui < _num_u_vertices &&
108 vi >= 0 && vi < _num_v_vertices);
109 vert(ui, vi).set_vertex(vertex);
122 nassertv(ui >= 0 && ui < _num_u_vertices &&
123 vi >= 0 && vi < _num_v_vertices);
124 vert(ui, vi).set_vertex(
LVecBase4(vertex[0] * weight, vertex[1] * weight, vertex[2] * weight, weight));
135 nassertr(ui >= 0 && ui < _num_u_vertices &&
137 return vert(ui, vi).get_vertex();
148 nassertr(ui >= 0 && ui < _num_u_vertices &&
151 NodePath space = vert(ui, vi).get_space(rel_to);
152 const LVecBase4 &vertex = vert(ui, vi).get_vertex();
176 nassertv(ui >= 0 && ui < _num_u_vertices &&
177 vi >= 0 && vi < _num_v_vertices);
195 nassertv(ui >= 0 && ui < _num_u_vertices &&
196 vi >= 0 && vi < _num_v_vertices);
224 nassertv(ui >= 0 && ui < _num_u_vertices &&
225 vi >= 0 && vi < _num_v_vertices);
239 nassertr(ui >= 0 && ui < _num_u_vertices &&
240 vi >= 0 && vi < _num_v_vertices, 0.0f);
253 return _num_u_vertices + _u_order;
265 return _num_v_vertices + _v_order;
277 if (_u_basis_dirty) {
292 if (_v_basis_dirty) {
305 vert(
int ui,
int vi) {
306 return _vertices[ui * _num_v_vertices + vi];
316 vert(
int ui,
int vi)
const {
317 return _vertices[ui * _num_v_vertices + vi];
void set_vertex_space(int ui, int vi, const NodePath &space)
Sets the coordinate space of the nth control vertex.
This is the base class for all three-component vectors and points.
int get_num_v_knots() const
Returns the number of knot values in the surface in the V direction.
const LVecBase4 & get_vertex(int ui, int vi) const
Returns the nth control vertex of the surface, relative to its indicated coordinate space...
bool is_empty() const
Returns true if the NodePath contains no nodes.
int get_num_segments() const
Returns the number of piecewise continuous segments in the curve.
void set_extended_vertex(int ui, int vi, int d, PN_stdfloat value)
Sets an n-dimensional vertex value.
int get_u_order() const
Returns the order of the surface in the U direction as set by a previous call to set_u_order().
This class is an abstraction for evaluating NURBS surfaces.
int get_v_order() const
Returns the order of the surface in the V direction as set by a previous call to set_v_order().
int get_num_v_vertices() const
Returns the number of control vertices in the V direction on the surface.
This represents a single control vertex in a NurbsEvaluator.
int get_num_u_vertices() const
Returns the number of control vertices in the U direction on the surface.
int get_num_u_knots() const
Returns the number of knot values in the surface in the U direction.
void set_vertex(int ui, int vi, const LVecBase4 &vertex)
Sets the nth control vertex of the surface, as a vertex in 4-d homogeneous space. ...
int get_num_v_segments() const
Returns the number of piecewise continuous segments in the surface in the V direction.
int get_num_u_segments() const
Returns the number of piecewise continuous segments in the surface in the U direction.
This is a 4-by-4 transform matrix.
void set_space(const NodePath &space)
Sets the space of this vertex as a fixed NodePath.
void set_u_order(int u_order)
Sets the order of the surface in the U direction.
This is the base class for all three-component vectors and points.
PN_stdfloat get_extended_vertex(int d) const
Returns an n-dimensional vertex value.
void set_v_order(int v_order)
Sets the order of the surface in the V direction.
const LMatrix4 & get_mat() const
Returns the transform matrix that has been applied to the referenced node, or the identity matrix if ...
void set_extended_vertex(int d, PN_stdfloat value)
Sets an n-dimensional vertex value.
PN_stdfloat get_extended_vertex(int ui, int vi, int d) const
Returns an n-dimensional vertex value.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
static const LVecBase4f & zero()
Returns a zero-length vector.