Panda3D
 All Classes Functions Variables Enumerations
eggTriangleStrip.h
1 // Filename: eggTriangleStrip.h
2 // Created by: drose (13Mar05)
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 EGGTRIANGLESTRIP_H
16 #define EGGTRIANGLESTRIP_H
17 
18 #include "pandabase.h"
19 
20 #include "eggCompositePrimitive.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : EggTriangleStrip
24 // Description : A connected strip 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 EggTriangleStrip : public EggCompositePrimitive {
29 PUBLISHED:
30  INLINE EggTriangleStrip(const string &name = "");
31  INLINE EggTriangleStrip(const EggTriangleStrip &copy);
32  INLINE EggTriangleStrip &operator = (const EggTriangleStrip &copy);
33  virtual ~EggTriangleStrip();
34 
35  virtual void write(ostream &out, int indent_level) const;
36 
37 protected:
38  virtual int get_num_lead_vertices() const;
39  virtual bool do_triangulate(EggGroupNode *container) const;
40 
41 public:
42  static TypeHandle get_class_type() {
43  return _type_handle;
44  }
45  static void init_type() {
46  EggCompositePrimitive::init_type();
47  register_type(_type_handle, "EggTriangleStrip",
48  EggCompositePrimitive::get_class_type());
49  }
50  virtual TypeHandle get_type() const {
51  return get_class_type();
52  }
53  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
54 
55 private:
56  static TypeHandle _type_handle;
57 };
58 
59 #include "eggTriangleStrip.I"
60 
61 #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
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
A connected strip of triangles.