Panda3D
|
00001 // Filename: config_linmath.cxx 00002 // Created by: drose (23Feb00) 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 #include "config_linmath.h" 00016 #include "luse.h" 00017 #include "coordinateSystem.h" 00018 00019 #include "dconfig.h" 00020 00021 Configure(config_linmath); 00022 NotifyCategoryDef(linmath, ""); 00023 00024 ConfigureFn(config_linmath) { 00025 init_liblinmath(); 00026 } 00027 00028 ConfigVariableBool paranoid_hpr_quat 00029 ("paranoid-hpr-quat", false, 00030 PRC_DESC("Set this true to doublecheck the quaternion-hpr compose and " 00031 "decompose operations against the quaternion-matrix and matrix-hpr " 00032 "operations. This only has effect if NDEBUG is not defined.")); 00033 00034 ConfigVariableBool temp_hpr_fix 00035 ("temp-hpr-fix", true, 00036 PRC_DESC("Set this true to compute hpr's correctly. Historically, Panda has " 00037 "applied these in the wrong order, and roll was backwards relative " 00038 "to the other two. Set this false if you need compatibility with " 00039 "Panda's old hpr calculations.")); 00040 00041 //////////////////////////////////////////////////////////////////// 00042 // Function: init_liblinmath 00043 // Description: Initializes the library. This must be called at 00044 // least once before any of the functions or classes in 00045 // this library can be used. Normally it will be 00046 // called by the static initializers and need not be 00047 // called explicitly, but special cases exist. 00048 //////////////////////////////////////////////////////////////////// 00049 void 00050 init_liblinmath() { 00051 static bool initialized = false; 00052 if (initialized) { 00053 return; 00054 } 00055 initialized = true; 00056 00057 LVecBase2f::init_type(); 00058 LVecBase3f::init_type(); 00059 LVecBase4f::init_type(); 00060 LVector2f::init_type(); 00061 LVector3f::init_type(); 00062 LVector4f::init_type(); 00063 LPoint2f::init_type(); 00064 LPoint3f::init_type(); 00065 LPoint4f::init_type(); 00066 LMatrix3f::init_type(); 00067 LMatrix4f::init_type(); 00068 00069 LVecBase2d::init_type(); 00070 LVecBase3d::init_type(); 00071 LVecBase4d::init_type(); 00072 LVector2d::init_type(); 00073 LVector3d::init_type(); 00074 LVector4d::init_type(); 00075 LPoint2d::init_type(); 00076 LPoint3d::init_type(); 00077 LPoint4d::init_type(); 00078 LMatrix3d::init_type(); 00079 LMatrix4d::init_type(); 00080 00081 LQuaternionf::init_type(); 00082 LRotationf::init_type(); 00083 LOrientationf::init_type(); 00084 00085 LQuaterniond::init_type(); 00086 LRotationd::init_type(); 00087 LOrientationd::init_type(); 00088 }