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)) if (arguments.read("--camera", lat, lon, alt, heading, incline, roll))
{ {
camera_specified=true; camera_specified=true;
lat = lat * M_PI / 180.0; // Convert to radians lat = osg::DegreesToRadians(lat);
lon = lon * M_PI / 180.0; // Convert to radians lon = osg::DegreesToRadians(lon);
heading = heading * M_PI / 180.0; // Convert to radians heading = osg::DegreesToRadians(heading);
incline = incline * M_PI / 180.0; // Convert to radians incline = osg::DegreesToRadians(incline);
roll = roll * M_PI / 180.0; // Convert to radians roll = osg::DegreesToRadians(roll);
} }
// load the data // load the data