00001 00002 #ifndef __JBXL_CPP_TOLERANCE_H_ 00003 #define __JBXL_CPP_TOLERANCE_H_ 00004 00005 00014 // 00015 namespace jbxl { 00016 00017 00018 00019 // 相対値 00020 extern double Vector_Tolerance; 00021 extern double Vertex_Tolerance; 00022 extern double Edge_Tolerance; 00023 extern double Facet_Tolerance; 00024 00025 // 絶対値 00026 extern double Abs_Vector_Tolerance; 00027 extern double Abs_Vertex_Tolerance; 00028 extern double Collision_Tolerance; 00029 extern double Sin_Tolerance; 00030 00031 00032 // 1に対して 0とするトレランス 00033 extern double Zero_Eps; 00034 extern double Zero_Eps2; 00035 00036 00037 /* 00038 void SetZeroEPS(double eps); 00039 void SetVectorTolerance(double tol); 00040 void SetVertexTolerance(double tol); 00041 void SetEdgeTolerance(double tol); 00042 void SetFacetTolerance(double tol); 00043 void SetCollisionTolerance(double tol); 00044 void SetSINTolerance(double tol); 00045 void SetAbsVectorTolerance(double tol); 00046 void SetAbsVertexTolerance(double tol); 00047 */ 00048 00049 inline void SetZeroEPS(double eps) { Zero_Eps = eps; } 00050 inline void SetVectorTolerance(double tol) { Vector_Tolerance = tol; } 00051 inline void SetVertexTolerance(double tol) { Vertex_Tolerance = tol; } 00052 inline void SetEdgeTolerance(double tol) { Edge_Tolerance = tol; } 00053 inline void SetFacetTolerance(double tol) { Facet_Tolerance = tol; } 00054 inline void SetCollisionTolerance(double tol){ Collision_Tolerance = tol; } 00055 inline void SetSINTolerance(double tol) { Sin_Tolerance = tol; } 00056 inline void SetAbsVectorTolerance(double tol){ Abs_Vector_Tolerance = tol; } 00057 inline void SetAbsVertexTolerance(double tol){ Abs_Vertex_Tolerance = tol; } 00058 00059 00060 00061 } // namespace 00062 00063 00064 #endif 00065