00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "config_linmath.h"
00020 #include "luse.h"
00021 #include "coordinateSystem.h"
00022
00023 #include <dconfig.h>
00024
00025 Configure(config_linmath);
00026 NotifyCategoryDef(linmath, "");
00027
00028 ConfigureFn(config_linmath) {
00029 init_liblinmath();
00030 }
00031
00032
00033
00034
00035 const bool paranoid_hpr_quat = config_linmath.GetBool("paranoid-hpr-quat", false);
00036
00037
00038
00039
00040
00041
00042
00043
00044 const bool temp_hpr_fix = config_linmath.GetBool("temp-hpr-fix", false);
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 void
00055 init_liblinmath() {
00056 static bool initialized = false;
00057 if (initialized) {
00058 return;
00059 }
00060 initialized = true;
00061
00062 LVecBase2f::init_type();
00063 LVecBase3f::init_type();
00064 LVecBase4f::init_type();
00065 LVector2f::init_type();
00066 LVector3f::init_type();
00067 LVector4f::init_type();
00068 LPoint2f::init_type();
00069 LPoint3f::init_type();
00070 LPoint4f::init_type();
00071 LMatrix3f::init_type();
00072 LMatrix4f::init_type();
00073
00074 LVecBase2d::init_type();
00075 LVecBase3d::init_type();
00076 LVecBase4d::init_type();
00077 LVector2d::init_type();
00078 LVector3d::init_type();
00079 LVector4d::init_type();
00080 LPoint2d::init_type();
00081 LPoint3d::init_type();
00082 LPoint4d::init_type();
00083 LMatrix3d::init_type();
00084 LMatrix4d::init_type();
00085
00086 LQuaternionf::init_type();
00087 LRotationf::init_type();
00088 LOrientationf::init_type();
00089
00090 LQuaterniond::init_type();
00091 LRotationd::init_type();
00092 LOrientationd::init_type();
00093
00094 string csstr = config_linmath.GetString("coordinate-system", "default");
00095 CoordinateSystem cs = parse_coordinate_system_string(csstr);
00096
00097 if (cs == CS_invalid) {
00098 linmath_cat.error()
00099 << "Unexpected coordinate-system string: " << csstr << "\n";
00100 cs = CS_default;
00101 }
00102 default_coordinate_system = (cs == CS_default) ? CS_zup_right : cs;
00103 }