Panda3D
fltObject.h
1 // Filename: fltObject.h
2 // Created by: drose (24Aug00)
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 FLTOBJECT_H
16 #define FLTOBJECT_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "fltBeadID.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : FltObject
24 // Description : The main objecting bead of the flt file.
25 ////////////////////////////////////////////////////////////////////
26 class FltObject : public FltBeadID {
27 public:
28  FltObject(FltHeader *header);
29 
30  enum Flags {
31  F_no_daylight = 0x80000000,
32  F_no_dusk = 0x40000000,
33  F_no_night = 0x20000000,
34  F_no_illuminate = 0x10000000,
35  F_flat_shaded = 0x08000000,
36  F_shadow_object = 0x04000000,
37  };
38 
39  unsigned int _flags;
40  int _relative_priority;
41  int _transparency;
42  int _special_id1, _special_id2;
43  int _significance;
44 
45 protected:
46  virtual bool extract_record(FltRecordReader &reader);
47  virtual bool build_record(FltRecordWriter &writer) const;
48 
49 public:
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  static TypeHandle get_class_type() {
55  return _type_handle;
56  }
57  static void init_type() {
58  FltBeadID::init_type();
59  register_type(_type_handle, "FltObject",
60  FltBeadID::get_class_type());
61  }
62 
63 private:
64  static TypeHandle _type_handle;
65 };
66 
67 #endif
68 
69 
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
The main objecting bead of the flt file.
Definition: fltObject.h:26
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85