Panda3D
 All Classes Functions Variables Enumerations
fltTransformGeneralMatrix.h
1 // Filename: fltTransformGeneralMatrix.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 FLTTRANSFORMGENERALMATRIX_H
16 #define FLTTRANSFORMGENERALMATRIX_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "fltTransformRecord.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : FltTransformGeneralMatrix
24 // Description : A general 4x4 matrix. This appears in the flt file
25 // when there is no record of the composition of the
26 // transform.
27 ////////////////////////////////////////////////////////////////////
29 public:
31 
32  void set_matrix(const LMatrix4d &matrix);
33  void set_matrix(const LMatrix4f &matrix);
34 
35 protected:
36  virtual bool extract_record(FltRecordReader &reader);
37  virtual bool build_record(FltRecordWriter &writer) const;
38 
39 public:
40  virtual TypeHandle get_type() const {
41  return get_class_type();
42  }
43  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
44  static TypeHandle get_class_type() {
45  return _type_handle;
46  }
47  static void init_type() {
48  FltTransformRecord::init_type();
49  register_type(_type_handle, "FltTransformGeneralMatrix",
50  FltTransformRecord::get_class_type());
51  }
52 
53 private:
54  static TypeHandle _type_handle;
55 };
56 
57 #endif
58 
59 
This class writes a sequence of FltRecords to an ostream, handling opcode and size counts properly...
This is a 4-by-4 transform matrix.
Definition: lmatrix.h:4716
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
void set_matrix(const LMatrix4d &matrix)
Directly sets the general matrix.
This is a 4-by-4 transform matrix.
Definition: lmatrix.h:451
A base class for a number of types of ancillary records that follow beads and indicate some kind of a...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85