14#ifndef NURBSSURFACEEVALUATOR_H
15#define NURBSSURFACEEVALUATOR_H
34class EXPCL_PANDA_PARAMETRICS NurbsSurfaceEvaluator :
public ReferenceCount {
36 NurbsSurfaceEvaluator();
37 ~NurbsSurfaceEvaluator();
45 void reset(
int num_u_vertices,
int num_v_vertices);
49 INLINE
void set_vertex(
int ui,
int vi,
const LVecBase4 &vertex);
50 INLINE
void set_vertex(
int ui,
int vi,
const LVecBase3 &vertex, PN_stdfloat weight = 1.0);
51 INLINE
const LVecBase4 &
get_vertex(
int ui,
int vi)
const;
61 const PN_stdfloat values[],
int num_values);
80 void output(std::ostream &out)
const;
88 typedef epvector<LVecBase4> Vert4Array;
89 typedef pvector<LPoint3> Vert3Array;
90 void get_vertices(Vert4Array &verts,
const NodePath &rel_to)
const;
91 void get_vertices(Vert3Array &verts,
const NodePath &rel_to)
const;
95 INLINE
const NurbsVertex &vert(
int ui,
int vi)
const;
97 void recompute_u_knots();
98 void recompute_v_knots();
99 void recompute_u_basis();
100 void recompute_v_basis();
105 typedef epvector<NurbsVertex> Vertices;
112 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 surfaces.
void set_extended_vertices(int ui, int vi, 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_...
void set_extended_vertex(int ui, int vi, int d, PN_stdfloat value)
Sets an n-dimensional vertex value.
void reset(int num_u_vertices, int num_v_vertices)
Resets all the vertices and knots to their default values, and sets the surface up with the indicated...
get_v_order
Returns the order of the surface in the V direction as set by a previous call to set_v_order().
set_u_knot
Sets the value of the nth knot.
PN_stdfloat get_extended_vertex(int ui, int vi, int d) const
Returns an n-dimensional vertex value.
get_v_knot
Returns the value of the nth knot.
set_v_knot
Sets the value of the nth knot.
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.
get_num_v_knots
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.
set_u_order
Sets the order of the surface in the U direction.
set_v_order
Sets the order of the surface in the V direction.
int get_num_u_vertices() const
Returns the number of control vertices in the U direction on the surface.
void normalize_u_knots()
Normalizes the knot sequence so that the parametric range of the surface in the U direction is 0 .
get_num_u_knots
Returns the number of knot values in the surface in the U direction.
NodePath get_vertex_space(int ui, int vi, const NodePath &rel_to) const
Returns the coordinate space of the nth control vertex of the surface, expressed as a NodePath.
void normalize_v_knots()
Normalizes the knot sequence so that the parametric range of the surface in the U direction is 0 .
get_u_knot
Returns the value of the nth knot.
int get_num_v_vertices() const
Returns the number of control vertices in the V direction on the surface.
void set_vertex_space(int ui, int vi, const NodePath &space)
Sets the coordinate space of the nth control vertex.
get_u_order
Returns the order of the surface in the U direction as set by a previous call to set_u_order().
int get_num_u_segments() const
Returns the number of piecewise continuous segments in the surface in the U direction.
The result of a NurbsSurfaceEvaluator.
This represents a single control vertex in a NurbsEvaluator.
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.