Panda3D
eggSurface.h
1 // Filename: eggSurface.h
2 // Created by: drose (15Feb00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef EGGSURFACE_H
16 #define EGGSURFACE_H
17 
18 #include "pandabase.h"
19 
20 #include "eggPrimitive.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : EggSurface
24 // Description : A parametric surface of some kind. See
25 // EggNurbsSurface.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDAEGG EggSurface : public EggPrimitive {
28 PUBLISHED:
29  INLINE EggSurface(const string &name = "");
30  INLINE EggSurface(const EggSurface &copy);
31  INLINE EggSurface &operator = (const EggSurface &copy);
32 
33  INLINE void set_u_subdiv(int subdiv);
34  INLINE int get_u_subdiv() const;
35  INLINE void set_v_subdiv(int subdiv);
36  INLINE int get_v_subdiv() const;
37 
38 private:
39  int _u_subdiv;
40  int _v_subdiv;
41 
42 public:
43 
44  static TypeHandle get_class_type() {
45  return _type_handle;
46  }
47  static void init_type() {
48  EggPrimitive::init_type();
49  register_type(_type_handle, "EggSurface",
50  EggPrimitive::get_class_type());
51  }
52  virtual TypeHandle get_type() const {
53  return get_class_type();
54  }
55  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
56 
57 private:
58  static TypeHandle _type_handle;
59 
60 };
61 
62 #include "eggSurface.I"
63 
64 #endif
A base class for any of a number of kinds of geometry primitives: polygons, point lights...
Definition: eggPrimitive.h:51
A parametric surface of some kind.
Definition: eggSurface.h:27
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85