15 #ifndef NURBSCURVEINTERFACE_H
16 #define NURBSCURVEINTERFACE_H
18 #include "pandabase.h"
37 virtual void set_order(
int order)=0;
38 virtual int get_order()
const=0;
40 virtual int get_num_cvs()
const=0;
41 virtual int get_num_knots()
const=0;
43 virtual bool insert_cv(PN_stdfloat t)=0;
45 INLINE
int append_cv(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
49 virtual bool remove_cv(
int n)=0;
50 virtual void remove_all_cvs()=0;
52 INLINE
bool set_cv_point(
int n, PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
53 INLINE
bool set_cv_point(
int n,
const LVecBase3 &v);
54 INLINE
LVecBase3 get_cv_point(
int n)
const;
56 bool set_cv_weight(
int n, PN_stdfloat w);
57 INLINE PN_stdfloat get_cv_weight(
int n)
const;
59 virtual bool set_cv(
int n,
const LVecBase4 &v)=0;
62 virtual bool set_knot(
int n, PN_stdfloat t)=0;
63 virtual PN_stdfloat get_knot(
int n)
const=0;
65 MAKE_SEQ(get_cvs, get_num_cvs, get_cv);
66 MAKE_SEQ(get_knots, get_num_knots, get_knot);
68 void write_cv(ostream &out,
int n)
const;
71 virtual int append_cv_impl(
const LVecBase4 &v)=0;
73 void write(ostream &out,
int indent_level)
const;
74 bool format_egg(ostream &out,
const string &name,
75 const string &curve_type,
int indent_level)
const;
83 static void init_type() {
84 register_type(_type_handle,
"NurbsCurveInterface");
91 #include "nurbsCurveInterface.I"
This is the base class for all three-component vectors and points.
A virtual base class for parametric curves.
This abstract class defines the interface only for a Nurbs-style curve, with knots and coordinates in...
This is the base class for all three-component vectors and points.
TypeHandle is the identifier used to differentiate C++ class types.