Changeset 10413
- Timestamp:
- 06/25/09 16:06:29 (4 years ago)
- Location:
- OpenSceneGraph/branches/OpenSceneGraph-2.8/src
- Files:
-
- 13 modified
-
osg/ArgumentParser.cpp (modified) (2 diffs)
-
osg/CullSettings.cpp (modified) (1 diff)
-
osg/DisplaySettings.cpp (modified) (2 diffs)
-
osgDB/DatabasePager.cpp (modified) (3 diffs)
-
osgGA/DriveManipulator.cpp (modified) (1 diff)
-
osgPlugins/bsp/VBSPEntity.cpp (modified) (4 diffs)
-
osgPlugins/cfg/ConfigParser.cpp (modified) (3 diffs)
-
osgPlugins/dw/ReaderWriterDW.cpp (modified) (2 diffs)
-
osgPlugins/ive/DataOutputStream.cpp (modified) (1 diff)
-
osgPlugins/normals/ReaderWriterNormals.cpp (modified) (1 diff)
-
osgPlugins/txp/ReaderWriterTXP.cpp (modified) (2 diffs)
-
osgPlugins/txp/TXPParser.cpp (modified) (1 diff)
-
osgViewer/ViewerEventHandlers.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osg/ArgumentParser.cpp
r9145 r10413 17 17 #include <osg/ArgumentParser> 18 18 #include <osg/ApplicationUsage> 19 #include <osg/Math> 19 20 #include <osg/Notify> 20 21 … … 164 165 break; 165 166 } 166 case Parameter::FLOAT_PARAMETER: *_value._float = atof(str); break;167 case Parameter::DOUBLE_PARAMETER: *_value._double = atof(str); break;167 case Parameter::FLOAT_PARAMETER: *_value._float = osg::asciiToFloat(str); break; 168 case Parameter::DOUBLE_PARAMETER: *_value._double = osg::asciiToDouble(str); break; 168 169 case Parameter::INT_PARAMETER: *_value._int = atoi(str); break; 169 170 case Parameter::UNSIGNED_INT_PARAMETER: *_value._uint = atoi(str); break; -
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osg/CullSettings.cpp
r8137 r10413 112 112 if ((ptr = getenv("OSG_NEAR_FAR_RATIO")) != 0) 113 113 { 114 _nearFarRatio = atof(ptr);114 _nearFarRatio = osg::asciiToDouble(ptr); 115 115 116 116 osg::notify(osg::INFO)<<"Set near/far ratio to "<<_nearFarRatio<<std::endl; -
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osg/DisplaySettings.cpp
r9191 r10413 14 14 #include <osg/ArgumentParser> 15 15 #include <osg/ApplicationUsage> 16 #include <osg/Math> 16 17 #include <osg/Notify> 17 18 #include <osg/ref_ptr> … … 268 269 if( (ptr = getenv("OSG_EYE_SEPARATION")) != 0) 269 270 { 270 _eyeSeparation = atof(ptr);271 _eyeSeparation = osg::asciiToFloat(ptr); 271 272 } 272 273 273 274 if( (ptr = getenv("OSG_SCREEN_WIDTH")) != 0) 274 275 { 275 _screenWidth = atof(ptr);276 _screenWidth = osg::asciiToFloat(ptr); 276 277 } 277 278 278 279 if( (ptr = getenv("OSG_SCREEN_HEIGHT")) != 0) 279 280 { 280 _screenHeight = atof(ptr);281 _screenHeight = osg::asciiToFloat(ptr); 281 282 } 282 283 283 284 if( (ptr = getenv("OSG_SCREEN_DISTANCE")) != 0) 284 285 { 285 _screenDistance = atof(ptr);286 _screenDistance = osg::asciiToFloat(ptr); 286 287 } 287 288 -
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgDB/DatabasePager.cpp
r10151 r10413 886 886 if( (ptr = getenv("OSG_EXPIRY_DELAY")) != 0) 887 887 { 888 _expiryDelay = atof(ptr);888 _expiryDelay = osg::asciiToDouble(ptr); 889 889 osg::notify(osg::NOTICE)<<"Expiry delay = "<<_expiryDelay<<std::endl; 890 890 } … … 905 905 else 906 906 { 907 setReleaseDelay( atof(ptr));907 setReleaseDelay(osg::asciiToDouble(ptr)); 908 908 } 909 909 … … 944 944 if( (ptr = getenv("OSG_MINIMUM_COMPILE_TIME_PER_FRAME")) != 0) 945 945 { 946 _minimumTimeAvailableForGLCompileAndDeletePerFrame = atof(ptr);946 _minimumTimeAvailableForGLCompileAndDeletePerFrame = osg::asciiToDouble(ptr); 947 947 } 948 948 -
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgGA/DriveManipulator.cpp
r8561 r10413 37 37 if (getenv("OSG_DRIVE_MANIPULATOR_HEIGHT")) 38 38 { 39 height = atof(getenv("OSG_DRIVE_MANIPULATOR_HEIGHT"));39 height = osg::asciiToDouble(getenv("OSG_DRIVE_MANIPULATOR_HEIGHT")); 40 40 } 41 41 osg::notify(osg::INFO)<<"DriveManipulator::_height set to =="<<height<<std::endl; -
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgPlugins/bsp/VBSPEntity.cpp
r9475 r10413 182 182 Vec3f VBSPEntity::getVector(std::string str) 183 183 { 184 doublex, y, z;184 float x, y, z; 185 185 186 186 // Look for the first non-whitespace … … 191 191 192 192 if ((end > start) && (start != std::string::npos)) 193 x = atof(str.substr(start, end-start).c_str());193 x = osg::asciiToFloat(str.substr(start, end-start).c_str()); 194 194 else 195 195 return Vec3f(); … … 202 202 203 203 if ((end > start) && (start != std::string::npos)) 204 y = atof(str.substr(start, end-start).c_str());204 y = osg::asciiToFloat(str.substr(start, end-start).c_str()); 205 205 else 206 206 return Vec3f(); … … 215 215 216 216 if ((end > start) && (start != std::string::npos)) 217 z = atof(str.substr(start, end-start).c_str());217 z = osg::asciiToFloat(str.substr(start, end-start).c_str()); 218 218 else 219 219 return Vec3f(); -
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgPlugins/cfg/ConfigParser.cpp
r9756 r10413 1933 1933 1934 1934 { 1935 yyval.real = atof(flexer->YYText());1935 yyval.real = osg::asciiToFloat(flexer->YYText()); 1936 1936 ;} 1937 1937 break; … … 1940 1940 1941 1941 { 1942 yyval.real = atof(flexer->YYText());1942 yyval.real = osg::asciiToFloat(flexer->YYText()); 1943 1943 ;} 1944 1944 break; … … 1947 1947 1948 1948 { 1949 yyval.real = atof(flexer->YYText());1949 yyval.real = osg::asciiToFloat(flexer->YYText()); 1950 1950 ;} 1951 1951 break; -
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgPlugins/dw/ReaderWriterDW.cpp
r9527 r10413 859 859 } else if (strncmp(buff, "numPhases:",10)==0) { 860 860 } else if (strncmp(buff, "Opacity:",8)==0) { 861 float opacity= atof(buff+8);861 float opacity=osg::asciiToFloat(buff+8); 862 862 matpalet[nmat].setopacity(opacity); 863 863 } else if (strncmp(buff, "FallOff:",8)==0) { 864 float fo= atof(buff+8);864 float fo=osg::asciiToFloat(buff+8); 865 865 matpalet[nmat].setFallOff(fo); 866 866 } else if (strncmp(buff, "InnerHalfAngle:",15)==0) { 867 float ha= atof(buff+15);867 float ha=osg::asciiToFloat(buff+15); 868 868 matpalet[nmat].setHalfAngleIn(ha); 869 869 } else if (strncmp(buff, "OuterHalfAngle:",15)==0) { 870 float ha= atof(buff+15);870 float ha=osg::asciiToFloat(buff+15); 871 871 matpalet[nmat].setHalfAngleOut(ha); 872 872 } else if (strncmp(buff, "Brightness:",11)==0) { 873 float br= atof(buff+11);873 float br=osg::asciiToFloat(buff+11); 874 874 matpalet[nmat].setBright(br); 875 875 } else if (strncmp(buff, "Attentuation:",13)==0) { // oops - they can't spell … … 878 878 matpalet[nmat].setType(buff+14); 879 879 } else if (strncmp(buff, "SpecularReflectivity:",21)==0) { 880 float spec= atof(buff+21);880 float spec=osg::asciiToFloat(buff+21); 881 881 matpalet[nmat].setspecular(spec); 882 882 } else if (strncmp(buff, "SmoothnessExponent:",19)==0) { 883 float spec= atof(buff+19);883 float spec=osg::asciiToFloat(buff+19); 884 884 matpalet[nmat].setspecexp(spec*128.0f/100.0f); // convert to 0-128 range from percent 885 885 } else if (strncmp(buff, "TextureWidthAndHeight:",22)==0) { 886 886 char *ct=strchr(buff+22,','); 887 float repx= atof(buff+23), repy=atof(ct+1);887 float repx=osg::asciiToFloat(buff+23), repy=osg::asciiToFloat(ct+1); 888 888 matpalet[nmat].settxrep(repx, repy); 889 889 } else if (strncmp(buff, "PictureFile:",12)==0) { -
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgPlugins/ive/DataOutputStream.cpp
r9475 r10413 173 173 { 174 174 std::string numberString = optionsString.substr(endOfToken+1, numOfCharInNumber); 175 _maximumErrorToSizeRatio = atof(numberString.c_str());175 _maximumErrorToSizeRatio = osg::asciiToDouble(numberString.c_str()); 176 176 177 177 osg::notify(osg::DEBUG_INFO)<<"TerrainMaximumErrorToSizeRatio = "<<_maximumErrorToSizeRatio<<std::endl; -
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgPlugins/normals/ReaderWriterNormals.cpp
r9475 r10413 59 59 if( key == "scale" || key == "SCALE" ) 60 60 { 61 scale = atof( value.c_str() );61 scale = osg::asciiToFloat( value.c_str() ); 62 62 } 63 63 else if( key == "mode" || key == "MODE" ) -
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgPlugins/txp/ReaderWriterTXP.cpp
r9637 r10413 540 540 if(!token) 541 541 break; 542 locs[idx].zmin = (float)atof(token);542 locs[idx].zmin = osg::asciiToFloat(token); 543 543 nbTokenRead++; 544 544 … … 547 547 if(!token) 548 548 break; 549 locs[idx].zmax = (float)atof(token);549 locs[idx].zmax = osg::asciiToFloat(token); 550 550 nbTokenRead++; 551 551 -
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgPlugins/txp/TXPParser.cpp
r9637 r10413 103 103 if (getenv("OSG_TXP_DEFAULT_MAX_ANISOTROPY")) 104 104 { 105 _defaultMaxAnisotropy = atof(getenv("OSG_TXP_DEFAULT_MAX_ANISOTROPY"));105 _defaultMaxAnisotropy = osg::asciiToFloat(getenv("OSG_TXP_DEFAULT_MAX_ANISOTROPY")); 106 106 } 107 107 -
OpenSceneGraph/branches/OpenSceneGraph-2.8/src/osgViewer/ViewerEventHandlers.cpp
r9340 r10413 390 390 if (str) 391 391 { 392 _interval = 1.0f / atof(str);392 _interval = 1.0f / osg::asciiToDouble(str); 393 393 } 394 394 else
