From Jean-Sebastien Guay, "osgautocapture uses M_PI to convert degrees to radians, which didn't compile on Win32. Switched to using osg::DegreesToRadians. Also removed the "convert to radians" comment on each line, as the code clearly conveys this without needing a comment now."

This commit is contained in:
Robert Osfield 2008-11-27 09:45:41 +00:00
parent 25ec33d863
commit 12bfb6d79a

View File

@ -211,11 +211,11 @@ int main( int argc, char **argv )
if (arguments.read("--camera", lat, lon, alt, heading, incline, roll))
{
camera_specified=true;
lat = lat * M_PI / 180.0; // Convert to radians
lon = lon * M_PI / 180.0; // Convert to radians
heading = heading * M_PI / 180.0; // Convert to radians
incline = incline * M_PI / 180.0; // Convert to radians
roll = roll * M_PI / 180.0; // Convert to radians
lat = osg::DegreesToRadians(lat);
lon = osg::DegreesToRadians(lon);
heading = osg::DegreesToRadians(heading);
incline = osg::DegreesToRadians(incline);
roll = osg::DegreesToRadians(roll);
}
// load the data