Panda3D
eggPatch.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 eggPatch.h
10  * @author drose
11  * @date 2012-04-27
12  */
13 
14 #ifndef EGGPATCH_H
15 #define EGGPATCH_H
16 
17 #include "pandabase.h"
18 
19 #include "eggPrimitive.h"
20 
21 /**
22  * A single "patch", a special primitive to be rendered only with a
23  * tessellation shader.
24  */
25 class EXPCL_PANDA_EGG EggPatch : public EggPrimitive {
26 PUBLISHED:
27  INLINE explicit EggPatch(const std::string &name = "");
28  INLINE EggPatch(const EggPatch &copy);
29  INLINE EggPatch &operator = (const EggPatch &copy);
30 
31  virtual EggPatch *make_copy() const override;
32 
33  virtual void write(std::ostream &out, int indent_level) const override;
34 
35 public:
36  static TypeHandle get_class_type() {
37  return _type_handle;
38  }
39  static void init_type() {
40  EggPrimitive::init_type();
41  register_type(_type_handle, "EggPatch",
42  EggPrimitive::get_class_type());
43  }
44  virtual TypeHandle get_type() const override {
45  return get_class_type();
46  }
47  virtual TypeHandle force_init_type() override {
48  init_type();
49  return get_class_type();
50  }
51 
52 private:
53  static TypeHandle _type_handle;
54 
55 };
56 
57 #include "eggPatch.I"
58 
59 #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.
A single "patch", a special primitive to be rendered only with a tessellation shader.
Definition: eggPatch.h:25
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81