Panda3D
Loading...
Searching...
No Matches
fltObject.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file fltObject.h
10 * @author drose
11 * @date 2000-08-24
12 */
13
14#ifndef FLTOBJECT_H
15#define FLTOBJECT_H
16
17#include "pandatoolbase.h"
18
19#include "fltBeadID.h"
20
21/**
22 * The main objecting bead of the flt file.
23 */
24class FltObject : public FltBeadID {
25public:
26 FltObject(FltHeader *header);
27
28 enum Flags {
29 F_no_daylight = 0x80000000,
30 F_no_dusk = 0x40000000,
31 F_no_night = 0x20000000,
32 F_no_illuminate = 0x10000000,
33 F_flat_shaded = 0x08000000,
34 F_shadow_object = 0x04000000,
35 };
36
37 unsigned int _flags;
38 int _relative_priority;
39 int _transparency;
40 int _special_id1, _special_id2;
41 int _significance;
42
43protected:
44 virtual bool extract_record(FltRecordReader &reader);
45 virtual bool build_record(FltRecordWriter &writer) const;
46
47public:
48 virtual TypeHandle get_type() const {
49 return get_class_type();
50 }
51 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
52 static TypeHandle get_class_type() {
53 return _type_handle;
54 }
55 static void init_type() {
56 FltBeadID::init_type();
57 register_type(_type_handle, "FltObject",
58 FltBeadID::get_class_type());
59 }
60
61private:
62 static TypeHandle _type_handle;
63};
64
65#endif
A base class for any of a broad family of flt beads that include an ID.
Definition fltBeadID.h:24
This is the first bead in the file, the top of the bead hierarchy, and the primary interface to readi...
Definition fltHeader.h:44
The main objecting bead of the flt file.
Definition fltObject.h:24
This class turns an istream into a sequence of FltRecords by reading a sequence of Datagrams and extr...
This class writes a sequence of FltRecords to an ostream, handling opcode and size counts properly.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...