Panda3D
 All Classes Functions Variables Enumerations
fltLOD.h
1 // Filename: fltLOD.h
2 // Created by: drose (25Aug00)
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 FLTLOD_H
16 #define FLTLOD_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "fltBeadID.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : FltLOD
24 // Description : A Level-of-Detail record.
25 ////////////////////////////////////////////////////////////////////
26 class FltLOD : public FltBeadID {
27 public:
28  FltLOD(FltHeader *header);
29 
30  enum Flags {
31  F_use_previous_slant = 0x80000000,
32  F_freeze_center = 0x20000000
33  };
34 
35  double _switch_in;
36  double _switch_out;
37  int _special_id1, _special_id2;
38  unsigned int _flags;
39  double _center_x;
40  double _center_y;
41  double _center_z;
42  double _transition_range;
43 
44 protected:
45  virtual bool extract_record(FltRecordReader &reader);
46  virtual bool build_record(FltRecordWriter &writer) const;
47 
48 public:
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  static TypeHandle get_class_type() {
54  return _type_handle;
55  }
56  static void init_type() {
57  FltBeadID::init_type();
58  register_type(_type_handle, "FltLOD",
59  FltBeadID::get_class_type());
60  }
61 
62 private:
63  static TypeHandle _type_handle;
64 };
65 
66 #endif
67 
68 
This class writes a sequence of FltRecords to an ostream, handling opcode and size counts properly...
A base class for any of a broad family of flt beads that include an ID.
Definition: fltBeadID.h:27
This class turns an istream into a sequence of FltRecords by reading a sequence of Datagrams and extr...
This is the first bead in the file, the top of the bead hierarchy, and the primary interface to readi...
Definition: fltHeader.h:48
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
A Level-of-Detail record.
Definition: fltLOD.h:26