diff --git a/examples/osgmovie/osgmovie.cpp b/examples/osgmovie/osgmovie.cpp index 4e70722a9..febfba5ba 100644 --- a/examples/osgmovie/osgmovie.cpp +++ b/examples/osgmovie/osgmovie.cpp @@ -292,6 +292,9 @@ osg::Geometry* createDomeDistortionMesh(const osg::Vec3& origin, const osg::Vec3 double collar_radius = 0.45; if (arguments.read("--collar", collar_radius)) {} + double rotationDegrees = 180.0; + if (arguments.read("--rotation", rotationDegrees)) {} + osg::Vec3d center(0.0,0.0,0.0); osg::Vec3d eye(0.0,0.0,0.0); @@ -330,14 +333,21 @@ osg::Geometry* createDomeDistortionMesh(const osg::Vec3& origin, const osg::Vec3 osg::Vec3 dx = xAxis*(width/((float)(noSteps-2))); osg::Vec3 dy = yAxis*(height/((float)(noSteps-1))); + osg::Vec3 top = origin + yAxis*height; + osg::Vec3d screenCenter = origin + widthVector*0.5f + heightVector*0.5f; float screenRadius = heightVector.length() * 0.5f; + double rotation = osg::DegreesToRadians(rotationDegrees); + osg::Vec3 cursor = bottom; int i,j; int midSteps = noSteps/2; + bool flip = false; + if (arguments.read("--flip")) { flip = true; } + for(i=0;i osg::PI_2) phi = osg::PI_2; @@ -359,7 +370,11 @@ osg::Geometry* createDomeDistortionMesh(const osg::Vec3& origin, const osg::Vec3 // osg::notify(osg::NOTICE)<<"cursor = "<getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height); + wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(screenNum), width, height); while (arguments.read("--width",width)) {} while (arguments.read("--height",height)) {} osg::ref_ptr traits = new osg::GraphicsContext::Traits; + traits->screenNum = screenNum; traits->x = 0; traits->y = 0; traits->width = width;