14#ifndef EGGNURBSCURVE_H
15#define EGGNURBSCURVE_H
26class EXPCL_PANDA_EGG EggNurbsCurve :
public EggCurve {
28 INLINE
explicit EggNurbsCurve(
const std::string &name =
"");
29 INLINE EggNurbsCurve(
const EggNurbsCurve ©);
30 INLINE EggNurbsCurve &operator = (
const EggNurbsCurve ©);
32 virtual EggNurbsCurve *
make_copy()
const override;
34 void setup(
int order,
int num_knots);
39 INLINE
void set_knot(
int k,
double value);
53 virtual void write(std::ostream &out,
int indent_level)
const override;
61 typedef vector_double Knots;
70 static void init_type() {
71 EggCurve::init_type();
73 EggCurve::get_class_type());
75 virtual TypeHandle get_type()
const override {
76 return get_class_type();
78 virtual TypeHandle force_init_type()
override {
80 return get_class_type();
84 static TypeHandle _type_handle;
void setup(int order, int num_knots)
Prepares a new curve definition with the indicated order and number of knots.
is_closed
Returns true if the curve appears to be closed.
get_degree
Returns the degree of the curve.
virtual void write(std::ostream &out, int indent_level) const override
Writes the nurbsCurve to the indicated output stream in Egg format.
get_order
Returns the order of the curve.
get_num_knots
Returns the number of knots.
int get_num_cvs() const
Returns the total number of control vertices that *should* be defined for the curve.
bool is_valid() const
Returns true if the NURBS parameters are all internally consistent (e.g.
set_knot
Resets the value of the indicated knot as indicated.
void set_num_knots(int num)
Directly changes the number of knots.
set_order
Directly changes the order to the indicated value (which must be an integer in the range 1 <= order <...
virtual EggNurbsCurve * make_copy() const override
Makes a copy of this object.
get_knot
Returns the nth knot value defined.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.