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