14 #ifndef EGGNURBSCURVE_H    15 #define EGGNURBSCURVE_H    34   void setup(
int order, 
int num_knots);
    36   INLINE 
void set_order(
int order);
    37   void set_num_knots(
int num);
    39   INLINE 
void set_knot(
int k, 
double value);
    41   bool is_valid() 
const;
    43   INLINE 
int get_order() 
const;
    44   INLINE 
int get_degree() 
const;
    45   INLINE 
int get_num_knots() 
const;
    46   INLINE 
int get_num_cvs() 
const;
    48   bool is_closed() 
const;
    50   INLINE 
double get_knot(
int k) 
const;
    51   MAKE_SEQ(get_knots, get_num_knots, get_knot);
    53   virtual void write(std::ostream &out, 
int indent_level) 
const override;
    55   MAKE_PROPERTY(order, get_order, set_order);
    56   MAKE_PROPERTY(degree, get_degree);
    57   MAKE_PROPERTY(closed, is_closed);
    58   MAKE_SEQ_PROPERTY(knots, get_num_knots, get_knot, set_knot);
    61   typedef vector_double Knots;
    70   static void init_type() {
    71     EggCurve::init_type();
    73                   EggCurve::get_class_type());
    76     return get_class_type();
    78   virtual TypeHandle force_init_type()
 override {
    80     return get_class_type();
 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.
 
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
 
A parametric NURBS curve.
 
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
 
A parametric curve of some kind.
 
TypeHandle is the identifier used to differentiate C++ class types.