14 #ifndef EGGNURBSSURFACE_H 15 #define EGGNURBSSURFACE_H 41 void setup(
int u_order,
int v_order,
42 int num_u_knots,
int num_v_knots);
44 INLINE
void set_u_order(
int u_order);
45 INLINE
void set_v_order(
int v_order);
46 void set_num_u_knots(
int num);
47 void set_num_v_knots(
int num);
49 INLINE
void set_u_knot(
int k,
double value);
50 INLINE
void set_v_knot(
int k,
double value);
51 INLINE
void set_cv(
int ui,
int vi,
EggVertex *vertex);
53 bool is_valid()
const;
55 INLINE
int get_u_order()
const;
56 INLINE
int get_v_order()
const;
57 INLINE
int get_u_degree()
const;
58 INLINE
int get_v_degree()
const;
59 INLINE
int get_num_u_knots()
const;
60 INLINE
int get_num_v_knots()
const;
61 INLINE
int get_num_u_cvs()
const;
62 INLINE
int get_num_v_cvs()
const;
63 INLINE
int get_num_cvs()
const;
65 INLINE
int get_u_index(
int vertex_index)
const;
66 INLINE
int get_v_index(
int vertex_index)
const;
67 INLINE
int get_vertex_index(
int ui,
int vi)
const;
69 bool is_closed_u()
const;
70 bool is_closed_v()
const;
72 INLINE
double get_u_knot(
int k)
const;
73 MAKE_SEQ(get_u_knots, get_num_u_knots, get_u_knot);
74 INLINE
double get_v_knot(
int k)
const;
75 MAKE_SEQ(get_v_knots, get_num_v_knots, get_v_knot);
76 INLINE
EggVertex *get_cv(
int ui,
int vi)
const;
78 virtual void write(std::ostream &out,
int indent_level)
const override;
88 typedef vector_double Knots;
99 static void init_type() {
100 EggSurface::init_type();
102 EggSurface::get_class_type());
104 virtual TypeHandle get_type()
const override {
105 return get_class_type();
107 virtual TypeHandle force_init_type()
override {
109 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.
This is a collection of textures by TRef name.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL list.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal.
A parametric NURBS curve.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A parametric NURBS surface.
A parametric surface of some kind.
TypeHandle is the identifier used to differentiate C++ class types.