14#ifndef NURBSCURVEEVALUATOR_H
15#define NURBSCURVEEVALUATOR_H
39class EXPCL_PANDA_PARAMETRICS NurbsCurveEvaluator :
public ReferenceCount {
41 NurbsCurveEvaluator();
42 ~NurbsCurveEvaluator();
47 void reset(
int num_vertices);
50 INLINE
void set_vertex(
int i,
const LVecBase4 &vertex);
51 INLINE
void set_vertex(
int i,
const LVecBase3 &vertex, PN_stdfloat weight = 1.0);
52 INLINE
const LVecBase4 &
get_vertex(
int i)
const;
63 const PN_stdfloat values[],
int num_values);
66 void set_knot(
int i, PN_stdfloat knot);
75 const LMatrix4 &mat)
const;
77 void output(std::ostream &out)
const;
80 typedef epvector<LVecBase4> Vert4Array;
81 typedef pvector<LPoint3> Vert3Array;
82 void get_vertices(Vert4Array &verts,
const NodePath &rel_to)
const;
83 void get_vertices(Vert3Array &verts,
const NodePath &rel_to)
const;
86 void recompute_knots();
87 void recompute_basis();
91 typedef epvector<NurbsVertex> Vertices;
95 typedef vector_stdfloat Knots;
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
This encapsulates a series of matrices that are used to represent the sequential segments of a NurbsC...
This class is an abstraction for evaluating NURBS curves.
void reset(int num_vertices)
Resets all the vertices and knots to their default values, and sets the curve up with the indicated n...
get_num_vertices
Returns the number of control vertices in the curve.
void normalize_knots()
Normalizes the knot sequence so that the parametric range of the curve is 0
NodePath get_vertex_space(int i, const NodePath &rel_to) const
Returns the coordinate space of the nth control vertex of the curve, expressed as a NodePath.
void set_vertex(int i, const LVecBase4 &vertex)
Sets the nth control vertex of the curve, as a vertex in 4-d homogeneous space.
void set_order(int order)
Sets the order of the curve.
void set_extended_vertex(int i, int d, PN_stdfloat value)
Sets an n-dimensional vertex value.
get_vertex
Returns the nth control vertex of the curve, relative to its indicated coordinate space.
int get_order() const
Returns the order of the curve as set by a previous call to set_order().
void set_extended_vertices(int i, int d, const PN_stdfloat values[], int num_values)
Simultaneously sets several extended values in the slots d through (d + num_values - 1) from the num_...
int get_num_segments() const
Returns the number of piecewise continuous segments in the curve.
PN_stdfloat get_extended_vertex(int i, int d) const
Returns an n-dimensional vertex value.
get_num_knots
Returns the number of knot values in the curve.
void set_vertex_space(int i, const NodePath &space)
Sets the coordinate space of the nth control vertex.
get_knot
Returns the value of the nth knot.
void set_knot(int i, PN_stdfloat knot)
Sets the value of the nth knot.
The result of a NurbsCurveEvaluator.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.