Panda3D
 All Classes Functions Variables Enumerations
compose_matrix.h
1 // Filename: compose_matrix.h
2 // Created by: drose (27Jan99)
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 COMPOSE_MATRIX_H
16 #define COMPOSE_MATRIX_H
17 
18 ////////////////////////////////////////////////////////////////////
19 //
20 // compose_matrix(), decompose_matrix()
21 //
22 // These two functions build and/or extract an affine matrix into
23 // its constituent parts: scale, hpr, and translate.
24 //
25 // There are also two additional flavors for 3x3 matrices. These are
26 // treated as the upper 3x3 part of a general 4x4 matrix, and so can
27 // only represent rotations and scales.
28 //
29 ////////////////////////////////////////////////////////////////////
30 
31 #include "pandabase.h"
32 #include <math.h>
33 
34 #include "lmatrix.h"
35 #include "lvector3.h"
36 #include "lvector2.h"
37 #include "lpoint3.h"
38 #include "lpoint2.h"
39 #include "lmat_ops.h"
40 #include "lvec2_ops.h"
41 #include "lvec3_ops.h"
42 
43 // These define the standard one-letter names for the components in
44 // the array-accepting forms of compose_matrix() and
45 // decompose_matrix().
46 static const int num_matrix_components = 12;
47 EXPCL_PANDA_LINMATH extern const char * const matrix_component_letters;
48 EXPCL_PANDA_LINMATH extern const double matrix_component_defaults[num_matrix_components];
49 
50 #include "fltnames.h"
51 #include "compose_matrix_src.h"
52 
53 #include "dblnames.h"
54 #include "compose_matrix_src.h"
55 
56 #endif
57