Panda3D
 All Classes Functions Variables Enumerations
fltMesh.h
1 // Filename: fltMesh.h
2 // Created by: drose (28Feb01)
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 FLTMESH_H
16 #define FLTMESH_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "fltGeometry.h"
21 #include "fltLocalVertexPool.h"
22 
23 #include "pointerTo.h"
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : FltMesh
27 // Description : A mesh of connected polygons and tristrips, etc.,
28 // with a local vertex pool.
29 ////////////////////////////////////////////////////////////////////
30 class FltMesh : public FltGeometry {
31 public:
32  FltMesh(FltHeader *header);
33 
34  PT(FltLocalVertexPool) _vpool;
35 
36 protected:
37  virtual bool extract_record(FltRecordReader &reader);
38  virtual bool extract_ancillary(FltRecordReader &reader);
39 
40  virtual bool build_record(FltRecordWriter &writer) const;
41  virtual FltError write_ancillary(FltRecordWriter &writer) const;
42 
43 public:
44  virtual TypeHandle get_type() const {
45  return get_class_type();
46  }
47  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
48  static TypeHandle get_class_type() {
49  return _type_handle;
50  }
51  static void init_type() {
52  FltGeometry::init_type();
53  register_type(_type_handle, "FltMesh",
54  FltGeometry::get_class_type());
55  }
56 
57 private:
58  static TypeHandle _type_handle;
59 };
60 
61 #include "fltMesh.I"
62 
63 #endif
64 
65 
This class writes a sequence of FltRecords to an ostream, handling opcode and size counts properly...
This class turns an istream into a sequence of FltRecords by reading a sequence of Datagrams and extr...
This is a base class for both FltFace and FltMesh, which are two different kinds of geometric primiti...
Definition: fltGeometry.h:36
This is the first bead in the file, the top of the bead hierarchy, and the primary interface to readi...
Definition: fltHeader.h:48
A local vertex pool, as might appear in the middle of the hierarchy, for instance for a mesh...
A mesh of connected polygons and tristrips, etc., with a local vertex pool.
Definition: fltMesh.h:30
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85