53 return (
int)_vertices.size();
67 nassertv(i >= 0 && i < (
int)_vertices.size());
68 _vertices[i].set_vertex(vertex);
81 nassertv(i >= 0 && i < (
int)_vertices.size());
82 _vertices[i].set_vertex(
LVecBase4(vertex[0] * weight, vertex[1] * weight, vertex[2] * weight, weight));
94 return _vertices[i].get_vertex();
107 NodePath space = _vertices[i].get_space(rel_to);
108 const LVecBase4 &vertex = _vertices[i].get_vertex();
109 if (space.is_empty()) {
112 const LMatrix4 &mat = space.get_mat(rel_to);
132 nassertv(i >= 0 && i < (
int)_vertices.size());
133 _vertices[i].set_space(space);
150 nassertv(i >= 0 && i < (
int)_vertices.size());
151 _vertices[i].set_space(space);
178 nassertv(i >= 0 && i < (
int)_vertices.size());
179 _vertices[i].set_extended_vertex(d, value);
192 nassertr(i >= 0 && i < (
int)_vertices.size(), 0.0f);
193 return _vertices[i].get_extended_vertex(d);
204 return (
int)_vertices.size() + _order;
This is the base class for all three-component vectors and points.
int get_num_segments() const
Returns the number of piecewise continuous segments in the curve.
This class is an abstraction for evaluating NURBS curves.
void set_order(int order)
Sets the order of the curve.
PN_stdfloat get_extended_vertex(int i, int d) const
Returns an n-dimensional vertex value.
void set_extended_vertex(int i, int d, PN_stdfloat value)
Sets an n-dimensional vertex value.
void set_vertex(int i, const LVecBase4 &vertex)
Sets the nth control vertex of the curve, as a vertex in 4-d homogeneous space.
This is a 4-by-4 transform matrix.
int get_num_knots() const
Returns the number of knot values in the curve.
int get_num_vertices() const
Returns the number of control vertices in the curve.
const LVecBase4 & get_vertex(int i) const
Returns the nth control vertex of the curve, relative to its indicated coordinate space...
This is the base class for all three-component vectors and points.
int get_num_segments() const
Returns the number of piecewise continuous segments in the curve.
void set_vertex_space(int i, const NodePath &space)
Sets the coordinate space of the nth control vertex.
int get_order() const
Returns the order of the curve as set by a previous call to set_order().
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
static const LVecBase4f & zero()
Returns a zero-length vector.