Panda3D
fltTransformRecord.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 fltTransformRecord.h
10  * @author drose
11  * @date 2000-08-24
12  */
13 
14 #ifndef FLTTRANSFORMRECORD_H
15 #define FLTTRANSFORMRECORD_H
16 
17 #include "pandatoolbase.h"
18 
19 #include "fltRecord.h"
20 
21 #include "luse.h"
22 
23 /**
24  * A base class for a number of types of ancillary records that follow beads
25  * and indicate some kind of a transformation. Pointers of this type are
26  * collected in the FltTransformation class.
27  */
28 class FltTransformRecord : public FltRecord {
29 public:
31 
32  const LMatrix4d &get_matrix() const;
33 
34 protected:
35  LMatrix4d _matrix;
36 
37 public:
38  virtual TypeHandle get_type() const {
39  return get_class_type();
40  }
41  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
42  static TypeHandle get_class_type() {
43  return _type_handle;
44  }
45  static void init_type() {
46  FltRecord::init_type();
47  register_type(_type_handle, "FltTransformRecord",
48  FltRecord::get_class_type());
49  }
50 
51 private:
52  static TypeHandle _type_handle;
53 
54  friend class FltBead;
55 };
56 
57 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
const LMatrix4d & get_matrix() const
Returns the transform matrix represented by this particular component of the transform.
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(),...
Definition: register_type.I:22
A base class for any of a broad family of flt records that represent particular beads in the hierarch...
Definition: fltBead.h:29
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 base class for all kinds of records in a MultiGen OpenFlight file.
Definition: fltRecord.h:36
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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:81