Panda3D
eggTriangleFan.h
1 // Filename: eggTriangleFan.h
2 // Created by: drose (23Mar05)
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 EGGTRIANGLEFAN_H
16 #define EGGTRIANGLEFAN_H
17 
18 #include "pandabase.h"
19 
20 #include "eggCompositePrimitive.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : EggTriangleFan
24 // Description : A connected fan of triangles. This does not
25 // normally appear in an egg file; it is typically
26 // generated as a result of meshing.
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDAEGG EggTriangleFan : public EggCompositePrimitive {
29 PUBLISHED:
30  INLINE EggTriangleFan(const string &name = "");
31  INLINE EggTriangleFan(const EggTriangleFan &copy);
32  INLINE EggTriangleFan &operator = (const EggTriangleFan &copy);
33  virtual ~EggTriangleFan();
34 
35  virtual void write(ostream &out, int indent_level) const;
36  virtual void apply_first_attribute();
37 
38 protected:
39  virtual int get_num_lead_vertices() const;
40  virtual bool do_triangulate(EggGroupNode *container) const;
41 
42 public:
43  static TypeHandle get_class_type() {
44  return _type_handle;
45  }
46  static void init_type() {
47  EggCompositePrimitive::init_type();
48  register_type(_type_handle, "EggTriangleFan",
49  EggCompositePrimitive::get_class_type());
50  }
51  virtual TypeHandle get_type() const {
52  return get_class_type();
53  }
54  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
55 
56 private:
57  static TypeHandle _type_handle;
58 };
59 
60 #include "eggTriangleFan.I"
61 
62 #endif
The base class for primitives such as triangle strips and triangle fans, which include several compon...
A base class for nodes in the hierarchy that are not leaf nodes.
Definition: eggGroupNode.h:51
A connected fan of triangles.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
virtual void apply_first_attribute()
Sets the first vertex of the triangle (or each component) to the primitive normal and/or color...