00001 // Filename: compose_matrix.h 00002 // Created by: drose (27Jan99) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef COMPOSE_MATRIX_H 00016 #define COMPOSE_MATRIX_H 00017 00018 //////////////////////////////////////////////////////////////////// 00019 // 00020 // compose_matrix(), decompose_matrix() 00021 // 00022 // These two functions build and/or extract an affine matrix into 00023 // its constituent parts: scale, hpr, and translate. 00024 // 00025 // There are also two additional flavors for 3x3 matrices. These are 00026 // treated as the upper 3x3 part of a general 4x4 matrix, and so can 00027 // only represent rotations and scales. 00028 // 00029 //////////////////////////////////////////////////////////////////// 00030 00031 #include "pandabase.h" 00032 #include <math.h> 00033 00034 #include "lmatrix.h" 00035 #include "lvector3.h" 00036 #include "lvector2.h" 00037 #include "lpoint3.h" 00038 #include "lpoint2.h" 00039 #include "lmat_ops.h" 00040 #include "lvec2_ops.h" 00041 #include "lvec3_ops.h" 00042 00043 // These define the standard one-letter names for the components in 00044 // the array-accepting forms of compose_matrix() and 00045 // decompose_matrix(). 00046 static const int num_matrix_components = 12; 00047 EXPCL_PANDA_LINMATH extern const char * const matrix_component_letters; 00048 EXPCL_PANDA_LINMATH extern const double matrix_component_defaults[num_matrix_components]; 00049 00050 #include "fltnames.h" 00051 #include "compose_matrix_src.h" 00052 00053 #include "dblnames.h" 00054 #include "compose_matrix_src.h" 00055 00056 #endif 00057