|
World of Rigid Bodies (WoRB)
|
00001 /** 00002 * @file Constants.cpp 00003 * @brief Implementation of the Const class that encapsulates various 00004 * physical and mathematical constants. 00005 * @author Mikica Kocic 00006 * @version 0.1 00007 * @date 2012-05-03 00008 * @copyright GNU Public License. 00009 */ 00010 00011 #include "Constants.h" 00012 #include "Quaternion.h" 00013 00014 #include <cmath> // we use atan 00015 #include <limits> // we use std::numeric_limits 00016 #include <cstdio> // we use: printf 00017 00018 using namespace WoRB; 00019 00020 ///////////////////////////////////////////////////////////////////////////////////////// 00021 00022 const double Const::Pi = 4 * std::atan(1.0); 00023 00024 ///////////////////////////////////////////////////////////////////////////////////////// 00025 00026 const double Const::Max = std::numeric_limits<double>::max (); 00027 const double Const::Min = std::numeric_limits<double>::min (); 00028 const double Const::Eps = std::numeric_limits<double>::epsilon (); 00029 const double Const::Inf = std::numeric_limits<double>::infinity (); 00030 const double Const::NaN = std::numeric_limits<double>::quiet_NaN (); 00031 00032 ///////////////////////////////////////////////////////////////////////////////////////// 00033 00034 const Quaternion Const::g_n( 0, 0, -9.80665, 0 ); // Standard gravity along y-axis 00035 00036 ///////////////////////////////////////////////////////////////////////////////////////// 00037 00038 const Quaternion Const::X ( 0, 1, 0, 0 ); 00039 const Quaternion Const::Y ( 0, 0, 1, 0 ); 00040 const Quaternion Const::Z ( 0, 0, 0, 1 ); 00041