00001 //=========================================================================== 00002 /* 00003 This file is part of the CHAI 3D visualization and haptics libraries. 00004 Copyright (C) 2003-2009 by CHAI 3D. All rights reserved. 00005 00006 This library is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License("GPL") version 2 00008 as published by the Free Software Foundation. 00009 00010 For using the CHAI 3D libraries with software that can not be combined 00011 with the GNU GPL, and for taking advantage of the additional benefits 00012 of our support services, please contact CHAI 3D about acquiring a 00013 Professional Edition License. 00014 00015 \author <http://www.chai3d.org> 00016 \author Francois Conti 00017 \version 2.0.0 $Rev: 250 $ 00018 */ 00019 //=========================================================================== 00020 00021 //--------------------------------------------------------------------------- 00022 #ifndef CConstantsH 00023 #define CConstantsH 00024 //--------------------------------------------------------------------------- 00025 00026 //=========================================================================== 00035 //=========================================================================== 00036 00037 //--------------------------------------------------------------------------- 00038 // SCALARS 00039 //--------------------------------------------------------------------------- 00040 00042 #define CHAI_PI 3.14159265358979323846 00043 00045 #define CHAI_PI_DIV_2 1.57079632679489661923 00046 00048 #define CHAI_DEG2RAD 0.01745329252 00049 00051 #define CHAI_RAD2DEG 57.2957795131 00052 00054 #define CHAI_TINY 1e-49 00055 00057 #define CHAI_SMALL 0.000000001 00058 00060 #ifdef DBL_MAX 00061 #define CHAI_LARGE DBL_MAX 00062 #else 00063 #define CHAI_LARGE 1e+49 00064 #endif 00065 00067 #ifdef FLOAT_MAX 00068 #define CHAI_LARGE_FLOAT FLOAT_MAX 00069 #else 00070 #define CHAI_LARGE_FLOAT 1e37 00071 #endif 00072 00073 00074 //--------------------------------------------------------------------------- 00075 // VECTORS 00076 //--------------------------------------------------------------------------- 00077 00079 #define CHAI_VECTOR_ZERO cVector3d(0, 0, 0); 00080 00082 #define CHAI_VECTOR_X cVector3d(1, 0, 0); 00083 00085 #define CHAI_VECTOR_Y cVector3d(0, 1, 0); 00086 00088 #define CHAI_VECTOR_Z cVector3d(0, 0, 1); 00089 00091 #define CHAI_ORIGIN cVector3d(0, 0, 0); 00092 00093 00094 //--------------------------------------------------------------------------- 00095 #endif 00096 //---------------------------------------------------------------------------