Panda3D
fltVectorRecord.h
1 // Filename: fltVectorRecord.h
2 // Created by: drose (30Aug02)
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 FLTVECTORRECORD_H
16 #define FLTVECTORRECORD_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "fltRecord.h"
21 
22 #include "luse.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : FltVectorRecord
26 // Description : This is an ancillary record of the old (pre-15.4)
27 // face node. Its only use is to provide the direction
28 // vector for unidirectional and bidirectional light
29 // point faces.
30 ////////////////////////////////////////////////////////////////////
31 class FltVectorRecord : public FltRecord {
32 public:
33  FltVectorRecord(FltHeader *header);
34 
35  const LVector3 &get_vector() const;
36 
37 protected:
38  LVector3 _vector;
39 
40 protected:
41  virtual bool extract_record(FltRecordReader &reader);
42  virtual bool build_record(FltRecordWriter &writer) const;
43 
44 public:
45  virtual TypeHandle get_type() const {
46  return get_class_type();
47  }
48  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
49  static TypeHandle get_class_type() {
50  return _type_handle;
51  }
52  static void init_type() {
53  FltRecord::init_type();
54  register_type(_type_handle, "FltVectorRecord",
55  FltRecord::get_class_type());
56  }
57 
58 private:
59  static TypeHandle _type_handle;
60 
61  friend class FltBead;
62 };
63 
64 #endif
65 
66 
const LVector3 & get_vector() const
Returns the vector value.
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...
A base class for any of a broad family of flt records that represent particular beads in the hierarch...
Definition: fltBead.h:33
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
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 base class for all kinds of records in a MultiGen OpenFlight file.
Definition: fltRecord.h:40
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
This is an ancillary record of the old (pre-15.4) face node.