00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
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 ConfigVariableBool no_singular_invert
00042 ("no-singular-invert", false,
00043 PRC_DESC("Set this true to make singular-invert warning messages generate an "
00044 "assertion failure instead of just a warning (which can then be "
00045 "trapped with assert-abort)."));
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 void
00056 init_liblinmath() {
00057 static bool initialized = false;
00058 if (initialized) {
00059 return;
00060 }
00061 initialized = true;
00062
00063 LVecBase2f::init_type();
00064 LVecBase3f::init_type();
00065 LVecBase4f::init_type();
00066 LVector2f::init_type();
00067 LVector3f::init_type();
00068 LVector4f::init_type();
00069 LPoint2f::init_type();
00070 LPoint3f::init_type();
00071 LPoint4f::init_type();
00072 LMatrix3f::init_type();
00073 LMatrix4f::init_type();
00074 UnalignedLVecBase4f::init_type();
00075 UnalignedLMatrix4f::init_type();
00076
00077 LVecBase2d::init_type();
00078 LVecBase3d::init_type();
00079 LVecBase4d::init_type();
00080 LVector2d::init_type();
00081 LVector3d::init_type();
00082 LVector4d::init_type();
00083 LPoint2d::init_type();
00084 LPoint3d::init_type();
00085 LPoint4d::init_type();
00086 LMatrix3d::init_type();
00087 LMatrix4d::init_type();
00088 UnalignedLVecBase4d::init_type();
00089 UnalignedLMatrix4d::init_type();
00090
00091 LQuaternionf::init_type();
00092 LRotationf::init_type();
00093 LOrientationf::init_type();
00094
00095 LQuaterniond::init_type();
00096 LRotationd::init_type();
00097 LOrientationd::init_type();
00098 }