From 7083773b64e5add2361816d5b2f8ea272d193ae3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 14 Mar 2003 20:35:45 +0000 Subject: [PATCH] Ported osgGLUT based src/Demos across to being osgProducer based, and placed them in the new examples/ directory. --- Make/makedirdefs | 37 +- examples/osganimate/GNUmakefile | 19 + examples/osganimate/GNUmakefile.inst | 14 + examples/osganimate/osganimate.cpp | 262 + examples/osgbillboard/GNUmakefile | 19 + examples/osgbillboard/GNUmakefile.inst | 15 + examples/osgbillboard/osgbillboard.cpp | 224 + examples/osgcallback/GNUmakefile | 19 + examples/osgcallback/GNUmakefile.inst | 15 + examples/osgcallback/osgcallback.cpp | 201 + examples/osgcameragroup/GNUmakefile | 2 +- examples/osgcameragroup/GNUmakefile.inst | 3 +- examples/osgclip/GNUmakefile | 18 + examples/osgclip/GNUmakefile.inst | 14 + examples/osgclip/osgclip.cpp | 201 + examples/osgcluster/GNUmakefile | 23 + examples/osgcluster/GNUmakefile.inst | 13 + examples/osgcluster/broadcaster.cpp | 188 + examples/osgcluster/broadcaster.h | 55 + examples/osgcluster/osgcluster.cpp | 408 ++ examples/osgcluster/receiver.cpp | 145 + examples/osgcluster/receiver.h | 51 + examples/osgconv/GNUmakefile | 1 - examples/osgconv/GNUmakefile.inst | 3 + examples/osgcopy/GNUmakefile | 18 + examples/osgcopy/GNUmakefile.inst | 14 + examples/osgcopy/osgcopy.cpp | 243 + examples/osgcubemap/GNUmakefile | 19 + examples/osgcubemap/GNUmakefile.inst | 15 + examples/osgcubemap/osgcubemap.cpp | 140 + examples/osggeodemo/GNUmakefile | 19 + examples/osggeodemo/GNUmakefile.inst | 15 + examples/osggeodemo/osggeodemo.cpp | 185 + examples/osggeometry/GNUmakefile | 18 + examples/osggeometry/GNUmakefile.inst | 14 + examples/osggeometry/osggeometry.cpp | 708 +++ examples/osghangglide/GNUmakefile | 33 + examples/osghangglide/GNUmakefile.inst | 22 + examples/osghangglide/GliderManipulator.cpp | 241 + examples/osghangglide/GliderManipulator.h | 65 + examples/osghangglide/base.cpp | 78 + examples/osghangglide/hat.cpp | 150 + examples/osghangglide/hat.h | 4 + examples/osghangglide/osghangglide.cpp | 168 + examples/osghangglide/sky.cpp | 124 + examples/osghangglide/tank.cpp | 166 + examples/osghangglide/terrain.cpp | 128 + examples/osghangglide/terrain_coords.h | 1528 ++++++ examples/osghangglide/terrain_normals.h | 4421 +++++++++++++++++ examples/osghangglide/terrain_texcoords.h | 2936 +++++++++++ examples/osghangglide/trees.cpp | 273 + examples/osghud/GNUmakefile | 2 +- examples/osghud/GNUmakefile.inst | 3 +- examples/osgimpostor/GNUmakefile | 19 + examples/osgimpostor/GNUmakefile.inst | 14 + examples/osgimpostor/TestManipulator.cpp | 382 ++ examples/osgimpostor/TestManipulator.h | 80 + examples/osgimpostor/osgimpostor.cpp | 344 ++ examples/osglight/GNUmakefile | 19 + examples/osglight/GNUmakefile.inst | 15 + examples/osglight/osglight.cpp | 379 ++ examples/osglightpoint/GNUmakefile | 19 + examples/osglightpoint/GNUmakefile.inst | 15 + examples/osglightpoint/osglightpoint.cpp | 189 + examples/osglogo/GNUmakefile | 18 + examples/osglogo/GNUmakefile.inst | 14 + examples/osglogo/osglogo.cpp | 465 ++ examples/osgmultitexture/GNUmakefile | 19 + examples/osgmultitexture/GNUmakefile.inst | 15 + examples/osgmultitexture/osgmultitexture.cpp | 112 + examples/osgoccluder/GNUmakefile | 19 + examples/osgoccluder/GNUmakefile.inst | 15 + examples/osgoccluder/osgoccluder.cpp | 370 ++ examples/osgparticle/GNUmakefile | 19 + examples/osgparticle/GNUmakefile.inst | 16 + examples/osgparticle/osgparticle.cpp | 405 ++ examples/osgprerender/GNUmakefile | 18 + examples/osgprerender/GNUmakefile.inst | 14 + examples/osgprerender/osgprerender.cpp | 444 ++ examples/osgreflect/GNUmakefile | 2 +- examples/osgreflect/GNUmakefile.inst | 5 +- examples/osgscribe/GNUmakefile | 18 + examples/osgscribe/GNUmakefile.inst | 14 + examples/osgscribe/osgscribe.cpp | 129 + examples/osgsequence/GNUmakefile | 18 + examples/osgsequence/GNUmakefile.inst | 14 + examples/osgsequence/osgsequence.cpp | 201 + .../osgshadowtexture/CreateShadowedScene.cpp | 274 + .../osgshadowtexture/CreateShadowedScene.h | 12 + examples/osgshadowtexture/GNUmakefile | 19 + examples/osgshadowtexture/GNUmakefile.inst | 15 + .../osgshadowtexture/osgshadowtexture.cpp | 240 + examples/osgshape/GNUmakefile | 18 + examples/osgshape/GNUmakefile.inst | 14 + examples/osgshape/osgshape.cpp | 143 + examples/osgteapot/GNUmakefile | 18 + examples/osgteapot/GNUmakefile.inst | 14 + examples/osgteapot/osgteapot.cpp | 374 ++ examples/osgtext/GNUmakefile | 2 +- examples/osgtext/GNUmakefile.inst | 3 +- examples/osgtexture1D/GNUmakefile | 18 + examples/osgtexture1D/GNUmakefile.inst | 14 + examples/osgtexture1D/osgtexture1D.cpp | 227 + examples/osgtexture2D/GNUmakefile | 18 + examples/osgtexture2D/GNUmakefile.inst | 14 + examples/osgtexture2D/osgtexture2D.cpp | 466 ++ examples/osgtexture3D/GNUmakefile | 18 + examples/osgtexture3D/GNUmakefile.inst | 14 + examples/osgtexture3D/osgtexture3D.cpp | 265 + examples/osgunittests/GNUmakefile | 19 + examples/osgunittests/GNUmakefile.inst | 15 + examples/osgunittests/osgunittests.cpp | 56 + examples/osgversion/GNUmakefile | 18 + examples/osgversion/GNUmakefile.inst | 14 + examples/osgversion/osgversion.cpp | 9 + examples/osgvertexprogram/GNUmakefile | 18 + examples/osgvertexprogram/GNUmakefile.inst | 14 + .../osgvertexprogram/osgvertexprogram.cpp | 424 ++ examples/osgviewer/GNUmakefile | 2 +- examples/osgviewer/GNUmakefile.inst | 3 +- rundemos.bat | 38 +- src/osgProducer/Viewer.cpp | 2 + 122 files changed, 20331 insertions(+), 40 deletions(-) create mode 100644 examples/osganimate/GNUmakefile create mode 100644 examples/osganimate/GNUmakefile.inst create mode 100644 examples/osganimate/osganimate.cpp create mode 100644 examples/osgbillboard/GNUmakefile create mode 100644 examples/osgbillboard/GNUmakefile.inst create mode 100644 examples/osgbillboard/osgbillboard.cpp create mode 100644 examples/osgcallback/GNUmakefile create mode 100644 examples/osgcallback/GNUmakefile.inst create mode 100644 examples/osgcallback/osgcallback.cpp create mode 100644 examples/osgclip/GNUmakefile create mode 100644 examples/osgclip/GNUmakefile.inst create mode 100644 examples/osgclip/osgclip.cpp create mode 100644 examples/osgcluster/GNUmakefile create mode 100644 examples/osgcluster/GNUmakefile.inst create mode 100644 examples/osgcluster/broadcaster.cpp create mode 100644 examples/osgcluster/broadcaster.h create mode 100644 examples/osgcluster/osgcluster.cpp create mode 100644 examples/osgcluster/receiver.cpp create mode 100644 examples/osgcluster/receiver.h create mode 100644 examples/osgcopy/GNUmakefile create mode 100644 examples/osgcopy/GNUmakefile.inst create mode 100644 examples/osgcopy/osgcopy.cpp create mode 100644 examples/osgcubemap/GNUmakefile create mode 100644 examples/osgcubemap/GNUmakefile.inst create mode 100644 examples/osgcubemap/osgcubemap.cpp create mode 100644 examples/osggeodemo/GNUmakefile create mode 100644 examples/osggeodemo/GNUmakefile.inst create mode 100644 examples/osggeodemo/osggeodemo.cpp create mode 100644 examples/osggeometry/GNUmakefile create mode 100644 examples/osggeometry/GNUmakefile.inst create mode 100644 examples/osggeometry/osggeometry.cpp create mode 100644 examples/osghangglide/GNUmakefile create mode 100644 examples/osghangglide/GNUmakefile.inst create mode 100644 examples/osghangglide/GliderManipulator.cpp create mode 100644 examples/osghangglide/GliderManipulator.h create mode 100644 examples/osghangglide/base.cpp create mode 100644 examples/osghangglide/hat.cpp create mode 100644 examples/osghangglide/hat.h create mode 100644 examples/osghangglide/osghangglide.cpp create mode 100644 examples/osghangglide/sky.cpp create mode 100644 examples/osghangglide/tank.cpp create mode 100644 examples/osghangglide/terrain.cpp create mode 100644 examples/osghangglide/terrain_coords.h create mode 100644 examples/osghangglide/terrain_normals.h create mode 100644 examples/osghangglide/terrain_texcoords.h create mode 100644 examples/osghangglide/trees.cpp create mode 100644 examples/osgimpostor/GNUmakefile create mode 100644 examples/osgimpostor/GNUmakefile.inst create mode 100644 examples/osgimpostor/TestManipulator.cpp create mode 100644 examples/osgimpostor/TestManipulator.h create mode 100644 examples/osgimpostor/osgimpostor.cpp create mode 100644 examples/osglight/GNUmakefile create mode 100644 examples/osglight/GNUmakefile.inst create mode 100644 examples/osglight/osglight.cpp create mode 100644 examples/osglightpoint/GNUmakefile create mode 100644 examples/osglightpoint/GNUmakefile.inst create mode 100644 examples/osglightpoint/osglightpoint.cpp create mode 100644 examples/osglogo/GNUmakefile create mode 100644 examples/osglogo/GNUmakefile.inst create mode 100644 examples/osglogo/osglogo.cpp create mode 100644 examples/osgmultitexture/GNUmakefile create mode 100644 examples/osgmultitexture/GNUmakefile.inst create mode 100644 examples/osgmultitexture/osgmultitexture.cpp create mode 100644 examples/osgoccluder/GNUmakefile create mode 100644 examples/osgoccluder/GNUmakefile.inst create mode 100644 examples/osgoccluder/osgoccluder.cpp create mode 100644 examples/osgparticle/GNUmakefile create mode 100644 examples/osgparticle/GNUmakefile.inst create mode 100644 examples/osgparticle/osgparticle.cpp create mode 100644 examples/osgprerender/GNUmakefile create mode 100644 examples/osgprerender/GNUmakefile.inst create mode 100644 examples/osgprerender/osgprerender.cpp create mode 100644 examples/osgscribe/GNUmakefile create mode 100644 examples/osgscribe/GNUmakefile.inst create mode 100644 examples/osgscribe/osgscribe.cpp create mode 100644 examples/osgsequence/GNUmakefile create mode 100644 examples/osgsequence/GNUmakefile.inst create mode 100644 examples/osgsequence/osgsequence.cpp create mode 100644 examples/osgshadowtexture/CreateShadowedScene.cpp create mode 100644 examples/osgshadowtexture/CreateShadowedScene.h create mode 100644 examples/osgshadowtexture/GNUmakefile create mode 100644 examples/osgshadowtexture/GNUmakefile.inst create mode 100644 examples/osgshadowtexture/osgshadowtexture.cpp create mode 100644 examples/osgshape/GNUmakefile create mode 100644 examples/osgshape/GNUmakefile.inst create mode 100644 examples/osgshape/osgshape.cpp create mode 100644 examples/osgteapot/GNUmakefile create mode 100644 examples/osgteapot/GNUmakefile.inst create mode 100644 examples/osgteapot/osgteapot.cpp create mode 100644 examples/osgtexture1D/GNUmakefile create mode 100644 examples/osgtexture1D/GNUmakefile.inst create mode 100644 examples/osgtexture1D/osgtexture1D.cpp create mode 100644 examples/osgtexture2D/GNUmakefile create mode 100644 examples/osgtexture2D/GNUmakefile.inst create mode 100644 examples/osgtexture2D/osgtexture2D.cpp create mode 100644 examples/osgtexture3D/GNUmakefile create mode 100644 examples/osgtexture3D/GNUmakefile.inst create mode 100644 examples/osgtexture3D/osgtexture3D.cpp create mode 100644 examples/osgunittests/GNUmakefile create mode 100644 examples/osgunittests/GNUmakefile.inst create mode 100644 examples/osgunittests/osgunittests.cpp create mode 100755 examples/osgversion/GNUmakefile create mode 100644 examples/osgversion/GNUmakefile.inst create mode 100644 examples/osgversion/osgversion.cpp create mode 100644 examples/osgvertexprogram/GNUmakefile create mode 100644 examples/osgvertexprogram/GNUmakefile.inst create mode 100644 examples/osgvertexprogram/osgvertexprogram.cpp diff --git a/Make/makedirdefs b/Make/makedirdefs index 9967d3330..6b42b3959 100644 --- a/Make/makedirdefs +++ b/Make/makedirdefs @@ -18,7 +18,7 @@ SRC_DIRS = \ osgSim\ osgPlugins\ ../examples\ - src/Demos +# src/Demos ################################################################ @@ -86,14 +86,45 @@ endif # Directories traversed in the TOPDIR/examples directory EXAMPLE_DIRS = \ + osganimate\ + osgbillboard\ + osgcallback\ osgcameragroup\ - osgviewer\ + osgclip\ osgconv\ + osgcopy\ + osgcubemap\ + osggeodemo\ + osggeometry\ + osghangglide\ osghud\ - osgtext\ + osgimpostor\ + osglight\ + osglightpoint\ + osglogo\ + osgmultitexture\ + osgoccluder\ + osgparticle\ + osgprerender\ osgreflect\ + osgscribe\ + osgsequence\ + osgshadowtexture\ + osgshape\ osgstereoimage\ + osgstereoimage\ + osgteapot\ + osgtext\ + osgtexture1D\ + osgtexture2D\ + osgtexture3D\ + osgunittests\ + osgversion\ + osgvertexprogram\ + osgviewer\ +# comment in you want to compile the cluster demo. +# EXAMPLE_DIRS += osgcluster ################################################################ # Directories traversed in the TOPDIR/src/Demos directory diff --git a/examples/osganimate/GNUmakefile b/examples/osganimate/GNUmakefile new file mode 100644 index 000000000..ee92da9d8 --- /dev/null +++ b/examples/osganimate/GNUmakefile @@ -0,0 +1,19 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osganimate.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osganimate + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules + diff --git a/examples/osganimate/GNUmakefile.inst b/examples/osganimate/GNUmakefile.inst new file mode 100644 index 000000000..60e4dab39 --- /dev/null +++ b/examples/osganimate/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osganimate.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osganimate + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osganimate/osganimate.cpp b/examples/osganimate/osganimate.cpp new file mode 100644 index 000000000..9b9ed643b --- /dev/null +++ b/examples/osganimate/osganimate.cpp @@ -0,0 +1,262 @@ +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include + +#include + + +osg::AnimationPath* createAnimationPath(const osg::Vec3& center,float radius,double looptime) +{ + // set up the animation path + osg::AnimationPath* animationPath = new osg::AnimationPath; + animationPath->setLoopMode(osg::AnimationPath::LOOP); + + int numSamples = 40; + float yaw = 0.0f; + float yaw_delta = 2.0f*osg::PI/((float)numSamples-1.0f); + float roll = osg::inDegrees(30.0f); + + double time=0.0f; + double time_delta = looptime/(double)numSamples; + for(int i=0;iinsert(time,osg::AnimationPath::ControlPoint(position,rotation)); + + yaw += yaw_delta; + time += time_delta; + + } + return animationPath; +} + +osg::Node* createBase(const osg::Vec3& center,float radius) +{ + + + + int numTilesX = 10; + int numTilesY = 10; + + float width = 2*radius; + float height = 2*radius; + + osg::Vec3 v000(center - osg::Vec3(width*0.5f,height*0.5f,0.0f)); + osg::Vec3 dx(osg::Vec3(width/((float)numTilesX),0.0,0.0f)); + osg::Vec3 dy(osg::Vec3(0.0f,height/((float)numTilesY),0.0f)); + + // fill in vertices for grid, note numTilesX+1 * numTilesY+1... + osg::Vec3Array* coords = new osg::Vec3Array; + int iy; + for(iy=0;iy<=numTilesY;++iy) + { + for(int ix=0;ix<=numTilesX;++ix) + { + coords->push_back(v000+dx*(float)ix+dy*(float)iy); + } + } + + //Just two colours - black and white. + osg::Vec4Array* colors = new osg::Vec4Array; + colors->push_back(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); // white + colors->push_back(osg::Vec4(0.0f,0.0f,0.0f,1.0f)); // black + int numColors=colors->size(); + + + int numIndicesPerRow=numTilesX+1; + osg::UByteArray* coordIndices = new osg::UByteArray; // assumes we are using less than 256 points... + osg::UByteArray* colorIndices = new osg::UByteArray; + for(iy=0;iypush_back(ix +(iy+1)*numIndicesPerRow); + coordIndices->push_back(ix +iy*numIndicesPerRow); + coordIndices->push_back((ix+1)+iy*numIndicesPerRow); + coordIndices->push_back((ix+1)+(iy+1)*numIndicesPerRow); + + // one color per quad + colorIndices->push_back((ix+iy)%numColors); + } + } + + + // set up a single normal + osg::Vec3Array* normals = new osg::Vec3Array; + normals->push_back(osg::Vec3(0.0f,0.0f,1.0f)); + + + osg::Geometry* geom = new osg::Geometry; + geom->setVertexArray(coords); + geom->setVertexIndices(coordIndices); + + geom->setColorArray(colors); + geom->setColorIndices(colorIndices); + geom->setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE); + + geom->setNormalArray(normals); + geom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,coordIndices->size())); + + osg::Geode* geode = new osg::Geode; + geode->addDrawable(geom); + + return geode; +} + +osg::Node* createMovingModel(const osg::Vec3& center, float radius) +{ + float animationLength = 10.0f; + + osg::AnimationPath* animationPath = createAnimationPath(center,radius,animationLength); + + osg::Group* model = new osg::Group; + + osg::Node* glider = osgDB::readNodeFile("glider.osg"); + if (glider) + { + const osg::BoundingSphere& bs = glider->getBound(); + + float size = radius/bs.radius()*0.3f; + osg::MatrixTransform* positioned = new osg::MatrixTransform; + positioned->setDataVariance(osg::Object::STATIC); + positioned->setMatrix(osg::Matrix::translate(-bs.center())* + osg::Matrix::scale(size,size,size)* + osg::Matrix::rotate(osg::inDegrees(-90.0f),0.0f,0.0f,1.0f)); + + positioned->addChild(glider); + + osg::PositionAttitudeTransform* xform = new osg::PositionAttitudeTransform; + xform->setUpdateCallback(new osg::AnimationPathCallback(animationPath,0.0,1.0)); + xform->addChild(positioned); + + model->addChild(xform); + } + + osg::Node* cessna = osgDB::readNodeFile("cessna.osg"); + if (cessna) + { + const osg::BoundingSphere& bs = cessna->getBound(); + + float size = radius/bs.radius()*0.3f; + osg::MatrixTransform* positioned = new osg::MatrixTransform; + positioned->setDataVariance(osg::Object::STATIC); + positioned->setMatrix(osg::Matrix::translate(-bs.center())* + osg::Matrix::scale(size,size,size)* + osg::Matrix::rotate(osg::inDegrees(180.0f),0.0f,0.0f,1.0f)); + + positioned->addChild(cessna); + + osg::MatrixTransform* xform = new osg::MatrixTransform; + xform->setUpdateCallback(new osg::AnimationPathCallback(animationPath,0.0f,2.0)); + xform->addChild(positioned); + + model->addChild(xform); + } + + return model; +} + +osg::Node* createModel() +{ + osg::Vec3 center(0.0f,0.0f,0.0f); + float radius = 100.0f; + + osg::Group* root = new osg::Group; + + root->addChild(createMovingModel(center,radius*0.8f)); + + root->addChild(createBase(center-osg::Vec3(0.0f,0.0f,radius*0.5),radius)); + + return root; +} + + +int main( int argc, char **argv ) +{ + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // initialize the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // load the nodes from the commandline arguments. + osg::Node* model = createModel(); + if (!model) + { + return 1; + } + + // tilt the scene so the default eye position is looking down on the model. + osg::MatrixTransform* rootnode = new osg::MatrixTransform; + rootnode->setMatrix(osg::Matrix::rotate(osg::inDegrees(30.0f),1.0f,0.0f,0.0f)); + rootnode->addChild(model); + + // run optimization over the scene graph + osgUtil::Optimizer optimzer; + optimzer.optimize(rootnode); + + // set the scene to render + viewer.setSceneData(rootnode); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgbillboard/GNUmakefile b/examples/osgbillboard/GNUmakefile new file mode 100644 index 000000000..f97526992 --- /dev/null +++ b/examples/osgbillboard/GNUmakefile @@ -0,0 +1,19 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgbillboard.cpp + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgbillboard + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgbillboard/GNUmakefile.inst b/examples/osgbillboard/GNUmakefile.inst new file mode 100644 index 000000000..ed8ff2968 --- /dev/null +++ b/examples/osgbillboard/GNUmakefile.inst @@ -0,0 +1,15 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgbillboard.cpp + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + + +EXEC = osgbillboard + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgbillboard/osgbillboard.cpp b/examples/osgbillboard/osgbillboard.cpp new file mode 100644 index 000000000..dda0ce247 --- /dev/null +++ b/examples/osgbillboard/osgbillboard.cpp @@ -0,0 +1,224 @@ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + + +// +// A simple demo demonstrating different texturing modes, +// including using of texture extensions. +// + + +typedef std::vector< osg::ref_ptr > ImageList; + +/** create quad at specified position. */ +osg::Drawable* createSquare(const osg::Vec3& corner,const osg::Vec3& width,const osg::Vec3& height, osg::Image* image=NULL) +{ + // set up the Geometry. + osg::Geometry* geom = new osg::Geometry; + + osg::Vec3Array* coords = new osg::Vec3Array(4); + (*coords)[0] = corner; + (*coords)[1] = corner+width; + (*coords)[2] = corner+width+height; + (*coords)[3] = corner+height; + + + geom->setVertexArray(coords); + + osg::Vec3Array* norms = new osg::Vec3Array(1); + (*norms)[0] = width^height; + (*norms)[0].normalize(); + + geom->setNormalArray(norms); + geom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + osg::Vec2Array* tcoords = new osg::Vec2Array(4); + (*tcoords)[0].set(0.0f,0.0f); + (*tcoords)[1].set(1.0f,0.0f); + (*tcoords)[2].set(1.0f,1.0f); + (*tcoords)[3].set(0.0f,1.0f); + geom->setTexCoordArray(0,tcoords); + + geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,4)); + + if (image) + { + osg::StateSet* stateset = new osg::StateSet; + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); + geom->setStateSet(stateset); + } + + return geom; +} + +osg::Drawable* createAxis(const osg::Vec3& corner,const osg::Vec3& xdir,const osg::Vec3& ydir,const osg::Vec3& zdir) +{ + // set up the Geometry. + osg::Geometry* geom = new osg::Geometry; + + osg::Vec3Array* coords = new osg::Vec3Array(6); + (*coords)[0] = corner; + (*coords)[1] = corner+xdir; + (*coords)[2] = corner; + (*coords)[3] = corner+ydir; + (*coords)[4] = corner; + (*coords)[5] = corner+zdir; + + geom->setVertexArray(coords); + + osg::Vec4 x_color(0.0f,1.0f,1.0f,1.0f); + osg::Vec4 y_color(0.0f,1.0f,1.0f,1.0f); + osg::Vec4 z_color(1.0f,0.0f,0.0f,1.0f); + + osg::Vec4Array* color = new osg::Vec4Array(6); + (*color)[0] = x_color; + (*color)[1] = x_color; + (*color)[2] = y_color; + (*color)[3] = y_color; + (*color)[4] = z_color; + (*color)[5] = z_color; + + geom->setColorArray(color); + geom->setColorBinding(osg::Geometry::BIND_PER_VERTEX); + + geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES,0,6)); + + osg::StateSet* stateset = new osg::StateSet; + osg::LineWidth* linewidth = new osg::LineWidth(); + linewidth->setWidth(4.0f); + stateset->setAttributeAndModes(linewidth,osg::StateAttribute::ON); + stateset->setMode(GL_LIGHTING,osg::StateAttribute::OFF); + geom->setStateSet(stateset); + + return geom; +} + +osg::Node* createModel() +{ + + // create the root node which will hold the model. + osg::Group* root = new osg::Group(); + + // add the drawable into a single goede to be shared... + osg::Billboard* center = new osg::Billboard(); + center->setMode(osg::Billboard::POINT_ROT_EYE); + center->addDrawable( + createSquare(osg::Vec3(-0.5f,0.0f,-0.5f),osg::Vec3(1.0f,0.0f,0.0f),osg::Vec3(0.0f,0.0f,1.0f),osgDB::readImageFile("Images/reflect.rgb")), + osg::Vec3(0.0f,0.0f,0.0f)); + + osg::Billboard* x_arrow = new osg::Billboard(); + x_arrow->setMode(osg::Billboard::AXIAL_ROT); + x_arrow->setAxis(osg::Vec3(1.0f,0.0f,0.0f)); + x_arrow->setNormal(osg::Vec3(0.0f,-1.0f,0.0f)); + x_arrow->addDrawable( + createSquare(osg::Vec3(-0.5f,0.0f,-0.5f),osg::Vec3(1.0f,0.0f,0.0f),osg::Vec3(0.0f,0.0f,1.0f),osgDB::readImageFile("Cubemap_axis/posx.png")), + osg::Vec3(5.0f,0.0f,0.0f)); + + osg::Billboard* y_arrow = new osg::Billboard(); + y_arrow->setMode(osg::Billboard::AXIAL_ROT); + y_arrow->setAxis(osg::Vec3(0.0f,1.0f,0.0f)); + y_arrow->setNormal(osg::Vec3(1.0f,0.0f,0.0f)); + y_arrow->addDrawable( + createSquare(osg::Vec3(0.0f,-0.5f,-0.5f),osg::Vec3(0.0f,1.0f,0.0f),osg::Vec3(0.0f,0.0f,1.0f),osgDB::readImageFile("Cubemap_axis/posy.png")), + osg::Vec3(0.0f,5.0f,0.0f)); + + osg::Billboard* z_arrow = new osg::Billboard(); + z_arrow->setMode(osg::Billboard::AXIAL_ROT); + z_arrow->setAxis(osg::Vec3(0.0f,0.0f,1.0f)); + z_arrow->setNormal(osg::Vec3(0.0f,-1.0f,0.0f)); + z_arrow->addDrawable( + createSquare(osg::Vec3(-0.5f,0.0f,-0.5f),osg::Vec3(1.0f,0.0f,0.0f),osg::Vec3(0.0f,0.0f,1.0f),osgDB::readImageFile("Cubemap_axis/posz.png")), + osg::Vec3(0.0f,0.0f,5.0f)); + + + + osg::Geode* axis = new osg::Geode(); + axis->addDrawable(createAxis(osg::Vec3(0.0f,0.0f,0.0f),osg::Vec3(5.0f,0.0f,0.0f),osg::Vec3(0.0f,5.0f,0.0f),osg::Vec3(0.0f,0.0f,5.0f))); + + + root->addChild(center); + root->addChild(x_arrow); + root->addChild(y_arrow); + root->addChild(z_arrow); + root->addChild(axis); + + return root; +} + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // initialize the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // create a model from the images. + osg::Node* rootNode = createModel(); + + // set the scene to render + viewer.setSceneData(rootNode); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgcallback/GNUmakefile b/examples/osgcallback/GNUmakefile new file mode 100644 index 000000000..6501c7cfb --- /dev/null +++ b/examples/osgcallback/GNUmakefile @@ -0,0 +1,19 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgcallback.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgcallback + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules + diff --git a/examples/osgcallback/GNUmakefile.inst b/examples/osgcallback/GNUmakefile.inst new file mode 100644 index 000000000..d48e2c76f --- /dev/null +++ b/examples/osgcallback/GNUmakefile.inst @@ -0,0 +1,15 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgcallback.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgcallback + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgcallback/osgcallback.cpp b/examples/osgcallback/osgcallback.cpp new file mode 100644 index 000000000..8ef5da5e2 --- /dev/null +++ b/examples/osgcallback/osgcallback.cpp @@ -0,0 +1,201 @@ +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include + + +class UpdateCallback : public osg::NodeCallback +{ + virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + { + std::cout<<"update callback - pre traverse"<drawImplementation(state); + std::cout<<"draw call back - post drawImplementation"<computeLocalToWorldMatrix"<computeLocalToWorldMatrix(matrix,nv); + std::cout<<"computeLocalToWorldMatrix - post transform->computeLocalToWorldMatrix"<computeWorldToLocalMatrix"<computeWorldToLocalMatrix(matrix,nv); + std::cout<<"computeWorldToLocalMatrix - post transform->computeWorldToLocalMatrix"<setUpdateCallback(new DrawableUpdateCallback()); + geode.getDrawable(i)->setCullCallback(new DrawableCullCallback()); + geode.getDrawable(i)->setDrawCallback(new DrawableDrawCallback()); + } + } + + virtual void apply(osg::Transform& node) + { + node.setComputeTransformCallback(new TransformCallback()); + apply((osg::Node&)node); + } +}; + +int main( int argc, char **argv ) +{ + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // initialize the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // load the nodes from the commandline arguments. + osg::Node* rootnode = osgDB::readNodeFiles(arguments); + if (!rootnode) + { +// write_usage(osg::notify(osg::NOTICE),argv[0]); + return 1; + } + + // run optimization over the scene graph + osgUtil::Optimizer optimzer; + optimzer.optimize(rootnode); + + // insert all the callbacks + InsertCallbacksVisitor icv; + rootnode->accept(icv); + + // set the scene to render + viewer.setSceneData(rootnode); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgcameragroup/GNUmakefile b/examples/osgcameragroup/GNUmakefile index 4bf24a62f..0375468ff 100644 --- a/examples/osgcameragroup/GNUmakefile +++ b/examples/osgcameragroup/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgcameragroup.cpp\ -LIBS += -losgProducer -lProducer $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgcameragroup/GNUmakefile.inst b/examples/osgcameragroup/GNUmakefile.inst index afc452b84..d7dc28687 100644 --- a/examples/osgcameragroup/GNUmakefile.inst +++ b/examples/osgcameragroup/GNUmakefile.inst @@ -4,12 +4,11 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgcameragroup.cpp\ -LIBS += -losgProducer -lProducer $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgcameragroup INC += $(PRODUCER_INCLUDE_DIR) LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgclip/GNUmakefile b/examples/osgclip/GNUmakefile new file mode 100644 index 000000000..b2b852d50 --- /dev/null +++ b/examples/osgclip/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgclip.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgclip + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgclip/GNUmakefile.inst b/examples/osgclip/GNUmakefile.inst new file mode 100644 index 000000000..9fdf6bb57 --- /dev/null +++ b/examples/osgclip/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgclip.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgclip + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgclip/osgclip.cpp b/examples/osgclip/osgclip.cpp new file mode 100644 index 000000000..d893be143 --- /dev/null +++ b/examples/osgclip/osgclip.cpp @@ -0,0 +1,201 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include + +void write_usage(std::ostream& out,const std::string& name) +{ + out << std::endl; + out <<"usage:"<< std::endl; + out <<" "<setMode(osg::PolygonMode::FRONT_AND_BACK,osg::PolygonMode::LINE); + stateset->setAttributeAndModes(polymode,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON); + + osg::Group* wireframe_subgraph = new osg::Group; + wireframe_subgraph->setStateSet(stateset); + wireframe_subgraph->addChild(subgraph); + rootnode->addChild(wireframe_subgraph); + +/* + // simple approach to adding a clipnode above a subrgaph. + + // create clipped part. + osg::ClipNode* clipped_subgraph = new osg::ClipNode; + + osg::BoundingSphere bs = subgraph->getBound(); + bs.radius()*= 0.4f; + + osg::BoundingBox bb; + bb.expandBy(bs); + + + clipped_subgraph->createClipBox(bb); + clipped_subgraph->addChild(subgraph); + rootnode->addChild(clipped_subgraph); +*/ + + + // more complex approach to managing ClipNode, allowing + // ClipNode node to be transformed independantly from the subgraph + // that it is clipping. + + osg::MatrixTransform* transform= new osg::MatrixTransform; + + osg::NodeCallback* nc = new osgUtil::TransformCallback(subgraph->getBound().center(),osg::Vec3(0.0f,0.0f,1.0f),osg::inDegrees(45.0f)); + transform->setUpdateCallback(nc); + + osg::ClipNode* clipnode = new osg::ClipNode; + osg::BoundingSphere bs = subgraph->getBound(); + bs.radius()*= 0.4f; + + osg::BoundingBox bb; + bb.expandBy(bs); + + clipnode->createClipBox(bb); + clipnode->setCullingActive(false); + + transform->addChild(clipnode); + rootnode->addChild(transform); + + + // create clipped part. + osg::Group* clipped_subgraph = new osg::Group; + + clipped_subgraph->setStateSet(clipnode->getStateSet()); + clipped_subgraph->addChild(subgraph); + rootnode->addChild(clipped_subgraph); + + return rootnode; +} + + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // initialize the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // load the nodes from the commandline arguments. + osg::Node* loadedModel = osgDB::readNodeFiles(arguments); + if (!loadedModel) + { + write_usage(osg::notify(osg::NOTICE),argv[0]); + return 1; + } + + // decorate the scenegraph with a clip node. + osg::Node* rootnode = decorate_with_clip_node(loadedModel); + + + + // run optimization over the scene graph + osgUtil::Optimizer optimzer; + optimzer.optimize(rootnode); + + // set the scene to render + viewer.setSceneData(rootnode); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgcluster/GNUmakefile b/examples/osgcluster/GNUmakefile new file mode 100644 index 000000000..10152355a --- /dev/null +++ b/examples/osgcluster/GNUmakefile @@ -0,0 +1,23 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + broadcaster.cpp\ + osgcluster.cpp\ + receiver.cpp\ + +HEADERFILES =\ + broadcaster.h\ + receiver.h\ + + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(SOCKET_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + $(HEADERFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgcluster + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgcluster/GNUmakefile.inst b/examples/osgcluster/GNUmakefile.inst new file mode 100644 index 000000000..c04ed0fdd --- /dev/null +++ b/examples/osgcluster/GNUmakefile.inst @@ -0,0 +1,13 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + broadcaster.cpp\ + osgcluster.cpp\ + receiver.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(SOCKET_LIBS) $(OTHER_LIBS) + +EXEC = osgcluster + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgcluster/broadcaster.cpp b/examples/osgcluster/broadcaster.cpp new file mode 100644 index 000000000..8a307b2c8 --- /dev/null +++ b/examples/osgcluster/broadcaster.cpp @@ -0,0 +1,188 @@ +#include +#include +#include + +#if !defined (WIN32) +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + +#include + +#if defined(__linux) + #include + #include +#elif defined(__FreeBSD__) + #include + #include +#elif defined(__sgi) + #include + #include +#elif defined(__CYGWIN__) + // nothing needed +#elif defined(__sun) + #include + #include +#elif defined (__DARWIN_OSX__) + #include + #include +#elif defined (WIN32) + #include + #include +#elif defined (__hpux__) + #include +#else + #error Teach me how to build on this system +#endif + +#include "broadcaster.h" + +#define _VERBOSE 1 + +Broadcaster::Broadcaster( void ) +{ + _port = 0; + _initialized = false; + _buffer = 0L; + _address = 0; +} + +Broadcaster::~Broadcaster( void ) +{ +#if defined (WIN32) + closesocket( _so); +#else + close( _so ); +#endif +} + +bool Broadcaster::init( void ) +{ +#if defined (WIN32) + WORD version = MAKEWORD(1,1); + WSADATA wsaData; + // First, we start up Winsock + WSAStartup(version, &wsaData); +#endif + + if( _port == 0 ) + { + fprintf( stderr, "Broadcaster::init() - port not defined\n" ); + return false; + } + + if( (_so = socket( AF_INET, SOCK_DGRAM, 0 )) < 0 ) + { + perror( "Socket" ); + return false; + } +#if defined (WIN32) + const BOOL on = TRUE; +#else + int on = 1; +#endif + +#if defined (WIN32) + setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char *) &on, sizeof(int)); +#else + setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); +#endif + + saddr.sin_family = AF_INET; + saddr.sin_port = htons( _port ); + if( _address == 0 ) + { +#if defined (WIN32) + setsockopt( _so, SOL_SOCKET, SO_BROADCAST, (const char *) &on, sizeof(int)); +#else + setsockopt( _so, SOL_SOCKET, SO_BROADCAST, &on, sizeof(on)); +#endif + +#if !defined (WIN32) + struct ifreq ifr; +#endif +#if defined (__linux) + strcpy( ifr.ifr_name, "eth0" ); +#elif defined(__sun) + strcpy( ifr.ifr_name, "hme0" ); +#elif !defined (WIN32) + strcpy( ifr.ifr_name, "ef0" ); +#endif +#if defined (WIN32) // get the server address + saddr.sin_addr.s_addr = htonl(INADDR_BROADCAST); + } +#else + if( (ioctl( _so, SIOCGIFBRDADDR, &ifr)) < 0 ) + { + perror( "Broadcaster::init() Cannot get Broadcast Address" ); + return false; + } + saddr.sin_addr.s_addr = (((sockaddr_in *)&ifr.ifr_broadaddr)->sin_addr.s_addr); + } + else + { + saddr.sin_addr.s_addr = _address; + } +#endif +#define _VERBOSE 1 +#ifdef _VERBOSE + unsigned char *ptr = (unsigned char *)&saddr.sin_addr.s_addr; + printf( "Broadcast address : %u.%u.%u.%u\n", ptr[0], ptr[1], ptr[2], ptr[3] ); +#endif + + _initialized = true; + return _initialized; +} + +void Broadcaster::setHost( const char *hostname ) +{ + struct hostent *h; + if( (h = gethostbyname( hostname )) == 0L ) + { + fprintf( stderr, "Broadcaster::setHost() - Cannot resolv an address for \"%s\".\n", hostname ); + _address = 0; + } + else + _address = *(( unsigned long *)h->h_addr); +} + +void Broadcaster::setPort( const short port ) +{ + _port = port; +} + +void Broadcaster::setBuffer( void *buffer, const unsigned int size ) +{ + _buffer = buffer; + _buffer_size = size; +} + +void Broadcaster::sync( void ) +{ + if(!_initialized) init(); + + if( _buffer == 0L ) + { + fprintf( stderr, "Broadcaster::sync() - No buffer\n" ); + return; + } + +#if defined (WIN32) + unsigned int size = sizeof( SOCKADDR_IN ); + sendto( _so, (const char *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size ); + int err = WSAGetLastError (); + int *dum = (int*) _buffer; +#else + unsigned int size = sizeof( struct sockaddr_in ); + sendto( _so, (const void *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size ); +#endif + +} + diff --git a/examples/osgcluster/broadcaster.h b/examples/osgcluster/broadcaster.h new file mode 100644 index 000000000..32d84892d --- /dev/null +++ b/examples/osgcluster/broadcaster.h @@ -0,0 +1,55 @@ +#ifndef __BROADCASTER_H +#define __BROADCASTER_H + +//////////////////////////////////////////////////////////// +// Broadcaster.h +// +// Class definition for broadcasting a buffer to a LAN +// + +#ifndef WIN32 + #include +#endif + +class Broadcaster +{ + public : + + Broadcaster( void ); + ~Broadcaster( void ); + + // Set the broadcast port + void setPort( const short port ); + + // Set the buffer to be broadcast + void setBuffer( void *buffer, const unsigned int buffer_size ); + + // Set a recipient host. If this is used, the Broadcaster + // no longer broadcasts, but rather directs UDP packets at + // host. + void setHost( const char *hostname ); + + // Sync broadcasts the buffer + void sync( void ); + + private : + bool init( void ); + + private : +#if defined (WIN32) + SOCKET _so; +#else + int _so; +#endif + bool _initialized; + short _port; + void *_buffer; + unsigned int _buffer_size; +#if defined (WIN32) + SOCKADDR_IN saddr; +#else + struct sockaddr_in saddr; +#endif + unsigned long _address; +}; +#endif diff --git a/examples/osgcluster/osgcluster.cpp b/examples/osgcluster/osgcluster.cpp new file mode 100644 index 000000000..24254ba00 --- /dev/null +++ b/examples/osgcluster/osgcluster.cpp @@ -0,0 +1,408 @@ +#ifdef USE_MEM_CHECK +#include +#endif + +#include +#include + +#include +#include + +#include + +#include + +#if defined (WIN32) +#include +#endif + +#include "receiver.h" +#include "broadcaster.h" + +typedef unsigned char * BytePtr; +template +inline void swapBytes( T &s ) +{ + if( sizeof( T ) == 1 ) return; + + T d = s; + BytePtr sptr = (BytePtr)&s; + BytePtr dptr = &(((BytePtr)&d)[sizeof(T)-1]); + + for( unsigned int i = 0; i < sizeof(T); i++ ) + *(sptr++) = *(dptr--); +} + +class CameraPacket { + public: + + CameraPacket():_masterKilled(false) + { + _byte_order = 0x12345678; + } + + void setPacket(const osg::Camera& camera,const osg::FrameStamp* frameStamp) + { + _eye = camera.getEyePoint(); + _center = camera.getCenterPoint(); + _up = camera.getUpVector(); + if (frameStamp) + { + _frameStamp = *frameStamp; + } + } + + void getCamera(osg::Camera& camera,float angle_offset=0.0f) + { + + osg::Vec3 lv = _center-_eye; + osg::Matrix matrix; + matrix.makeIdentity(); + matrix.makeRotate(angle_offset,_up.x(),_up.y(),_up.z()); + lv = lv*matrix; + + camera.setLookAt(_eye,_eye+lv,_up); + + } + + void getSceneViewUpdate(osgUtil::SceneView& sv) + { + // note pass a separate reference counted FrameStamp + // rather than this frame stamp as it can get overwritten. + sv.setFrameStamp(new osg::FrameStamp(_frameStamp)); + } + + + void checkByteOrder( void ) + { + if( _byte_order == 0x78563412 ) // We're backwards + { + swapBytes( _byte_order ); + swapBytes( _masterKilled ); + swapBytes( _eye[0] ); + swapBytes( _eye[1] ); + swapBytes( _eye[2] ); + swapBytes( _center[0] ); + swapBytes( _center[1] ); + swapBytes( _center[2] ); + swapBytes( _up[0] ); + swapBytes( _up[1] ); + swapBytes( _up[2] ); + swapBytes( _attachMatrix ); + for( int i = 0; i < 16; i++ ) + swapBytes( _matrix.ptr()[i] ); + } + } + + + void setMasterKilled(const bool flag) { _masterKilled = flag; } + const bool getMasterKilled() const { return _masterKilled; } + + unsigned long _byte_order; + bool _masterKilled; + osg::Vec3 _eye; + osg::Vec3 _center; + osg::Vec3 _up; + bool _attachMatrix; + osg::Matrix _matrix; + + // note don't use a ref_ptr as used elsewhere for FrameStamp + // since we don't want to copy the pointer - but the memory. + // FrameStamp doesn't have a private destructor to allow + // us to do this, even though its a reference counted object. + osg::FrameStamp _frameStamp; + +}; + +// using namespace osgUtil required to get round VisualStudio's inablility +// to handle osgUtil::SceneView::app() in the code below, only SceneView::app +// works..but this breaks the IRIX build, unless you have the osgUtil??! +// Robert Osfield, July 2002. +using namespace osgUtil; + +class MySceneView : public SceneView { + + public: + + enum ViewerMode + { + STAND_ALONE, + SLAVE, + MASTER + }; + + MySceneView(ViewerMode viewerMode,int socketNumber,float camera_fov, float camera_offset): + _viewerMode(viewerMode),_socketNumber(socketNumber), + _camera_fov(camera_fov), _camera_offset(camera_offset) + { + setDefaults(); + getCamera()->setAdjustAspectRatioMode(osg::Camera::ADJUST_VERTICAL); + getCamera()->setFOV(camera_fov,camera_fov*(600.0f/800.0f),1.0f,1000.0f); + + _bc.setPort(socketNumber); + _rc.setPort(socketNumber); + }; + + ~MySceneView() + { + if (_viewerMode==MASTER) + { + // need to broadcast my death. + CameraPacket cp; + cp.setPacket(*getCamera(),getFrameStamp()); + cp.setMasterKilled(true); + + _bc.setBuffer(&cp, sizeof( CameraPacket )); + _bc.sync(); + + std::cout << "broadcasting death"< NodeList; + NodeList nodeList; + for( i = 1; i < argc; i++ ) + { + + if (argv[i][0]=='-') + { + switch(argv[i][1]) + { + + case('m'): + viewerMode = MySceneView::MASTER; + break; + case('s'): + viewerMode = MySceneView::SLAVE; + break; + case('n'): + ++i; + if (iloadLibrary(argv[i]); + } + break; + case('e'): + ++i; + if (icreateLibraryNameForExt(argv[i]); + osgDB::Registry::instance()->loadLibrary(libName); + } + break; + } + } else + { + osg::Node *node = osgDB::readNodeFile( argv[i] ); + + if( node != (osg::Node *)0L ) + { + if (node->getName().empty()) node->setName( argv[i] ); + nodeList.push_back(node); + } + } + + } + + if (nodeList.size()==0) + { + osg::notify(osg::WARN) << "No data loaded."<1 + { + osg::Group* group = new osg::Group(); + for(NodeList::iterator itr=nodeList.begin(); + itr!=nodeList.end(); + ++itr) + { + group->addChild(*itr); + } + + rootnode = group; + } + + return rootnode; +} + + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + + osg::Timer timer; + osg::Timer_t before_load = timer.tick(); + + MySceneView::ViewerMode viewerMode = MySceneView::STAND_ALONE; + int socketNumber=8100; + float camera_fov=45.0f; + float camera_offset=45.0f; + + osg::Node* rootnode = getNodeFromFiles( argc, argv, viewerMode, socketNumber,camera_fov,camera_offset); + + osg::Timer_t after_load = timer.tick(); + std::cout << "Time for load = "< mySceneView = new MySceneView(viewerMode,socketNumber,camera_fov,osg::inDegrees(camera_offset)); + mySceneView->setSceneData(rootnode); + + // set the scene to render + viewer.setSceneData(mySceneView.get()); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgcluster/receiver.cpp b/examples/osgcluster/receiver.cpp new file mode 100644 index 000000000..c50481388 --- /dev/null +++ b/examples/osgcluster/receiver.cpp @@ -0,0 +1,145 @@ +#include +#include +#include +#if defined (WIN32) +#include +#else +#include +#include +#include +#include +#include +#include +#include +#endif +#include + + +#include "receiver.h" + +Receiver::Receiver( void ) +{ + _port = 0; + _initialized = false; + _buffer = 0L; +} + +Receiver::~Receiver( void ) +{ +#if defined (WIN32) + closesocket( _so); +#else + close( _so ); +#endif +} + +bool Receiver::init( void ) +{ +#ifdef WIN32 + WORD version = MAKEWORD(1,1); + WSADATA wsaData; + // First, we start up Winsock + WSAStartup(version, &wsaData); +#endif + + if( _port == 0 ) + { + fprintf( stderr, "Receiver::init() - port not defined\n" ); + return false; + } + + if( (_so = socket( AF_INET, SOCK_DGRAM, 0 )) < 0 ) + { + perror( "Socket" ); + return false; + } +#if defined (WIN32) +// const BOOL on = TRUE; +// setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char*) &on, sizeof(int)); +#else + int on = 1; + setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); +#endif + +// struct sockaddr_in saddr; + saddr.sin_family = AF_INET; + saddr.sin_port = htons( _port ); +#if defined (WIN32) + saddr.sin_addr.s_addr = htonl(INADDR_ANY); +#else + saddr.sin_addr.s_addr = 0; +#endif + + if( bind( _so, (struct sockaddr *)&saddr, sizeof( saddr )) < 0 ) + { + perror( "bind" ); + return false; + } + + _initialized = true; + return _initialized; +} + + +void Receiver::setPort( const short port ) +{ + _port = port; +} + +void Receiver::setBuffer( void *buffer, const unsigned int size ) +{ + _buffer = buffer; + _buffer_size = size; +} + +void Receiver::sync( void ) +{ + if(!_initialized) init(); + + if( _buffer == 0L ) + { + fprintf( stderr, "Receiver::sync() - No buffer\n" ); + return; + } + +#if defined(__linux) || defined(__FreeBSD__) + socklen_t +#else + int +#endif + size = sizeof( struct sockaddr_in ); + + fd_set fdset; + FD_ZERO( &fdset ); + FD_SET( _so, &fdset ); + + struct timeval tv; + tv.tv_sec = 0; + tv.tv_usec = 0; + +#if defined (WIN32) +// saddr.sin_port = htons( _port ); + recvfrom( _so, (char *)_buffer, _buffer_size, 0, (sockaddr*)&saddr, &size ); +// recvfrom(sock_Receive, szMessage, 256, 0, (sockaddr*)&addr_Cli, &clilen) + int err = WSAGetLastError (); + int *dum = (int*) _buffer; + + while( select( _so+1, &fdset, 0L, 0L, &tv ) ) + { + if( FD_ISSET( _so, &fdset ) ) + { + recvfrom( _so, (char *)_buffer, _buffer_size, 0, (sockaddr*)&saddr, &size ); + } + } +#else + recvfrom( _so, (caddr_t)_buffer, _buffer_size, 0, 0, &size ); + while( select( _so+1, &fdset, 0L, 0L, &tv ) ) + { + if( FD_ISSET( _so, &fdset ) ) + { + recvfrom( _so, (caddr_t)_buffer, _buffer_size, 0, 0, &size ); + } + } +#endif +} + diff --git a/examples/osgcluster/receiver.h b/examples/osgcluster/receiver.h new file mode 100644 index 000000000..f9043d106 --- /dev/null +++ b/examples/osgcluster/receiver.h @@ -0,0 +1,51 @@ +#ifndef __RECEIVER_H +#define __RECEIVER_H + + +//////////////////////////////////////////////////////////// +// Receiver.h +// +// Class definition for the recipient of a broadcasted message +// + +#ifndef WIN32 + #include +#endif + +class Receiver +{ + public : + + Receiver(); + ~Receiver(); + + // setBuffer defines the buffer into which the broadcasted + // message will be received. + void setBuffer( void *buffer, const unsigned int size ); + + // Define what port to listen and bind to + void setPort( const short port ); + + // Sync does a blocking wait to recieve next message + void sync( void ); + + private : + bool init( void ); + + private : +#if defined (WIN32) + SOCKET _so; +#else + int _so; +#endif +#if defined (WIN32) + SOCKADDR_IN saddr; +#else + struct sockaddr_in saddr; +#endif + bool _initialized; + short _port; + void *_buffer; + unsigned int _buffer_size; +}; +#endif diff --git a/examples/osgconv/GNUmakefile b/examples/osgconv/GNUmakefile index 396717124..abe85c6a0 100644 --- a/examples/osgconv/GNUmakefile +++ b/examples/osgconv/GNUmakefile @@ -17,5 +17,4 @@ INSTFILES = \ EXEC = osgconv - include $(TOPDIR)/Make/makerules diff --git a/examples/osgconv/GNUmakefile.inst b/examples/osgconv/GNUmakefile.inst index 1607a0d46..a164b6a45 100644 --- a/examples/osgconv/GNUmakefile.inst +++ b/examples/osgconv/GNUmakefile.inst @@ -13,4 +13,7 @@ INSTFILES =\ $(CXXFILES)\ Makefile.inst=Makefile +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + include $(TOPDIR)/Make/makerules diff --git a/examples/osgcopy/GNUmakefile b/examples/osgcopy/GNUmakefile new file mode 100644 index 000000000..c8090e6b9 --- /dev/null +++ b/examples/osgcopy/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgcopy.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgcopy + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgcopy/GNUmakefile.inst b/examples/osgcopy/GNUmakefile.inst new file mode 100644 index 000000000..ac64cf6b1 --- /dev/null +++ b/examples/osgcopy/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgcopy.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgcopy + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgcopy/osgcopy.cpp b/examples/osgcopy/osgcopy.cpp new file mode 100644 index 000000000..6bdbf9985 --- /dev/null +++ b/examples/osgcopy/osgcopy.cpp @@ -0,0 +1,243 @@ +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +// Customize the CopyOp so that we add our own verbose +// output of what's being copied. +class MyCopyOp : public osg::CopyOp +{ + public: + + inline MyCopyOp(CopyFlags flags=SHALLOW_COPY): + osg::CopyOp(flags), + _indent(0), + _step(4) {} + + inline void moveIn() const { _indent += _step; } + inline void moveOut() const { _indent -= _step; } + inline void writeIndent() const + { + for(int i=0;i<_indent;++i) std::cout << " "; + } + + virtual osg::Referenced* operator() (const osg::Referenced* ref) const + { + writeIndent(); std::cout << "copying Referenced "<className(); + std::cout<className()<<" '"<getName()<<"'"; + std::cout<className(); + std::cout<className(); + std::cout<className(); + std::cout<className(); + std::cout<className(); + std::cout<setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // initialize the viewer. + osgProducer::Viewer viewer(arguments); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // load the nodes from the commandline arguments. + osg::Node* rootnode = osgDB::readNodeFiles(arguments); + if (!rootnode) + { + return 1; + } + + // run optimization over the scene graph + osgUtil::Optimizer optimzer; + optimzer.optimize(rootnode); + +// ------------- Start of copy specific code ------------------------------------------------------- + + // do a deep copy, using MyCopyOp to reveal whats going on under the good, + // in your own code you'd typically just use the basic osg::CopyOp something like + // osg::Node* mycopy = dynamic_cast(rootnode->clone(osg::CopyOp::DEEP_COPY_ALL)); + std::cout << "Doing a deep copy of scene graph"<(rootnode->clone(MyCopyOp(osg::CopyOp::DEEP_COPY_ALL))); + + std::cout << "----------------------------------------------------------------"<(rootnode->clone(MyCopyOp(osg::CopyOp::SHALLOW_COPY))); + + + // write out the various scene graphs so that they can be browsed, either + // in an editor or using a graphics diff tool gdiff/xdiff/xxdiff. + std::cout << std::endl << "Writing out the original scene graph as 'original.osg'"<(rootnode->clone(osg::CopyOp::DEEP_COPY_NODES | DEEP_COPY_DRAWABLES)); + // Which shares state but creates copies of all nodes and drawables (which contain the geometry). + // + // You may also want to subclass from CopyOp to provide finer grained control of what gets shared (shallow copy) vs + // cloned (deep copy). + + + +// ------------- End of copy specific code ------------------------------------------------------- + + // set the scene to render + viewer.setSceneData(rootnode); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgcubemap/GNUmakefile b/examples/osgcubemap/GNUmakefile new file mode 100644 index 000000000..5441e982d --- /dev/null +++ b/examples/osgcubemap/GNUmakefile @@ -0,0 +1,19 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgcubemap.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgcubemap + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules + diff --git a/examples/osgcubemap/GNUmakefile.inst b/examples/osgcubemap/GNUmakefile.inst new file mode 100644 index 000000000..754ce0980 --- /dev/null +++ b/examples/osgcubemap/GNUmakefile.inst @@ -0,0 +1,15 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgcubemap.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgcubemap + + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgcubemap/osgcubemap.cpp b/examples/osgcubemap/osgcubemap.cpp new file mode 100644 index 000000000..8c33c3f49 --- /dev/null +++ b/examples/osgcubemap/osgcubemap.cpp @@ -0,0 +1,140 @@ +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include + +void create_specular_highlights(osg::Node *node) +{ + osg::StateSet *ss = node->getOrCreateStateSet(); + + // create and setup the texture object + osg::TextureCubeMap *tcm = new osg::TextureCubeMap; + tcm->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP); + tcm->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP); + tcm->setWrap(osg::Texture::WRAP_R, osg::Texture::CLAMP); + tcm->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR_MIPMAP_LINEAR); + tcm->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR); + + // generate the six highlight map images (light direction = [1, 1, -1]) + osgUtil::HighlightMapGenerator *mapgen = new osgUtil::HighlightMapGenerator( + osg::Vec3(1, 1, -1), // light direction + osg::Vec4(1, 0.9f, 0.8f, 1), // light color + 8); // specular exponent + + mapgen->generateMap(); + + // assign the six images to the texture object + tcm->setImage(osg::TextureCubeMap::POSITIVE_X, mapgen->getImage(osg::TextureCubeMap::POSITIVE_X)); + tcm->setImage(osg::TextureCubeMap::NEGATIVE_X, mapgen->getImage(osg::TextureCubeMap::NEGATIVE_X)); + tcm->setImage(osg::TextureCubeMap::POSITIVE_Y, mapgen->getImage(osg::TextureCubeMap::POSITIVE_Y)); + tcm->setImage(osg::TextureCubeMap::NEGATIVE_Y, mapgen->getImage(osg::TextureCubeMap::NEGATIVE_Y)); + tcm->setImage(osg::TextureCubeMap::POSITIVE_Z, mapgen->getImage(osg::TextureCubeMap::POSITIVE_Z)); + tcm->setImage(osg::TextureCubeMap::NEGATIVE_Z, mapgen->getImage(osg::TextureCubeMap::NEGATIVE_Z)); + + // enable texturing, replacing any textures in the subgraphs + ss->setTextureAttributeAndModes(0, tcm, osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON); + + // texture coordinate generation + osg::TexGen *tg = new osg::TexGen; + tg->setMode(osg::TexGen::REFLECTION_MAP); + ss->setTextureAttributeAndModes(0, tg, osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON); + + // use TexEnvCombine to add the highlights to the original lighting + osg::TexEnvCombine *te = new osg::TexEnvCombine; + te->setCombine_RGB(osg::TexEnvCombine::ADD); + te->setSource0_RGB(osg::TexEnvCombine::TEXTURE); + te->setOperand0_RGB(osg::TexEnvCombine::SRC_COLOR); + te->setSource1_RGB(osg::TexEnvCombine::PRIMARY_COLOR); + te->setOperand1_RGB(osg::TexEnvCombine::SRC_COLOR); + ss->setTextureAttributeAndModes(0, te, osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON); +} + +int main(int argc, char *argv[]) +{ + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // load the nodes from the commandline arguments. + osg::Node* rootnode = osgDB::readNodeFiles(arguments); + if (!rootnode) { + return 1; + } + + // create specular highlights + create_specular_highlights(rootnode); + + // run optimization over the scene graph + osgUtil::Optimizer optimzer; + optimzer.optimize(rootnode); + + // add a viewport to the viewer and attach the scene graph. + viewer.setSceneData(rootnode); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osggeodemo/GNUmakefile b/examples/osggeodemo/GNUmakefile new file mode 100644 index 000000000..bd2159ac2 --- /dev/null +++ b/examples/osggeodemo/GNUmakefile @@ -0,0 +1,19 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osggeodemo.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osggeodemo + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules + diff --git a/examples/osggeodemo/GNUmakefile.inst b/examples/osggeodemo/GNUmakefile.inst new file mode 100644 index 000000000..9c4c0229a --- /dev/null +++ b/examples/osggeodemo/GNUmakefile.inst @@ -0,0 +1,15 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osggeomdemo.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osggeomdemo + + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osggeodemo/osggeodemo.cpp b/examples/osggeodemo/osggeodemo.cpp new file mode 100644 index 000000000..fb1d65d9d --- /dev/null +++ b/examples/osggeodemo/osggeodemo.cpp @@ -0,0 +1,185 @@ +// Geo demo written by Geoff Michel, November 2002. + +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include + +// currently not a satisfactory solution, but this is early days for the +// geo loader and having direct links with it. +#include "../../src/osgPlugins/geo/osgGeoAnimation.h" + + +//== event trapper gets events + +class geodemoEventHandler : public osgGA::GUIEventHandler +{ +public: + + geodemoEventHandler( ) { mouse_x=mouse_y=0;} + virtual ~geodemoEventHandler( ) {} + + virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&) + { + mouse_x=ea.getX(); + mouse_y=ea.getY(); + return false; + + } + + virtual void accept(osgGA::GUIEventHandlerVisitor& v) + { + v.visit(*this); + } + inline int getMouseX(void) {return mouse_x;}; + inline int getMouseY(void) {return mouse_y;}; + +private: + int mouse_x, mouse_y; +}; + +static geodemoEventHandler *ghand=NULL; +inline double DEG2RAD(const double val) { return val*0.0174532925199432957692369076848861;} +inline double RAD2DEG(const double val) { return val*57.2957795130823208767981548141052;} + +double dodynamics(const double /*time*/, const double val, const std::string name) +{ // Each local variable named 'name' declared in the geo modeller is passed into here. + // its current value is val; returns new value. Time - elapsed time + static double heading,speed; // these are only required for my 'dynamics' + if (name == "xpos") { + return (val+speed*sin(heading)); + // std::cout << " nx " << (*itr->getValue()) ; + } else if (name == "ypos") { + return (val+speed*cos(heading)); + // std::cout << " ny " << (*itr->getValue()) ; + } else if (name == "sped") { + speed=(0.00025*(ghand->getMouseY()-300)); // (*itr->getValue()); + return (speed); + } else if (name == "heading") { + heading-= 0.01*DEG2RAD(ghand->getMouseX()-400); // =DEG2RAD(*itr->getValue()); + return (RAD2DEG(heading)); + } else if (name == "conerot") { + return ((ghand->getMouseX()-400)); + } else if (name == "planrot") { + return ((ghand->getMouseY()-300)/200.0); + } else if (name == "secint" || name == "minutehand"|| name == "hourhand") { + // std::cout << " updating " << name << " " << val << std::endl; + } + return val; +} + +int main( int argc, char **argv ) +{ + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + arguments.getApplicationUsage()->addCommandLineOption("--fov ","Set the Field of View"); + + float camera_fov=-1; + while (arguments.read("--fov",camera_fov)) {} + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + + // load the nodes from the commandline arguments. + osg::Node* rootnode = osgDB::readNodeFiles(arguments); + if (!rootnode) + { + return 1; + } + + // run optimization over the scene graph + osgUtil::Optimizer optimzer; + optimzer.optimize(rootnode); + + // add a viewport to the viewer and attach the scene graph. + viewer.setSceneData( rootnode ); + + geoHeader *gh = dynamic_cast(rootnode); + if (gh) + { // it is a geo file, so set function to update its animation variables. + ghand=new geodemoEventHandler(); + gh->setUserUpdate(dodynamics); + viewer.getEventHandlerList().push_front(ghand); + } + else + { // maybe a group with geo models below. + osg::Group *gpall=dynamic_cast(rootnode); + if (gpall) + { + int nchild=gpall->getNumChildren(); + for (int i=0; igetChild(i); + gh = dynamic_cast(nod); + if (gh) + { + ghand=new geodemoEventHandler(); + gh->setUserUpdate(dodynamics); + viewer.getEventHandlerList().push_front(ghand); + } + } + } + } + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osggeometry/GNUmakefile b/examples/osggeometry/GNUmakefile new file mode 100644 index 000000000..ba863cf4b --- /dev/null +++ b/examples/osggeometry/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osggeometry.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osggeometry + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osggeometry/GNUmakefile.inst b/examples/osggeometry/GNUmakefile.inst new file mode 100644 index 000000000..f5ad9b34a --- /dev/null +++ b/examples/osggeometry/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osggeometry.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osggeometry + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osggeometry/osggeometry.cpp b/examples/osggeometry/osggeometry.cpp new file mode 100644 index 000000000..f4d01049b --- /dev/null +++ b/examples/osggeometry/osggeometry.cpp @@ -0,0 +1,708 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +#include + + + +// This demos uses the illustrates how to creates the various different types of geometry that +// the osg::Geometry class can represent. This demos uses the OpenGL red books diagram of different +// OpenGL Primitives as a template for all the equivilant OpenSceneGraph Primitives. The OpenSceneGraph +// wraps OpenGL very thinly so uses all the same enum and naming conventions. The coordinate data is also +// wrapped around OpenGL's vertex arrays and draw arrays/elements calls. Familarity with +// OpenGL will help understand the the osg::Geometry class which encapsulate all this, or if you +// havn't learnt OpenGL yet, learning osg::Geometry will help you understand how OpenGL +// works! + +// The osg::Geometry class "is a" subclass of osg::Drawable base class, so is an object that provides +// a draw method for drawing objects in the scene. osg::Geometry contains all the vertex, normal +// color and texture coordate arrays required to specify the coordinates of your objects, and the +// primtives join these coordinates together as the points, lines or surfaces that you will see +// rendered on your screen. +// +// This demo is split into two functions, the createScene() function which creates the scene graph +// with the various primitives in it, and the main() which sets up a basic viewer window and +// adds to the it the scene generated by createScene(). + + +struct NormalPrint +{ + void operator() (const osg::Vec3& v1,const osg::Vec3& v2,const osg::Vec3& v3) const + { + osg::Vec3 normal = (v2-v1)^(v3-v2); + normal.normalize(); + std::cout << "\t("< tf; + drawable.accept(tf); + + std::cout<. osg::Array's are reference counted and hence sharable, + // which std::vector<> provides all the convinience, flexibility and robustness + // of the most popular of all STL containers. + osg::Vec3Array* vertices = new osg::Vec3Array; + vertices->push_back(osg::Vec3(-1.02168, -2.15188e-09, 0.885735)); + vertices->push_back(osg::Vec3(-0.976368, -2.15188e-09, 0.832179)); + vertices->push_back(osg::Vec3(-0.873376, 9.18133e-09, 0.832179)); + vertices->push_back(osg::Vec3(-0.836299, -2.15188e-09, 0.885735)); + vertices->push_back(osg::Vec3(-0.790982, 9.18133e-09, 0.959889)); + + // pass the created vertex array to the points geometry object. + pointsGeom->setVertexArray(vertices); + + + + // create the color of the geometry, one single for the whole geometry. + // for consitency of design even one single color must added as an element + // in a color array. + osg::Vec4Array* colors = new osg::Vec4Array; + // add a white color, colors take the form r,g,b,a with 0.0 off, 1.0 full on. + colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); + + // pass the color arry to points geometry, note the binding to tell the geometry + // that only use one color for the whole object. + pointsGeom->setColorArray(colors); + pointsGeom->setColorBinding(osg::Geometry::BIND_OVERALL); + + + // set the normal in the same way color. + osg::Vec3Array* normals = new osg::Vec3Array; + normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); + pointsGeom->setNormalArray(normals); + pointsGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + + // create and add a DrawArray Primitive (see include/osg/Primtive). The first + // paramter passed to the DrawArrays constructor is the Primtive::Mode which + // in this case is POINTS (which has the same value GL_POINTS), the second + // parameter is the index position into the vertex array of the first point + // to draw, and the third parameter is the number of points to draw. + pointsGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POINTS,0,vertices->size())); + + + // add the points geomtry to the geode. + geode->addDrawable(pointsGeom); + } + + // create LINES + { + // create Geometry object to store all the vetices and lines primtive. + osg::Geometry* linesGeom = new osg::Geometry(); + + // this time we'll prealloacte the vertex array to the size we + // need and then simple set them as array elements, 8 points + // makes 4 line segments. + osg::Vec3Array* vertices = new osg::Vec3Array(8); + (*vertices)[0].set(-1.13704, -2.15188e-09, 0.40373); + (*vertices)[1].set(-0.856897, -2.15188e-09, 0.531441); + (*vertices)[2].set(-0.889855, -2.15188e-09, 0.444927); + (*vertices)[3].set(-0.568518, -2.15188e-09, 0.40373); + (*vertices)[4].set(-1.00933, -2.15188e-09, 0.370773); + (*vertices)[5].set(-0.716827, -2.15188e-09, 0.292498); + (*vertices)[6].set(-1.07936, 9.18133e-09, 0.317217); + (*vertices)[7].set(-0.700348, 9.18133e-09, 0.362533); + + + // pass the created vertex array to the points geometry object. + linesGeom->setVertexArray(vertices); + + // set the colors as before, plus using the aobve + osg::Vec4Array* colors = new osg::Vec4Array; + colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); + linesGeom->setColorArray(colors); + linesGeom->setColorBinding(osg::Geometry::BIND_OVERALL); + + + // set the normal in the same way color. + osg::Vec3Array* normals = new osg::Vec3Array; + normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); + linesGeom->setNormalArray(normals); + linesGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + + // This time we simply use primitive, and hardwire the number of coords to use + // since we know up front, + linesGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES,0,8)); + + + // add the points geomtry to the geode. + geode->addDrawable(linesGeom); + } + + // create LINE_STRIP + { + // create Geometry object to store all the vetices and lines primtive. + osg::Geometry* linesGeom = new osg::Geometry(); + + // this time we'll prealloacte the vertex array to the size + // and then use an iterator to fill in the values, a bit perverse + // but does demonstrate that we have just a standard std::vector underneath. + osg::Vec3Array* vertices = new osg::Vec3Array(5); + osg::Vec3Array::iterator vitr = vertices->begin(); + (vitr++)->set(-0.0741545, -2.15188e-09, 0.416089); + (vitr++)->set(0.234823, -2.15188e-09, 0.259541); + (vitr++)->set(0.164788, -2.15188e-09, 0.366653); + (vitr++)->set(-0.0288379, -2.15188e-09, 0.333695); + (vitr++)->set(-0.0453167, -2.15188e-09, 0.280139); + + // pass the created vertex array to the points geometry object. + linesGeom->setVertexArray(vertices); + + // set the colors as before, plus using the aobve + osg::Vec4Array* colors = new osg::Vec4Array; + colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); + linesGeom->setColorArray(colors); + linesGeom->setColorBinding(osg::Geometry::BIND_OVERALL); + + + // set the normal in the same way color. + osg::Vec3Array* normals = new osg::Vec3Array; + normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); + linesGeom->setNormalArray(normals); + linesGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + + // This time we simply use primitive, and hardwire the number of coords to use + // since we know up front, + linesGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINE_STRIP,0,5)); + + + // add the points geomtry to the geode. + geode->addDrawable(linesGeom); + } + + // create LINE_LOOP + { + // create Geometry object to store all the vetices and lines primtive. + osg::Geometry* linesGeom = new osg::Geometry(); + + // this time we'll a C arrays to initilize the vertices. + + osg::Vec3 myCoords[] = + { + osg::Vec3(0.741546, -2.15188e-09, 0.453167), + osg::Vec3(0.840418, -2.15188e-09, 0.304858), + osg::Vec3(1.12468, -2.15188e-09, 0.300738), + osg::Vec3(1.03816, 9.18133e-09, 0.453167), + osg::Vec3(0.968129, -2.15188e-09, 0.337815), + osg::Vec3(0.869256, -2.15188e-09, 0.531441) + }; + + int numCoords = sizeof(myCoords)/sizeof(osg::Vec3); + + osg::Vec3Array* vertices = new osg::Vec3Array(numCoords,myCoords); + + // pass the created vertex array to the points geometry object. + linesGeom->setVertexArray(vertices); + + // set the colors as before, plus using the aobve + osg::Vec4Array* colors = new osg::Vec4Array; + colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); + linesGeom->setColorArray(colors); + linesGeom->setColorBinding(osg::Geometry::BIND_OVERALL); + + + // set the normal in the same way color. + osg::Vec3Array* normals = new osg::Vec3Array; + normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); + linesGeom->setNormalArray(normals); + linesGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + + // This time we simply use primitive, and hardwire the number of coords to use + // since we know up front, + linesGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINE_LOOP,0,numCoords)); + + + // add the points geomtry to the geode. + geode->addDrawable(linesGeom); + } + + + + + // now we'll stop creating separate normal and color arrays + // since we are using the same values all the time, we'll just + // share the same ColorArray and NormalArrays.. + + // set the colors as before, use a ref_ptr rather than just + // standard C pointer, as that in the case of it not being + // assigned it will still be cleaned up automatically. + osg::ref_ptr shared_colors = new osg::Vec4Array; + shared_colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); + + // same trick for shared normal. + osg::ref_ptr shared_normals = new osg::Vec3Array; + shared_normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); + + + + // Note on vertex ordering. + // While the OpenGL diagram should vertices specified in a clockwise direction + // in reality you need to specify coords for polygons into a anticlockwise direction + // for their front face to be pointing towards your, get this wrong and you could + // find back face culling removing the wrong faces of your models. The OpenGL diagram + // is just plain wrong, but its nice diagram so we'll keep it for now! + + // create POLYGON + { + // create Geometry object to store all the vetices and lines primtive. + osg::Geometry* polyGeom = new osg::Geometry(); + + // this time we'll a C arrays to initilize the vertices. + // note, anticlockwsie ordering. + // note II, OpenGL polygons must be convex plan polygons, otherwise + // undefined results will occur. If you have concave polygons or ones + // that cross over themselves then use the osgUtil::Tesselator to fix + // the polygons into a set of valid polygons. + osg::Vec3 myCoords[] = + { + osg::Vec3(-1.0464, 0.0f, -0.193626), + osg::Vec3(-1.0258, 0.0f, -0.26778), + osg::Vec3(-0.807461, 0.0f, -0.181267), + osg::Vec3(-0.766264, 0.0f, -0.0576758), + osg::Vec3(-0.980488, 0.0f, -0.094753) + }; + + int numCoords = sizeof(myCoords)/sizeof(osg::Vec3); + + osg::Vec3Array* vertices = new osg::Vec3Array(numCoords,myCoords); + + // pass the created vertex array to the points geometry object. + polyGeom->setVertexArray(vertices); + + // use the shared color array. + polyGeom->setColorArray(shared_colors.get()); + polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); + + + // use the shared normal array. + polyGeom->setNormalArray(shared_normals.get()); + polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + + // This time we simply use primitive, and hardwire the number of coords to use + // since we know up front, + polyGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POLYGON,0,numCoords)); + + printTriangles("Polygon",*polyGeom); + + // add the points geomtry to the geode. + geode->addDrawable(polyGeom); + } + + + // create QUADS + { + // create Geometry object to store all the vetices and lines primtive. + osg::Geometry* polyGeom = new osg::Geometry(); + + // note, anticlockwsie ordering. + osg::Vec3 myCoords[] = + { + osg::Vec3(0.0247182, 0.0f, -0.156548), + osg::Vec3(0.0247182, 0.0f, -0.00823939), + osg::Vec3(-0.160668, 0.0f, -0.0453167), + osg::Vec3(-0.222464, 0.0f, -0.13183), + + osg::Vec3(0.238942, 0.0f, -0.251302), + osg::Vec3(0.333696, 0.0f, 0.0329576), + osg::Vec3(0.164788, 0.0f, -0.0453167), + osg::Vec3(0.13595, 0.0f, -0.255421) + }; + + int numCoords = sizeof(myCoords)/sizeof(osg::Vec3); + + osg::Vec3Array* vertices = new osg::Vec3Array(numCoords,myCoords); + + // pass the created vertex array to the points geometry object. + polyGeom->setVertexArray(vertices); + + // use the shared color array. + polyGeom->setColorArray(shared_colors.get()); + polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); + + + // use the shared normal array. + polyGeom->setNormalArray(shared_normals.get()); + polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + + // This time we simply use primitive, and hardwire the number of coords to use + // since we know up front, + polyGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,numCoords)); + + + printTriangles("Quads",*polyGeom); + + // add the points geomtry to the geode. + geode->addDrawable(polyGeom); + } + + // create QUAD_STRIP + { + // create Geometry object to store all the vetices and lines primtive. + osg::Geometry* polyGeom = new osg::Geometry(); + + // note, first coord at top, second at bottom, reverse to that buggy OpenGL image.. + osg::Vec3 myCoords[] = + { + osg::Vec3(0.733306, -2.15188e-09, -0.0741545), + osg::Vec3(0.758024, -2.15188e-09, -0.205985), + + osg::Vec3(0.885735, -2.15188e-09, -0.0576757), + osg::Vec3(0.885735, -2.15188e-09, -0.214224), + + osg::Vec3(0.964009, 9.18133e-09, -0.0370773), + osg::Vec3(1.0464, 9.18133e-09, -0.173027), + + osg::Vec3(1.11232, -2.15188e-09, 0.0123591), + osg::Vec3(1.12468, 9.18133e-09, -0.164788), + }; + + int numCoords = sizeof(myCoords)/sizeof(osg::Vec3); + + osg::Vec3Array* vertices = new osg::Vec3Array(numCoords,myCoords); + + // pass the created vertex array to the points geometry object. + polyGeom->setVertexArray(vertices); + + // use the shared color array. + polyGeom->setColorArray(shared_colors.get()); + polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); + + + // use the shared normal array. + polyGeom->setNormalArray(shared_normals.get()); + polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + + // This time we simply use primitive, and hardwire the number of coords to use + // since we know up front, + polyGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUAD_STRIP,0,numCoords)); + + + printTriangles("Quads strip",*polyGeom); + + // add the points geomtry to the geode. + geode->addDrawable(polyGeom); + } + + // create TRIANGLES, TRIANGLE_STRIP and TRIANGLE_FAN all in one Geometry/ + { + // create Geometry object to store all the vetices and lines primtive. + osg::Geometry* polyGeom = new osg::Geometry(); + + // note, first coord at top, second at bottom, reverse to that buggy OpenGL image.. + osg::Vec3 myCoords[] = + { + // TRIANGLES 6 vertices, v0..v5 + // note in aniclockwise order. + osg::Vec3(-1.12056, -2.15188e-09, -0.840418), + osg::Vec3(-0.95165, -2.15188e-09, -0.840418), + osg::Vec3(-1.11644, 9.18133e-09, -0.716827), + + // note in aniclockwise order. + osg::Vec3(-0.840418, 9.18133e-09, -0.778623), + osg::Vec3(-0.622074, 9.18133e-09, -0.613835), + osg::Vec3(-1.067, 9.18133e-09, -0.609715), + + // TRIANGLE STRIP 6 vertices, v6..v11 + // note defined top point first, + // then anticlockwise for the next two points, + // then alternating to bottom there after. + osg::Vec3(-0.160668, -2.15188e-09, -0.531441), + osg::Vec3(-0.160668, -2.15188e-09, -0.749785), + osg::Vec3(0.0617955, 9.18133e-09, -0.531441), + osg::Vec3(0.168908, -2.15188e-09, -0.753905), + osg::Vec3(0.238942, -2.15188e-09, -0.531441), + osg::Vec3(0.280139, -2.15188e-09, -0.823939), + + // TRIANGLE FAN 5 vertices, v12..v16 + // note defined in anticlockwsie order. + osg::Vec3(0.844538, 9.18133e-09, -0.712708), + osg::Vec3(1.0258, 9.18133e-09, -0.799221), + osg::Vec3(1.03816, -2.15188e-09, -0.692109), + osg::Vec3(0.988727, 9.18133e-09, -0.568518), + osg::Vec3(0.840418, -2.15188e-09, -0.506723), + + }; + + int numCoords = sizeof(myCoords)/sizeof(osg::Vec3); + + osg::Vec3Array* vertices = new osg::Vec3Array(numCoords,myCoords); + + // pass the created vertex array to the points geometry object. + polyGeom->setVertexArray(vertices); + + // use the shared color array. + polyGeom->setColorArray(shared_colors.get()); + polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); + + + // use the shared normal array. + polyGeom->setNormalArray(shared_normals.get()); + polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + + // This time we simply use primitive, and hardwire the number of coords to use + // since we know up front, + polyGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::TRIANGLES,0,6)); + polyGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::TRIANGLE_STRIP,6,6)); + polyGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::TRIANGLE_FAN,12,5)); + + // polygon stipple + osg::StateSet* stateSet = new osg::StateSet(); + polyGeom->setStateSet(stateSet); + osg::PolygonStipple* polygonStipple = new osg::PolygonStipple; + stateSet->setAttributeAndModes(polygonStipple,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON); + + printTriangles("Triangles/Strip/Fan",*polyGeom); + + // add the points geomtry to the geode. + geode->addDrawable(polyGeom); + } + + return geode; +} + + +// define a node callback to animation a transform as a cycle along the y axis, between 0 and 2.0. +class MyTransformCallback : public osg::NodeCallback +{ + + public: + + MyTransformCallback(float angularVelocity) + { + _angular_velocity = angularVelocity; + } + + virtual void operator() (osg::Node* node, osg::NodeVisitor* nv) + { + osg::MatrixTransform* transform = dynamic_cast(node); + if (nv && transform && nv->getFrameStamp()) + { + double time = nv->getFrameStamp()->getReferenceTime(); + transform->setMatrix(osg::Matrix::translate(0.0f,1.0f+cosf(time*_angular_velocity),0.0f)); + } + + // must continue subgraph traversal. + traverse(node,nv); + + } + + protected: + + float _angular_velocity; + +}; + + +osg::Node* createBackground() +{ + + // we'll create a texture mapped quad to sit behind the Geometry + osg::Image* image = osgDB::readImageFile("Images/primitives.gif"); + if (!image) return NULL; + + + // create Geometry object to store all the vetices and lines primtive. + osg::Geometry* polyGeom = new osg::Geometry(); + + // note, anticlockwsie ordering. + osg::Vec3 myCoords[] = + { + osg::Vec3(-1.22908f,0.0f,1.0f), + osg::Vec3(-1.22908f,0.0f,-1.0f), + osg::Vec3(1.22908f,0.0f,-1.0f), + osg::Vec3(1.22908f,0.0f,1.0f) + }; + + int numCoords = sizeof(myCoords)/sizeof(osg::Vec3); + + // pass the created vertex array to the points geometry object. + polyGeom->setVertexArray(new osg::Vec3Array(numCoords,myCoords)); + + osg::Vec4Array* colors = new osg::Vec4Array; + colors->push_back(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); + polyGeom->setColorArray(colors); + polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); + + + // set the normal in the same way color. + osg::Vec3Array* normals = new osg::Vec3Array; + normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); + polyGeom->setNormalArray(normals); + polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + osg::Vec2 myTexCoords[] = + { + osg::Vec2(0,1), + osg::Vec2(0,0), + osg::Vec2(1,0), + osg::Vec2(1,1) + }; + + int numTexCoords = sizeof(myCoords)/sizeof(osg::Vec2); + + // pass the created tex coord array to the points geometry object, + // and use it to set texture unit 0. + polyGeom->setTexCoordArray(0,new osg::Vec2Array(numTexCoords,myTexCoords)); + + // well use indices and DrawElements to define the primitive this time. + unsigned short myIndices[] = + { + 0, + 1, + 2, + 3 + }; + + int numIndices = sizeof(myIndices)/sizeof(unsigned short); + + // Theere are three variants of the DrawElements osg::Primitive, UByteDrawElements which + // contains unsigned char indicies, UShortDrawElements which contains unsigned short indices, + // and UIntDrawElements whcih contains ... unsigned int indices. + // The first parameter to DrawElements is + polyGeom->addPrimitiveSet(new osg::DrawElementsUShort(osg::PrimitiveSet::QUADS,numIndices,myIndices)); + + // new we need to add the texture to the Drawable, we do so by creating a + // StateSet to contain the Texture2D StateAttribute. + osg::StateSet* stateset = new osg::StateSet; + + // set up the texture. + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + stateset->setTextureAttributeAndModes(0, texture,osg::StateAttribute::ON); + + polyGeom->setStateSet(stateset); + + + // create the Geode (Geometry Node) to contain all our osg::Geometry objects. + osg::Geode* geode = new osg::Geode(); + + // add the points geomtry to the geode. + geode->addDrawable(polyGeom); + + //return geode; + + // create a tranform to move the background back and forward with. + + osg::MatrixTransform* transform = new osg::MatrixTransform(); + transform->setUpdateCallback(new MyTransformCallback(1.0f)); + transform->addChild(geode); + + return transform; +} + + + + +int main( int argc, char **argv ) +{ + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + + // create the model + osg::Group* root = new osg::Group; + root->addChild( createScene() ); + root->addChild( createBackground() ); + + //osgDB::writeNodeFile(*root,"geoemtry.osg"); + + + // add model to viewer. + viewer.setSceneData( root ); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osghangglide/GNUmakefile b/examples/osghangglide/GNUmakefile new file mode 100644 index 000000000..4e8c4d752 --- /dev/null +++ b/examples/osghangglide/GNUmakefile @@ -0,0 +1,33 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + base.cpp\ + GliderManipulator.cpp\ + osghangglide.cpp\ + hat.cpp\ + sky.cpp\ + tank.cpp\ + terrain.cpp\ + trees.cpp\ + +HEADERFILES = \ + GliderManipulator.h\ + hat.h\ + terrain_coords.h\ + terrain_normals.h\ + terrain_texcoords.h\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + $(HEADERFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osghangglide + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osghangglide/GNUmakefile.inst b/examples/osghangglide/GNUmakefile.inst new file mode 100644 index 000000000..d202b6adf --- /dev/null +++ b/examples/osghangglide/GNUmakefile.inst @@ -0,0 +1,22 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + base.cpp\ + GliderManipulator.cpp\ + osghangglide.cpp\ + hat.cpp\ + ReaderWriterFLY.cpp\ + sky.cpp\ + tank.cpp\ + terrain.cpp\ + trees.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osghangglide + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osghangglide/GliderManipulator.cpp b/examples/osghangglide/GliderManipulator.cpp new file mode 100644 index 000000000..e15f5734d --- /dev/null +++ b/examples/osghangglide/GliderManipulator.cpp @@ -0,0 +1,241 @@ +#include "GliderManipulator.h" + +#include + +using namespace osg; +using namespace osgGA; + +GliderManipulator::GliderManipulator() +{ + _modelScale = 0.01f; + _velocity = 0.0f; + _yawMode = YAW_AUTOMATICALLY_WHEN_BANKED; +} + + +GliderManipulator::~GliderManipulator() +{ +} + + +void GliderManipulator::setNode(osg::Node* node) +{ + _node = node; + if (_node.get()) + { + const osg::BoundingSphere& boundingSphere=_node->getBound(); + _modelScale = boundingSphere._radius; + } +} + + +const osg::Node* GliderManipulator::getNode() const +{ + return _node.get(); +} + + +void GliderManipulator::home(const GUIEventAdapter& ea,GUIActionAdapter& us) +{ + if(_node.get() && _camera.get()) + { + + const osg::BoundingSphere& boundingSphere=_node->getBound(); + + osg::Vec3 eye = boundingSphere._center+osg::Vec3(-boundingSphere._radius*0.25f,-boundingSphere._radius*0.25f,-boundingSphere._radius*0.03f); + + _camera->setView(eye, + eye+osg::Vec3(1.0f,1.0f,-0.1f), + osg::Vec3(0.0f,0.0f,1.0f)); + + _velocity = boundingSphere._radius*0.01f; + + us.requestRedraw(); + + us.requestWarpPointer((ea.getXmin()+ea.getXmax())/2,(ea.getYmin()+ea.getYmax())/2); + + flushMouseEventStack(); + + } + +} + + +void GliderManipulator::init(const GUIEventAdapter& ea,GUIActionAdapter& us) +{ + flushMouseEventStack(); + + us.requestContinuousUpdate(false); + + const osg::BoundingSphere& boundingSphere=_node->getBound(); + _velocity = boundingSphere._radius*0.01f; + + us.requestWarpPointer((ea.getXmin()+ea.getXmax())/2,(ea.getYmin()+ea.getYmax())/2); + +} + + +bool GliderManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us) +{ + if(!_camera.get()) return false; + + switch(ea.getEventType()) + { + case(GUIEventAdapter::PUSH): + { + + addMouseEvent(ea); + us.requestContinuousUpdate(true); + if (calcMovement()) us.requestRedraw(); + return true; + } + + case(GUIEventAdapter::RELEASE): + { + + addMouseEvent(ea); + us.requestContinuousUpdate(true); + if (calcMovement()) us.requestRedraw(); + return true; + } + + case(GUIEventAdapter::DRAG): + { + + addMouseEvent(ea); + us.requestContinuousUpdate(true); + if (calcMovement()) us.requestRedraw(); + return true; + } + + case(GUIEventAdapter::MOVE): + { + + addMouseEvent(ea); + us.requestContinuousUpdate(true); + if (calcMovement()) us.requestRedraw(); + + return true; + } + + case(GUIEventAdapter::KEYDOWN): + if (ea.getKey()==' ') + { + flushMouseEventStack(); + home(ea,us); + us.requestRedraw(); + us.requestContinuousUpdate(false); + return true; + } + else if (ea.getKey()=='+') + { + _camera->setFusionDistanceRatio(_camera->getFusionDistanceRatio()*1.25f); + return true; + } + else if (ea.getKey()=='-') + { + _camera->setFusionDistanceRatio(_camera->getFusionDistanceRatio()/1.25f); + return true; + } + return false; + + case(GUIEventAdapter::FRAME): + addMouseEvent(ea); + if (calcMovement()) us.requestRedraw(); + return true; + + case(GUIEventAdapter::RESIZE): + init(ea,us); + us.requestRedraw(); + return true; + + default: + return false; + } +} + + +void GliderManipulator::flushMouseEventStack() +{ + _ga_t1 = NULL; + _ga_t0 = NULL; +} + + +void GliderManipulator::addMouseEvent(const GUIEventAdapter& ea) +{ + _ga_t1 = _ga_t0; + _ga_t0 = &ea; +} + + +bool GliderManipulator::calcMovement() +{ + _camera->setFusionDistanceMode(osg::Camera::PROPORTIONAL_TO_SCREEN_DISTANCE); + + // return if less then two events have been added. + if (_ga_t0.get()==NULL || _ga_t1.get()==NULL) return false; + + + float dt = _ga_t0->time()-_ga_t1->time(); + + if (dt<0.0f) + { + notify(WARN) << "warning dt = "<getButtonMask(); + if (buttonMask==GUIEventAdapter::LEFT_MOUSE_BUTTON) + { + // pan model. + + _velocity += dt*_modelScale*0.05f; + + } + else if (buttonMask==GUIEventAdapter::MIDDLE_MOUSE_BUTTON || + buttonMask==(GUIEventAdapter::LEFT_MOUSE_BUTTON|GUIEventAdapter::RIGHT_MOUSE_BUTTON)) + { + + _velocity = 0.0f; + + } + else if (buttonMask==GUIEventAdapter::RIGHT_MOUSE_BUTTON) + { + + _velocity -= dt*_modelScale*0.05f; + + } + + float mx = (_ga_t0->getXmin()+_ga_t0->getXmax())/2.0f; + float my = (_ga_t0->getYmin()+_ga_t0->getYmax())/2.0f; + + float dx = _ga_t0->getX()-mx; + float dy = _ga_t0->getY()-my; + + osg::Vec3 center = _camera->getEyePoint(); + osg::Vec3 sv = _camera->getSideVector(); + osg::Vec3 lv = _camera->getLookVector(); + + float pitch = inDegrees(dy*0.15f*dt); + float roll = inDegrees(dx*0.1f*dt); + + osg::Matrix mat; + mat.makeTranslate(-center); + mat *= Matrix::rotate(pitch,sv.x(),sv.y(),sv.z()); + mat *= Matrix::rotate(roll,lv.x(),lv.y(),lv.z()); + if (_yawMode==YAW_AUTOMATICALLY_WHEN_BANKED) + { + float bank = asinf(sv.z()); + float yaw = inRadians(bank)*dt; + mat *= Matrix::rotate(yaw,0.0f,0.0f,1.0f); + } + + lv *= (_velocity*dt); + + mat *= Matrix::translate(center+lv); + + _camera->transformLookAt(mat); + + return true; +} diff --git a/examples/osghangglide/GliderManipulator.h b/examples/osghangglide/GliderManipulator.h new file mode 100644 index 000000000..03d232dd2 --- /dev/null +++ b/examples/osghangglide/GliderManipulator.h @@ -0,0 +1,65 @@ +#ifndef HANGGLIDE_GLIDERMANIPULATOR +#define HANGGLIDE_GLIDERMANIPULATOR 1 + +#include + +class GliderManipulator : public osgGA::CameraManipulator +{ + public: + + GliderManipulator(); + virtual ~GliderManipulator(); + + /** Attach a node to the manipulator. + Automatically detaches previously attached node. + setNode(NULL) detaches previously nodes. + Is ignored by manipulators which do not require a reference model.*/ + virtual void setNode(osg::Node*); + + /** Return node if attached.*/ + virtual const osg::Node* getNode() const; + + /** Move the camera to the default position. + May be ignored by manipulators if home functionality is not appropriate.*/ + virtual void home(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& us); + + /** Start/restart the manipulator.*/ + virtual void init(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& us); + + /** handle events, return true if handled, false otherwise.*/ + virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& us); + + enum YawControlMode { + YAW_AUTOMATICALLY_WHEN_BANKED, + NO_AUTOMATIC_YAW + }; + + /** Set the yaw control between no yaw and yawing when banked.*/ + void setYawControlMode(YawControlMode ycm) { _yawMode = ycm; } + + private: + + /** Reset the internal GUIEvent stack.*/ + void flushMouseEventStack(); + /** Add the current mouse GUIEvent to internal stack.*/ + void addMouseEvent(const osgGA::GUIEventAdapter& ea); + + /** For the give mouse movement calculate the movement of the camera. + Return true is camera has moved and a redraw is required.*/ + bool calcMovement(); + + // Internal event stack comprising last three mouse events. + osg::ref_ptr _ga_t1; + osg::ref_ptr _ga_t0; + + osg::ref_ptr _node; + + float _modelScale; + float _velocity; + + YawControlMode _yawMode; + +}; + +#endif + diff --git a/examples/osghangglide/base.cpp b/examples/osghangglide/base.cpp new file mode 100644 index 000000000..9775ad7a5 --- /dev/null +++ b/examples/osghangglide/base.cpp @@ -0,0 +1,78 @@ +#include + +#include +#include +#include +#include +#include +#include + +#include + +using namespace osg; + +Node *makeBase( void ) +{ + int i, c; + float theta; + float ir = 20.0f; + + Vec3Array *coords = new Vec3Array(19); + Vec2Array *tcoords = new Vec2Array(19); + Vec4Array *colors = new Vec4Array(1); + + (*colors)[0].set(1.0f,1.0f,1.0f,1.0f); + + c = 0; + (*coords)[c].set(0.0f,0.0f,0.0f); + (*tcoords)[c].set(0.0f,0.0f); + + for( i = 0; i <= 18; i++ ) + { + theta = osg::DegreesToRadians((float)i * 20.0); + + (*coords)[c].set(ir * cosf( theta ), ir * sinf( theta ), 0.0f); + (*tcoords)[c].set((*coords)[c][0]/36.0f,(*coords)[c][1]/36.0f); + + c++; + } + + Geometry *geom = new Geometry; + + geom->setVertexArray( coords ); + + geom->setTexCoordArray( 0, tcoords ); + + geom->setColorArray( colors ); + geom->setColorBinding( Geometry::BIND_OVERALL ); + + geom->addPrimitiveSet( new DrawArrays(PrimitiveSet::TRIANGLE_FAN,0,19) ); + + Texture2D *tex = new Texture2D; + + tex->setImage(osgDB::readImageFile("Images/water.rgb")); + tex->setWrap( Texture2D::WRAP_S, Texture2D::REPEAT ); + tex->setWrap( Texture2D::WRAP_T, Texture2D::REPEAT ); + + StateSet *dstate = new StateSet; + dstate->setMode( GL_LIGHTING, StateAttribute::OFF ); + dstate->setTextureAttributeAndModes(0, tex, StateAttribute::ON ); + + dstate->setTextureAttribute(0, new TexEnv ); + + // clear the depth to the far plane. + osg::Depth* depth = new osg::Depth; + depth->setFunction(osg::Depth::ALWAYS); + depth->setRange(1.0,1.0); + dstate->setAttributeAndModes(depth,StateAttribute::ON ); + + dstate->setRenderBinDetails(-1,"RenderBin"); + + + geom->setStateSet( dstate ); + + Geode *geode = new Geode; + geode->addDrawable( geom ); + + return geode; +} diff --git a/examples/osghangglide/hat.cpp b/examples/osghangglide/hat.cpp new file mode 100644 index 000000000..f5e3e219f --- /dev/null +++ b/examples/osghangglide/hat.cpp @@ -0,0 +1,150 @@ +#ifdef _MSC_VER +#include +#pragma warning( disable : 4244 ) +#endif + +#include +#include +#include + +#include "terrain_coords.h" +#include "hat.h" + +static int inited = 0; + +static float dbcenter[3]; +static float dbradius; + +static void getDatabaseCenterRadius( float dbcenter[3], float *dbradius ) +{ + int i; + double n=0.0; + double center[3] = { 0.0f, 0.0f, 0.0f }; + float cnt; + + cnt = 39 * 38; + for( i = 0; i < cnt; i++ ) + { + center[0] += (double)vertex[i][0]; + center[1] += (double)vertex[i][1]; + center[2] += (double)vertex[i][2]; + + n = n + 1.0; + } + + center[0] /= n; + center[1] /= n; + center[2] /= n; + + float r = 0.0; + + // for( i = 0; i < sizeof( vertex ) / (sizeof( float[3] )); i++ ) + for( i = 0; i < cnt; i++ ) + { + double d = sqrt( + (((double)vertex[i][0] - center[0]) * ((double)vertex[i][0] - center[0])) + + (((double)vertex[i][1] - center[1]) * ((double)vertex[i][1] - center[1])) + + (((double)vertex[i][2] - center[2]) * ((double)vertex[i][2] - center[2])) ); + + if( d > (double)r ) r = (float)d; + + } + + *dbradius = r; + dbcenter[0] = (float)center[0]; + dbcenter[1] = (float)center[1]; + dbcenter[2] = (float)center[2]; + + int index = 19 * 39 + 19; + dbcenter[0] = vertex[index][0] - 0.15; + dbcenter[1] = vertex[index][1]; + dbcenter[2] = vertex[index][2] + 0.35; +} + + +static void init( void ) +{ + getDatabaseCenterRadius( dbcenter, &dbradius ); + inited = 1; +} + + +static void getNormal( float *v1, float *v2, float *v3, float *n ) +{ + float V1[4], V2[4]; + float f; + int i; + + /* Two vectors v2->v1 and v2->v3 */ + + for( i = 0; i < 3; i++ ) + { + V1[i] = v1[i] - v2[i]; + V2[i] = v3[i] - v2[i]; + } + + /* Cross product between V1 and V2 */ + + n[0] = (V1[1] * V2[2]) - (V1[2] * V2[1]); + n[1] = -((V1[0] * V2[2]) - ( V1[2] * V2[0] )); + n[2] = (V1[0] * V2[1] ) - (V1[1] * V2[0] ); + + /* Normalize */ + + f = sqrtf( ( n[0] * n[0] ) + ( n[1] * n[1] ) + ( n[2] * n[2] ) ); + n[0] /= f; + n[1] /= f; + n[2] /= f; +} + + +float Hat( float x, float y, float z ) +{ + int m, n; + int i, j; + float tri[3][3]; + float norm[3]; + float d, pz; + + if( inited == 0 ) init(); + + // m = columns + // n = rows + m = (sizeof( vertex ) /(sizeof( float[3])))/39; + n = 39; + + i = 0; + while( i < ((m-1)*39) && x > (vertex[i+n][0] - dbcenter[0]) ) + i += n; + + j = 0; + + while( j < n-1 && y > (vertex[i+j+1][1] - dbcenter[1]) ) + j++; + + tri[0][0] = vertex[i+0+j+0][0] - dbcenter[0]; + tri[0][1] = vertex[i+0+j+0][1] - dbcenter[1]; + //tri[0][2] = vertex[i+0+j+0][2] - dbcenter[2]; + tri[0][2] = vertex[i+0+j+0][2]; + + tri[1][0] = vertex[i+n+j+0][0] - dbcenter[0]; + tri[1][1] = vertex[i+n+j+0][1] - dbcenter[1]; + //tri[1][2] = vertex[i+n+j+0][2] - dbcenter[2]; + tri[1][2] = vertex[i+n+j+0][2]; + + tri[2][0] = vertex[i+0+j+1][0] - dbcenter[0]; + tri[2][1] = vertex[i+0+j+1][1] - dbcenter[1]; + //tri[2][2] = vertex[i+0+j+1][2] - dbcenter[2]; + tri[2][2] = vertex[i+0+j+1][2]; + + getNormal( tri[0], tri[1], tri[2], norm ); + + d = (tri[0][0] * norm[0]) + + (tri[0][1] * norm[1]) + + (tri[0][2] * norm[2]); + + d *= -1; + pz = (-(norm[0] * x) - (norm[1] * y) - d)/norm[2]; + + return z - pz; +} diff --git a/examples/osghangglide/hat.h b/examples/osghangglide/hat.h new file mode 100644 index 000000000..1e4a20384 --- /dev/null +++ b/examples/osghangglide/hat.h @@ -0,0 +1,4 @@ +#ifndef __HAT_H +#define __HAT_H +extern float Hat( float x, float y, float z ); +#endif diff --git a/examples/osghangglide/osghangglide.cpp b/examples/osghangglide/osghangglide.cpp new file mode 100644 index 000000000..14a86ccda --- /dev/null +++ b/examples/osghangglide/osghangglide.cpp @@ -0,0 +1,168 @@ +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include + +#include + +#include "GliderManipulator.h" + +extern osg::Node *makeTerrain( void ); +extern osg::Node *makeTrees( void ); +extern osg::Node *makeTank( void ); +extern osg::Node *makeWindsocks( void ); +extern osg::Node *makeGliders( void ); +extern osg::Node *makeGlider( void ); +extern osg::Node *makeSky( void ); +extern osg::Node *makeBase( void ); +extern osg::Node *makeClouds( void ); + +struct MoveEarthySkyWithEyePointCallback : public osg::Transform::ComputeTransformCallback +{ + /** Get the transformation matrix which moves from local coords to world coords.*/ + virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,const osg::Transform*, osg::NodeVisitor* nv) const + { + osgUtil::CullVisitor* cv = dynamic_cast(nv); + if (cv) + { + osg::Vec3 eyePointLocal = cv->getEyeLocal(); + matrix.preMult(osg::Matrix::translate(eyePointLocal.x(),eyePointLocal.y(),0.0f)); + } + return true; + } + + /** Get the transformation matrix which moves from world coords to local coords.*/ + virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,const osg::Transform*, osg::NodeVisitor* nv) const + { + osgUtil::CullVisitor* cv = dynamic_cast(nv); + if (cv) + { + osg::Vec3 eyePointLocal = cv->getEyeLocal(); + matrix.postMult(osg::Matrix::translate(-eyePointLocal.x(),-eyePointLocal.y(),0.0f)); + } + return true; + } +}; + +osg::Group* createModel() +{ + // no database loaded so automatically create Ed Levin Park.. + osg::Group* group = new osg::Group; + + // the base and sky subgraphs go to set the earth sky of the + // model and clear the color and depth buffer for us, by using + // osg::Depth, and setting their bin numbers to less than 0, + // to force them to draw before the rest of the scene. + + osg::ClearNode* clearNode = new osg::ClearNode; + clearNode->setRequiresClear(false); // we've got base and sky to do it. + + // use a transform to make the sky and base around with the eye point. + osg::Transform* transform = new osg::Transform; + + // transform's value isn't knowm until in the cull traversal so its bounding + // volume is can't be determined, therefore culling will be invalid, + // so switch it off, this cause all our paresnts to switch culling + // off as well. But don't worry culling will be back on once underneath + // this node or any other branch above this transform. + transform->setCullingActive(false); + + // set the compute transform callback to do all the work of + // determining the transform according to the current eye point. + transform->setComputeTransformCallback(new MoveEarthySkyWithEyePointCallback); + + // add the sky and base layer. + transform->addChild(makeSky()); // bin number -2 so drawn first. + transform->addChild(makeBase()); // bin number -1 so draw second. + + // add the transform to the earth sky. + clearNode->addChild(transform); + + // add to earth sky to the scene. + group->addChild(clearNode); + + // the rest of the scene drawn after the base and sky above. + group->addChild(makeTrees()); // will drop into a transparent, depth sorted bin (1) + group->addChild(makeTerrain()); // will drop into default bin - state sorted 0 + group->addChild(makeTank()); // will drop into default bin - state sorted 0 + // add the following in the future... + // makeGliders + // makeClouds + + return group; +} + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + unsigned int pos = viewer.addCameraManipulator(new GliderManipulator()); + viewer.selectCameraManipulator(pos); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // load the nodes from the commandline arguments. + osg::Node* rootnode = osgDB::readNodeFiles(arguments); + if (!rootnode) rootnode = createModel(); + + viewer.setSceneData( rootnode ); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} + diff --git a/examples/osghangglide/sky.cpp b/examples/osghangglide/sky.cpp new file mode 100644 index 000000000..a24a9a004 --- /dev/null +++ b/examples/osghangglide/sky.cpp @@ -0,0 +1,124 @@ +#include + +#include +#include +#include +#include +#include +#include + +#include + +#ifdef _MSC_VER +#pragma warning( disable : 4244 ) +#pragma warning( disable : 4305 ) +#endif + +using namespace osg; + +Node *makeSky( void ) +{ + int i, j; + float lev[] = { -5, -1.0, 1.0, 15.0, 30.0, 60.0, 90.0 }; + float cc[][4] = + { + { 0.0, 0.0, 0.15 }, + { 0.0, 0.0, 0.15 }, + { 0.4, 0.4, 0.7 }, + { 0.2, 0.2, 0.6 }, + { 0.1, 0.1, 0.6 }, + { 0.1, 0.1, 0.6 }, + { 0.1, 0.1, 0.6 }, + }; + float x, y, z; + float alpha, theta; + float radius = 20.0f; + int nlev = sizeof( lev )/sizeof(float); + + Geometry *geom = new Geometry; + + Vec3Array& coords = *(new Vec3Array(19*nlev)); + Vec4Array& colors = *(new Vec4Array(19*nlev)); + Vec2Array& tcoords = *(new Vec2Array(19*nlev)); + + + int ci = 0; + + for( i = 0; i < nlev; i++ ) + { + for( j = 0; j <= 18; j++ ) + { + alpha = osg::DegreesToRadians(lev[i]); + theta = osg::DegreesToRadians((float)(j*20)); + + x = radius * cosf( alpha ) * cosf( theta ); + y = radius * cosf( alpha ) * -sinf( theta ); + z = radius * sinf( alpha ); + + coords[ci][0] = x; + coords[ci][1] = y; + coords[ci][2] = z; + + colors[ci][0] = cc[i][0]; + colors[ci][1] = cc[i][1]; + colors[ci][2] = cc[i][2]; + colors[ci][3] = 1.0; + + tcoords[ci][0] = (float)j/18.0; + tcoords[ci][0] = (float)i/(float)(nlev-1); + + ci++; + } + + + } + + for( i = 0; i < nlev-1; i++ ) + { + DrawElementsUShort* drawElements = new DrawElementsUShort(PrimitiveSet::TRIANGLE_STRIP); + drawElements->reserve(38); + + for( j = 0; j <= 18; j++ ) + { + drawElements->push_back((i+1)*19+j); + drawElements->push_back((i+0)*19+j); + } + + geom->addPrimitiveSet(drawElements); + } + + geom->setVertexArray( &coords ); + geom->setTexCoordArray( 0, &tcoords ); + + geom->setColorArray( &colors ); + geom->setColorBinding( Geometry::BIND_PER_VERTEX ); + + + Texture2D *tex = new Texture2D; + tex->setImage(osgDB::readImageFile("Images/white.rgb")); + + StateSet *dstate = new StateSet; + + dstate->setTextureAttributeAndModes(0, tex, StateAttribute::OFF ); + dstate->setTextureAttribute(0, new TexEnv ); + dstate->setMode( GL_LIGHTING, StateAttribute::OFF ); + dstate->setMode( GL_CULL_FACE, StateAttribute::ON ); + + + // clear the depth to the far plane. + osg::Depth* depth = new osg::Depth; + depth->setFunction(osg::Depth::ALWAYS); + depth->setRange(1.0,1.0); + dstate->setAttributeAndModes(depth,StateAttribute::ON ); + + dstate->setRenderBinDetails(-2,"RenderBin"); + + geom->setStateSet( dstate ); + + Geode *geode = new Geode; + geode->addDrawable( geom ); + + geode->setName( "Sky" ); + + return geode; +} diff --git a/examples/osghangglide/tank.cpp b/examples/osghangglide/tank.cpp new file mode 100644 index 000000000..60d1d3d7f --- /dev/null +++ b/examples/osghangglide/tank.cpp @@ -0,0 +1,166 @@ +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef _MSC_VER +#pragma warning( disable : 4244 ) +#pragma warning( disable : 4305 ) +#endif + +using namespace osg; + +extern void getDatabaseCenterRadius( float dbcenter[3], float *dbradius ); + +static float radius = 2.0; +static float dbcenter[3], dbradius; + +static void conv( const Vec3& a, const Matrix& mat, Vec3& b ) +{ + int i; + Vec3 t; + + for( i = 0; i < 3; i++ ) + { + t[i] = (a[0] * mat(0,i)) + + (a[1] * mat(1,i)) + + (a[2] * mat(2,i)) + + mat(3,i); + } + b[0] = t[0]; + b[1] = t[1]; + b[2] = t[2]; +} + + +Node *makeTank( void ) +{ + + Geode *geode = new Geode; + + getDatabaseCenterRadius( dbcenter, &dbradius ); + + Matrix mat( + 0.05, 0, 0, 0, + 0, 0.05, 0, 0, + 0, 0, 0.05, 0, + 1.5999 - 0.3, + 3.1474, + dbcenter[2] + 0.6542 - 0.09, + 1 + ); + + // 42 required for sodes, 22 for the top. + Vec3Array& vc = *(new Vec3Array(42+22)); + Vec2Array& tc = *(new Vec2Array(42+22)); + + Geometry *gset = new Geometry; + gset->setVertexArray( &vc ); + gset->setTexCoordArray( 0, &tc ); + + // create the sides of the tank. + unsigned int i, c = 0; + for( i = 0; i <= 360; i += 18 ) + { + float x, y, z; + float s, t; + float theta = osg::DegreesToRadians((float)i); + + s = (float)i/90.0; + t = 1.0; + + x = radius * cosf( theta ); + y = radius * sinf( theta ); + z = 1.0; + + vc[c][0] = x; + vc[c][1] = y; + vc[c][2] = z; + + tc[c][0] = s; + tc[c][1] = t; + + c++; + + t = 0.0; + z = 0.0; + + vc[c][0] = x; + vc[c][1] = y; + vc[c][2] = z; + + tc[c][0] = s; + tc[c][1] = t; + c++; + } + + gset->addPrimitiveSet( new DrawArrays(PrimitiveSet::TRIANGLE_STRIP,0,c) ); + + // create the top of the tank. + + int prev_c = c; + + vc[c][0] = 0.0f; + vc[c][1] = 0.0f; + vc[c][2] = 1.0f; + + tc[c][0] = 0.0f; + tc[c][1] = 0.0f; + c++; + + for( i = 0; i <= 360; i += 18 ) + { + float x, y, z; + float s, t; + float theta = osg::DegreesToRadians((float)i); + + // s = (float)i/360.0; + // t = 1.0; + s = cosf( theta ); + t = sinf( theta ); + + x = radius * cosf( theta ); + y = radius * sinf( theta ); + z = 1.0; + + vc[c][0] = x; + vc[c][1] = y; + vc[c][2] = z; + + tc[c][0] = s; + tc[c][1] = t; + + c++; + } + + for( i = 0; i < c; i++ ) + conv( vc[i], mat, vc[i] ); + + gset->addPrimitiveSet(new DrawArrays(PrimitiveSet::TRIANGLE_FAN,prev_c,c-prev_c)); + + + + + Texture2D *tex = new Texture2D; + + tex->setWrap( Texture2D::WRAP_S, Texture2D::REPEAT ); + tex->setWrap( Texture2D::WRAP_T, Texture2D::REPEAT ); + tex->setImage(osgDB::readImageFile("Images/tank.rgb")); + + StateSet *dstate = new StateSet; + dstate->setTextureAttributeAndModes(0, tex, StateAttribute::ON ); + dstate->setTextureAttribute(0, new TexEnv ); + + gset->setStateSet( dstate ); + geode->addDrawable( gset ); + + return geode; +} diff --git a/examples/osghangglide/terrain.cpp b/examples/osghangglide/terrain.cpp new file mode 100644 index 000000000..6d9b8eb14 --- /dev/null +++ b/examples/osghangglide/terrain.cpp @@ -0,0 +1,128 @@ +// #include + +#include +#include +#include +#include +#include + +#include + +#include "terrain_coords.h" +#include "terrain_texcoords.h" + +using namespace osg; + +void getDatabaseCenterRadius( float dbcenter[3], float *dbradius ) +{ + int i; + double n=0.0; + double center[3] = { 0.0f, 0.0f, 0.0f }; + float cnt; + + cnt = 39 * 38; + for( i = 0; i < cnt; i++ ) + { + center[0] += (double)vertex[i][0]; + center[1] += (double)vertex[i][1]; + center[2] += (double)vertex[i][2]; + + n = n + 1.0; + } + + center[0] /= n; + center[1] /= n; + center[2] /= n; + + float r = 0.0; + + // for( i = 0; i < sizeof( vertex ) / (sizeof( float[3] )); i++ ) + for( i = 0; i < cnt; i++ ) + { + double d = sqrt( + (((double)vertex[i][0] - center[0]) * ((double)vertex[i][0] - center[0])) + + (((double)vertex[i][1] - center[1]) * ((double)vertex[i][1] - center[1])) + + (((double)vertex[i][2] - center[2]) * ((double)vertex[i][2] - center[2])) ); + + if( d > (double)r ) r = (float)d; + + } + + *dbradius = r; + dbcenter[0] = (float)center[0]; + dbcenter[1] = (float)center[1]; + dbcenter[2] = (float)center[2]; + + int index = 19 * 39 + 19; + dbcenter[0] = vertex[index][0] - 0.15; + dbcenter[1] = vertex[index][1]; + dbcenter[2] = vertex[index][2] + 0.35; + +} + + +Node *makeTerrain( void ) +{ + int m, n; + int i, j; + float dbcenter[3]; + float dbradius; + + getDatabaseCenterRadius( dbcenter, &dbradius ); + + m = (sizeof( vertex ) /(sizeof( float[3])))/39; + n = 39; + + Vec3Array& v = *(new Vec3Array(m*n)); + Vec2Array& t = *(new Vec2Array(m*n)); + Vec4Array& col = *(new Vec4Array(1)); + + col[0][0] = col[0][1] = col[0][2] = col[0][3] = 1.0f; + + for( i = 0; i < m * n; i++ ) + { + v[i][0] = vertex[i][0] - dbcenter[0]; + v[i][1] = vertex[i][1] - dbcenter[1]; + v[i][2] = vertex[i][2]; + + t[i][0] = texcoord[i][0] + 0.025; + t[i][1] = texcoord[i][1]; + } + + Geometry *geom = new Geometry; + + geom->setVertexArray( &v ); + geom->setTexCoordArray( 0, &t ); + + geom->setColorArray( &col ); + geom->setColorBinding( Geometry::BIND_OVERALL ); + + for( i = 0; i < m-2; i++ ) + { + DrawElementsUShort* elements = new DrawElementsUShort(PrimitiveSet::TRIANGLE_STRIP); + elements->reserve(39*2); + for( j = 0; j < n; j++ ) + { + elements->push_back((i+0)*n+j); + elements->push_back((i+1)*n+j); + } + geom->addPrimitiveSet(elements); + } + + + Texture2D *tex = new Texture2D; + + tex->setImage(osgDB::readImageFile("Images/lz.rgb")); + + StateSet *dstate = new StateSet; + dstate->setMode( GL_LIGHTING, StateAttribute::OFF ); + dstate->setTextureAttributeAndModes(0, tex, StateAttribute::ON ); + dstate->setTextureAttribute(0, new TexEnv ); + + geom->setStateSet( dstate ); + + Geode *geode = new Geode; + geode->addDrawable( geom ); + + return geode; +} diff --git a/examples/osghangglide/terrain_coords.h b/examples/osghangglide/terrain_coords.h new file mode 100644 index 000000000..3f3b27ec5 --- /dev/null +++ b/examples/osghangglide/terrain_coords.h @@ -0,0 +1,1528 @@ +#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) + // disable the double to float errors. + #pragma warning( disable : 4305 ) +#endif + +static float vertex[][3] = { + + { 5998.7998, 41456.1016, 1.7800 }, + { 5998.7998, 41456.3984, 1.8200 }, + { 5998.7998, 41456.6992, 1.8600 }, + { 5998.7998, 41457.0000, 1.8800 }, + { 5998.7998, 41457.3008, 1.9000 }, + { 5998.7998, 41457.6016, 1.9000 }, + { 5998.7998, 41457.8984, 1.8900 }, + { 5998.7998, 41458.1992, 1.8800 }, + { 5998.7998, 41458.5000, 1.8600 }, + { 5998.7998, 41458.8008, 1.8500 }, + { 5998.7998, 41459.1016, 1.8300 }, + { 5998.7998, 41459.3984, 1.8100 }, + { 5998.7998, 41459.6992, 1.7800 }, + { 5998.7998, 41460.0000, 1.7500 }, + { 5998.7998, 41460.3008, 1.7300 }, + { 5998.7998, 41460.6016, 1.7100 }, + { 5998.7998, 41460.8984, 1.7000 }, + { 5998.7998, 41461.1992, 1.6900 }, + { 5998.7998, 41461.5000, 1.7000 }, + { 5998.7998, 41461.8008, 1.7400 }, + { 5998.7998, 41462.1016, 1.7900 }, + { 5998.7998, 41462.3984, 1.8600 }, + { 5998.7998, 41462.6992, 1.9400 }, + { 5998.7998, 41463.0000, 1.9900 }, + { 5998.7998, 41463.3008, 2.0200 }, + { 5998.7998, 41463.6016, 2.0300 }, + { 5998.7998, 41463.8984, 2.0300 }, + { 5998.7998, 41464.1992, 2.0200 }, + { 5998.7998, 41464.5000, 2.0100 }, + { 5998.7998, 41464.8008, 1.9900 }, + { 5998.7998, 41465.1016, 1.9700 }, + { 5998.7998, 41465.3984, 1.9600 }, + { 5998.7998, 41465.6992, 1.9500 }, + { 5998.7998, 41466.0000, 1.9500 }, + { 5998.7998, 41466.3008, 1.9500 }, + { 5998.7998, 41466.6016, 1.9500 }, + { 5998.7998, 41466.8984, 1.9400 }, + { 5998.7998, 41467.1992, 1.9300 }, + { 5998.7998, 41467.5000, 1.9200 }, + + { 5999.1001, 41456.1016, 1.8600 }, + { 5999.1001, 41456.3984, 1.9100 }, + { 5999.1001, 41456.6992, 1.9600 }, + { 5999.1001, 41457.0000, 1.9900 }, + { 5999.1001, 41457.3008, 2.0100 }, + { 5999.1001, 41457.6016, 2.0000 }, + { 5999.1001, 41457.8984, 1.9700 }, + { 5999.1001, 41458.1992, 1.9400 }, + { 5999.1001, 41458.5000, 1.9100 }, + { 5999.1001, 41458.8008, 1.8700 }, + { 5999.1001, 41459.1016, 1.8400 }, + { 5999.1001, 41459.3984, 1.8000 }, + { 5999.1001, 41459.6992, 1.7700 }, + { 5999.1001, 41460.0000, 1.7400 }, + { 5999.1001, 41460.3008, 1.7300 }, + { 5999.1001, 41460.6016, 1.7200 }, + { 5999.1001, 41460.8984, 1.7200 }, + { 5999.1001, 41461.1992, 1.7300 }, + { 5999.1001, 41461.5000, 1.7600 }, + { 5999.1001, 41461.8008, 1.7900 }, + { 5999.1001, 41462.1016, 1.8300 }, + { 5999.1001, 41462.3984, 1.8700 }, + { 5999.1001, 41462.6992, 1.9100 }, + { 5999.1001, 41463.0000, 1.9400 }, + { 5999.1001, 41463.3008, 1.9700 }, + { 5999.1001, 41463.6016, 1.9900 }, + { 5999.1001, 41463.8984, 2.0100 }, + { 5999.1001, 41464.1992, 2.0200 }, + { 5999.1001, 41464.5000, 2.0100 }, + { 5999.1001, 41464.8008, 1.9900 }, + { 5999.1001, 41465.1016, 1.9700 }, + { 5999.1001, 41465.3984, 1.9600 }, + { 5999.1001, 41465.6992, 1.9600 }, + { 5999.1001, 41466.0000, 1.9600 }, + { 5999.1001, 41466.3008, 1.9600 }, + { 5999.1001, 41466.6016, 1.9600 }, + { 5999.1001, 41466.8984, 1.9600 }, + { 5999.1001, 41467.1992, 1.9600 }, + { 5999.1001, 41467.5000, 1.9600 }, + + { 5999.3999, 41456.1016, 1.9200 }, + { 5999.3999, 41456.3984, 1.9800 }, + { 5999.3999, 41456.6992, 2.0300 }, + { 5999.3999, 41457.0000, 2.0600 }, + { 5999.3999, 41457.3008, 2.0700 }, + { 5999.3999, 41457.6016, 2.0500 }, + { 5999.3999, 41457.8984, 2.0100 }, + { 5999.3999, 41458.1992, 1.9700 }, + { 5999.3999, 41458.5000, 1.9200 }, + { 5999.3999, 41458.8008, 1.8700 }, + { 5999.3999, 41459.1016, 1.8300 }, + { 5999.3999, 41459.3984, 1.7900 }, + { 5999.3999, 41459.6992, 1.7500 }, + { 5999.3999, 41460.0000, 1.7300 }, + { 5999.3999, 41460.3008, 1.7200 }, + { 5999.3999, 41460.6016, 1.7200 }, + { 5999.3999, 41460.8984, 1.7400 }, + { 5999.3999, 41461.1992, 1.7700 }, + { 5999.3999, 41461.5000, 1.8100 }, + { 5999.3999, 41461.8008, 1.8400 }, + { 5999.3999, 41462.1016, 1.8700 }, + { 5999.3999, 41462.3984, 1.8900 }, + { 5999.3999, 41462.6992, 1.9100 }, + { 5999.3999, 41463.0000, 1.9200 }, + { 5999.3999, 41463.3008, 1.9400 }, + { 5999.3999, 41463.6016, 1.9700 }, + { 5999.3999, 41463.8984, 2.0000 }, + { 5999.3999, 41464.1992, 2.0100 }, + { 5999.3999, 41464.5000, 2.0100 }, + { 5999.3999, 41464.8008, 2.0000 }, + { 5999.3999, 41465.1016, 1.9800 }, + { 5999.3999, 41465.3984, 1.9700 }, + { 5999.3999, 41465.6992, 1.9700 }, + { 5999.3999, 41466.0000, 1.9700 }, + { 5999.3999, 41466.3008, 1.9800 }, + { 5999.3999, 41466.6016, 1.9800 }, + { 5999.3999, 41466.8984, 1.9900 }, + { 5999.3999, 41467.1992, 1.9900 }, + { 5999.3999, 41467.5000, 2.0100 }, + + { 5999.7002, 41456.1016, 1.9800 }, + { 5999.7002, 41456.3984, 2.0300 }, + { 5999.7002, 41456.6992, 2.0700 }, + { 5999.7002, 41457.0000, 2.0900 }, + { 5999.7002, 41457.3008, 2.0800 }, + { 5999.7002, 41457.6016, 2.0500 }, + { 5999.7002, 41457.8984, 2.0000 }, + { 5999.7002, 41458.1992, 1.9500 }, + { 5999.7002, 41458.5000, 1.9000 }, + { 5999.7002, 41458.8008, 1.8400 }, + { 5999.7002, 41459.1016, 1.8000 }, + { 5999.7002, 41459.3984, 1.7600 }, + { 5999.7002, 41459.6992, 1.7200 }, + { 5999.7002, 41460.0000, 1.7100 }, + { 5999.7002, 41460.3008, 1.7100 }, + { 5999.7002, 41460.6016, 1.7200 }, + { 5999.7002, 41460.8984, 1.7500 }, + { 5999.7002, 41461.1992, 1.8000 }, + { 5999.7002, 41461.5000, 1.8600 }, + { 5999.7002, 41461.8008, 1.9000 }, + { 5999.7002, 41462.1016, 1.9300 }, + { 5999.7002, 41462.3984, 1.9400 }, + { 5999.7002, 41462.6992, 1.9400 }, + { 5999.7002, 41463.0000, 1.9500 }, + { 5999.7002, 41463.3008, 1.9600 }, + { 5999.7002, 41463.6016, 1.9800 }, + { 5999.7002, 41463.8984, 2.0000 }, + { 5999.7002, 41464.1992, 2.0100 }, + { 5999.7002, 41464.5000, 2.0100 }, + { 5999.7002, 41464.8008, 2.0000 }, + { 5999.7002, 41465.1016, 1.9900 }, + { 5999.7002, 41465.3984, 1.9800 }, + { 5999.7002, 41465.6992, 1.9800 }, + { 5999.7002, 41466.0000, 1.9900 }, + { 5999.7002, 41466.3008, 2.0000 }, + { 5999.7002, 41466.6016, 2.0100 }, + { 5999.7002, 41466.8984, 2.0200 }, + { 5999.7002, 41467.1992, 2.0400 }, + { 5999.7002, 41467.5000, 2.0600 }, + + { 6000.0000, 41456.1016, 2.0200 }, + { 6000.0000, 41456.3984, 2.0400 }, + { 6000.0000, 41456.6992, 2.0600 }, + { 6000.0000, 41457.0000, 2.0600 }, + { 6000.0000, 41457.3008, 2.0400 }, + { 6000.0000, 41457.6016, 2.0000 }, + { 6000.0000, 41457.8984, 1.9500 }, + { 6000.0000, 41458.1992, 1.9000 }, + { 6000.0000, 41458.5000, 1.8400 }, + { 6000.0000, 41458.8008, 1.7900 }, + { 6000.0000, 41459.1016, 1.7500 }, + { 6000.0000, 41459.3984, 1.7100 }, + { 6000.0000, 41459.6992, 1.6900 }, + { 6000.0000, 41460.0000, 1.6800 }, + { 6000.0000, 41460.3008, 1.6900 }, + { 6000.0000, 41460.6016, 1.7200 }, + { 6000.0000, 41460.8984, 1.7600 }, + { 6000.0000, 41461.1992, 1.8200 }, + { 6000.0000, 41461.5000, 1.8800 }, + { 6000.0000, 41461.8008, 1.9300 }, + { 6000.0000, 41462.1016, 1.9600 }, + { 6000.0000, 41462.3984, 1.9600 }, + { 6000.0000, 41462.6992, 1.9600 }, + { 6000.0000, 41463.0000, 1.9600 }, + { 6000.0000, 41463.3008, 1.9700 }, + { 6000.0000, 41463.6016, 1.9900 }, + { 6000.0000, 41463.8984, 2.0100 }, + { 6000.0000, 41464.1992, 2.0200 }, + { 6000.0000, 41464.5000, 2.0200 }, + { 6000.0000, 41464.8008, 2.0100 }, + { 6000.0000, 41465.1016, 1.9900 }, + { 6000.0000, 41465.3984, 1.9900 }, + { 6000.0000, 41465.6992, 1.9900 }, + { 6000.0000, 41466.0000, 2.0000 }, + { 6000.0000, 41466.3008, 2.0200 }, + { 6000.0000, 41466.6016, 2.0400 }, + { 6000.0000, 41466.8984, 2.0600 }, + { 6000.0000, 41467.1992, 2.0800 }, + { 6000.0000, 41467.5000, 2.1000 }, + + { 6000.2998, 41456.1016, 2.0600 }, + { 6000.2998, 41456.3984, 2.0700 }, + { 6000.2998, 41456.6992, 2.0700 }, + { 6000.2998, 41457.0000, 2.0500 }, + { 6000.2998, 41457.3008, 2.0200 }, + { 6000.2998, 41457.6016, 1.9700 }, + { 6000.2998, 41457.8984, 1.9000 }, + { 6000.2998, 41458.1992, 1.8400 }, + { 6000.2998, 41458.5000, 1.7800 }, + { 6000.2998, 41458.8008, 1.7400 }, + { 6000.2998, 41459.1016, 1.7000 }, + { 6000.2998, 41459.3984, 1.6800 }, + { 6000.2998, 41459.6992, 1.6700 }, + { 6000.2998, 41460.0000, 1.6700 }, + { 6000.2998, 41460.3008, 1.6800 }, + { 6000.2998, 41460.6016, 1.7100 }, + { 6000.2998, 41460.8984, 1.7400 }, + { 6000.2998, 41461.1992, 1.7800 }, + { 6000.2998, 41461.5000, 1.8300 }, + { 6000.2998, 41461.8008, 1.8700 }, + { 6000.2998, 41462.1016, 1.8900 }, + { 6000.2998, 41462.3984, 1.9000 }, + { 6000.2998, 41462.6992, 1.9000 }, + { 6000.2998, 41463.0000, 1.9100 }, + { 6000.2998, 41463.3008, 1.9300 }, + { 6000.2998, 41463.6016, 1.9500 }, + { 6000.2998, 41463.8984, 1.9800 }, + { 6000.2998, 41464.1992, 2.0000 }, + { 6000.2998, 41464.5000, 2.0100 }, + { 6000.2998, 41464.8008, 2.0100 }, + { 6000.2998, 41465.1016, 2.0000 }, + { 6000.2998, 41465.3984, 2.0000 }, + { 6000.2998, 41465.6992, 2.0000 }, + { 6000.2998, 41466.0000, 2.0200 }, + { 6000.2998, 41466.3008, 2.0400 }, + { 6000.2998, 41466.6016, 2.0600 }, + { 6000.2998, 41466.8984, 2.0800 }, + { 6000.2998, 41467.1992, 2.1100 }, + { 6000.2998, 41467.5000, 2.1300 }, + + { 6000.6001, 41456.1016, 2.1000 }, + { 6000.6001, 41456.3984, 2.1100 }, + { 6000.6001, 41456.6992, 2.1000 }, + { 6000.6001, 41457.0000, 2.0700 }, + { 6000.6001, 41457.3008, 2.0200 }, + { 6000.6001, 41457.6016, 1.9500 }, + { 6000.6001, 41457.8984, 1.8700 }, + { 6000.6001, 41458.1992, 1.8000 }, + { 6000.6001, 41458.5000, 1.7400 }, + { 6000.6001, 41458.8008, 1.7000 }, + { 6000.6001, 41459.1016, 1.6800 }, + { 6000.6001, 41459.3984, 1.6600 }, + { 6000.6001, 41459.6992, 1.6600 }, + { 6000.6001, 41460.0000, 1.6700 }, + { 6000.6001, 41460.3008, 1.6800 }, + { 6000.6001, 41460.6016, 1.7000 }, + { 6000.6001, 41460.8984, 1.7200 }, + { 6000.6001, 41461.1992, 1.7400 }, + { 6000.6001, 41461.5000, 1.7700 }, + { 6000.6001, 41461.8008, 1.7900 }, + { 6000.6001, 41462.1016, 1.8100 }, + { 6000.6001, 41462.3984, 1.8200 }, + { 6000.6001, 41462.6992, 1.8200 }, + { 6000.6001, 41463.0000, 1.8400 }, + { 6000.6001, 41463.3008, 1.8600 }, + { 6000.6001, 41463.6016, 1.9000 }, + { 6000.6001, 41463.8984, 1.9400 }, + { 6000.6001, 41464.1992, 1.9600 }, + { 6000.6001, 41464.5000, 1.9800 }, + { 6000.6001, 41464.8008, 1.9900 }, + { 6000.6001, 41465.1016, 2.0000 }, + { 6000.6001, 41465.3984, 2.0100 }, + { 6000.6001, 41465.6992, 2.0200 }, + { 6000.6001, 41466.0000, 2.0400 }, + { 6000.6001, 41466.3008, 2.0600 }, + { 6000.6001, 41466.6016, 2.0900 }, + { 6000.6001, 41466.8984, 2.1100 }, + { 6000.6001, 41467.1992, 2.1300 }, + { 6000.6001, 41467.5000, 2.1600 }, + + { 6000.8999, 41456.1016, 2.1000 }, + { 6000.8999, 41456.3984, 2.1000 }, + { 6000.8999, 41456.6992, 2.0800 }, + { 6000.8999, 41457.0000, 2.0500 }, + { 6000.8999, 41457.3008, 2.0000 }, + { 6000.8999, 41457.6016, 1.9200 }, + { 6000.8999, 41457.8984, 1.8400 }, + { 6000.8999, 41458.1992, 1.7800 }, + { 6000.8999, 41458.5000, 1.7200 }, + { 6000.8999, 41458.8008, 1.6900 }, + { 6000.8999, 41459.1016, 1.6700 }, + { 6000.8999, 41459.3984, 1.6600 }, + { 6000.8999, 41459.6992, 1.6600 }, + { 6000.8999, 41460.0000, 1.6700 }, + { 6000.8999, 41460.3008, 1.6800 }, + { 6000.8999, 41460.6016, 1.6900 }, + { 6000.8999, 41460.8984, 1.7100 }, + { 6000.8999, 41461.1992, 1.7200 }, + { 6000.8999, 41461.5000, 1.7300 }, + { 6000.8999, 41461.8008, 1.7400 }, + { 6000.8999, 41462.1016, 1.7500 }, + { 6000.8999, 41462.3984, 1.7600 }, + { 6000.8999, 41462.6992, 1.7700 }, + { 6000.8999, 41463.0000, 1.7900 }, + { 6000.8999, 41463.3008, 1.8200 }, + { 6000.8999, 41463.6016, 1.8600 }, + { 6000.8999, 41463.8984, 1.9000 }, + { 6000.8999, 41464.1992, 1.9400 }, + { 6000.8999, 41464.5000, 1.9700 }, + { 6000.8999, 41464.8008, 1.9900 }, + { 6000.8999, 41465.1016, 2.0100 }, + { 6000.8999, 41465.3984, 2.0300 }, + { 6000.8999, 41465.6992, 2.0500 }, + { 6000.8999, 41466.0000, 2.0700 }, + { 6000.8999, 41466.3008, 2.0900 }, + { 6000.8999, 41466.6016, 2.1200 }, + { 6000.8999, 41466.8984, 2.1400 }, + { 6000.8999, 41467.1992, 2.1600 }, + { 6000.8999, 41467.5000, 2.1800 }, + + { 6001.2002, 41456.1016, 2.0600 }, + { 6001.2002, 41456.3984, 2.0400 }, + { 6001.2002, 41456.6992, 2.0200 }, + { 6001.2002, 41457.0000, 1.9800 }, + { 6001.2002, 41457.3008, 1.9400 }, + { 6001.2002, 41457.6016, 1.8800 }, + { 6001.2002, 41457.8984, 1.8100 }, + { 6001.2002, 41458.1992, 1.7600 }, + { 6001.2002, 41458.5000, 1.7200 }, + { 6001.2002, 41458.8008, 1.7000 }, + { 6001.2002, 41459.1016, 1.6800 }, + { 6001.2002, 41459.3984, 1.6700 }, + { 6001.2002, 41459.6992, 1.6700 }, + { 6001.2002, 41460.0000, 1.6800 }, + { 6001.2002, 41460.3008, 1.6900 }, + { 6001.2002, 41460.6016, 1.7000 }, + { 6001.2002, 41460.8984, 1.7100 }, + { 6001.2002, 41461.1992, 1.7100 }, + { 6001.2002, 41461.5000, 1.7200 }, + { 6001.2002, 41461.8008, 1.7200 }, + { 6001.2002, 41462.1016, 1.7300 }, + { 6001.2002, 41462.3984, 1.7400 }, + { 6001.2002, 41462.6992, 1.7500 }, + { 6001.2002, 41463.0000, 1.7700 }, + { 6001.2002, 41463.3008, 1.8100 }, + { 6001.2002, 41463.6016, 1.8700 }, + { 6001.2002, 41463.8984, 1.9300 }, + { 6001.2002, 41464.1992, 1.9800 }, + { 6001.2002, 41464.5000, 2.0200 }, + { 6001.2002, 41464.8008, 2.0400 }, + { 6001.2002, 41465.1016, 2.0500 }, + { 6001.2002, 41465.3984, 2.0600 }, + { 6001.2002, 41465.6992, 2.0800 }, + { 6001.2002, 41466.0000, 2.1000 }, + { 6001.2002, 41466.3008, 2.1200 }, + { 6001.2002, 41466.6016, 2.1500 }, + { 6001.2002, 41466.8984, 2.1700 }, + { 6001.2002, 41467.1992, 2.1900 }, + { 6001.2002, 41467.5000, 2.2200 }, + + { 6001.5000, 41456.1016, 2.0000 }, + { 6001.5000, 41456.3984, 1.9700 }, + { 6001.5000, 41456.6992, 1.9400 }, + { 6001.5000, 41457.0000, 1.9000 }, + { 6001.5000, 41457.3008, 1.8600 }, + { 6001.5000, 41457.6016, 1.8200 }, + { 6001.5000, 41457.8984, 1.7800 }, + { 6001.5000, 41458.1992, 1.7500 }, + { 6001.5000, 41458.5000, 1.7200 }, + { 6001.5000, 41458.8008, 1.7100 }, + { 6001.5000, 41459.1016, 1.7000 }, + { 6001.5000, 41459.3984, 1.6900 }, + { 6001.5000, 41459.6992, 1.6900 }, + { 6001.5000, 41460.0000, 1.7000 }, + { 6001.5000, 41460.3008, 1.7100 }, + { 6001.5000, 41460.6016, 1.7100 }, + { 6001.5000, 41460.8984, 1.7200 }, + { 6001.5000, 41461.1992, 1.7200 }, + { 6001.5000, 41461.5000, 1.7200 }, + { 6001.5000, 41461.8008, 1.7200 }, + { 6001.5000, 41462.1016, 1.7200 }, + { 6001.5000, 41462.3984, 1.7300 }, + { 6001.5000, 41462.6992, 1.7500 }, + { 6001.5000, 41463.0000, 1.7800 }, + { 6001.5000, 41463.3008, 1.8200 }, + { 6001.5000, 41463.6016, 1.8900 }, + { 6001.5000, 41463.8984, 1.9700 }, + { 6001.5000, 41464.1992, 2.0300 }, + { 6001.5000, 41464.5000, 2.0800 }, + { 6001.5000, 41464.8008, 2.0900 }, + { 6001.5000, 41465.1016, 2.0900 }, + { 6001.5000, 41465.3984, 2.0900 }, + { 6001.5000, 41465.6992, 2.1000 }, + { 6001.5000, 41466.0000, 2.1200 }, + { 6001.5000, 41466.3008, 2.1500 }, + { 6001.5000, 41466.6016, 2.1700 }, + { 6001.5000, 41466.8984, 2.2000 }, + { 6001.5000, 41467.1992, 2.2200 }, + { 6001.5000, 41467.5000, 2.2600 }, + + { 6001.7998, 41456.1016, 1.9400 }, + { 6001.7998, 41456.3984, 1.9100 }, + { 6001.7998, 41456.6992, 1.8700 }, + { 6001.7998, 41457.0000, 1.8400 }, + { 6001.7998, 41457.3008, 1.8100 }, + { 6001.7998, 41457.6016, 1.7900 }, + { 6001.7998, 41457.8984, 1.7700 }, + { 6001.7998, 41458.1992, 1.7500 }, + { 6001.7998, 41458.5000, 1.7300 }, + { 6001.7998, 41458.8008, 1.7200 }, + { 6001.7998, 41459.1016, 1.7100 }, + { 6001.7998, 41459.3984, 1.7100 }, + { 6001.7998, 41459.6992, 1.7100 }, + { 6001.7998, 41460.0000, 1.7100 }, + { 6001.7998, 41460.3008, 1.7200 }, + { 6001.7998, 41460.6016, 1.7200 }, + { 6001.7998, 41460.8984, 1.7300 }, + { 6001.7998, 41461.1992, 1.7300 }, + { 6001.7998, 41461.5000, 1.7200 }, + { 6001.7998, 41461.8008, 1.7200 }, + { 6001.7998, 41462.1016, 1.7200 }, + { 6001.7998, 41462.3984, 1.7300 }, + { 6001.7998, 41462.6992, 1.7600 }, + { 6001.7998, 41463.0000, 1.7900 }, + { 6001.7998, 41463.3008, 1.8400 }, + { 6001.7998, 41463.6016, 1.9200 }, + { 6001.7998, 41463.8984, 2.0100 }, + { 6001.7998, 41464.1992, 2.0800 }, + { 6001.7998, 41464.5000, 2.1200 }, + { 6001.7998, 41464.8008, 2.1300 }, + { 6001.7998, 41465.1016, 2.1200 }, + { 6001.7998, 41465.3984, 2.1100 }, + { 6001.7998, 41465.6992, 2.1200 }, + { 6001.7998, 41466.0000, 2.1300 }, + { 6001.7998, 41466.3008, 2.1600 }, + { 6001.7998, 41466.6016, 2.1800 }, + { 6001.7998, 41466.8984, 2.2100 }, + { 6001.7998, 41467.1992, 2.2400 }, + { 6001.7998, 41467.5000, 2.2800 }, + + { 6002.1001, 41456.1016, 1.8900 }, + { 6002.1001, 41456.3984, 1.8500 }, + { 6002.1001, 41456.6992, 1.8200 }, + { 6002.1001, 41457.0000, 1.8000 }, + { 6002.1001, 41457.3008, 1.7800 }, + { 6002.1001, 41457.6016, 1.7600 }, + { 6002.1001, 41457.8984, 1.7500 }, + { 6002.1001, 41458.1992, 1.7400 }, + { 6002.1001, 41458.5000, 1.7400 }, + { 6002.1001, 41458.8008, 1.7300 }, + { 6002.1001, 41459.1016, 1.7300 }, + { 6002.1001, 41459.3984, 1.7200 }, + { 6002.1001, 41459.6992, 1.7200 }, + { 6002.1001, 41460.0000, 1.7200 }, + { 6002.1001, 41460.3008, 1.7300 }, + { 6002.1001, 41460.6016, 1.7300 }, + { 6002.1001, 41460.8984, 1.7400 }, + { 6002.1001, 41461.1992, 1.7300 }, + { 6002.1001, 41461.5000, 1.7200 }, + { 6002.1001, 41461.8008, 1.7200 }, + { 6002.1001, 41462.1016, 1.7300 }, + { 6002.1001, 41462.3984, 1.7500 }, + { 6002.1001, 41462.6992, 1.7800 }, + { 6002.1001, 41463.0000, 1.8200 }, + { 6002.1001, 41463.3008, 1.8800 }, + { 6002.1001, 41463.6016, 1.9600 }, + { 6002.1001, 41463.8984, 2.0600 }, + { 6002.1001, 41464.1992, 2.1300 }, + { 6002.1001, 41464.5000, 2.1700 }, + { 6002.1001, 41464.8008, 2.1700 }, + { 6002.1001, 41465.1016, 2.1500 }, + { 6002.1001, 41465.3984, 2.1400 }, + { 6002.1001, 41465.6992, 2.1300 }, + { 6002.1001, 41466.0000, 2.1400 }, + { 6002.1001, 41466.3008, 2.1600 }, + { 6002.1001, 41466.6016, 2.1800 }, + { 6002.1001, 41466.8984, 2.2100 }, + { 6002.1001, 41467.1992, 2.2400 }, + { 6002.1001, 41467.5000, 2.2900 }, + + { 6002.3999, 41456.1016, 1.8300 }, + { 6002.3999, 41456.3984, 1.8000 }, + { 6002.3999, 41456.6992, 1.7800 }, + { 6002.3999, 41457.0000, 1.7600 }, + { 6002.3999, 41457.3008, 1.7400 }, + { 6002.3999, 41457.6016, 1.7400 }, + { 6002.3999, 41457.8984, 1.7400 }, + { 6002.3999, 41458.1992, 1.7400 }, + { 6002.3999, 41458.5000, 1.7400 }, + { 6002.3999, 41458.8008, 1.7400 }, + { 6002.3999, 41459.1016, 1.7300 }, + { 6002.3999, 41459.3984, 1.7300 }, + { 6002.3999, 41459.6992, 1.7300 }, + { 6002.3999, 41460.0000, 1.7300 }, + { 6002.3999, 41460.3008, 1.7400 }, + { 6002.3999, 41460.6016, 1.7400 }, + { 6002.3999, 41460.8984, 1.7400 }, + { 6002.3999, 41461.1992, 1.7400 }, + { 6002.3999, 41461.5000, 1.7300 }, + { 6002.3999, 41461.8008, 1.7300 }, + { 6002.3999, 41462.1016, 1.7400 }, + { 6002.3999, 41462.3984, 1.7700 }, + { 6002.3999, 41462.6992, 1.8000 }, + { 6002.3999, 41463.0000, 1.8500 }, + { 6002.3999, 41463.3008, 1.9200 }, + { 6002.3999, 41463.6016, 2.0100 }, + { 6002.3999, 41463.8984, 2.1100 }, + { 6002.3999, 41464.1992, 2.1800 }, + { 6002.3999, 41464.5000, 2.2200 }, + { 6002.3999, 41464.8008, 2.2200 }, + { 6002.3999, 41465.1016, 2.1900 }, + { 6002.3999, 41465.3984, 2.1700 }, + { 6002.3999, 41465.6992, 2.1500 }, + { 6002.3999, 41466.0000, 2.1600 }, + { 6002.3999, 41466.3008, 2.1700 }, + { 6002.3999, 41466.6016, 2.1900 }, + { 6002.3999, 41466.8984, 2.2100 }, + { 6002.3999, 41467.1992, 2.2400 }, + { 6002.3999, 41467.5000, 2.2900 }, + + { 6002.7002, 41456.1016, 1.8100 }, + { 6002.7002, 41456.3984, 1.7900 }, + { 6002.7002, 41456.6992, 1.7800 }, + { 6002.7002, 41457.0000, 1.7600 }, + { 6002.7002, 41457.3008, 1.7500 }, + { 6002.7002, 41457.6016, 1.7500 }, + { 6002.7002, 41457.8984, 1.7500 }, + { 6002.7002, 41458.1992, 1.7500 }, + { 6002.7002, 41458.5000, 1.7500 }, + { 6002.7002, 41458.8008, 1.7500 }, + { 6002.7002, 41459.1016, 1.7400 }, + { 6002.7002, 41459.3984, 1.7300 }, + { 6002.7002, 41459.6992, 1.7300 }, + { 6002.7002, 41460.0000, 1.7300 }, + { 6002.7002, 41460.3008, 1.7400 }, + { 6002.7002, 41460.6016, 1.7400 }, + { 6002.7002, 41460.8984, 1.7500 }, + { 6002.7002, 41461.1992, 1.7400 }, + { 6002.7002, 41461.5000, 1.7400 }, + { 6002.7002, 41461.8008, 1.7400 }, + { 6002.7002, 41462.1016, 1.7500 }, + { 6002.7002, 41462.3984, 1.7900 }, + { 6002.7002, 41462.6992, 1.8300 }, + { 6002.7002, 41463.0000, 1.8800 }, + { 6002.7002, 41463.3008, 1.9500 }, + { 6002.7002, 41463.6016, 2.0400 }, + { 6002.7002, 41463.8984, 2.1400 }, + { 6002.7002, 41464.1992, 2.2100 }, + { 6002.7002, 41464.5000, 2.2600 }, + { 6002.7002, 41464.8008, 2.2500 }, + { 6002.7002, 41465.1016, 2.2200 }, + { 6002.7002, 41465.3984, 2.2000 }, + { 6002.7002, 41465.6992, 2.1900 }, + { 6002.7002, 41466.0000, 2.1900 }, + { 6002.7002, 41466.3008, 2.2100 }, + { 6002.7002, 41466.6016, 2.2200 }, + { 6002.7002, 41466.8984, 2.2400 }, + { 6002.7002, 41467.1992, 2.2700 }, + { 6002.7002, 41467.5000, 2.3100 }, + + { 6003.0000, 41456.1016, 1.8400 }, + { 6003.0000, 41456.3984, 1.8300 }, + { 6003.0000, 41456.6992, 1.8200 }, + { 6003.0000, 41457.0000, 1.8100 }, + { 6003.0000, 41457.3008, 1.8000 }, + { 6003.0000, 41457.6016, 1.7900 }, + { 6003.0000, 41457.8984, 1.7800 }, + { 6003.0000, 41458.1992, 1.7700 }, + { 6003.0000, 41458.5000, 1.7600 }, + { 6003.0000, 41458.8008, 1.7600 }, + { 6003.0000, 41459.1016, 1.7500 }, + { 6003.0000, 41459.3984, 1.7400 }, + { 6003.0000, 41459.6992, 1.7400 }, + { 6003.0000, 41460.0000, 1.7400 }, + { 6003.0000, 41460.3008, 1.7500 }, + { 6003.0000, 41460.6016, 1.7500 }, + { 6003.0000, 41460.8984, 1.7500 }, + { 6003.0000, 41461.1992, 1.7500 }, + { 6003.0000, 41461.5000, 1.7500 }, + { 6003.0000, 41461.8008, 1.7500 }, + { 6003.0000, 41462.1016, 1.7700 }, + { 6003.0000, 41462.3984, 1.8000 }, + { 6003.0000, 41462.6992, 1.8500 }, + { 6003.0000, 41463.0000, 1.9100 }, + { 6003.0000, 41463.3008, 1.9800 }, + { 6003.0000, 41463.6016, 2.0600 }, + { 6003.0000, 41463.8984, 2.1500 }, + { 6003.0000, 41464.1992, 2.2200 }, + { 6003.0000, 41464.5000, 2.2700 }, + { 6003.0000, 41464.8008, 2.2700 }, + { 6003.0000, 41465.1016, 2.2400 }, + { 6003.0000, 41465.3984, 2.2300 }, + { 6003.0000, 41465.6992, 2.2200 }, + { 6003.0000, 41466.0000, 2.2300 }, + { 6003.0000, 41466.3008, 2.2600 }, + { 6003.0000, 41466.6016, 2.2800 }, + { 6003.0000, 41466.8984, 2.3000 }, + { 6003.0000, 41467.1992, 2.3300 }, + { 6003.0000, 41467.5000, 2.3700 }, + + { 6003.2998, 41456.1016, 1.8500 }, + { 6003.2998, 41456.3984, 1.8600 }, + { 6003.2998, 41456.6992, 1.8700 }, + { 6003.2998, 41457.0000, 1.8700 }, + { 6003.2998, 41457.3008, 1.8600 }, + { 6003.2998, 41457.6016, 1.8500 }, + { 6003.2998, 41457.8984, 1.8200 }, + { 6003.2998, 41458.1992, 1.8000 }, + { 6003.2998, 41458.5000, 1.7800 }, + { 6003.2998, 41458.8008, 1.7700 }, + { 6003.2998, 41459.1016, 1.7600 }, + { 6003.2998, 41459.3984, 1.7500 }, + { 6003.2998, 41459.6992, 1.7500 }, + { 6003.2998, 41460.0000, 1.7500 }, + { 6003.2998, 41460.3008, 1.7600 }, + { 6003.2998, 41460.6016, 1.7600 }, + { 6003.2998, 41460.8984, 1.7600 }, + { 6003.2998, 41461.1992, 1.7600 }, + { 6003.2998, 41461.5000, 1.7600 }, + { 6003.2998, 41461.8008, 1.7700 }, + { 6003.2998, 41462.1016, 1.7800 }, + { 6003.2998, 41462.3984, 1.8200 }, + { 6003.2998, 41462.6992, 1.8700 }, + { 6003.2998, 41463.0000, 1.9300 }, + { 6003.2998, 41463.3008, 1.9900 }, + { 6003.2998, 41463.6016, 2.0700 }, + { 6003.2998, 41463.8984, 2.1500 }, + { 6003.2998, 41464.1992, 2.2100 }, + { 6003.2998, 41464.5000, 2.2600 }, + { 6003.2998, 41464.8008, 2.2600 }, + { 6003.2998, 41465.1016, 2.2500 }, + { 6003.2998, 41465.3984, 2.2500 }, + { 6003.2998, 41465.6992, 2.2500 }, + { 6003.2998, 41466.0000, 2.2800 }, + { 6003.2998, 41466.3008, 2.3200 }, + { 6003.2998, 41466.6016, 2.3500 }, + { 6003.2998, 41466.8984, 2.3800 }, + { 6003.2998, 41467.1992, 2.4100 }, + { 6003.2998, 41467.5000, 2.4400 }, + + { 6003.6001, 41456.1016, 1.8600 }, + { 6003.6001, 41456.3984, 1.8800 }, + { 6003.6001, 41456.6992, 1.9000 }, + { 6003.6001, 41457.0000, 1.9200 }, + { 6003.6001, 41457.3008, 1.9200 }, + { 6003.6001, 41457.6016, 1.9000 }, + { 6003.6001, 41457.8984, 1.8700 }, + { 6003.6001, 41458.1992, 1.8400 }, + { 6003.6001, 41458.5000, 1.8100 }, + { 6003.6001, 41458.8008, 1.7900 }, + { 6003.6001, 41459.1016, 1.7700 }, + { 6003.6001, 41459.3984, 1.7600 }, + { 6003.6001, 41459.6992, 1.7600 }, + { 6003.6001, 41460.0000, 1.7600 }, + { 6003.6001, 41460.3008, 1.7700 }, + { 6003.6001, 41460.6016, 1.7700 }, + { 6003.6001, 41460.8984, 1.7800 }, + { 6003.6001, 41461.1992, 1.7700 }, + { 6003.6001, 41461.5000, 1.7700 }, + { 6003.6001, 41461.8008, 1.7800 }, + { 6003.6001, 41462.1016, 1.8000 }, + { 6003.6001, 41462.3984, 1.8400 }, + { 6003.6001, 41462.6992, 1.9000 }, + { 6003.6001, 41463.0000, 1.9500 }, + { 6003.6001, 41463.3008, 2.0200 }, + { 6003.6001, 41463.6016, 2.0900 }, + { 6003.6001, 41463.8984, 2.1600 }, + { 6003.6001, 41464.1992, 2.2200 }, + { 6003.6001, 41464.5000, 2.2600 }, + { 6003.6001, 41464.8008, 2.2700 }, + { 6003.6001, 41465.1016, 2.2700 }, + { 6003.6001, 41465.3984, 2.2700 }, + { 6003.6001, 41465.6992, 2.2900 }, + { 6003.6001, 41466.0000, 2.3400 }, + { 6003.6001, 41466.3008, 2.4000 }, + { 6003.6001, 41466.6016, 2.4500 }, + { 6003.6001, 41466.8984, 2.4900 }, + { 6003.6001, 41467.1992, 2.5100 }, + { 6003.6001, 41467.5000, 2.5200 }, + + { 6003.8999, 41456.1016, 1.8800 }, + { 6003.8999, 41456.3984, 1.9000 }, + { 6003.8999, 41456.6992, 1.9300 }, + { 6003.8999, 41457.0000, 1.9600 }, + { 6003.8999, 41457.3008, 1.9600 }, + { 6003.8999, 41457.6016, 1.9400 }, + { 6003.8999, 41457.8984, 1.9000 }, + { 6003.8999, 41458.1992, 1.8700 }, + { 6003.8999, 41458.5000, 1.8400 }, + { 6003.8999, 41458.8008, 1.8100 }, + { 6003.8999, 41459.1016, 1.7800 }, + { 6003.8999, 41459.3984, 1.7700 }, + { 6003.8999, 41459.6992, 1.7600 }, + { 6003.8999, 41460.0000, 1.7700 }, + { 6003.8999, 41460.3008, 1.7800 }, + { 6003.8999, 41460.6016, 1.7900 }, + { 6003.8999, 41460.8984, 1.7900 }, + { 6003.8999, 41461.1992, 1.7900 }, + { 6003.8999, 41461.5000, 1.7900 }, + { 6003.8999, 41461.8008, 1.8000 }, + { 6003.8999, 41462.1016, 1.8200 }, + { 6003.8999, 41462.3984, 1.8700 }, + { 6003.8999, 41462.6992, 1.9300 }, + { 6003.8999, 41463.0000, 2.0000 }, + { 6003.8999, 41463.3008, 2.0600 }, + { 6003.8999, 41463.6016, 2.1400 }, + { 6003.8999, 41463.8984, 2.2100 }, + { 6003.8999, 41464.1992, 2.2800 }, + { 6003.8999, 41464.5000, 2.3200 }, + { 6003.8999, 41464.8008, 2.3200 }, + { 6003.8999, 41465.1016, 2.3200 }, + { 6003.8999, 41465.3984, 2.3300 }, + { 6003.8999, 41465.6992, 2.3500 }, + { 6003.8999, 41466.0000, 2.4100 }, + { 6003.8999, 41466.3008, 2.4900 }, + { 6003.8999, 41466.6016, 2.5500 }, + { 6003.8999, 41466.8984, 2.5900 }, + { 6003.8999, 41467.1992, 2.6000 }, + { 6003.8999, 41467.5000, 2.6000 }, + + { 6004.2002, 41456.1016, 1.9100 }, + { 6004.2002, 41456.3984, 1.9200 }, + { 6004.2002, 41456.6992, 1.9600 }, + { 6004.2002, 41457.0000, 1.9800 }, + { 6004.2002, 41457.3008, 1.9800 }, + { 6004.2002, 41457.6016, 1.9500 }, + { 6004.2002, 41457.8984, 1.9100 }, + { 6004.2002, 41458.1992, 1.8700 }, + { 6004.2002, 41458.5000, 1.8400 }, + { 6004.2002, 41458.8008, 1.8100 }, + { 6004.2002, 41459.1016, 1.7900 }, + { 6004.2002, 41459.3984, 1.7800 }, + { 6004.2002, 41459.6992, 1.7700 }, + { 6004.2002, 41460.0000, 1.7800 }, + { 6004.2002, 41460.3008, 1.7900 }, + { 6004.2002, 41460.6016, 1.8000 }, + { 6004.2002, 41460.8984, 1.8100 }, + { 6004.2002, 41461.1992, 1.8100 }, + { 6004.2002, 41461.5000, 1.8000 }, + { 6004.2002, 41461.8008, 1.8100 }, + { 6004.2002, 41462.1016, 1.8400 }, + { 6004.2002, 41462.3984, 1.9000 }, + { 6004.2002, 41462.6992, 1.9700 }, + { 6004.2002, 41463.0000, 2.0500 }, + { 6004.2002, 41463.3008, 2.1400 }, + { 6004.2002, 41463.6016, 2.2200 }, + { 6004.2002, 41463.8984, 2.3100 }, + { 6004.2002, 41464.1992, 2.3800 }, + { 6004.2002, 41464.5000, 2.4300 }, + { 6004.2002, 41464.8008, 2.4400 }, + { 6004.2002, 41465.1016, 2.4200 }, + { 6004.2002, 41465.3984, 2.4200 }, + { 6004.2002, 41465.6992, 2.4400 }, + { 6004.2002, 41466.0000, 2.5100 }, + { 6004.2002, 41466.3008, 2.5800 }, + { 6004.2002, 41466.6016, 2.6500 }, + { 6004.2002, 41466.8984, 2.6900 }, + { 6004.2002, 41467.1992, 2.6900 }, + { 6004.2002, 41467.5000, 2.6800 }, + + { 6004.5000, 41456.1016, 1.9500 }, + { 6004.5000, 41456.3984, 1.9500 }, + { 6004.5000, 41456.6992, 1.9600 }, + { 6004.5000, 41457.0000, 1.9700 }, + { 6004.5000, 41457.3008, 1.9600 }, + { 6004.5000, 41457.6016, 1.9300 }, + { 6004.5000, 41457.8984, 1.8900 }, + { 6004.5000, 41458.1992, 1.8500 }, + { 6004.5000, 41458.5000, 1.8200 }, + { 6004.5000, 41458.8008, 1.8000 }, + { 6004.5000, 41459.1016, 1.7900 }, + { 6004.5000, 41459.3984, 1.7800 }, + { 6004.5000, 41459.6992, 1.7800 }, + { 6004.5000, 41460.0000, 1.7900 }, + { 6004.5000, 41460.3008, 1.8000 }, + { 6004.5000, 41460.6016, 1.8200 }, + { 6004.5000, 41460.8984, 1.8300 }, + { 6004.5000, 41461.1992, 1.8300 }, + { 6004.5000, 41461.5000, 1.8300 }, + { 6004.5000, 41461.8008, 1.8400 }, + { 6004.5000, 41462.1016, 1.8700 }, + { 6004.5000, 41462.3984, 1.9400 }, + { 6004.5000, 41462.6992, 2.0200 }, + { 6004.5000, 41463.0000, 2.1200 }, + { 6004.5000, 41463.3008, 2.2100 }, + { 6004.5000, 41463.6016, 2.3200 }, + { 6004.5000, 41463.8984, 2.4200 }, + { 6004.5000, 41464.1992, 2.5000 }, + { 6004.5000, 41464.5000, 2.5600 }, + { 6004.5000, 41464.8008, 2.5600 }, + { 6004.5000, 41465.1016, 2.5400 }, + { 6004.5000, 41465.3984, 2.5400 }, + { 6004.5000, 41465.6992, 2.5500 }, + { 6004.5000, 41466.0000, 2.6100 }, + { 6004.5000, 41466.3008, 2.6800 }, + { 6004.5000, 41466.6016, 2.7400 }, + { 6004.5000, 41466.8984, 2.7800 }, + { 6004.5000, 41467.1992, 2.7800 }, + { 6004.5000, 41467.5000, 2.7600 }, + + { 6004.7998, 41456.1016, 1.9800 }, + { 6004.7998, 41456.3984, 1.9600 }, + { 6004.7998, 41456.6992, 1.9400 }, + { 6004.7998, 41457.0000, 1.9100 }, + { 6004.7998, 41457.3008, 1.8900 }, + { 6004.7998, 41457.6016, 1.8600 }, + { 6004.7998, 41457.8984, 1.8300 }, + { 6004.7998, 41458.1992, 1.8100 }, + { 6004.7998, 41458.5000, 1.7900 }, + { 6004.7998, 41458.8008, 1.7900 }, + { 6004.7998, 41459.1016, 1.7900 }, + { 6004.7998, 41459.3984, 1.7900 }, + { 6004.7998, 41459.6992, 1.7900 }, + { 6004.7998, 41460.0000, 1.8000 }, + { 6004.7998, 41460.3008, 1.8200 }, + { 6004.7998, 41460.6016, 1.8400 }, + { 6004.7998, 41460.8984, 1.8500 }, + { 6004.7998, 41461.1992, 1.8600 }, + { 6004.7998, 41461.5000, 1.8700 }, + { 6004.7998, 41461.8008, 1.8900 }, + { 6004.7998, 41462.1016, 1.9200 }, + { 6004.7998, 41462.3984, 1.9900 }, + { 6004.7998, 41462.6992, 2.0800 }, + { 6004.7998, 41463.0000, 2.1700 }, + { 6004.7998, 41463.3008, 2.2700 }, + { 6004.7998, 41463.6016, 2.3900 }, + { 6004.7998, 41463.8984, 2.5100 }, + { 6004.7998, 41464.1992, 2.6100 }, + { 6004.7998, 41464.5000, 2.6700 }, + { 6004.7998, 41464.8008, 2.6800 }, + { 6004.7998, 41465.1016, 2.6600 }, + { 6004.7998, 41465.3984, 2.6500 }, + { 6004.7998, 41465.6992, 2.6600 }, + { 6004.7998, 41466.0000, 2.7100 }, + { 6004.7998, 41466.3008, 2.7700 }, + { 6004.7998, 41466.6016, 2.8300 }, + { 6004.7998, 41466.8984, 2.8700 }, + { 6004.7998, 41467.1992, 2.8700 }, + { 6004.7998, 41467.5000, 2.8500 }, + + { 6005.1001, 41456.1016, 2.0300 }, + { 6005.1001, 41456.3984, 1.9800 }, + { 6005.1001, 41456.6992, 1.9300 }, + { 6005.1001, 41457.0000, 1.8900 }, + { 6005.1001, 41457.3008, 1.8400 }, + { 6005.1001, 41457.6016, 1.8200 }, + { 6005.1001, 41457.8984, 1.8000 }, + { 6005.1001, 41458.1992, 1.8000 }, + { 6005.1001, 41458.5000, 1.8000 }, + { 6005.1001, 41458.8008, 1.8000 }, + { 6005.1001, 41459.1016, 1.7800 }, + { 6005.1001, 41459.3984, 1.7900 }, + { 6005.1001, 41459.6992, 1.8000 }, + { 6005.1001, 41460.0000, 1.8200 }, + { 6005.1001, 41460.3008, 1.8400 }, + { 6005.1001, 41460.6016, 1.8600 }, + { 6005.1001, 41460.8984, 1.8800 }, + { 6005.1001, 41461.1992, 1.9000 }, + { 6005.1001, 41461.5000, 1.9200 }, + { 6005.1001, 41461.8008, 1.9400 }, + { 6005.1001, 41462.1016, 1.9800 }, + { 6005.1001, 41462.3984, 2.0500 }, + { 6005.1001, 41462.6992, 2.1300 }, + { 6005.1001, 41463.0000, 2.2100 }, + { 6005.1001, 41463.3008, 2.3100 }, + { 6005.1001, 41463.6016, 2.4300 }, + { 6005.1001, 41463.8984, 2.5600 }, + { 6005.1001, 41464.1992, 2.6600 }, + { 6005.1001, 41464.5000, 2.7400 }, + { 6005.1001, 41464.8008, 2.7600 }, + { 6005.1001, 41465.1016, 2.7400 }, + { 6005.1001, 41465.3984, 2.7400 }, + { 6005.1001, 41465.6992, 2.7500 }, + { 6005.1001, 41466.0000, 2.7900 }, + { 6005.1001, 41466.3008, 2.8600 }, + { 6005.1001, 41466.6016, 2.9100 }, + { 6005.1001, 41466.8984, 2.9400 }, + { 6005.1001, 41467.1992, 2.9500 }, + { 6005.1001, 41467.5000, 2.9300 }, + + { 6005.3999, 41456.1016, 2.0700 }, + { 6005.3999, 41456.3984, 2.0200 }, + { 6005.3999, 41456.6992, 1.9500 }, + { 6005.3999, 41457.0000, 1.8900 }, + { 6005.3999, 41457.3008, 1.8400 }, + { 6005.3999, 41457.6016, 1.8100 }, + { 6005.3999, 41457.8984, 1.8000 }, + { 6005.3999, 41458.1992, 1.8000 }, + { 6005.3999, 41458.5000, 1.8000 }, + { 6005.3999, 41458.8008, 1.8000 }, + { 6005.3999, 41459.1016, 1.7900 }, + { 6005.3999, 41459.3984, 1.8000 }, + { 6005.3999, 41459.6992, 1.8200 }, + { 6005.3999, 41460.0000, 1.8400 }, + { 6005.3999, 41460.3008, 1.8600 }, + { 6005.3999, 41460.6016, 1.8800 }, + { 6005.3999, 41460.8984, 1.9100 }, + { 6005.3999, 41461.1992, 1.9300 }, + { 6005.3999, 41461.5000, 1.9600 }, + { 6005.3999, 41461.8008, 1.9900 }, + { 6005.3999, 41462.1016, 2.0300 }, + { 6005.3999, 41462.3984, 2.0900 }, + { 6005.3999, 41462.6992, 2.1700 }, + { 6005.3999, 41463.0000, 2.2500 }, + { 6005.3999, 41463.3008, 2.3400 }, + { 6005.3999, 41463.6016, 2.4500 }, + { 6005.3999, 41463.8984, 2.5600 }, + { 6005.3999, 41464.1992, 2.6600 }, + { 6005.3999, 41464.5000, 2.7400 }, + { 6005.3999, 41464.8008, 2.7700 }, + { 6005.3999, 41465.1016, 2.7800 }, + { 6005.3999, 41465.3984, 2.8000 }, + { 6005.3999, 41465.6992, 2.8300 }, + { 6005.3999, 41466.0000, 2.8800 }, + { 6005.3999, 41466.3008, 2.9400 }, + { 6005.3999, 41466.6016, 2.9800 }, + { 6005.3999, 41466.8984, 3.0200 }, + { 6005.3999, 41467.1992, 3.0300 }, + { 6005.3999, 41467.5000, 3.0200 }, + + { 6005.7002, 41456.1016, 2.0900 }, + { 6005.7002, 41456.3984, 2.0300 }, + { 6005.7002, 41456.6992, 1.9600 }, + { 6005.7002, 41457.0000, 1.8900 }, + { 6005.7002, 41457.3008, 1.8300 }, + { 6005.7002, 41457.6016, 1.8000 }, + { 6005.7002, 41457.8984, 1.8000 }, + { 6005.7002, 41458.1992, 1.8000 }, + { 6005.7002, 41458.5000, 1.8000 }, + { 6005.7002, 41458.8008, 1.8000 }, + { 6005.7002, 41459.1016, 1.8100 }, + { 6005.7002, 41459.3984, 1.8200 }, + { 6005.7002, 41459.6992, 1.8300 }, + { 6005.7002, 41460.0000, 1.8500 }, + { 6005.7002, 41460.3008, 1.8800 }, + { 6005.7002, 41460.6016, 1.9000 }, + { 6005.7002, 41460.8984, 1.9200 }, + { 6005.7002, 41461.1992, 1.9500 }, + { 6005.7002, 41461.5000, 1.9800 }, + { 6005.7002, 41461.8008, 2.0200 }, + { 6005.7002, 41462.1016, 2.0600 }, + { 6005.7002, 41462.3984, 2.1200 }, + { 6005.7002, 41462.6992, 2.2000 }, + { 6005.7002, 41463.0000, 2.2800 }, + { 6005.7002, 41463.3008, 2.3700 }, + { 6005.7002, 41463.6016, 2.4600 }, + { 6005.7002, 41463.8984, 2.5500 }, + { 6005.7002, 41464.1992, 2.6400 }, + { 6005.7002, 41464.5000, 2.7200 }, + { 6005.7002, 41464.8008, 2.7700 }, + { 6005.7002, 41465.1016, 2.8100 }, + { 6005.7002, 41465.3984, 2.8600 }, + { 6005.7002, 41465.6992, 2.9100 }, + { 6005.7002, 41466.0000, 2.9600 }, + { 6005.7002, 41466.3008, 3.0100 }, + { 6005.7002, 41466.6016, 3.0500 }, + { 6005.7002, 41466.8984, 3.0900 }, + { 6005.7002, 41467.1992, 3.1000 }, + { 6005.7002, 41467.5000, 3.1000 }, + + { 6006.0000, 41456.1016, 2.0700 }, + { 6006.0000, 41456.3984, 2.0100 }, + { 6006.0000, 41456.6992, 1.9400 }, + { 6006.0000, 41457.0000, 1.8700 }, + { 6006.0000, 41457.3008, 1.8000 }, + { 6006.0000, 41457.6016, 1.8000 }, + { 6006.0000, 41457.8984, 1.8000 }, + { 6006.0000, 41458.1992, 1.8000 }, + { 6006.0000, 41458.5000, 1.8000 }, + { 6006.0000, 41458.8008, 1.8100 }, + { 6006.0000, 41459.1016, 1.8200 }, + { 6006.0000, 41459.3984, 1.8300 }, + { 6006.0000, 41459.6992, 1.8400 }, + { 6006.0000, 41460.0000, 1.8600 }, + { 6006.0000, 41460.3008, 1.8900 }, + { 6006.0000, 41460.6016, 1.9100 }, + { 6006.0000, 41460.8984, 1.9300 }, + { 6006.0000, 41461.1992, 1.9600 }, + { 6006.0000, 41461.5000, 1.9900 }, + { 6006.0000, 41461.8008, 2.0300 }, + { 6006.0000, 41462.1016, 2.0800 }, + { 6006.0000, 41462.3984, 2.1500 }, + { 6006.0000, 41462.6992, 2.2400 }, + { 6006.0000, 41463.0000, 2.3200 }, + { 6006.0000, 41463.3008, 2.4100 }, + { 6006.0000, 41463.6016, 2.5000 }, + { 6006.0000, 41463.8984, 2.6000 }, + { 6006.0000, 41464.1992, 2.6900 }, + { 6006.0000, 41464.5000, 2.7800 }, + { 6006.0000, 41464.8008, 2.8300 }, + { 6006.0000, 41465.1016, 2.8800 }, + { 6006.0000, 41465.3984, 2.9200 }, + { 6006.0000, 41465.6992, 2.9700 }, + { 6006.0000, 41466.0000, 3.0200 }, + { 6006.0000, 41466.3008, 3.0700 }, + { 6006.0000, 41466.6016, 3.1200 }, + { 6006.0000, 41466.8984, 3.1500 }, + { 6006.0000, 41467.1992, 3.1700 }, + { 6006.0000, 41467.5000, 3.1700 }, + + { 6006.2998, 41456.1016, 2.0300 }, + { 6006.2998, 41456.3984, 1.9700 }, + { 6006.2998, 41456.6992, 1.9000 }, + { 6006.2998, 41457.0000, 1.8300 }, + { 6006.2998, 41457.3008, 1.8000 }, + { 6006.2998, 41457.6016, 1.8000 }, + { 6006.2998, 41457.8984, 1.8000 }, + { 6006.2998, 41458.1992, 1.8000 }, + { 6006.2998, 41458.5000, 1.8000 }, + { 6006.2998, 41458.8008, 1.8200 }, + { 6006.2998, 41459.1016, 1.8300 }, + { 6006.2998, 41459.3984, 1.8500 }, + { 6006.2998, 41459.6992, 1.8600 }, + { 6006.2998, 41460.0000, 1.8800 }, + { 6006.2998, 41460.3008, 1.9000 }, + { 6006.2998, 41460.6016, 1.9200 }, + { 6006.2998, 41460.8984, 1.9400 }, + { 6006.2998, 41461.1992, 1.9700 }, + { 6006.2998, 41461.5000, 2.0100 }, + { 6006.2998, 41461.8008, 2.0500 }, + { 6006.2998, 41462.1016, 2.1000 }, + { 6006.2998, 41462.3984, 2.1800 }, + { 6006.2998, 41462.6992, 2.2700 }, + { 6006.2998, 41463.0000, 2.3600 }, + { 6006.2998, 41463.3008, 2.4500 }, + { 6006.2998, 41463.6016, 2.5600 }, + { 6006.2998, 41463.8984, 2.6700 }, + { 6006.2998, 41464.1992, 2.7700 }, + { 6006.2998, 41464.5000, 2.8600 }, + { 6006.2998, 41464.8008, 2.9100 }, + { 6006.2998, 41465.1016, 2.9400 }, + { 6006.2998, 41465.3984, 2.9700 }, + { 6006.2998, 41465.6992, 3.0100 }, + { 6006.2998, 41466.0000, 3.0600 }, + { 6006.2998, 41466.3008, 3.1200 }, + { 6006.2998, 41466.6016, 3.1800 }, + { 6006.2998, 41466.8984, 3.2200 }, + { 6006.2998, 41467.1992, 3.2400 }, + { 6006.2998, 41467.5000, 3.2400 }, + + { 6006.6001, 41456.1016, 1.9600 }, + { 6006.6001, 41456.3984, 1.9100 }, + { 6006.6001, 41456.6992, 1.8500 }, + { 6006.6001, 41457.0000, 1.8000 }, + { 6006.6001, 41457.3008, 1.8000 }, + { 6006.6001, 41457.6016, 1.8000 }, + { 6006.6001, 41457.8984, 1.8000 }, + { 6006.6001, 41458.1992, 1.8000 }, + { 6006.6001, 41458.5000, 1.8000 }, + { 6006.6001, 41458.8008, 1.8200 }, + { 6006.6001, 41459.1016, 1.8400 }, + { 6006.6001, 41459.3984, 1.8600 }, + { 6006.6001, 41459.6992, 1.8800 }, + { 6006.6001, 41460.0000, 1.9000 }, + { 6006.6001, 41460.3008, 1.9100 }, + { 6006.6001, 41460.6016, 1.9300 }, + { 6006.6001, 41460.8984, 1.9500 }, + { 6006.6001, 41461.1992, 1.9800 }, + { 6006.6001, 41461.5000, 2.0200 }, + { 6006.6001, 41461.8008, 2.0700 }, + { 6006.6001, 41462.1016, 2.1200 }, + { 6006.6001, 41462.3984, 2.2000 }, + { 6006.6001, 41462.6992, 2.3000 }, + { 6006.6001, 41463.0000, 2.3900 }, + { 6006.6001, 41463.3008, 2.4900 }, + { 6006.6001, 41463.6016, 2.6100 }, + { 6006.6001, 41463.8984, 2.7300 }, + { 6006.6001, 41464.1992, 2.8400 }, + { 6006.6001, 41464.5000, 2.9300 }, + { 6006.6001, 41464.8008, 2.9700 }, + { 6006.6001, 41465.1016, 2.9800 }, + { 6006.6001, 41465.3984, 3.0000 }, + { 6006.6001, 41465.6992, 3.0300 }, + { 6006.6001, 41466.0000, 3.0900 }, + { 6006.6001, 41466.3008, 3.1700 }, + { 6006.6001, 41466.6016, 3.2400 }, + { 6006.6001, 41466.8984, 3.3000 }, + { 6006.6001, 41467.1992, 3.3200 }, + { 6006.6001, 41467.5000, 3.3200 }, + + { 6006.8999, 41456.1016, 1.8800 }, + { 6006.8999, 41456.3984, 1.8500 }, + { 6006.8999, 41456.6992, 1.8000 }, + { 6006.8999, 41457.0000, 1.8000 }, + { 6006.8999, 41457.3008, 1.8000 }, + { 6006.8999, 41457.6016, 1.8000 }, + { 6006.8999, 41457.8984, 1.8000 }, + { 6006.8999, 41458.1992, 1.8000 }, + { 6006.8999, 41458.5000, 1.8000 }, + { 6006.8999, 41458.8008, 1.8200 }, + { 6006.8999, 41459.1016, 1.8500 }, + { 6006.8999, 41459.3984, 1.8800 }, + { 6006.8999, 41459.6992, 1.9000 }, + { 6006.8999, 41460.0000, 1.9200 }, + { 6006.8999, 41460.3008, 1.9300 }, + { 6006.8999, 41460.6016, 1.9400 }, + { 6006.8999, 41460.8984, 1.9600 }, + { 6006.8999, 41461.1992, 1.9900 }, + { 6006.8999, 41461.5000, 2.0400 }, + { 6006.8999, 41461.8008, 2.0800 }, + { 6006.8999, 41462.1016, 2.1400 }, + { 6006.8999, 41462.3984, 2.2300 }, + { 6006.8999, 41462.6992, 2.3300 }, + { 6006.8999, 41463.0000, 2.4300 }, + { 6006.8999, 41463.3008, 2.5400 }, + { 6006.8999, 41463.6016, 2.6700 }, + { 6006.8999, 41463.8984, 2.7900 }, + { 6006.8999, 41464.1992, 2.9100 }, + { 6006.8999, 41464.5000, 3.0000 }, + { 6006.8999, 41464.8008, 3.0400 }, + { 6006.8999, 41465.1016, 3.0400 }, + { 6006.8999, 41465.3984, 3.0500 }, + { 6006.8999, 41465.6992, 3.0800 }, + { 6006.8999, 41466.0000, 3.1500 }, + { 6006.8999, 41466.3008, 3.2400 }, + { 6006.8999, 41466.6016, 3.3200 }, + { 6006.8999, 41466.8984, 3.3800 }, + { 6006.8999, 41467.1992, 3.4000 }, + { 6006.8999, 41467.5000, 3.4000 }, + + { 6007.2002, 41456.1016, 1.8300 }, + { 6007.2002, 41456.3984, 1.8000 }, + { 6007.2002, 41456.6992, 1.8000 }, + { 6007.2002, 41457.0000, 1.8000 }, + { 6007.2002, 41457.3008, 1.8000 }, + { 6007.2002, 41457.6016, 1.8000 }, + { 6007.2002, 41457.8984, 1.8000 }, + { 6007.2002, 41458.1992, 1.8000 }, + { 6007.2002, 41458.5000, 1.8000 }, + { 6007.2002, 41458.8008, 1.8000 }, + { 6007.2002, 41459.1016, 1.8600 }, + { 6007.2002, 41459.3984, 1.8900 }, + { 6007.2002, 41459.6992, 1.9200 }, + { 6007.2002, 41460.0000, 1.9400 }, + { 6007.2002, 41460.3008, 1.9500 }, + { 6007.2002, 41460.6016, 1.9600 }, + { 6007.2002, 41460.8984, 1.9800 }, + { 6007.2002, 41461.1992, 2.0100 }, + { 6007.2002, 41461.5000, 2.0600 }, + { 6007.2002, 41461.8008, 2.1100 }, + { 6007.2002, 41462.1016, 2.1700 }, + { 6007.2002, 41462.3984, 2.2600 }, + { 6007.2002, 41462.6992, 2.3700 }, + { 6007.2002, 41463.0000, 2.4800 }, + { 6007.2002, 41463.3008, 2.6000 }, + { 6007.2002, 41463.6016, 2.7300 }, + { 6007.2002, 41463.8984, 2.8600 }, + { 6007.2002, 41464.1992, 2.9700 }, + { 6007.2002, 41464.5000, 3.0600 }, + { 6007.2002, 41464.8008, 3.0900 }, + { 6007.2002, 41465.1016, 3.0900 }, + { 6007.2002, 41465.3984, 3.1000 }, + { 6007.2002, 41465.6992, 3.1300 }, + { 6007.2002, 41466.0000, 3.2100 }, + { 6007.2002, 41466.3008, 3.3100 }, + { 6007.2002, 41466.6016, 3.4100 }, + { 6007.2002, 41466.8984, 3.4800 }, + { 6007.2002, 41467.1992, 3.5000 }, + { 6007.2002, 41467.5000, 3.4800 }, + + { 6007.5000, 41456.1016, 1.8000 }, + { 6007.5000, 41456.3984, 1.7800 }, + { 6007.5000, 41456.6992, 1.8000 }, + { 6007.5000, 41457.0000, 1.8000 }, + { 6007.5000, 41457.3008, 1.8000 }, + { 6007.5000, 41457.6016, 1.8000 }, + { 6007.5000, 41457.8984, 1.8000 }, + { 6007.5000, 41458.1992, 1.8000 }, + { 6007.5000, 41458.5000, 1.8000 }, + { 6007.5000, 41458.8008, 1.8400 }, + { 6007.5000, 41459.1016, 1.8800 }, + { 6007.5000, 41459.3984, 1.9100 }, + { 6007.5000, 41459.6992, 1.9400 }, + { 6007.5000, 41460.0000, 1.9600 }, + { 6007.5000, 41460.3008, 1.9700 }, + { 6007.5000, 41460.6016, 1.9900 }, + { 6007.5000, 41460.8984, 2.0100 }, + { 6007.5000, 41461.1992, 2.0500 }, + { 6007.5000, 41461.5000, 2.1000 }, + { 6007.5000, 41461.8008, 2.1600 }, + { 6007.5000, 41462.1016, 2.2300 }, + { 6007.5000, 41462.3984, 2.3200 }, + { 6007.5000, 41462.6992, 2.4400 }, + { 6007.5000, 41463.0000, 2.5600 }, + { 6007.5000, 41463.3008, 2.6800 }, + { 6007.5000, 41463.6016, 2.8000 }, + { 6007.5000, 41463.8984, 2.9200 }, + { 6007.5000, 41464.1992, 3.0200 }, + { 6007.5000, 41464.5000, 3.1100 }, + { 6007.5000, 41464.8008, 3.1300 }, + { 6007.5000, 41465.1016, 3.1200 }, + { 6007.5000, 41465.3984, 3.1200 }, + { 6007.5000, 41465.6992, 3.1500 }, + { 6007.5000, 41466.0000, 3.2400 }, + { 6007.5000, 41466.3008, 3.3700 }, + { 6007.5000, 41466.6016, 3.4800 }, + { 6007.5000, 41466.8984, 3.5700 }, + { 6007.5000, 41467.1992, 3.5800 }, + { 6007.5000, 41467.5000, 3.5600 }, + + { 6007.7998, 41456.1016, 1.8100 }, + { 6007.7998, 41456.3984, 1.7800 }, + { 6007.7998, 41456.6992, 1.8000 }, + { 6007.7998, 41457.0000, 1.8000 }, + { 6007.7998, 41457.3008, 1.8000 }, + { 6007.7998, 41457.6016, 1.8000 }, + { 6007.7998, 41457.8984, 1.8000 }, + { 6007.7998, 41458.1992, 1.8000 }, + { 6007.7998, 41458.5000, 1.8000 }, + { 6007.7998, 41458.8008, 1.8700 }, + { 6007.7998, 41459.1016, 1.9000 }, + { 6007.7998, 41459.3984, 1.9400 }, + { 6007.7998, 41459.6992, 1.9700 }, + { 6007.7998, 41460.0000, 1.9900 }, + { 6007.7998, 41460.3008, 2.0000 }, + { 6007.7998, 41460.6016, 2.0200 }, + { 6007.7998, 41460.8984, 2.0500 }, + { 6007.7998, 41461.1992, 2.1000 }, + { 6007.7998, 41461.5000, 2.1600 }, + { 6007.7998, 41461.8008, 2.2300 }, + { 6007.7998, 41462.1016, 2.3100 }, + { 6007.7998, 41462.3984, 2.4100 }, + { 6007.7998, 41462.6992, 2.5400 }, + { 6007.7998, 41463.0000, 2.6600 }, + { 6007.7998, 41463.3008, 2.7800 }, + { 6007.7998, 41463.6016, 2.8900 }, + { 6007.7998, 41463.8984, 2.9900 }, + { 6007.7998, 41464.1992, 3.0800 }, + { 6007.7998, 41464.5000, 3.1600 }, + { 6007.7998, 41464.8008, 3.1800 }, + { 6007.7998, 41465.1016, 3.1700 }, + { 6007.7998, 41465.3984, 3.1800 }, + { 6007.7998, 41465.6992, 3.2100 }, + { 6007.7998, 41466.0000, 3.3000 }, + { 6007.7998, 41466.3008, 3.4300 }, + { 6007.7998, 41466.6016, 3.5400 }, + { 6007.7998, 41466.8984, 3.6300 }, + { 6007.7998, 41467.1992, 3.6400 }, + { 6007.7998, 41467.5000, 3.6000 }, + + { 6008.1001, 41456.1016, 1.8200 }, + { 6008.1001, 41456.3984, 1.7900 }, + { 6008.1001, 41456.6992, 1.8000 }, + { 6008.1001, 41457.0000, 1.8000 }, + { 6008.1001, 41457.3008, 1.8000 }, + { 6008.1001, 41457.6016, 1.8000 }, + { 6008.1001, 41457.8984, 1.8000 }, + { 6008.1001, 41458.1992, 1.8000 }, + { 6008.1001, 41458.5000, 1.8700 }, + { 6008.1001, 41458.8008, 1.9000 }, + { 6008.1001, 41459.1016, 1.9300 }, + { 6008.1001, 41459.3984, 1.9600 }, + { 6008.1001, 41459.6992, 2.0000 }, + { 6008.1001, 41460.0000, 2.0200 }, + { 6008.1001, 41460.3008, 2.0400 }, + { 6008.1001, 41460.6016, 2.0700 }, + { 6008.1001, 41460.8984, 2.1000 }, + { 6008.1001, 41461.1992, 2.1600 }, + { 6008.1001, 41461.5000, 2.2300 }, + { 6008.1001, 41461.8008, 2.3100 }, + { 6008.1001, 41462.1016, 2.3900 }, + { 6008.1001, 41462.3984, 2.5000 }, + { 6008.1001, 41462.6992, 2.6300 }, + { 6008.1001, 41463.0000, 2.7500 }, + { 6008.1001, 41463.3008, 2.8700 }, + { 6008.1001, 41463.6016, 2.9800 }, + { 6008.1001, 41463.8984, 3.0800 }, + { 6008.1001, 41464.1992, 3.1600 }, + { 6008.1001, 41464.5000, 3.2300 }, + { 6008.1001, 41464.8008, 3.2600 }, + { 6008.1001, 41465.1016, 3.2500 }, + { 6008.1001, 41465.3984, 3.2600 }, + { 6008.1001, 41465.6992, 3.2900 }, + { 6008.1001, 41466.0000, 3.3800 }, + { 6008.1001, 41466.3008, 3.4900 }, + { 6008.1001, 41466.6016, 3.5900 }, + { 6008.1001, 41466.8984, 3.6700 }, + { 6008.1001, 41467.1992, 3.6700 }, + { 6008.1001, 41467.5000, 3.6400 }, + + { 6008.3999, 41456.1016, 1.8100 }, + { 6008.3999, 41456.3984, 1.8000 }, + { 6008.3999, 41456.6992, 1.8000 }, + { 6008.3999, 41457.0000, 1.8000 }, + { 6008.3999, 41457.3008, 1.8000 }, + { 6008.3999, 41457.6016, 1.8000 }, + { 6008.3999, 41457.8984, 1.8000 }, + { 6008.3999, 41458.1992, 1.8000 }, + { 6008.3999, 41458.5000, 1.9100 }, + { 6008.3999, 41458.8008, 1.9400 }, + { 6008.3999, 41459.1016, 1.9600 }, + { 6008.3999, 41459.3984, 1.9900 }, + { 6008.3999, 41459.6992, 2.0200 }, + { 6008.3999, 41460.0000, 2.0500 }, + { 6008.3999, 41460.3008, 2.0800 }, + { 6008.3999, 41460.6016, 2.1200 }, + { 6008.3999, 41460.8984, 2.1600 }, + { 6008.3999, 41461.1992, 2.2200 }, + { 6008.3999, 41461.5000, 2.2900 }, + { 6008.3999, 41461.8008, 2.3600 }, + { 6008.3999, 41462.1016, 2.4400 }, + { 6008.3999, 41462.3984, 2.5600 }, + { 6008.3999, 41462.6992, 2.6900 }, + { 6008.3999, 41463.0000, 2.8100 }, + { 6008.3999, 41463.3008, 2.9400 }, + { 6008.3999, 41463.6016, 3.0600 }, + { 6008.3999, 41463.8984, 3.1700 }, + { 6008.3999, 41464.1992, 3.2700 }, + { 6008.3999, 41464.5000, 3.3500 }, + { 6008.3999, 41464.8008, 3.3700 }, + { 6008.3999, 41465.1016, 3.3600 }, + { 6008.3999, 41465.3984, 3.3600 }, + { 6008.3999, 41465.6992, 3.3800 }, + { 6008.3999, 41466.0000, 3.4500 }, + { 6008.3999, 41466.3008, 3.5500 }, + { 6008.3999, 41466.6016, 3.6400 }, + { 6008.3999, 41466.8984, 3.7100 }, + { 6008.3999, 41467.1992, 3.7100 }, + { 6008.3999, 41467.5000, 3.6900 }, + + { 6008.7002, 41456.1016, 1.7800 }, + { 6008.7002, 41456.3984, 1.7800 }, + { 6008.7002, 41456.6992, 1.8000 }, + { 6008.7002, 41457.0000, 1.8000 }, + { 6008.7002, 41457.3008, 1.8000 }, + { 6008.7002, 41457.6016, 1.8000 }, + { 6008.7002, 41457.8984, 1.8000 }, + { 6008.7002, 41458.1992, 1.9000 }, + { 6008.7002, 41458.5000, 1.9400 }, + { 6008.7002, 41458.8008, 1.9800 }, + { 6008.7002, 41459.1016, 2.0100 }, + { 6008.7002, 41459.3984, 2.0400 }, + { 6008.7002, 41459.6992, 2.0800 }, + { 6008.7002, 41460.0000, 2.1100 }, + { 6008.7002, 41460.3008, 2.1500 }, + { 6008.7002, 41460.6016, 2.1800 }, + { 6008.7002, 41460.8984, 2.2300 }, + { 6008.7002, 41461.1992, 2.2800 }, + { 6008.7002, 41461.5000, 2.3300 }, + { 6008.7002, 41461.8008, 2.3800 }, + { 6008.7002, 41462.1016, 2.4600 }, + { 6008.7002, 41462.3984, 2.5700 }, + { 6008.7002, 41462.6992, 2.7000 }, + { 6008.7002, 41463.0000, 2.8300 }, + { 6008.7002, 41463.3008, 2.9700 }, + { 6008.7002, 41463.6016, 3.1000 }, + { 6008.7002, 41463.8984, 3.2300 }, + { 6008.7002, 41464.1992, 3.3600 }, + { 6008.7002, 41464.5000, 3.4500 }, + { 6008.7002, 41464.8008, 3.4800 }, + { 6008.7002, 41465.1016, 3.4600 }, + { 6008.7002, 41465.3984, 3.4600 }, + { 6008.7002, 41465.6992, 3.4700 }, + { 6008.7002, 41466.0000, 3.5300 }, + { 6008.7002, 41466.3008, 3.6200 }, + { 6008.7002, 41466.6016, 3.7000 }, + { 6008.7002, 41466.8984, 3.7600 }, + { 6008.7002, 41467.1992, 3.7700 }, + { 6008.7002, 41467.5000, 3.7500 }, + + { 6009.0000, 41456.1016, 1.7300 }, + { 6009.0000, 41456.3984, 1.7500 }, + { 6009.0000, 41456.6992, 1.7500 }, + { 6009.0000, 41457.0000, 1.8000 }, + { 6009.0000, 41457.3008, 1.8000 }, + { 6009.0000, 41457.6016, 1.8000 }, + { 6009.0000, 41457.8984, 1.8600 }, + { 6009.0000, 41458.1992, 1.9000 }, + { 6009.0000, 41458.5000, 1.9500 }, + { 6009.0000, 41458.8008, 2.0000 }, + { 6009.0000, 41459.1016, 2.0600 }, + { 6009.0000, 41459.3984, 2.1100 }, + { 6009.0000, 41459.6992, 2.1700 }, + { 6009.0000, 41460.0000, 2.2100 }, + { 6009.0000, 41460.3008, 2.2400 }, + { 6009.0000, 41460.6016, 2.2800 }, + { 6009.0000, 41460.8984, 2.3200 }, + { 6009.0000, 41461.1992, 2.3400 }, + { 6009.0000, 41461.5000, 2.3700 }, + { 6009.0000, 41461.8008, 2.4000 }, + { 6009.0000, 41462.1016, 2.4500 }, + { 6009.0000, 41462.3984, 2.5500 }, + { 6009.0000, 41462.6992, 2.6800 }, + { 6009.0000, 41463.0000, 2.8100 }, + { 6009.0000, 41463.3008, 2.9400 }, + { 6009.0000, 41463.6016, 3.0900 }, + { 6009.0000, 41463.8984, 3.2300 }, + { 6009.0000, 41464.1992, 3.3700 }, + { 6009.0000, 41464.5000, 3.4900 }, + { 6009.0000, 41464.8008, 3.5200 }, + { 6009.0000, 41465.1016, 3.5200 }, + { 6009.0000, 41465.3984, 3.5200 }, + { 6009.0000, 41465.6992, 3.5400 }, + { 6009.0000, 41466.0000, 3.6000 }, + { 6009.0000, 41466.3008, 3.6900 }, + { 6009.0000, 41466.6016, 3.7600 }, + { 6009.0000, 41466.8984, 3.8300 }, + { 6009.0000, 41467.1992, 3.8400 }, + { 6009.0000, 41467.5000, 3.8300 }, + + { 6009.2998, 41456.1016, 1.7000 }, + { 6009.2998, 41456.3984, 1.7100 }, + { 6009.2998, 41456.6992, 1.7200 }, + { 6009.2998, 41457.0000, 1.7400 }, + { 6009.2998, 41457.3008, 1.7600 }, + { 6009.2998, 41457.6016, 1.7900 }, + { 6009.2998, 41457.8984, 1.8400 }, + { 6009.2998, 41458.1992, 1.8900 }, + { 6009.2998, 41458.5000, 1.9400 }, + { 6009.2998, 41458.8008, 2.0000 }, + { 6009.2998, 41459.1016, 2.0800 }, + { 6009.2998, 41459.3984, 2.1500 }, + { 6009.2998, 41459.6992, 2.2300 }, + { 6009.2998, 41460.0000, 2.2800 }, + { 6009.2998, 41460.3008, 2.3300 }, + { 6009.2998, 41460.6016, 2.3800 }, + { 6009.2998, 41460.8984, 2.4200 }, + { 6009.2998, 41461.1992, 2.4300 }, + { 6009.2998, 41461.5000, 2.4300 }, + { 6009.2998, 41461.8008, 2.4300 }, + { 6009.2998, 41462.1016, 2.4500 }, + { 6009.2998, 41462.3984, 2.5400 }, + { 6009.2998, 41462.6992, 2.6500 }, + { 6009.2998, 41463.0000, 2.7700 }, + { 6009.2998, 41463.3008, 2.8900 }, + { 6009.2998, 41463.6016, 3.0300 }, + { 6009.2998, 41463.8984, 3.1800 }, + { 6009.2998, 41464.1992, 3.3200 }, + { 6009.2998, 41464.5000, 3.4500 }, + { 6009.2998, 41464.8008, 3.5000 }, + { 6009.2998, 41465.1016, 3.5200 }, + { 6009.2998, 41465.3984, 3.5400 }, + { 6009.2998, 41465.6992, 3.5800 }, + { 6009.2998, 41466.0000, 3.6500 }, + { 6009.2998, 41466.3008, 3.7500 }, + { 6009.2998, 41466.6016, 3.8400 }, + { 6009.2998, 41466.8984, 3.9100 }, + { 6009.2998, 41467.1992, 3.9400 }, + { 6009.2998, 41467.5000, 3.9300 }, + + { 6009.6001, 41456.3984, 1.6900 }, + { 6009.6001, 41456.6992, 1.7000 }, + { 6009.6001, 41457.0000, 1.7100 }, + { 6009.6001, 41457.3008, 1.7300 }, + { 6009.6001, 41457.6016, 1.7600 }, + { 6009.6001, 41457.8984, 1.8000 }, + { 6009.6001, 41458.1992, 1.8500 }, + { 6009.6001, 41458.5000, 1.9000 }, + { 6009.6001, 41458.8008, 1.9700 }, + { 6009.6001, 41459.1016, 2.0500 }, + { 6009.6001, 41459.3984, 2.1400 }, + { 6009.6001, 41459.6992, 2.2200 }, + { 6009.6001, 41460.0000, 2.3100 }, + { 6009.6001, 41460.3008, 2.3800 }, + { 6009.6001, 41460.6016, 2.4600 }, + { 6009.6001, 41460.8984, 2.5200 }, + { 6009.6001, 41461.1992, 2.5400 }, + { 6009.6001, 41461.5000, 2.5200 }, + { 6009.6001, 41461.8008, 2.5200 }, + { 6009.6001, 41462.1016, 2.5300 }, + { 6009.6001, 41462.3984, 2.5900 }, + { 6009.6001, 41462.6992, 2.6900 }, + { 6009.6001, 41463.0000, 2.7900 }, + { 6009.6001, 41463.3008, 2.8900 }, + { 6009.6001, 41463.6016, 3.0100 }, + { 6009.6001, 41463.8984, 3.1400 }, + { 6009.6001, 41464.1992, 3.2600 }, + { 6009.6001, 41464.5000, 3.3700 }, + { 6009.6001, 41464.8008, 3.4400 }, + { 6009.6001, 41465.1016, 3.4900 }, + { 6009.6001, 41465.3984, 3.5500 }, + { 6009.6001, 41465.6992, 3.6100 }, + { 6009.6001, 41466.0000, 3.7000 }, + { 6009.6001, 41466.3008, 3.8100 }, + { 6009.6001, 41466.6016, 3.9200 }, + { 6009.6001, 41466.8984, 4.0000 }, + { 6009.6001, 41467.1992, 4.0400 }, + { 6009.6001, 41467.5000, 4.0400 }, + { 6009.6001, 41467.8008, 4.0500 }, + + { 6009.8999, 41456.3984, 1.6900 }, + { 6009.8999, 41456.6992, 1.7000 }, + { 6009.8999, 41457.0000, 1.7100 }, + { 6009.8999, 41457.3008, 1.7200 }, + { 6009.8999, 41457.6016, 1.7400 }, + { 6009.8999, 41457.8984, 1.7600 }, + { 6009.8999, 41458.1992, 1.7900 }, + { 6009.8999, 41458.5000, 1.8200 }, + { 6009.8999, 41458.8008, 1.9000 }, + { 6009.8999, 41459.1016, 2.0000 }, + { 6009.8999, 41459.3984, 2.1000 }, + { 6009.8999, 41459.6992, 2.2000 }, + { 6009.8999, 41460.0000, 2.3100 }, + { 6009.8999, 41460.3008, 2.4200 }, + { 6009.8999, 41460.6016, 2.5200 }, + { 6009.8999, 41460.8984, 2.6200 }, + { 6009.8999, 41461.1992, 2.6500 }, + { 6009.8999, 41461.5000, 2.6600 }, + { 6009.8999, 41461.8008, 2.6700 }, + { 6009.8999, 41462.1016, 2.6900 }, + { 6009.8999, 41462.3984, 2.7400 }, + { 6009.8999, 41462.6992, 2.8200 }, + { 6009.8999, 41463.0000, 2.9000 }, + { 6009.8999, 41463.3008, 2.9900 }, + { 6009.8999, 41463.6016, 3.0700 }, + { 6009.8999, 41463.8984, 3.1600 }, + { 6009.8999, 41464.1992, 3.2400 }, + { 6009.8999, 41464.5000, 3.3100 }, + { 6009.8999, 41464.8008, 3.4000 }, + { 6009.8999, 41465.1016, 3.4800 }, + { 6009.8999, 41465.3984, 3.5700 }, + { 6009.8999, 41465.6992, 3.6600 }, + { 6009.8999, 41466.0000, 3.7700 }, + { 6009.8999, 41466.3008, 3.8800 }, + { 6009.8999, 41466.6016, 3.9900 }, + { 6009.8999, 41466.8984, 4.0900 }, + { 6009.8999, 41467.1992, 4.1300 }, + { 6009.8999, 41467.5000, 4.1400 }, + { 6009.8999, 41467.8008, 4.1600 }, + +}; diff --git a/examples/osghangglide/terrain_normals.h b/examples/osghangglide/terrain_normals.h new file mode 100644 index 000000000..4f6886ce5 --- /dev/null +++ b/examples/osghangglide/terrain_normals.h @@ -0,0 +1,4421 @@ +#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) + // disable the double to float errors. + #pragma warning( disable : 4305 ) +#endif + +static float normal[][3] = { + { -0.2560, -0.1125, 0.9600 }, + { -0.2850, -0.1272, 0.9501 }, + { -0.3146, -0.0941, 0.9440 }, + { -0.3295, -0.0626, 0.9419 }, + { -0.3154, -0.0315, 0.9474 }, + { -0.2560, 0.0162, 0.9644 }, + { -0.1784, 0.0328, 0.9801 }, + { -0.1145, 0.0493, 0.9887 }, + { -0.0488, 0.0494, 0.9908 }, + { 0.0001, 0.0497, 0.9964 }, + { 0.0331, 0.0666, 0.9950 }, + { 0.0825, 0.0828, 0.9918 }, + { 0.0824, 0.0988, 0.9905 }, + { 0.0662, 0.0826, 0.9937 }, + { 0.0166, 0.0663, 0.9975 }, + { -0.0166, 0.0500, 0.9983 }, + { -0.0665, 0.0334, 0.9972 }, + { -0.1157, 0.0000, 0.9926 }, + { -0.1794, -0.0812, 0.9791 }, + { -0.1626, -0.1459, 0.9757 }, + { -0.1135, -0.1954, 0.9734 }, + { -0.0161, -0.2432, 0.9696 }, + { 0.0810, -0.2098, 0.9731 }, + { 0.1469, -0.1302, 0.9799 }, + { 0.1639, -0.0653, 0.9838 }, + { 0.1321, -0.0165, 0.9910 }, + { 0.0665, 0.0166, 0.9975 }, + { 0.0167, 0.0332, 0.9992 }, + { -0.0166, 0.0498, 0.9983 }, + { -0.0166, 0.0663, 0.9975 }, + { -0.0166, 0.0500, 0.9983 }, + { -0.0167, 0.0334, 0.9992 }, + { -0.0333, 0.0166, 0.9992 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0499, 0.0168, 0.9983 }, + { -0.0665, 0.0334, 0.9972 }, + { -0.0829, 0.0331, 0.9959 }, + { -0.0992, 0.0000, 0.9940 }, + { -0.2244, -0.1451, 0.9630 }, + { -0.2539, -0.1595, 0.9535 }, + { -0.2693, -0.1266, 0.9531 }, + { -0.2847, -0.0792, 0.9533 }, + { -0.2698, -0.0159, 0.9586 }, + { -0.2396, 0.0647, 0.9650 }, + { -0.1939, 0.0978, 0.9741 }, + { -0.1470, 0.0981, 0.9831 }, + { -0.0981, 0.1147, 0.9862 }, + { -0.0330, 0.1154, 0.9921 }, + { 0.0000, 0.1163, 0.9925 }, + { 0.0331, 0.1163, 0.9925 }, + { 0.0497, 0.0991, 0.9937 }, + { 0.0332, 0.0662, 0.9967 }, + { 0.0167, 0.0332, 0.9992 }, + { -0.0166, 0.0166, 0.9994 }, + { -0.0665, -0.0166, 0.9975 }, + { -0.1318, -0.0657, 0.9886 }, + { -0.1794, -0.0976, 0.9788 }, + { -0.1633, -0.1140, 0.9798 }, + { -0.1310, -0.1315, 0.9826 }, + { -0.0495, -0.1325, 0.9898 }, + { 0.0494, -0.1153, 0.9907 }, + { 0.1148, -0.0985, 0.9873 }, + { 0.1314, -0.0820, 0.9873 }, + { 0.0991, -0.0664, 0.9923 }, + { 0.0498, -0.0502, 0.9972 }, + { 0.0167, 0.0000, 0.9992 }, + { 0.0000, 0.0498, 0.9986 }, + { -0.0166, 0.0663, 0.9975 }, + { -0.0166, 0.0500, 0.9983 }, + { -0.0167, 0.0168, 0.9994 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0499, 0.0000, 0.9986 }, + { -0.0499, 0.0000, 0.9986 }, + { -0.0830, 0.0000, 0.9964 }, + { -0.0995, 0.0000, 0.9950 }, + { -0.1481, -0.0328, 0.9877 }, + { -0.1934, -0.1619, 0.9671 }, + { -0.1927, -0.1776, 0.9644 }, + { -0.1781, -0.1294, 0.9738 }, + { -0.1630, -0.0652, 0.9818 }, + { -0.1146, 0.0164, 0.9887 }, + { -0.0818, 0.0993, 0.9877 }, + { -0.0491, 0.1321, 0.9866 }, + { -0.0164, 0.1474, 0.9854 }, + { 0.0163, 0.1638, 0.9851 }, + { 0.0492, 0.1475, 0.9865 }, + { 0.0658, 0.1323, 0.9885 }, + { 0.0658, 0.1323, 0.9885 }, + { 0.0825, 0.0987, 0.9910 }, + { 0.0498, 0.0497, 0.9972 }, + { 0.0333, 0.0166, 0.9992 }, + { 0.0000, -0.0336, 0.9989 }, + { -0.0497, -0.0831, 0.9950 }, + { -0.1150, -0.1148, 0.9864 }, + { -0.1633, -0.1140, 0.9798 }, + { -0.1794, -0.0976, 0.9788 }, + { -0.1635, -0.0821, 0.9825 }, + { -0.1152, -0.0663, 0.9899 }, + { -0.0496, -0.0497, 0.9962 }, + { -0.0164, -0.0496, 0.9951 }, + { 0.0165, -0.0825, 0.9929 }, + { 0.0166, -0.0998, 0.9936 }, + { 0.0166, -0.0669, 0.9969 }, + { 0.0167, -0.0166, 0.9994 }, + { 0.0000, 0.0166, 0.9997 }, + { -0.0166, 0.0498, 0.9983 }, + { -0.0333, 0.0500, 0.9981 }, + { -0.0333, 0.0168, 0.9992 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0499, -0.0166, 0.9983 }, + { -0.0665, -0.0166, 0.9975 }, + { -0.0830, -0.0168, 0.9961 }, + { -0.0995, -0.0167, 0.9948 }, + { -0.1318, -0.0329, 0.9897 }, + { -0.1638, -0.0817, 0.9830 }, + { -0.1619, -0.1628, 0.9728 }, + { -0.0977, -0.1479, 0.9819 }, + { -0.0491, -0.0986, 0.9900 }, + { 0.0001, -0.0165, 0.9937 }, + { 0.0494, 0.0659, 0.9926 }, + { 0.0815, 0.1318, 0.9840 }, + { 0.0976, 0.1639, 0.9795 }, + { 0.1139, 0.1627, 0.9789 }, + { 0.1293, 0.1779, 0.9733 }, + { 0.1301, 0.1623, 0.9771 }, + { 0.1308, 0.1315, 0.9821 }, + { 0.1308, 0.1315, 0.9821 }, + { 0.0990, 0.0821, 0.9905 }, + { 0.0830, 0.0166, 0.9961 }, + { 0.0499, -0.0166, 0.9983 }, + { 0.0000, -0.0669, 0.9972 }, + { -0.0330, -0.1322, 0.9902 }, + { -0.0816, -0.1792, 0.9802 }, + { -0.1138, -0.1625, 0.9784 }, + { -0.1468, -0.1141, 0.9812 }, + { -0.1474, -0.0657, 0.9852 }, + { -0.1154, -0.0167, 0.9918 }, + { -0.0830, -0.0166, 0.9961 }, + { -0.0663, -0.0331, 0.9967 }, + { -0.0498, -0.0497, 0.9972 }, + { -0.0332, -0.0667, 0.9972 }, + { -0.0166, -0.0502, 0.9983 }, + { -0.0167, -0.0166, 0.9994 }, + { -0.0167, 0.0166, 0.9994 }, + { -0.0167, 0.0332, 0.9992 }, + { -0.0166, 0.0334, 0.9992 }, + { -0.0333, 0.0168, 0.9992 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0499, -0.0332, 0.9981 }, + { -0.0665, -0.0332, 0.9972 }, + { -0.0994, -0.0333, 0.9945 }, + { -0.1157, -0.0497, 0.9918 }, + { -0.1479, -0.0656, 0.9867 }, + { -0.1477, -0.0819, 0.9854 }, + { -0.1315, -0.0987, 0.9859 }, + { -0.0663, -0.0666, 0.9950 }, + { 0.0000, -0.0332, 0.9983 }, + { 0.0664, 0.0331, 0.9961 }, + { 0.0989, 0.0985, 0.9891 }, + { 0.1306, 0.1476, 0.9797 }, + { 0.1623, 0.1628, 0.9732 }, + { 0.1775, 0.1769, 0.9678 }, + { 0.1931, 0.1764, 0.9651 }, + { 0.1627, 0.1459, 0.9757 }, + { 0.1631, 0.1309, 0.9779 }, + { 0.1313, 0.0990, 0.9853 }, + { 0.0830, 0.0496, 0.9950 }, + { 0.0664, 0.0000, 0.9967 }, + { 0.0498, -0.0661, 0.9959 }, + { 0.0166, -0.1164, 0.9928 }, + { 0.0164, -0.1644, 0.9845 }, + { 0.0322, -0.1946, 0.9755 }, + { 0.0482, -0.1784, 0.9760 }, + { 0.0479, -0.1300, 0.9789 }, + { 0.0638, -0.0489, 0.9821 }, + { 0.0648, 0.0000, 0.9892 }, + { 0.0648, 0.0000, 0.9892 }, + { 0.0656, -0.0165, 0.9926 }, + { 0.0494, -0.0496, 0.9940 }, + { 0.0493, -0.0665, 0.9931 }, + { 0.0331, -0.0501, 0.9958 }, + { 0.0166, -0.0166, 0.9983 }, + { 0.0000, 0.0166, 0.9992 }, + { -0.0166, 0.0498, 0.9983 }, + { -0.0166, 0.0332, 0.9986 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0499, -0.0497, 0.9972 }, + { -0.0664, -0.0662, 0.9956 }, + { -0.0829, -0.0665, 0.9942 }, + { -0.0992, -0.0664, 0.9923 }, + { -0.1157, -0.0659, 0.9910 }, + { -0.1155, -0.0822, 0.9896 }, + { -0.1318, -0.0659, 0.9886 }, + { -0.1158, -0.0167, 0.9929 }, + { -0.0663, 0.0331, 0.9962 }, + { -0.0165, 0.0827, 0.9951 }, + { 0.0330, 0.1315, 0.9897 }, + { 0.0814, 0.1961, 0.9765 }, + { 0.1290, 0.2107, 0.9683 }, + { 0.1611, 0.1930, 0.9674 }, + { 0.1619, 0.1615, 0.9725 }, + { 0.1470, 0.1304, 0.9804 }, + { 0.1149, 0.0987, 0.9867 }, + { 0.0829, 0.0500, 0.9950 }, + { 0.0499, 0.0166, 0.9983 }, + { 0.0167, -0.0166, 0.9994 }, + { 0.0166, -0.0662, 0.9970 }, + { 0.0331, -0.0998, 0.9945 }, + { 0.0661, -0.1159, 0.9909 }, + { 0.1307, -0.1466, 0.9804 }, + { 0.1783, -0.1455, 0.9729 }, + { 0.2257, -0.0965, 0.9684 }, + { 0.2421, -0.0485, 0.9688 }, + { 0.2268, -0.0164, 0.9732 }, + { 0.2268, -0.0162, 0.9732 }, + { 0.1955, -0.0488, 0.9788 }, + { 0.1793, -0.0652, 0.9805 }, + { 0.1477, -0.0825, 0.9853 }, + { 0.1154, -0.0829, 0.9896 }, + { 0.0992, -0.0495, 0.9932 }, + { 0.0664, -0.0166, 0.9970 }, + { 0.0332, 0.0166, 0.9986 }, + { -0.0167, 0.0166, 0.9994 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0498, -0.0331, 0.9975 }, + { -0.0664, -0.0662, 0.9956 }, + { -0.0664, -0.0662, 0.9956 }, + { -0.0828, -0.0665, 0.9942 }, + { -0.0827, -0.0829, 0.9929 }, + { -0.0827, -0.0825, 0.9929 }, + { -0.0991, -0.0824, 0.9915 }, + { -0.0658, -0.0662, 0.9929 }, + { -0.0493, -0.0002, 0.9948 }, + { -0.0164, 0.0660, 0.9937 }, + { 0.0001, 0.1313, 0.9886 }, + { 0.0326, 0.1951, 0.9792 }, + { 0.0805, 0.2426, 0.9665 }, + { 0.0965, 0.2423, 0.9652 }, + { 0.0971, 0.2100, 0.9722 }, + { 0.0979, 0.1629, 0.9807 }, + { 0.0822, 0.0986, 0.9900 }, + { 0.0498, 0.0667, 0.9964 }, + { 0.0332, 0.0336, 0.9978 }, + { 0.0166, -0.0166, 0.9994 }, + { 0.0000, -0.0332, 0.9994 }, + { 0.0000, -0.0498, 0.9986 }, + { 0.0332, -0.0667, 0.9972 }, + { 0.0498, -0.0667, 0.9964 }, + { 0.0989, -0.0823, 0.9910 }, + { 0.1635, -0.0816, 0.9825 }, + { 0.2105, -0.0648, 0.9743 }, + { 0.2265, -0.0487, 0.9721 }, + { 0.2268, -0.0164, 0.9732 }, + { 0.2107, -0.0324, 0.9753 }, + { 0.1953, -0.0650, 0.9781 }, + { 0.1787, -0.0974, 0.9774 }, + { 0.1470, -0.1312, 0.9803 }, + { 0.1314, -0.0991, 0.9858 }, + { 0.0991, -0.0660, 0.9923 }, + { 0.0663, -0.0497, 0.9959 }, + { 0.0332, -0.0332, 0.9983 }, + { -0.0167, -0.0334, 0.9992 }, + { -0.0499, -0.0334, 0.9981 }, + { -0.0829, -0.0496, 0.9950 }, + { -0.0828, -0.0661, 0.9942 }, + { -0.0827, -0.0825, 0.9929 }, + { -0.0991, -0.0828, 0.9915 }, + { -0.0993, -0.0665, 0.9928 }, + { -0.0827, -0.0825, 0.9929 }, + { -0.0827, -0.0825, 0.9929 }, + { 0.0660, -0.0165, 0.9953 }, + { 0.1145, 0.0328, 0.9890 }, + { 0.1308, 0.0819, 0.9857 }, + { 0.1455, 0.1298, 0.9770 }, + { 0.1282, 0.2083, 0.9664 }, + { 0.1119, 0.2570, 0.9598 }, + { 0.0968, 0.2268, 0.9685 }, + { 0.0652, 0.1952, 0.9786 }, + { 0.0329, 0.1473, 0.9868 }, + { 0.0000, 0.0828, 0.9959 }, + { 0.0000, 0.0500, 0.9981 }, + { -0.0166, 0.0168, 0.9994 }, + { -0.0166, -0.0166, 0.9994 }, + { -0.0166, -0.0332, 0.9992 }, + { -0.0166, -0.0332, 0.9992 }, + { 0.0000, -0.0502, 0.9980 }, + { 0.0166, -0.0502, 0.9983 }, + { 0.0499, -0.0332, 0.9981 }, + { 0.0827, -0.0331, 0.9948 }, + { 0.1154, -0.0330, 0.9915 }, + { 0.1313, -0.0331, 0.9886 }, + { 0.1313, -0.0331, 0.9886 }, + { 0.1153, -0.0494, 0.9907 }, + { 0.1151, -0.0821, 0.9886 }, + { 0.0822, -0.1150, 0.9886 }, + { 0.0491, -0.1321, 0.9866 }, + { 0.0163, -0.1318, 0.9845 }, + { -0.0325, -0.1149, 0.9878 }, + { -0.0652, -0.0822, 0.9894 }, + { -0.0819, -0.0659, 0.9911 }, + { -0.0825, -0.0665, 0.9931 }, + { -0.0828, -0.0665, 0.9942 }, + { -0.0993, -0.0660, 0.9929 }, + { -0.0993, -0.0660, 0.9929 }, + { -0.0991, -0.0824, 0.9915 }, + { -0.0991, -0.0828, 0.9915 }, + { -0.0993, -0.0665, 0.9928 }, + { -0.0993, -0.0660, 0.9929 }, + { -0.0989, -0.0823, 0.9910 }, + { 0.1638, 0.0658, 0.9838 }, + { 0.2112, 0.0653, 0.9751 }, + { 0.2257, 0.0965, 0.9684 }, + { 0.2404, 0.1279, 0.9621 }, + { 0.2239, 0.1595, 0.9605 }, + { 0.1605, 0.2097, 0.9638 }, + { 0.0975, 0.1958, 0.9752 }, + { 0.0493, 0.1477, 0.9875 }, + { 0.0000, 0.0991, 0.9945 }, + { -0.0332, 0.0663, 0.9972 }, + { -0.0499, 0.0499, 0.9972 }, + { -0.0499, 0.0168, 0.9983 }, + { -0.0499, -0.0166, 0.9983 }, + { -0.0499, -0.0332, 0.9981 }, + { -0.0499, -0.0332, 0.9981 }, + { -0.0333, -0.0334, 0.9989 }, + { -0.0167, -0.0168, 0.9994 }, + { 0.0000, -0.0166, 0.9992 }, + { 0.0166, -0.0166, 0.9994 }, + { 0.0332, -0.0166, 0.9986 }, + { 0.0499, -0.0334, 0.9981 }, + { 0.0499, -0.0334, 0.9981 }, + { 0.0332, -0.0497, 0.9975 }, + { 0.0165, -0.0990, 0.9932 }, + { 0.0000, -0.1636, 0.9854 }, + { -0.0489, -0.1966, 0.9791 }, + { -0.1139, -0.1798, 0.9768 }, + { -0.1467, -0.1463, 0.9780 }, + { -0.1793, -0.0975, 0.9783 }, + { -0.1642, -0.0491, 0.9851 }, + { -0.1321, -0.0332, 0.9907 }, + { -0.0994, -0.0498, 0.9937 }, + { -0.0828, -0.0661, 0.9942 }, + { -0.0828, -0.0661, 0.9942 }, + { -0.0991, -0.0824, 0.9915 }, + { -0.0827, -0.0829, 0.9929 }, + { -0.0993, -0.0665, 0.9928 }, + { -0.0991, -0.0824, 0.9915 }, + { -0.1315, -0.0984, 0.9864 }, + { 0.1953, 0.0980, 0.9758 }, + { 0.2108, 0.0976, 0.9725 }, + { 0.2410, 0.1121, 0.9638 }, + { 0.2252, 0.1284, 0.9653 }, + { 0.2094, 0.1288, 0.9682 }, + { 0.1466, 0.1311, 0.9793 }, + { 0.0660, 0.1161, 0.9903 }, + { 0.0166, 0.0992, 0.9948 }, + { -0.0166, 0.0662, 0.9970 }, + { -0.0333, 0.0332, 0.9989 }, + { -0.0499, 0.0334, 0.9981 }, + { -0.0665, 0.0168, 0.9975 }, + { -0.0665, -0.0166, 0.9975 }, + { -0.0499, -0.0332, 0.9981 }, + { -0.0499, -0.0166, 0.9983 }, + { -0.0333, -0.0168, 0.9992 }, + { -0.0333, -0.0168, 0.9992 }, + { -0.0333, 0.0000, 0.9994 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0167, -0.0168, 0.9994 }, + { 0.0166, -0.0500, 0.9983 }, + { -0.0166, -0.0828, 0.9962 }, + { -0.0331, -0.1155, 0.9926 }, + { -0.0491, -0.1790, 0.9813 }, + { -0.0806, -0.2426, 0.9665 }, + { -0.1288, -0.2260, 0.9650 }, + { -0.1619, -0.1774, 0.9706 }, + { -0.1631, -0.0972, 0.9791 }, + { -0.1483, -0.0164, 0.9885 }, + { -0.1159, 0.0000, 0.9931 }, + { -0.0830, -0.0166, 0.9961 }, + { -0.0665, -0.0497, 0.9964 }, + { -0.0498, -0.0827, 0.9951 }, + { -0.0662, -0.0826, 0.9937 }, + { -0.0498, -0.0833, 0.9950 }, + { -0.0662, -0.0832, 0.9936 }, + { -0.0826, -0.0987, 0.9910 }, + { -0.0985, -0.1311, 0.9859 }, + { 0.1786, 0.1301, 0.9746 }, + { 0.1948, 0.1140, 0.9741 }, + { 0.1945, 0.1133, 0.9737 }, + { 0.1634, 0.0979, 0.9812 }, + { 0.1315, 0.0820, 0.9872 }, + { 0.0993, 0.0665, 0.9928 }, + { 0.0498, 0.0667, 0.9964 }, + { 0.0166, 0.0663, 0.9975 }, + { -0.0333, 0.0498, 0.9981 }, + { -0.0333, 0.0332, 0.9989 }, + { -0.0499, 0.0166, 0.9983 }, + { -0.0499, 0.0000, 0.9986 }, + { -0.0499, 0.0000, 0.9986 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0333, -0.0168, 0.9992 }, + { -0.0333, -0.0168, 0.9992 }, + { -0.0167, 0.0166, 0.9994 }, + { 0.0000, 0.0166, 0.9997 }, + { 0.0000, 0.0000, 1.0000 }, + { -0.0166, -0.0168, 0.9994 }, + { -0.0331, -0.0664, 0.9962 }, + { -0.0496, -0.0991, 0.9937 }, + { -0.0658, -0.1313, 0.9881 }, + { -0.0970, -0.2094, 0.9713 }, + { -0.1114, -0.2718, 0.9556 }, + { -0.1432, -0.2557, 0.9554 }, + { -0.1616, -0.1769, 0.9697 }, + { -0.1476, -0.0816, 0.9843 }, + { -0.1321, 0.0000, 0.9907 }, + { -0.0994, 0.0333, 0.9945 }, + { -0.0829, 0.0002, 0.9959 }, + { -0.0499, -0.0332, 0.9981 }, + { -0.0332, -0.0662, 0.9967 }, + { -0.0166, -0.0828, 0.9962 }, + { -0.0166, -0.0834, 0.9961 }, + { -0.0166, -0.0999, 0.9947 }, + { -0.0331, -0.1154, 0.9921 }, + { -0.0492, -0.1635, 0.9846 }, + { 0.1783, 0.1464, 0.9728 }, + { 0.1790, 0.1145, 0.9769 }, + { 0.1477, 0.0819, 0.9854 }, + { 0.1319, 0.0658, 0.9891 }, + { 0.1156, 0.0659, 0.9910 }, + { 0.0829, 0.0498, 0.9950 }, + { 0.0499, 0.0334, 0.9981 }, + { 0.0166, 0.0166, 0.9994 }, + { -0.0166, 0.0166, 0.9994 }, + { -0.0333, 0.0166, 0.9992 }, + { -0.0332, 0.0168, 0.9986 }, + { -0.0333, 0.0168, 0.9992 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0333, -0.0168, 0.9992 }, + { -0.0166, -0.0002, 0.9992 }, + { -0.0167, 0.0332, 0.9992 }, + { -0.0167, 0.0166, 0.9994 }, + { -0.0167, -0.0166, 0.9994 }, + { -0.0333, -0.0502, 0.9980 }, + { -0.0663, -0.0830, 0.9942 }, + { -0.0661, -0.1153, 0.9910 }, + { -0.0981, -0.1629, 0.9812 }, + { -0.1287, -0.2245, 0.9654 }, + { -0.1420, -0.2852, 0.9472 }, + { -0.1581, -0.2695, 0.9487 }, + { -0.1616, -0.1769, 0.9697 }, + { -0.1637, -0.0650, 0.9822 }, + { -0.1481, 0.0328, 0.9877 }, + { -0.1157, 0.0497, 0.9918 }, + { -0.0994, 0.0333, 0.9945 }, + { -0.0499, 0.0000, 0.9981 }, + { -0.0499, -0.0497, 0.9972 }, + { -0.0166, -0.0663, 0.9975 }, + { -0.0166, -0.0834, 0.9961 }, + { 0.0000, -0.0999, 0.9950 }, + { 0.0000, -0.1316, 0.9908 }, + { -0.0164, -0.1798, 0.9833 }, + { 0.1302, 0.1309, 0.9802 }, + { 0.0985, 0.0829, 0.9894 }, + { 0.0660, 0.0661, 0.9934 }, + { 0.0660, 0.0661, 0.9934 }, + { 0.0494, 0.0330, 0.9942 }, + { 0.0166, 0.0000, 0.9986 }, + { 0.0000, 0.0000, 0.9994 }, + { -0.0166, 0.0000, 0.9997 }, + { -0.0166, 0.0000, 0.9997 }, + { -0.0333, 0.0166, 0.9992 }, + { -0.0166, 0.0166, 0.9994 }, + { -0.0167, 0.0000, 0.9997 }, + { -0.0167, 0.0000, 0.9997 }, + { -0.0167, -0.0166, 0.9994 }, + { -0.0167, -0.0166, 0.9994 }, + { -0.0167, 0.0000, 0.9997 }, + { -0.0166, 0.0000, 0.9997 }, + { -0.0167, 0.0166, 0.9994 }, + { -0.0333, 0.0166, 0.9992 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0332, -0.0668, 0.9966 }, + { -0.0662, -0.0997, 0.9928 }, + { -0.0822, -0.1312, 0.9873 }, + { -0.0975, -0.1944, 0.9755 }, + { -0.1119, -0.2550, 0.9598 }, + { -0.1259, -0.3004, 0.9448 }, + { -0.1269, -0.2706, 0.9526 }, + { -0.1297, -0.1776, 0.9738 }, + { -0.1476, -0.0652, 0.9846 }, + { -0.1316, 0.0492, 0.9883 }, + { -0.1154, 0.0827, 0.9896 }, + { -0.0993, 0.0665, 0.9928 }, + { -0.0992, 0.0165, 0.9932 }, + { -0.0829, -0.0331, 0.9959 }, + { -0.0826, -0.0496, 0.9940 }, + { -0.0662, -0.0666, 0.9950 }, + { -0.0495, -0.0830, 0.9940 }, + { -0.0492, -0.1313, 0.9884 }, + { -0.0327, -0.1796, 0.9825 }, + { -0.0165, 0.0829, 0.9928 }, + { -0.0494, 0.0500, 0.9939 }, + { -0.0660, 0.0496, 0.9942 }, + { -0.0821, 0.0494, 0.9918 }, + { -0.0989, 0.0165, 0.9926 }, + { -0.0828, 0.0000, 0.9953 }, + { -0.0664, 0.0000, 0.9972 }, + { -0.0499, 0.0000, 0.9986 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0333, 0.0166, 0.9992 }, + { -0.0333, 0.0334, 0.9989 }, + { -0.0167, 0.0168, 0.9994 }, + { -0.0167, 0.0000, 0.9997 }, + { -0.0167, -0.0166, 0.9994 }, + { -0.0167, -0.0166, 0.9994 }, + { -0.0167, -0.0168, 0.9994 }, + { -0.0166, -0.0002, 0.9992 }, + { -0.0167, 0.0166, 0.9994 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0497, -0.0833, 0.9939 }, + { -0.0495, -0.1325, 0.9898 }, + { -0.0821, -0.1474, 0.9854 }, + { -0.0975, -0.1944, 0.9755 }, + { -0.0961, -0.2555, 0.9615 }, + { -0.0791, -0.3020, 0.9498 }, + { -0.0638, -0.2723, 0.9584 }, + { -0.0651, -0.1948, 0.9776 }, + { -0.0821, -0.0651, 0.9884 }, + { -0.0828, 0.0660, 0.9937 }, + { -0.0827, 0.0829, 0.9929 }, + { -0.0993, 0.0500, 0.9937 }, + { -0.1158, 0.0165, 0.9929 }, + { -0.1157, -0.0329, 0.9921 }, + { -0.1481, -0.0492, 0.9875 }, + { -0.1476, -0.0496, 0.9864 }, + { -0.1473, -0.0822, 0.9843 }, + { -0.1468, -0.1141, 0.9812 }, + { -0.1299, -0.1463, 0.9784 }, + { -0.0664, 0.0168, 0.9970 }, + { -0.1158, 0.0332, 0.9926 }, + { -0.1483, 0.0329, 0.9883 }, + { -0.1803, 0.0327, 0.9829 }, + { -0.1803, 0.0327, 0.9829 }, + { -0.1642, 0.0330, 0.9854 }, + { -0.1158, 0.0332, 0.9926 }, + { -0.0830, 0.0331, 0.9959 }, + { -0.0499, 0.0166, 0.9983 }, + { -0.0333, 0.0166, 0.9992 }, + { -0.0333, 0.0334, 0.9989 }, + { -0.0333, 0.0168, 0.9992 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0167, 0.0000, 0.9997 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0499, -0.0331, 0.9975 }, + { -0.0498, -0.0833, 0.9950 }, + { -0.0495, -0.1321, 0.9893 }, + { -0.0655, -0.1794, 0.9815 }, + { -0.0812, -0.2104, 0.9740 }, + { -0.0645, -0.2412, 0.9677 }, + { -0.0480, -0.2732, 0.9605 }, + { -0.0161, -0.2583, 0.9652 }, + { 0.0000, -0.1952, 0.9797 }, + { 0.0000, -0.0819, 0.9927 }, + { -0.0166, 0.0496, 0.9962 }, + { -0.0498, 0.0664, 0.9959 }, + { -0.0830, 0.0333, 0.9959 }, + { -0.0995, 0.0000, 0.9945 }, + { -0.1480, -0.0655, 0.9861 }, + { -0.1797, -0.0814, 0.9801 }, + { -0.2114, -0.0653, 0.9751 }, + { -0.2263, -0.0810, 0.9701 }, + { -0.2256, -0.1125, 0.9671 }, + { -0.2096, -0.1446, 0.9668 }, + { -0.0333, -0.0168, 0.9992 }, + { -0.0830, -0.0333, 0.9959 }, + { -0.1319, -0.0165, 0.9904 }, + { -0.1802, 0.0163, 0.9832 }, + { -0.1960, 0.0326, 0.9801 }, + { -0.1798, 0.0658, 0.9808 }, + { -0.1477, 0.0825, 0.9853 }, + { -0.1156, 0.0659, 0.9910 }, + { -0.0829, 0.0496, 0.9951 }, + { -0.0499, 0.0332, 0.9981 }, + { -0.0333, 0.0334, 0.9989 }, + { -0.0333, 0.0168, 0.9992 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0499, 0.0000, 0.9986 }, + { -0.0333, 0.0000, 0.9994 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0499, -0.0332, 0.9981 }, + { -0.0497, -0.0833, 0.9939 }, + { -0.0658, -0.1484, 0.9866 }, + { -0.0816, -0.1792, 0.9802 }, + { -0.0652, -0.1952, 0.9786 }, + { -0.0646, -0.2257, 0.9710 }, + { -0.0482, -0.2583, 0.9647 }, + { -0.0162, -0.2278, 0.9729 }, + { 0.0000, -0.1797, 0.9830 }, + { 0.0166, -0.0820, 0.9930 }, + { 0.0000, 0.0166, 0.9992 }, + { -0.0499, 0.0166, 0.9983 }, + { -0.0665, 0.0000, 0.9978 }, + { -0.1155, -0.0493, 0.9907 }, + { -0.1790, -0.1137, 0.9770 }, + { -0.2254, -0.1125, 0.9671 }, + { -0.2704, -0.0961, 0.9568 }, + { -0.2995, -0.0952, 0.9483 }, + { -0.2856, -0.0951, 0.9531 }, + { -0.2408, -0.1121, 0.9638 }, + { -0.0499, -0.0170, 0.9972 }, + { -0.0664, -0.0666, 0.9956 }, + { -0.0993, -0.0660, 0.9929 }, + { -0.1481, -0.0328, 0.9878 }, + { -0.1639, 0.0327, 0.9849 }, + { -0.1477, 0.0825, 0.9853 }, + { -0.1313, 0.0990, 0.9859 }, + { -0.1152, 0.0986, 0.9883 }, + { -0.0991, 0.0824, 0.9915 }, + { -0.0664, 0.0662, 0.9956 }, + { -0.0333, 0.0500, 0.9981 }, + { -0.0333, 0.0168, 0.9992 }, + { -0.0166, 0.0000, 0.9997 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0499, -0.0168, 0.9983 }, + { -0.0499, -0.0002, 0.9981 }, + { -0.0499, 0.0166, 0.9983 }, + { -0.0499, -0.0166, 0.9983 }, + { -0.0499, -0.0497, 0.9972 }, + { -0.0661, -0.0997, 0.9922 }, + { -0.0818, -0.1640, 0.9824 }, + { -0.0979, -0.1789, 0.9788 }, + { -0.1132, -0.1938, 0.9728 }, + { -0.1129, -0.2252, 0.9676 }, + { -0.1125, -0.2264, 0.9663 }, + { -0.0967, -0.2111, 0.9704 }, + { -0.1132, -0.1621, 0.9764 }, + { -0.0977, -0.0817, 0.9858 }, + { -0.0989, -0.0165, 0.9926 }, + { -0.1155, 0.0000, 0.9921 }, + { -0.1312, -0.0328, 0.9881 }, + { -0.1629, -0.1136, 0.9784 }, + { -0.2083, -0.1758, 0.9619 }, + { -0.2683, -0.1732, 0.9474 }, + { -0.3130, -0.1413, 0.9391 }, + { -0.3285, -0.0944, 0.9391 }, + { -0.3014, -0.0475, 0.9521 }, + { -0.2575, -0.0321, 0.9657 }, + { -0.0828, -0.0004, 0.9942 }, + { -0.0663, -0.0830, 0.9942 }, + { -0.0990, -0.0988, 0.9902 }, + { -0.0991, -0.0494, 0.9921 }, + { -0.0992, 0.0330, 0.9934 }, + { -0.0823, 0.0995, 0.9898 }, + { -0.0660, 0.1161, 0.9903 }, + { -0.0495, 0.0990, 0.9926 }, + { -0.0495, 0.0990, 0.9926 }, + { -0.0331, 0.0991, 0.9940 }, + { -0.0332, 0.0664, 0.9967 }, + { -0.0333, 0.0334, 0.9989 }, + { -0.0166, 0.0000, 0.9992 }, + { -0.0333, -0.0332, 0.9989 }, + { -0.0333, -0.0332, 0.9989 }, + { -0.0499, -0.0166, 0.9983 }, + { -0.0499, 0.0000, 0.9986 }, + { -0.0665, 0.0000, 0.9978 }, + { -0.0499, -0.0166, 0.9983 }, + { -0.0499, -0.0497, 0.9972 }, + { -0.0660, -0.1160, 0.9898 }, + { -0.0979, -0.1800, 0.9787 }, + { -0.1132, -0.2098, 0.9709 }, + { -0.1607, -0.2084, 0.9646 }, + { -0.1899, -0.2218, 0.9539 }, + { -0.2049, -0.2378, 0.9482 }, + { -0.2344, -0.2210, 0.9436 }, + { -0.2520, -0.1731, 0.9490 }, + { -0.2690, -0.0633, 0.9559 }, + { -0.2678, 0.0000, 0.9575 }, + { -0.2402, -0.0163, 0.9673 }, + { -0.2414, -0.0485, 0.9680 }, + { -0.2392, -0.1271, 0.9594 }, + { -0.2650, -0.2180, 0.9377 }, + { -0.2803, -0.2173, 0.9345 }, + { -0.3121, -0.1564, 0.9366 }, + { -0.3148, -0.0792, 0.9446 }, + { -0.2872, -0.0159, 0.9576 }, + { -0.2576, 0.0000, 0.9662 }, + { -0.1155, 0.0326, 0.9904 }, + { -0.0826, -0.0825, 0.9918 }, + { -0.0494, -0.0988, 0.9921 }, + { -0.0165, -0.0331, 0.9975 }, + { 0.0001, 0.0495, 0.9953 }, + { 0.0165, 0.1162, 0.9917 }, + { 0.0165, 0.1325, 0.9898 }, + { 0.0331, 0.1154, 0.9921 }, + { 0.0331, 0.0991, 0.9940 }, + { 0.0166, 0.0828, 0.9962 }, + { -0.0166, 0.0500, 0.9983 }, + { -0.0166, 0.0334, 0.9992 }, + { -0.0333, 0.0000, 0.9989 }, + { -0.0333, -0.0332, 0.9989 }, + { -0.0333, -0.0332, 0.9989 }, + { -0.0499, -0.0334, 0.9981 }, + { -0.0665, -0.0168, 0.9975 }, + { -0.0665, 0.0166, 0.9975 }, + { -0.0664, 0.0000, 0.9967 }, + { -0.0662, -0.0661, 0.9945 }, + { -0.0820, -0.1482, 0.9842 }, + { -0.1132, -0.2110, 0.9707 }, + { -0.1439, -0.2393, 0.9600 }, + { -0.1887, -0.2668, 0.9445 }, + { -0.2338, -0.2643, 0.9354 }, + { -0.2768, -0.2628, 0.9237 }, + { -0.3200, -0.2448, 0.9146 }, + { -0.3378, -0.1838, 0.9222 }, + { -0.3686, -0.0917, 0.9226 }, + { -0.3709, 0.0154, 0.9274 }, + { -0.3434, 0.0311, 0.9377 }, + { -0.3290, -0.0313, 0.9422 }, + { -0.3118, -0.1392, 0.9363 }, + { -0.3087, -0.2156, 0.9264 }, + { -0.2946, -0.2166, 0.9306 }, + { -0.2969, -0.1720, 0.9381 }, + { -0.3005, -0.0637, 0.9494 }, + { -0.2872, 0.0159, 0.9576 }, + { -0.2575, 0.0321, 0.9657 }, + { -0.1156, 0.0493, 0.9907 }, + { -0.0664, -0.0166, 0.9970 }, + { 0.0333, -0.0332, 0.9983 }, + { 0.1147, 0.0000, 0.9895 }, + { 0.1466, 0.0653, 0.9832 }, + { 0.1460, 0.1148, 0.9791 }, + { 0.1303, 0.1313, 0.9806 }, + { 0.0987, 0.1149, 0.9878 }, + { 0.0828, 0.0825, 0.9929 }, + { 0.0333, 0.0498, 0.9981 }, + { 0.0000, 0.0334, 0.9994 }, + { -0.0167, 0.0168, 0.9994 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0333, -0.0332, 0.9989 }, + { -0.0499, -0.0497, 0.9972 }, + { -0.0665, -0.0499, 0.9964 }, + { -0.0665, -0.0168, 0.9975 }, + { -0.0831, 0.0000, 0.9964 }, + { -0.1159, -0.0165, 0.9929 }, + { -0.1317, -0.0656, 0.9880 }, + { -0.1300, -0.1629, 0.9753 }, + { -0.1440, -0.2407, 0.9596 }, + { -0.1730, -0.2819, 0.9431 }, + { -0.1872, -0.2956, 0.9362 }, + { -0.2014, -0.3086, 0.9290 }, + { -0.2576, -0.3198, 0.9106 }, + { -0.3037, -0.2744, 0.9114 }, + { -0.3497, -0.2120, 0.9119 }, + { -0.3680, -0.0910, 0.9204 }, + { -0.3712, 0.0308, 0.9275 }, + { -0.3712, 0.0308, 0.9275 }, + { -0.3579, -0.0155, 0.9334 }, + { -0.3414, -0.1076, 0.9306 }, + { -0.3099, -0.2008, 0.9292 }, + { -0.2957, -0.2017, 0.9335 }, + { -0.2838, -0.1578, 0.9453 }, + { -0.2863, -0.0640, 0.9538 }, + { -0.2872, 0.0318, 0.9568 }, + { -0.2721, 0.0638, 0.9600 }, + { -0.1314, 0.0825, 0.9872 }, + { -0.0498, 0.0667, 0.9964 }, + { 0.0497, 0.0827, 0.9951 }, + { 0.1309, 0.0819, 0.9857 }, + { 0.1951, 0.0812, 0.9768 }, + { 0.1788, 0.0982, 0.9778 }, + { 0.1473, 0.0824, 0.9843 }, + { 0.0826, 0.0660, 0.9932 }, + { 0.0331, 0.0331, 0.9961 }, + { 0.0000, 0.0000, 0.9994 }, + { 0.0166, 0.0000, 0.9997 }, + { -0.0167, 0.0000, 0.9997 }, + { -0.0333, -0.0166, 0.9992 }, + { -0.0498, -0.0497, 0.9972 }, + { -0.0664, -0.0662, 0.9956 }, + { -0.0664, -0.0499, 0.9964 }, + { -0.0829, -0.0333, 0.9959 }, + { -0.1157, -0.0330, 0.9926 }, + { -0.1480, -0.0492, 0.9875 }, + { -0.1638, -0.0817, 0.9830 }, + { -0.1775, -0.1618, 0.9684 }, + { -0.1742, -0.2541, 0.9508 }, + { -0.1729, -0.2823, 0.9435 }, + { -0.1415, -0.2980, 0.9438 }, + { -0.1544, -0.3388, 0.9272 }, + { -0.1672, -0.3670, 0.9139 }, + { -0.2127, -0.3366, 0.9148 }, + { -0.2461, -0.2467, 0.9310 }, + { -0.2832, -0.1096, 0.9476 }, + { -0.3141, 0.0157, 0.9462 }, + { -0.3141, 0.0474, 0.9462 }, + { -0.3156, 0.0002, 0.9479 }, + { -0.3138, -0.0936, 0.9423 }, + { -0.2826, -0.1724, 0.9430 }, + { -0.2822, -0.1877, 0.9408 }, + { -0.2689, -0.1585, 0.9494 }, + { -0.2562, -0.0645, 0.9618 }, + { -0.2722, 0.0319, 0.9611 }, + { -0.2719, 0.0638, 0.9601 }, + { -0.1471, 0.1149, 0.9810 }, + { -0.0980, 0.1642, 0.9810 }, + { -0.0165, 0.1477, 0.9875 }, + { 0.0329, 0.1477, 0.9878 }, + { 0.0815, 0.1144, 0.9855 }, + { 0.0825, 0.0665, 0.9931 }, + { 0.0496, 0.0335, 0.9964 }, + { 0.0166, 0.0000, 0.9997 }, + { -0.0166, 0.0000, 0.9997 }, + { -0.0166, 0.0332, 0.9986 }, + { 0.0000, 0.0163, 0.9981 }, + { -0.0167, -0.0334, 0.9992 }, + { -0.0499, -0.0497, 0.9972 }, + { -0.0664, -0.0662, 0.9956 }, + { -0.0664, -0.0662, 0.9956 }, + { -0.0664, -0.0666, 0.9956 }, + { -0.0993, -0.0665, 0.9928 }, + { -0.1156, -0.0659, 0.9910 }, + { -0.1479, -0.0656, 0.9867 }, + { -0.1635, -0.0978, 0.9812 }, + { -0.1771, -0.1778, 0.9666 }, + { -0.1593, -0.2400, 0.9570 }, + { -0.1434, -0.2544, 0.9563 }, + { -0.1266, -0.2840, 0.9500 }, + { -0.1088, -0.3409, 0.9332 }, + { -0.0917, -0.3840, 0.9181 }, + { -0.0767, -0.3562, 0.9270 }, + { -0.0787, -0.2845, 0.9517 }, + { -0.1116, -0.1597, 0.9697 }, + { -0.1451, 0.0000, 0.9808 }, + { -0.1946, 0.0325, 0.9777 }, + { -0.2416, -0.0161, 0.9690 }, + { -0.2713, -0.0794, 0.9579 }, + { -0.2681, -0.1727, 0.9465 }, + { -0.2675, -0.1882, 0.9444 }, + { -0.2403, -0.1284, 0.9616 }, + { -0.2418, -0.0649, 0.9675 }, + { -0.2573, 0.0160, 0.9650 }, + { -0.2721, 0.0479, 0.9608 }, + { -0.0986, 0.1156, 0.9866 }, + { -0.0811, 0.1955, 0.9756 }, + { -0.0488, 0.2109, 0.9760 }, + { 0.0000, 0.1798, 0.9836 }, + { 0.0165, 0.1316, 0.9905 }, + { 0.0332, 0.0664, 0.9967 }, + { 0.0000, 0.0168, 0.9997 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0166, 0.9997 }, + { -0.0499, -0.0002, 0.9981 }, + { -0.0498, -0.0499, 0.9972 }, + { -0.0498, -0.0663, 0.9964 }, + { -0.0498, -0.0663, 0.9964 }, + { -0.0664, -0.0662, 0.9956 }, + { -0.0663, -0.0833, 0.9942 }, + { -0.0662, -0.0832, 0.9936 }, + { -0.0827, -0.0825, 0.9929 }, + { -0.0989, -0.0987, 0.9896 }, + { -0.1311, -0.1145, 0.9841 }, + { -0.1301, -0.1635, 0.9768 }, + { -0.1128, -0.2261, 0.9670 }, + { -0.1120, -0.2554, 0.9602 }, + { -0.1115, -0.2701, 0.9561 }, + { -0.0944, -0.3137, 0.9444 }, + { -0.0469, -0.3450, 0.9373 }, + { 0.0157, -0.3314, 0.9431 }, + { 0.0318, -0.2860, 0.9567 }, + { 0.0326, -0.1780, 0.9797 }, + { -0.0166, -0.0662, 0.9970 }, + { -0.1157, -0.0499, 0.9918 }, + { -0.1954, -0.0816, 0.9772 }, + { -0.2554, -0.1273, 0.9579 }, + { -0.2683, -0.1732, 0.9474 }, + { -0.2392, -0.1590, 0.9572 }, + { -0.2253, -0.1293, 0.9657 }, + { -0.2413, -0.0809, 0.9657 }, + { -0.2423, 0.0000, 0.9695 }, + { -0.2723, 0.0320, 0.9615 }, + { 0.0001, 0.1319, 0.9868 }, + { 0.0163, 0.2121, 0.9758 }, + { 0.0162, 0.2264, 0.9727 }, + { 0.0325, 0.2109, 0.9763 }, + { 0.0656, 0.1470, 0.9852 }, + { 0.0166, 0.0496, 0.9973 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { -0.0167, -0.0166, 0.9994 }, + { -0.0499, -0.0334, 0.9981 }, + { -0.0499, -0.0334, 0.9981 }, + { -0.0333, -0.0498, 0.9981 }, + { -0.0332, -0.0828, 0.9959 }, + { -0.0497, -0.0827, 0.9951 }, + { -0.0498, -0.0667, 0.9964 }, + { -0.0332, -0.0832, 0.9959 }, + { -0.0497, -0.0991, 0.9937 }, + { -0.0496, -0.1154, 0.9918 }, + { -0.0658, -0.1315, 0.9886 }, + { -0.0818, -0.1644, 0.9823 }, + { -0.0969, -0.2265, 0.9687 }, + { -0.1120, -0.2554, 0.9602 }, + { -0.1115, -0.2701, 0.9561 }, + { -0.1110, -0.2849, 0.9520 }, + { -0.0793, -0.2872, 0.9534 }, + { -0.0629, -0.2865, 0.9513 }, + { -0.0472, -0.2699, 0.9552 }, + { -0.0634, -0.2083, 0.9663 }, + { -0.0971, -0.1465, 0.9795 }, + { -0.1616, -0.1467, 0.9736 }, + { -0.1935, -0.1619, 0.9676 }, + { -0.2239, -0.1597, 0.9609 }, + { -0.2239, -0.1597, 0.9609 }, + { -0.2094, -0.1446, 0.9668 }, + { -0.2253, -0.1293, 0.9657 }, + { -0.2107, -0.0815, 0.9728 }, + { -0.2271, -0.0162, 0.9736 }, + { -0.2424, 0.0000, 0.9701 }, + { 0.0982, 0.1479, 0.9823 }, + { 0.0972, 0.2113, 0.9719 }, + { 0.0969, 0.2255, 0.9689 }, + { 0.0969, 0.2255, 0.9689 }, + { 0.0491, 0.1131, 0.9846 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, -0.0166, 0.9997 }, + { -0.0333, -0.0332, 0.9989 }, + { -0.0333, -0.0334, 0.9989 }, + { -0.0499, -0.0334, 0.9981 }, + { -0.0499, -0.0497, 0.9972 }, + { -0.0498, -0.0827, 0.9951 }, + { -0.0332, -0.0828, 0.9959 }, + { -0.0333, -0.0667, 0.9972 }, + { -0.0332, -0.0832, 0.9959 }, + { -0.0332, -0.0992, 0.9945 }, + { -0.0496, -0.1154, 0.9918 }, + { -0.0494, -0.1477, 0.9875 }, + { -0.0652, -0.1963, 0.9778 }, + { -0.0962, -0.2569, 0.9612 }, + { -0.1116, -0.2701, 0.9561 }, + { -0.1273, -0.2696, 0.9544 }, + { -0.1268, -0.2843, 0.9503 }, + { -0.1567, -0.2991, 0.9406 }, + { -0.1871, -0.2975, 0.9356 }, + { -0.2027, -0.2804, 0.9371 }, + { -0.2211, -0.2197, 0.9477 }, + { -0.2241, -0.1597, 0.9609 }, + { -0.2095, -0.1454, 0.9667 }, + { -0.1784, -0.1464, 0.9728 }, + { -0.1621, -0.1617, 0.9729 }, + { -0.1621, -0.1617, 0.9729 }, + { -0.1780, -0.1613, 0.9706 }, + { -0.2099, -0.1293, 0.9685 }, + { -0.2111, -0.0816, 0.9738 }, + { -0.2271, -0.0323, 0.9728 }, + { -0.2274, 0.0000, 0.9738 }, + { 0.1775, 0.1462, 0.9708 }, + { 0.1604, 0.2095, 0.9639 }, + { 0.1445, 0.2243, 0.9636 }, + { 0.1141, 0.1619, 0.9780 }, + { 0.0000, 0.0496, 0.9975 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, -0.0332, 0.9989 }, + { -0.0166, -0.0498, 0.9983 }, + { -0.0333, -0.0502, 0.9980 }, + { -0.0499, -0.0502, 0.9972 }, + { -0.0664, -0.0497, 0.9964 }, + { -0.0664, -0.0662, 0.9956 }, + { -0.0332, -0.0663, 0.9972 }, + { -0.0332, -0.0667, 0.9972 }, + { -0.0332, -0.0832, 0.9959 }, + { -0.0331, -0.1155, 0.9926 }, + { -0.0495, -0.1316, 0.9899 }, + { -0.0658, -0.1476, 0.9867 }, + { -0.0649, -0.2116, 0.9740 }, + { -0.0799, -0.2725, 0.9586 }, + { -0.0954, -0.2854, 0.9537 }, + { -0.1110, -0.2849, 0.9520 }, + { -0.1255, -0.3126, 0.9411 }, + { -0.1695, -0.3404, 0.9247 }, + { -0.2002, -0.3247, 0.9241 }, + { -0.2318, -0.2928, 0.9274 }, + { -0.2361, -0.2190, 0.9446 }, + { -0.2249, -0.1282, 0.9649 }, + { -0.1633, -0.0985, 0.9811 }, + { -0.1311, -0.1151, 0.9840 }, + { -0.0983, -0.1471, 0.9836 }, + { -0.1140, -0.1786, 0.9770 }, + { -0.1613, -0.1931, 0.9678 }, + { -0.1934, -0.1615, 0.9672 }, + { -0.2411, -0.0970, 0.9650 }, + { -0.2421, -0.0322, 0.9690 }, + { -0.2424, 0.0000, 0.9701 }, + { 0.2406, 0.1128, 0.9627 }, + { 0.1930, 0.1775, 0.9649 }, + { 0.1617, 0.1774, 0.9706 }, + { 0.0494, 0.0818, 0.9908 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, -0.0332, 0.9989 }, + { 0.0000, -0.0663, 0.9978 }, + { -0.0332, -0.0667, 0.9972 }, + { -0.0498, -0.0667, 0.9964 }, + { -0.0664, -0.0662, 0.9956 }, + { -0.0664, -0.0497, 0.9964 }, + { -0.0499, -0.0497, 0.9972 }, + { -0.0332, -0.0667, 0.9972 }, + { -0.0332, -0.0832, 0.9959 }, + { -0.0331, -0.1155, 0.9926 }, + { -0.0494, -0.1477, 0.9875 }, + { -0.0492, -0.1638, 0.9851 }, + { -0.0649, -0.2116, 0.9740 }, + { -0.0795, -0.2869, 0.9541 }, + { -0.0949, -0.2997, 0.9492 }, + { -0.1105, -0.2992, 0.9475 }, + { -0.1394, -0.3396, 0.9296 }, + { -0.1676, -0.3673, 0.9147 }, + { -0.1834, -0.3530, 0.9173 }, + { -0.2161, -0.3076, 0.9262 }, + { -0.2217, -0.2041, 0.9504 }, + { -0.2107, -0.0807, 0.9729 }, + { -0.1639, -0.0495, 0.9846 }, + { -0.1315, -0.0825, 0.9872 }, + { -0.1141, -0.1463, 0.9802 }, + { -0.1440, -0.2237, 0.9623 }, + { -0.1902, -0.2373, 0.9520 }, + { -0.2219, -0.2070, 0.9522 }, + { -0.2550, -0.1279, 0.9563 }, + { -0.2574, -0.0321, 0.9653 }, + { -0.2576, 0.0161, 0.9660 }, + { 0.2100, 0.0975, 0.9716 }, + { 0.1786, 0.1301, 0.9746 }, + { 0.0817, 0.0814, 0.9866 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, -0.0332, 0.9989 }, + { 0.0331, -0.0827, 0.9953 }, + { -0.0331, -0.0998, 0.9945 }, + { -0.0497, -0.0833, 0.9950 }, + { -0.0664, -0.0662, 0.9956 }, + { -0.0664, -0.0497, 0.9964 }, + { -0.0665, -0.0332, 0.9972 }, + { -0.0498, -0.0502, 0.9972 }, + { -0.0497, -0.0831, 0.9950 }, + { -0.0494, -0.1314, 0.9894 }, + { -0.0658, -0.1476, 0.9867 }, + { -0.0654, -0.1633, 0.9833 }, + { -0.0804, -0.2421, 0.9656 }, + { -0.0949, -0.3014, 0.9487 }, + { -0.1100, -0.3135, 0.9431 }, + { -0.1401, -0.3262, 0.9346 }, + { -0.1677, -0.3648, 0.9153 }, + { -0.1814, -0.3793, 0.9072 }, + { -0.1970, -0.3653, 0.9097 }, + { -0.2002, -0.3219, 0.9242 }, + { -0.2065, -0.2048, 0.9535 }, + { -0.1950, -0.0646, 0.9760 }, + { -0.1802, -0.0166, 0.9832 }, + { -0.1639, -0.0656, 0.9838 }, + { -0.1619, -0.1608, 0.9715 }, + { -0.1897, -0.2520, 0.9485 }, + { -0.2190, -0.2653, 0.9389 }, + { -0.2657, -0.2194, 0.9382 }, + { -0.2840, -0.1268, 0.9478 }, + { -0.2866, -0.0318, 0.9565 }, + { -0.2576, 0.0161, 0.9660 }, + { 0.1313, 0.0990, 0.9859 }, + { 0.1151, 0.0499, 0.9896 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { -0.0326, -0.0973, 0.9850 }, + { -0.0493, -0.1479, 0.9865 }, + { -0.0497, -0.0998, 0.9936 }, + { -0.0663, -0.0826, 0.9942 }, + { -0.0664, -0.0497, 0.9964 }, + { -0.0665, -0.0332, 0.9972 }, + { -0.0829, -0.0500, 0.9950 }, + { -0.0827, -0.0829, 0.9928 }, + { -0.0984, -0.1309, 0.9854 }, + { -0.0980, -0.1631, 0.9812 }, + { -0.1298, -0.1782, 0.9747 }, + { -0.1433, -0.2401, 0.9577 }, + { -0.1404, -0.3133, 0.9377 }, + { -0.1692, -0.3382, 0.9246 }, + { -0.1977, -0.3496, 0.9146 }, + { -0.2103, -0.3749, 0.9023 }, + { -0.1948, -0.3912, 0.8993 }, + { -0.1969, -0.3650, 0.9093 }, + { -0.1712, -0.3104, 0.9345 }, + { -0.1761, -0.1900, 0.9611 }, + { -0.1479, -0.0491, 0.9864 }, + { -0.1319, -0.0167, 0.9904 }, + { -0.1151, -0.0659, 0.9894 }, + { -0.1132, -0.1768, 0.9733 }, + { -0.1417, -0.2831, 0.9469 }, + { -0.2013, -0.3090, 0.9294 }, + { -0.2479, -0.2639, 0.9307 }, + { -0.2978, -0.1413, 0.9407 }, + { -0.2863, 0.0000, 0.9555 }, + { -0.2571, 0.0641, 0.9643 }, + { 0.0329, 0.0992, 0.9918 }, + { 0.0332, 0.0004, 0.9967 }, + { 0.0000, -0.0332, 0.9989 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, -0.0659, 0.9956 }, + { -0.1149, -0.1309, 0.9846 }, + { -0.0661, -0.1159, 0.9909 }, + { -0.0827, -0.0995, 0.9915 }, + { -0.0828, -0.0825, 0.9929 }, + { -0.0830, -0.0496, 0.9950 }, + { -0.0830, -0.0496, 0.9950 }, + { -0.0993, -0.0665, 0.9928 }, + { -0.1153, -0.0988, 0.9877 }, + { -0.1468, -0.1463, 0.9780 }, + { -0.1616, -0.1773, 0.9701 }, + { -0.1917, -0.2071, 0.9587 }, + { -0.2196, -0.2520, 0.9414 }, + { -0.2289, -0.3213, 0.9169 }, + { -0.2539, -0.3581, 0.8975 }, + { -0.2682, -0.3568, 0.8944 }, + { -0.2682, -0.3568, 0.8944 }, + { -0.2401, -0.3616, 0.9004 }, + { -0.1992, -0.3382, 0.9191 }, + { -0.1722, -0.2965, 0.9391 }, + { -0.1610, -0.1743, 0.9651 }, + { -0.1482, -0.0164, 0.9875 }, + { -0.1320, 0.0165, 0.9904 }, + { -0.1311, -0.0491, 0.9868 }, + { -0.1284, -0.1910, 0.9664 }, + { -0.1390, -0.3380, 0.9279 }, + { -0.1827, -0.3639, 0.9129 }, + { -0.2013, -0.3103, 0.9286 }, + { -0.2369, -0.1570, 0.9493 }, + { -0.2267, 0.0161, 0.9721 }, + { -0.1944, 0.0810, 0.9754 }, + { -0.0331, 0.0998, 0.9945 }, + { -0.0166, 0.0171, 0.9961 }, + { 0.0000, -0.0332, 0.9989 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { -0.1121, -0.1119, 0.9744 }, + { -0.0980, -0.1622, 0.9798 }, + { -0.0824, -0.1160, 0.9895 }, + { -0.0824, -0.1160, 0.9895 }, + { -0.0991, -0.0824, 0.9915 }, + { -0.0994, -0.0495, 0.9937 }, + { -0.1156, -0.0494, 0.9918 }, + { -0.1314, -0.0827, 0.9872 }, + { -0.1469, -0.1308, 0.9798 }, + { -0.1774, -0.1769, 0.9679 }, + { -0.2070, -0.2065, 0.9560 }, + { -0.2356, -0.2350, 0.9428 }, + { -0.2472, -0.2792, 0.9273 }, + { -0.2694, -0.3448, 0.8983 }, + { -0.2805, -0.3682, 0.8862 }, + { -0.2821, -0.3555, 0.8910 }, + { -0.2835, -0.3423, 0.8956 }, + { -0.2723, -0.3188, 0.9078 }, + { -0.2459, -0.2935, 0.9232 }, + { -0.2187, -0.2651, 0.9385 }, + { -0.1924, -0.1586, 0.9632 }, + { -0.2107, -0.0162, 0.9751 }, + { -0.2109, -0.0002, 0.9758 }, + { -0.2262, -0.0647, 0.9709 }, + { -0.2218, -0.1881, 0.9517 }, + { -0.2135, -0.3337, 0.9159 }, + { -0.1826, -0.3639, 0.9129 }, + { -0.1712, -0.3121, 0.9340 }, + { -0.1607, -0.1596, 0.9650 }, + { -0.1472, 0.0487, 0.9833 }, + { -0.1313, 0.1145, 0.9846 }, + { 0.0000, 0.0668, 0.9966 }, + { -0.0332, 0.0336, 0.9966 }, + { 0.0000, -0.0166, 0.9997 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, -0.1133, 0.9870 }, + { -0.1770, -0.1602, 0.9678 }, + { -0.1153, -0.0986, 0.9883 }, + { -0.0990, -0.0994, 0.9901 }, + { -0.0824, -0.1158, 0.9896 }, + { -0.0825, -0.0987, 0.9910 }, + { -0.0993, -0.0660, 0.9929 }, + { -0.1317, -0.0821, 0.9878 }, + { -0.1636, -0.0985, 0.9816 }, + { -0.1781, -0.1457, 0.9719 }, + { -0.1918, -0.2072, 0.9592 }, + { -0.2056, -0.2367, 0.9493 }, + { -0.2042, -0.2513, 0.9450 }, + { -0.2013, -0.2958, 0.9315 }, + { -0.2252, -0.3622, 0.9031 }, + { -0.2242, -0.3735, 0.8990 }, + { -0.2255, -0.3607, 0.9040 }, + { -0.2413, -0.3463, 0.9060 }, + { -0.2581, -0.3201, 0.9114 }, + { -0.2759, -0.2770, 0.9199 }, + { -0.2928, -0.2310, 0.9267 }, + { -0.2951, -0.1553, 0.9378 }, + { -0.3002, -0.0315, 0.9502 }, + { -0.3008, -0.0002, 0.9521 }, + { -0.2862, -0.0636, 0.9550 }, + { -0.2665, -0.1861, 0.9411 }, + { -0.2306, -0.3065, 0.9229 }, + { -0.1855, -0.3238, 0.9277 }, + { -0.1575, -0.2843, 0.9453 }, + { -0.1299, -0.1290, 0.9744 }, + { -0.1155, 0.0493, 0.9907 }, + { -0.1476, 0.0981, 0.9840 }, + { 0.0663, -0.0163, 0.9959 }, + { 0.0166, 0.0168, 0.9983 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { -0.1536, -0.1678, 0.9461 }, + { -0.1121, -0.2200, 0.9609 }, + { -0.1317, -0.0821, 0.9878 }, + { -0.1314, -0.0827, 0.9872 }, + { -0.1313, -0.0990, 0.9859 }, + { -0.1306, -0.0982, 0.9844 }, + { -0.1470, -0.0981, 0.9831 }, + { -0.1785, -0.1135, 0.9761 }, + { -0.1787, -0.1305, 0.9751 }, + { -0.2088, -0.1609, 0.9640 }, + { -0.1918, -0.2072, 0.9592 }, + { -0.1600, -0.2236, 0.9609 }, + { -0.1121, -0.2401, 0.9629 }, + { -0.1094, -0.3137, 0.9400 }, + { -0.1061, -0.3824, 0.9146 }, + { -0.1062, -0.3804, 0.9155 }, + { -0.1215, -0.3801, 0.9148 }, + { -0.1513, -0.3785, 0.9110 }, + { -0.1825, -0.3523, 0.9159 }, + { -0.2288, -0.3223, 0.9173 }, + { -0.3037, -0.2726, 0.9120 }, + { -0.3383, -0.1522, 0.9237 }, + { -0.3438, -0.0156, 0.9378 }, + { -0.3301, 0.0157, 0.9436 }, + { -0.3159, -0.0315, 0.9478 }, + { -0.2836, -0.1406, 0.9454 }, + { -0.2336, -0.2636, 0.9347 }, + { -0.2022, -0.2948, 0.9337 }, + { -0.1742, -0.2541, 0.9508 }, + { -0.1463, -0.1135, 0.9759 }, + { -0.1639, 0.0327, 0.9849 }, + { -0.1796, 0.0814, 0.9801 }, + { 0.1316, -0.0492, 0.9883 }, + { 0.0829, -0.0331, 0.9953 }, + { 0.0822, -0.0329, 0.9921 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { 0.0000, 0.0000, 1.0000 }, + { -0.0957, -0.1564, 0.9654 }, + { -0.1537, -0.2183, 0.9466 }, + { -0.0658, -0.1315, 0.9886 }, + { -0.0986, -0.1149, 0.9878 }, + { -0.1636, -0.0985, 0.9816 }, + { -0.1945, -0.1139, 0.9736 }, + { -0.2402, -0.1120, 0.9630 }, + { -0.2546, -0.1115, 0.9585 }, + { -0.2556, -0.1116, 0.9597 }, + { -0.2539, -0.1281, 0.9562 }, + { -0.2540, -0.1595, 0.9535 }, + { -0.1935, -0.1609, 0.9678 }, + { -0.1304, -0.1626, 0.9780 }, + { -0.0649, -0.2101, 0.9744 }, + { -0.0158, -0.3019, 0.9509 }, + { 0.0154, -0.3716, 0.9267 }, + { 0.0153, -0.3963, 0.9169 }, + { 0.0000, -0.4086, 0.9106 }, + { 0.0001, -0.4077, 0.9085 }, + { -0.0453, -0.3974, 0.9134 }, + { -0.0901, -0.3957, 0.9095 }, + { -0.1509, -0.3353, 0.9202 }, + { -0.2192, -0.1875, 0.9485 }, + { -0.2373, -0.0159, 0.9619 }, + { -0.2558, 0.0320, 0.9637 }, + { -0.2560, -0.0160, 0.9644 }, + { -0.2548, -0.1106, 0.9569 }, + { -0.2354, -0.2344, 0.9420 }, + { -0.2190, -0.2653, 0.9389 }, + { -0.1910, -0.2234, 0.9554 }, + { -0.1939, -0.1134, 0.9705 }, + { -0.2114, 0.0162, 0.9759 }, + { -0.2264, 0.0646, 0.9714 }, + { 0.1316, -0.0825, 0.9872 }, + { 0.1158, -0.0334, 0.9920 }, + { 0.1312, -0.0812, 0.9841 }, + { 0.0975, -0.0812, 0.9837 }, + { 0.0661, 0.0000, 0.9956 }, + { 0.0165, -0.0990, 0.9898 }, + { -0.0640, -0.1632, 0.9753 }, + { 0.0165, -0.1479, 0.9886 }, + { 0.0000, -0.1639, 0.9859 }, + { -0.0327, -0.1796, 0.9825 }, + { -0.1137, -0.1795, 0.9759 }, + { -0.1769, -0.1778, 0.9667 }, + { -0.2387, -0.1588, 0.9564 }, + { -0.2702, -0.1111, 0.9551 }, + { -0.2857, -0.1107, 0.9518 }, + { -0.3139, -0.1260, 0.9411 }, + { -0.3004, -0.0953, 0.9484 }, + { -0.2411, -0.0803, 0.9659 }, + { -0.1635, -0.0979, 0.9812 }, + { -0.0823, -0.1312, 0.9873 }, + { 0.0161, -0.2415, 0.9668 }, + { 0.0466, -0.3575, 0.9317 }, + { 0.0763, -0.3955, 0.9152 }, + { 0.0913, -0.3949, 0.9137 }, + { 0.1199, -0.4183, 0.8995 }, + { 0.1036, -0.4329, 0.8924 }, + { 0.0747, -0.4219, 0.9005 }, + { 0.0603, -0.3939, 0.9122 }, + { 0.0000, -0.2331, 0.9541 }, + { -0.0328, -0.0494, 0.9921 }, + { -0.0981, 0.0000, 0.9903 }, + { -0.1313, -0.0328, 0.9881 }, + { -0.1779, -0.1288, 0.9723 }, + { -0.1902, -0.2366, 0.9512 }, + { -0.2049, -0.2512, 0.9454 }, + { -0.2214, -0.2223, 0.9490 }, + { -0.2395, -0.1276, 0.9575 }, + { -0.2718, 0.0000, 0.9607 }, + { -0.2870, 0.0318, 0.9569 }, + { 0.0988, -0.0661, 0.9921 }, + { 0.0994, -0.0333, 0.9939 }, + { 0.0911, -0.0496, 0.9944 }, + { 0.1475, -0.0655, 0.9857 }, + { 0.1072, -0.0823, 0.9903 }, + { 0.0653, -0.1322, 0.9877 }, + { 0.0985, -0.1641, 0.9810 }, + { 0.0816, -0.1632, 0.9820 }, + { 0.0572, -0.1794, 0.9816 }, + { 0.0322, -0.2260, 0.9723 }, + { -0.0090, -0.2429, 0.9683 }, + { -0.0554, -0.2422, 0.9657 }, + { -0.1204, -0.2084, 0.9662 }, + { -0.1933, -0.1608, 0.9674 }, + { -0.2691, -0.1579, 0.9500 }, + { -0.3063, -0.1416, 0.9411 }, + { -0.3069, -0.0797, 0.9466 }, + { -0.2798, -0.0160, 0.9597 }, + { -0.2417, 0.0000, 0.9692 }, + { -0.1929, -0.0325, 0.9752 }, + { -0.1321, -0.1761, 0.9566 }, + { -0.0613, -0.3148, 0.9419 }, + { 0.0077, -0.3557, 0.9305 }, + { 0.0615, -0.3692, 0.9253 }, + { 0.0907, -0.3938, 0.9120 }, + { 0.1393, -0.4319, 0.8901 }, + { 0.1710, -0.4299, 0.8860 }, + { 0.2001, -0.4005, 0.8926 }, + { 0.2097, -0.2705, 0.9252 }, + { 0.1062, -0.1142, 0.9852 }, + { -0.0168, -0.0668, 0.9975 }, + { -0.0985, -0.0990, 0.9889 }, + { -0.1688, -0.1767, 0.9671 }, + { -0.1958, -0.2657, 0.9415 }, + { -0.2095, -0.2943, 0.9320 }, + { -0.2501, -0.2499, 0.9347 }, + { -0.2527, -0.1594, 0.9511 }, + { -0.3003, -0.0320, 0.9501 }, + { -0.3434, -0.0002, 0.9380 }, + { 0.0331, -0.0334, 0.9983 }, + { 0.0332, -0.0332, 0.9983 }, + { 0.0414, -0.0497, 0.9968 }, + { 0.0743, -0.0825, 0.9928 }, + { 0.0909, -0.1158, 0.9886 }, + { 0.1221, -0.1476, 0.9813 }, + { 0.1620, -0.1617, 0.9729 }, + { 0.2068, -0.1908, 0.9577 }, + { 0.1823, -0.2376, 0.9531 }, + { 0.1357, -0.2709, 0.9525 }, + { 0.1027, -0.2720, 0.9563 }, + { 0.0560, -0.2714, 0.9606 }, + { -0.0001, -0.2566, 0.9658 }, + { -0.1045, -0.2405, 0.9645 }, + { -0.1904, -0.2234, 0.9552 }, + { -0.3126, -0.1261, 0.9383 }, + { -0.3562, -0.0007, 0.9314 }, + { -0.3690, 0.0306, 0.9264 }, + { -0.3598, -0.0155, 0.9280 }, + { -0.3370, -0.1083, 0.9200 }, + { -0.3128, -0.2418, 0.9067 }, + { -0.2683, -0.3017, 0.9074 }, + { -0.2271, -0.3055, 0.9188 }, + { -0.1652, -0.3350, 0.9169 }, + { -0.0818, -0.3826, 0.9146 }, + { -0.0090, -0.3853, 0.9210 }, + { 0.0851, -0.3556, 0.9303 }, + { 0.1563, -0.2810, 0.9435 }, + { 0.1760, -0.1919, 0.9636 }, + { 0.1210, -0.1789, 0.9721 }, + { 0.0155, -0.1962, 0.9771 }, + { -0.0720, -0.2394, 0.9625 }, + { -0.1398, -0.3110, 0.9362 }, + { -0.1843, -0.3374, 0.9226 }, + { -0.2234, -0.2943, 0.9277 }, + { -0.2956, -0.1877, 0.9334 }, + { -0.3137, -0.0632, 0.9439 }, + { -0.3089, -0.0158, 0.9507 }, + { -0.3368, -0.0469, 0.9402 }, + { -0.0166, -0.0334, 0.9992 }, + { -0.0166, -0.0332, 0.9992 }, + { -0.0166, -0.0332, 0.9992 }, + { -0.0165, -0.0497, 0.9972 }, + { 0.0332, -0.0667, 0.9967 }, + { 0.0825, -0.0828, 0.9918 }, + { 0.1634, -0.0979, 0.9812 }, + { 0.2072, -0.1741, 0.9583 }, + { 0.1878, -0.2810, 0.9401 }, + { 0.1408, -0.3142, 0.9387 }, + { 0.1099, -0.3154, 0.9424 }, + { 0.0471, -0.3291, 0.9429 }, + { -0.0156, -0.3434, 0.9389 }, + { -0.1094, -0.3275, 0.9383 }, + { -0.1863, -0.3118, 0.9317 }, + { -0.2794, -0.2010, 0.9322 }, + { -0.3434, -0.0622, 0.9366 }, + { -0.4100, -0.0303, 0.9115 }, + { -0.4467, -0.0445, 0.8935 }, + { -0.4787, -0.1021, 0.8708 }, + { -0.4502, -0.1890, 0.8716 }, + { -0.3862, -0.2371, 0.8914 }, + { -0.3190, -0.2576, 0.9118 }, + { -0.2622, -0.2621, 0.9275 }, + { -0.1888, -0.2687, 0.9444 }, + { -0.1111, -0.2716, 0.9547 }, + { -0.0474, -0.2401, 0.9630 }, + { 0.0001, -0.2520, 0.9485 }, + { -0.0154, -0.2690, 0.9522 }, + { -0.0783, -0.2711, 0.9528 }, + { -0.1408, -0.2846, 0.9450 }, + { -0.1861, -0.3094, 0.9316 }, + { -0.2140, -0.3355, 0.9174 }, + { -0.1993, -0.3365, 0.9202 }, + { -0.2002, -0.3246, 0.9242 }, + { -0.2194, -0.2197, 0.9439 }, + { -0.2562, -0.0797, 0.9616 }, + { -0.3014, -0.0475, 0.9521 }, + { -0.3435, -0.0623, 0.9371 }, +}; + +static float texcoord[][2] = { +#ifdef _ORIGINAL_ /* [ */ + { 0.1121, 0.0171 }, + { 0.1094, 0.0411 }, + { 0.1066, 0.0654 }, + { 0.1038, 0.0898 }, + { 0.1010, 0.1141 }, + { 0.0982, 0.1384 }, + { 0.0954, 0.1624 }, + { 0.0926, 0.1868 }, + { 0.0898, 0.2111 }, + { 0.0870, 0.2354 }, + { 0.0842, 0.2598 }, + { 0.0815, 0.2838 }, + { 0.0787, 0.3081 }, + { 0.0759, 0.3325 }, + { 0.0731, 0.3568 }, + { 0.0703, 0.3811 }, + { 0.0675, 0.4052 }, + { 0.0647, 0.4295 }, + { 0.0619, 0.4538 }, + { 0.0591, 0.4782 }, + { 0.0564, 0.5025 }, + { 0.0536, 0.5265 }, + { 0.0508, 0.5508 }, + { 0.0480, 0.5752 }, + { 0.0452, 0.5995 }, + { 0.0424, 0.6239 }, + { 0.0397, 0.6479 }, + { 0.0369, 0.6722 }, + { 0.0341, 0.6965 }, + { 0.0313, 0.7209 }, + { 0.0285, 0.7452 }, + { 0.0257, 0.7692 }, + { 0.0229, 0.7936 }, + { 0.0201, 0.8179 }, + { 0.0173, 0.8422 }, + { 0.0145, 0.8666 }, + { 0.0118, 0.8906 }, + { 0.0090, 0.9149 }, + { 0.0062, 0.9393 }, + { 0.1364, 0.0199 }, + { 0.1336, 0.0439 }, + { 0.1309, 0.0682 }, + { 0.1281, 0.0925 }, + { 0.1253, 0.1169 }, + { 0.1225, 0.1412 }, + { 0.1197, 0.1652 }, + { 0.1169, 0.1896 }, + { 0.1141, 0.2139 }, + { 0.1113, 0.2382 }, + { 0.1085, 0.2626 }, + { 0.1058, 0.2866 }, + { 0.1030, 0.3109 }, + { 0.1002, 0.3353 }, + { 0.0974, 0.3596 }, + { 0.0946, 0.3839 }, + { 0.0918, 0.4079 }, + { 0.0890, 0.4323 }, + { 0.0862, 0.4566 }, + { 0.0834, 0.4810 }, + { 0.0806, 0.5053 }, + { 0.0779, 0.5293 }, + { 0.0751, 0.5536 }, + { 0.0723, 0.5780 }, + { 0.0695, 0.6023 }, + { 0.0667, 0.6266 }, + { 0.0640, 0.6507 }, + { 0.0612, 0.6750 }, + { 0.0584, 0.6993 }, + { 0.0556, 0.7237 }, + { 0.0528, 0.7480 }, + { 0.0500, 0.7720 }, + { 0.0472, 0.7964 }, + { 0.0444, 0.8207 }, + { 0.0416, 0.8450 }, + { 0.0388, 0.8694 }, + { 0.0361, 0.8934 }, + { 0.0333, 0.9177 }, + { 0.0305, 0.9420 }, + { 0.1607, 0.0226 }, + { 0.1579, 0.0467 }, + { 0.1551, 0.0710 }, + { 0.1523, 0.0953 }, + { 0.1495, 0.1197 }, + { 0.1467, 0.1440 }, + { 0.1440, 0.1680 }, + { 0.1412, 0.1924 }, + { 0.1384, 0.2167 }, + { 0.1356, 0.2410 }, + { 0.1328, 0.2654 }, + { 0.1300, 0.2894 }, + { 0.1272, 0.3137 }, + { 0.1244, 0.3380 }, + { 0.1216, 0.3624 }, + { 0.1188, 0.3867 }, + { 0.1161, 0.4107 }, + { 0.1133, 0.4351 }, + { 0.1105, 0.4594 }, + { 0.1077, 0.4837 }, + { 0.1049, 0.5081 }, + { 0.1021, 0.5321 }, + { 0.0994, 0.5564 }, + { 0.0966, 0.5808 }, + { 0.0938, 0.6051 }, + { 0.0910, 0.6294 }, + { 0.0882, 0.6534 }, + { 0.0854, 0.6778 }, + { 0.0826, 0.7021 }, + { 0.0798, 0.7265 }, + { 0.0770, 0.7508 }, + { 0.0743, 0.7748 }, + { 0.0715, 0.7991 }, + { 0.0687, 0.8235 }, + { 0.0659, 0.8478 }, + { 0.0631, 0.8721 }, + { 0.0603, 0.8962 }, + { 0.0575, 0.9205 }, + { 0.0547, 0.9448 }, + { 0.1850, 0.0254 }, + { 0.1822, 0.0495 }, + { 0.1794, 0.0738 }, + { 0.1766, 0.0981 }, + { 0.1738, 0.1225 }, + { 0.1710, 0.1468 }, + { 0.1683, 0.1708 }, + { 0.1655, 0.1951 }, + { 0.1627, 0.2195 }, + { 0.1599, 0.2438 }, + { 0.1571, 0.2681 }, + { 0.1543, 0.2922 }, + { 0.1515, 0.3165 }, + { 0.1487, 0.3408 }, + { 0.1459, 0.3652 }, + { 0.1431, 0.3895 }, + { 0.1404, 0.4135 }, + { 0.1376, 0.4379 }, + { 0.1348, 0.4622 }, + { 0.1320, 0.4865 }, + { 0.1292, 0.5109 }, + { 0.1264, 0.5349 }, + { 0.1236, 0.5592 }, + { 0.1209, 0.5835 }, + { 0.1181, 0.6079 }, + { 0.1153, 0.6322 }, + { 0.1125, 0.6562 }, + { 0.1097, 0.6806 }, + { 0.1069, 0.7049 }, + { 0.1041, 0.7292 }, + { 0.1013, 0.7536 }, + { 0.0986, 0.7776 }, + { 0.0958, 0.8019 }, + { 0.0930, 0.8263 }, + { 0.0902, 0.8506 }, + { 0.0874, 0.8749 }, + { 0.0846, 0.8990 }, + { 0.0818, 0.9233 }, + { 0.0790, 0.9476 }, + { 0.2092, 0.0282 }, + { 0.2065, 0.0522 }, + { 0.2037, 0.0766 }, + { 0.2009, 0.1009 }, + { 0.1981, 0.1252 }, + { 0.1953, 0.1496 }, + { 0.1925, 0.1736 }, + { 0.1897, 0.1979 }, + { 0.1869, 0.2223 }, + { 0.1841, 0.2466 }, + { 0.1813, 0.2709 }, + { 0.1786, 0.2950 }, + { 0.1758, 0.3193 }, + { 0.1730, 0.3436 }, + { 0.1702, 0.3680 }, + { 0.1674, 0.3923 }, + { 0.1646, 0.4163 }, + { 0.1618, 0.4406 }, + { 0.1590, 0.4650 }, + { 0.1563, 0.4893 }, + { 0.1535, 0.5136 }, + { 0.1507, 0.5377 }, + { 0.1479, 0.5620 }, + { 0.1451, 0.5863 }, + { 0.1423, 0.6107 }, + { 0.1395, 0.6350 }, + { 0.1368, 0.6590 }, + { 0.1340, 0.6834 }, + { 0.1312, 0.7077 }, + { 0.1284, 0.7320 }, + { 0.1256, 0.7564 }, + { 0.1228, 0.7804 }, + { 0.1200, 0.8047 }, + { 0.1172, 0.8290 }, + { 0.1144, 0.8534 }, + { 0.1116, 0.8777 }, + { 0.1089, 0.9017 }, + { 0.1061, 0.9261 }, + { 0.1033, 0.9504 }, + { 0.2335, 0.0310 }, + { 0.2307, 0.0550 }, + { 0.2279, 0.0794 }, + { 0.2251, 0.1037 }, + { 0.2223, 0.1280 }, + { 0.2195, 0.1524 }, + { 0.2168, 0.1764 }, + { 0.2140, 0.2007 }, + { 0.2112, 0.2251 }, + { 0.2084, 0.2494 }, + { 0.2056, 0.2737 }, + { 0.2028, 0.2977 }, + { 0.2000, 0.3221 }, + { 0.1972, 0.3464 }, + { 0.1944, 0.3707 }, + { 0.1916, 0.3951 }, + { 0.1889, 0.4191 }, + { 0.1861, 0.4434 }, + { 0.1833, 0.4678 }, + { 0.1805, 0.4921 }, + { 0.1777, 0.5164 }, + { 0.1750, 0.5405 }, + { 0.1722, 0.5648 }, + { 0.1694, 0.5891 }, + { 0.1666, 0.6135 }, + { 0.1638, 0.6378 }, + { 0.1610, 0.6618 }, + { 0.1582, 0.6861 }, + { 0.1554, 0.7105 }, + { 0.1526, 0.7348 }, + { 0.1498, 0.7591 }, + { 0.1471, 0.7832 }, + { 0.1443, 0.8075 }, + { 0.1415, 0.8318 }, + { 0.1387, 0.8562 }, + { 0.1359, 0.8805 }, + { 0.1331, 0.9045 }, + { 0.1303, 0.9289 }, + { 0.1275, 0.9532 }, + { 0.2578, 0.0338 }, + { 0.2550, 0.0578 }, + { 0.2522, 0.0822 }, + { 0.2494, 0.1065 }, + { 0.2466, 0.1308 }, + { 0.2438, 0.1552 }, + { 0.2411, 0.1792 }, + { 0.2383, 0.2035 }, + { 0.2355, 0.2278 }, + { 0.2327, 0.2522 }, + { 0.2299, 0.2765 }, + { 0.2271, 0.3005 }, + { 0.2243, 0.3249 }, + { 0.2215, 0.3492 }, + { 0.2187, 0.3735 }, + { 0.2159, 0.3979 }, + { 0.2132, 0.4219 }, + { 0.2104, 0.4462 }, + { 0.2076, 0.4706 }, + { 0.2048, 0.4949 }, + { 0.2020, 0.5192 }, + { 0.1992, 0.5432 }, + { 0.1965, 0.5676 }, + { 0.1937, 0.5919 }, + { 0.1909, 0.6162 }, + { 0.1881, 0.6406 }, + { 0.1853, 0.6646 }, + { 0.1825, 0.6889 }, + { 0.1797, 0.7133 }, + { 0.1769, 0.7376 }, + { 0.1741, 0.7619 }, + { 0.1714, 0.7860 }, + { 0.1686, 0.8103 }, + { 0.1658, 0.8346 }, + { 0.1630, 0.8590 }, + { 0.1602, 0.8833 }, + { 0.1574, 0.9073 }, + { 0.1546, 0.9316 }, + { 0.1518, 0.9560 }, + { 0.2820, 0.0366 }, + { 0.2793, 0.0606 }, + { 0.2765, 0.0849 }, + { 0.2737, 0.1093 }, + { 0.2709, 0.1336 }, + { 0.2681, 0.1579 }, + { 0.2653, 0.1820 }, + { 0.2625, 0.2063 }, + { 0.2597, 0.2306 }, + { 0.2569, 0.2550 }, + { 0.2541, 0.2793 }, + { 0.2514, 0.3033 }, + { 0.2486, 0.3277 }, + { 0.2458, 0.3520 }, + { 0.2430, 0.3763 }, + { 0.2402, 0.4007 }, + { 0.2374, 0.4247 }, + { 0.2346, 0.4490 }, + { 0.2319, 0.4733 }, + { 0.2291, 0.4977 }, + { 0.2263, 0.5220 }, + { 0.2235, 0.5460 }, + { 0.2207, 0.5704 }, + { 0.2179, 0.5947 }, + { 0.2151, 0.6190 }, + { 0.2123, 0.6434 }, + { 0.2096, 0.6674 }, + { 0.2068, 0.6917 }, + { 0.2040, 0.7161 }, + { 0.2012, 0.7404 }, + { 0.1984, 0.7647 }, + { 0.1956, 0.7887 }, + { 0.1928, 0.8131 }, + { 0.1900, 0.8374 }, + { 0.1872, 0.8617 }, + { 0.1844, 0.8861 }, + { 0.1817, 0.9101 }, + { 0.1789, 0.9344 }, + { 0.1761, 0.9588 }, + { 0.3063, 0.0394 }, + { 0.3036, 0.0634 }, + { 0.3008, 0.0877 }, + { 0.2980, 0.1121 }, + { 0.2952, 0.1364 }, + { 0.2924, 0.1607 }, + { 0.2896, 0.1848 }, + { 0.2868, 0.2091 }, + { 0.2840, 0.2334 }, + { 0.2812, 0.2578 }, + { 0.2784, 0.2821 }, + { 0.2757, 0.3061 }, + { 0.2729, 0.3304 }, + { 0.2701, 0.3548 }, + { 0.2673, 0.3791 }, + { 0.2645, 0.4034 }, + { 0.2617, 0.4275 }, + { 0.2589, 0.4518 }, + { 0.2561, 0.4761 }, + { 0.2534, 0.5005 }, + { 0.2506, 0.5248 }, + { 0.2478, 0.5488 }, + { 0.2450, 0.5732 }, + { 0.2422, 0.5975 }, + { 0.2394, 0.6218 }, + { 0.2366, 0.6462 }, + { 0.2339, 0.6702 }, + { 0.2311, 0.6945 }, + { 0.2283, 0.7188 }, + { 0.2255, 0.7432 }, + { 0.2227, 0.7675 }, + { 0.2199, 0.7915 }, + { 0.2171, 0.8159 }, + { 0.2143, 0.8402 }, + { 0.2115, 0.8645 }, + { 0.2087, 0.8889 }, + { 0.2060, 0.9129 }, + { 0.2032, 0.9372 }, + { 0.2004, 0.9616 }, + { 0.3306, 0.0422 }, + { 0.3278, 0.0662 }, + { 0.3250, 0.0905 }, + { 0.3222, 0.1148 }, + { 0.3194, 0.1392 }, + { 0.3166, 0.1635 }, + { 0.3139, 0.1875 }, + { 0.3111, 0.2119 }, + { 0.3083, 0.2362 }, + { 0.3055, 0.2605 }, + { 0.3027, 0.2849 }, + { 0.2999, 0.3089 }, + { 0.2971, 0.3332 }, + { 0.2943, 0.3576 }, + { 0.2915, 0.3819 }, + { 0.2888, 0.4062 }, + { 0.2860, 0.4302 }, + { 0.2832, 0.4546 }, + { 0.2804, 0.4789 }, + { 0.2776, 0.5033 }, + { 0.2748, 0.5276 }, + { 0.2721, 0.5516 }, + { 0.2693, 0.5759 }, + { 0.2665, 0.6003 }, + { 0.2637, 0.6246 }, + { 0.2609, 0.6489 }, + { 0.2581, 0.6730 }, + { 0.2553, 0.6973 }, + { 0.2525, 0.7216 }, + { 0.2497, 0.7460 }, + { 0.2469, 0.7703 }, + { 0.2442, 0.7943 }, + { 0.2414, 0.8187 }, + { 0.2386, 0.8430 }, + { 0.2358, 0.8673 }, + { 0.2330, 0.8917 }, + { 0.2302, 0.9157 }, + { 0.2274, 0.9400 }, + { 0.2246, 0.9643 }, + { 0.3548, 0.0449 }, + { 0.3521, 0.0690 }, + { 0.3493, 0.0933 }, + { 0.3465, 0.1176 }, + { 0.3437, 0.1420 }, + { 0.3409, 0.1663 }, + { 0.3381, 0.1903 }, + { 0.3353, 0.2147 }, + { 0.3325, 0.2390 }, + { 0.3297, 0.2633 }, + { 0.3269, 0.2877 }, + { 0.3242, 0.3117 }, + { 0.3214, 0.3360 }, + { 0.3186, 0.3603 }, + { 0.3158, 0.3847 }, + { 0.3130, 0.4090 }, + { 0.3102, 0.4330 }, + { 0.3075, 0.4574 }, + { 0.3047, 0.4817 }, + { 0.3019, 0.5060 }, + { 0.2991, 0.5304 }, + { 0.2963, 0.5544 }, + { 0.2935, 0.5787 }, + { 0.2907, 0.6031 }, + { 0.2879, 0.6274 }, + { 0.2851, 0.6517 }, + { 0.2824, 0.6757 }, + { 0.2796, 0.7001 }, + { 0.2768, 0.7244 }, + { 0.2740, 0.7488 }, + { 0.2712, 0.7731 }, + { 0.2684, 0.7971 }, + { 0.2656, 0.8214 }, + { 0.2628, 0.8458 }, + { 0.2600, 0.8701 }, + { 0.2573, 0.8944 }, + { 0.2545, 0.9185 }, + { 0.2517, 0.9428 }, + { 0.2489, 0.9671 }, + { 0.3791, 0.0477 }, + { 0.3764, 0.0718 }, + { 0.3736, 0.0961 }, + { 0.3708, 0.1204 }, + { 0.3680, 0.1448 }, + { 0.3652, 0.1691 }, + { 0.3624, 0.1931 }, + { 0.3596, 0.2174 }, + { 0.3568, 0.2418 }, + { 0.3540, 0.2661 }, + { 0.3512, 0.2905 }, + { 0.3485, 0.3145 }, + { 0.3457, 0.3388 }, + { 0.3429, 0.3631 }, + { 0.3401, 0.3875 }, + { 0.3373, 0.4118 }, + { 0.3345, 0.4358 }, + { 0.3317, 0.4602 }, + { 0.3290, 0.4845 }, + { 0.3262, 0.5088 }, + { 0.3234, 0.5332 }, + { 0.3206, 0.5572 }, + { 0.3178, 0.5815 }, + { 0.3150, 0.6059 }, + { 0.3122, 0.6302 }, + { 0.3094, 0.6545 }, + { 0.3067, 0.6785 }, + { 0.3039, 0.7029 }, + { 0.3011, 0.7272 }, + { 0.2983, 0.7515 }, + { 0.2955, 0.7759 }, + { 0.2927, 0.7999 }, + { 0.2899, 0.8242 }, + { 0.2871, 0.8486 }, + { 0.2843, 0.8729 }, + { 0.2815, 0.8972 }, + { 0.2788, 0.9213 }, + { 0.2760, 0.9456 }, + { 0.2732, 0.9699 }, + { 0.4034, 0.0505 }, + { 0.4006, 0.0745 }, + { 0.3978, 0.0989 }, + { 0.3950, 0.1232 }, + { 0.3922, 0.1475 }, + { 0.3894, 0.1719 }, + { 0.3867, 0.1959 }, + { 0.3839, 0.2202 }, + { 0.3811, 0.2446 }, + { 0.3783, 0.2689 }, + { 0.3755, 0.2932 }, + { 0.3727, 0.3173 }, + { 0.3699, 0.3416 }, + { 0.3671, 0.3659 }, + { 0.3644, 0.3903 }, + { 0.3616, 0.4146 }, + { 0.3588, 0.4386 }, + { 0.3560, 0.4629 }, + { 0.3532, 0.4873 }, + { 0.3504, 0.5116 }, + { 0.3476, 0.5359 }, + { 0.3449, 0.5600 }, + { 0.3421, 0.5843 }, + { 0.3393, 0.6086 }, + { 0.3365, 0.6330 }, + { 0.3337, 0.6573 }, + { 0.3309, 0.6813 }, + { 0.3281, 0.7057 }, + { 0.3253, 0.7300 }, + { 0.3225, 0.7543 }, + { 0.3197, 0.7787 }, + { 0.3170, 0.8027 }, + { 0.3142, 0.8270 }, + { 0.3114, 0.8513 }, + { 0.3086, 0.8757 }, + { 0.3058, 0.9000 }, + { 0.3030, 0.9240 }, + { 0.3002, 0.9484 }, + { 0.2975, 0.9727 }, + { 0.4277, 0.0533 }, + { 0.4249, 0.0773 }, + { 0.4221, 0.1017 }, + { 0.4193, 0.1260 }, + { 0.4165, 0.1503 }, + { 0.4137, 0.1747 }, + { 0.4110, 0.1987 }, + { 0.4082, 0.2230 }, + { 0.4054, 0.2474 }, + { 0.4026, 0.2717 }, + { 0.3998, 0.2960 }, + { 0.3970, 0.3200 }, + { 0.3942, 0.3444 }, + { 0.3914, 0.3687 }, + { 0.3886, 0.3930 }, + { 0.3859, 0.4174 }, + { 0.3831, 0.4414 }, + { 0.3803, 0.4657 }, + { 0.3775, 0.4901 }, + { 0.3747, 0.5144 }, + { 0.3719, 0.5387 }, + { 0.3692, 0.5628 }, + { 0.3664, 0.5871 }, + { 0.3636, 0.6114 }, + { 0.3608, 0.6358 }, + { 0.3580, 0.6601 }, + { 0.3552, 0.6841 }, + { 0.3524, 0.7084 }, + { 0.3496, 0.7328 }, + { 0.3468, 0.7571 }, + { 0.3440, 0.7815 }, + { 0.3413, 0.8055 }, + { 0.3385, 0.8298 }, + { 0.3357, 0.8541 }, + { 0.3329, 0.8785 }, + { 0.3301, 0.9028 }, + { 0.3273, 0.9268 }, + { 0.3245, 0.9512 }, + { 0.3217, 0.9755 }, + { 0.4519, 0.0561 }, + { 0.4492, 0.0801 }, + { 0.4464, 0.1045 }, + { 0.4436, 0.1288 }, + { 0.4408, 0.1531 }, + { 0.4380, 0.1775 }, + { 0.4352, 0.2015 }, + { 0.4324, 0.2258 }, + { 0.4296, 0.2501 }, + { 0.4268, 0.2745 }, + { 0.4240, 0.2988 }, + { 0.4213, 0.3228 }, + { 0.4185, 0.3472 }, + { 0.4157, 0.3715 }, + { 0.4129, 0.3958 }, + { 0.4101, 0.4202 }, + { 0.4073, 0.4442 }, + { 0.4046, 0.4685 }, + { 0.4018, 0.4929 }, + { 0.3990, 0.5172 }, + { 0.3962, 0.5415 }, + { 0.3934, 0.5655 }, + { 0.3906, 0.5899 }, + { 0.3878, 0.6142 }, + { 0.3850, 0.6385 }, + { 0.3822, 0.6629 }, + { 0.3795, 0.6869 }, + { 0.3767, 0.7112 }, + { 0.3739, 0.7356 }, + { 0.3711, 0.7599 }, + { 0.3683, 0.7842 }, + { 0.3655, 0.8083 }, + { 0.3627, 0.8326 }, + { 0.3599, 0.8569 }, + { 0.3571, 0.8813 }, + { 0.3544, 0.9056 }, + { 0.3516, 0.9296 }, + { 0.3488, 0.9539 }, + { 0.3460, 0.9783 }, + { 0.4762, 0.0589 }, + { 0.4734, 0.0829 }, + { 0.4706, 0.1072 }, + { 0.4678, 0.1316 }, + { 0.4650, 0.1559 }, + { 0.4622, 0.1802 }, + { 0.4595, 0.2043 }, + { 0.4567, 0.2286 }, + { 0.4539, 0.2529 }, + { 0.4511, 0.2773 }, + { 0.4483, 0.3016 }, + { 0.4455, 0.3256 }, + { 0.4427, 0.3500 }, + { 0.4400, 0.3743 }, + { 0.4372, 0.3986 }, + { 0.4344, 0.4230 }, + { 0.4316, 0.4470 }, + { 0.4288, 0.4713 }, + { 0.4260, 0.4956 }, + { 0.4232, 0.5200 }, + { 0.4204, 0.5443 }, + { 0.4177, 0.5683 }, + { 0.4149, 0.5927 }, + { 0.4121, 0.6170 }, + { 0.4093, 0.6413 }, + { 0.4065, 0.6657 }, + { 0.4037, 0.6897 }, + { 0.4009, 0.7140 }, + { 0.3981, 0.7384 }, + { 0.3953, 0.7627 }, + { 0.3925, 0.7870 }, + { 0.3898, 0.8110 }, + { 0.3870, 0.8354 }, + { 0.3842, 0.8597 }, + { 0.3814, 0.8840 }, + { 0.3786, 0.9084 }, + { 0.3758, 0.9324 }, + { 0.3731, 0.9567 }, + { 0.3703, 0.9811 }, + { 0.5005, 0.0617 }, + { 0.4977, 0.0857 }, + { 0.4949, 0.1100 }, + { 0.4921, 0.1344 }, + { 0.4893, 0.1587 }, + { 0.4865, 0.1830 }, + { 0.4838, 0.2071 }, + { 0.4810, 0.2314 }, + { 0.4782, 0.2557 }, + { 0.4754, 0.2801 }, + { 0.4726, 0.3044 }, + { 0.4698, 0.3284 }, + { 0.4670, 0.3527 }, + { 0.4642, 0.3771 }, + { 0.4615, 0.4014 }, + { 0.4587, 0.4257 }, + { 0.4559, 0.4498 }, + { 0.4531, 0.4741 }, + { 0.4503, 0.4984 }, + { 0.4475, 0.5228 }, + { 0.4447, 0.5471 }, + { 0.4420, 0.5711 }, + { 0.4392, 0.5955 }, + { 0.4364, 0.6198 }, + { 0.4336, 0.6441 }, + { 0.4308, 0.6685 }, + { 0.4280, 0.6925 }, + { 0.4252, 0.7168 }, + { 0.4224, 0.7411 }, + { 0.4196, 0.7655 }, + { 0.4168, 0.7898 }, + { 0.4141, 0.8138 }, + { 0.4113, 0.8382 }, + { 0.4085, 0.8625 }, + { 0.4057, 0.8868 }, + { 0.4029, 0.9112 }, + { 0.4001, 0.9352 }, + { 0.3973, 0.9595 }, + { 0.3946, 0.9839 }, + { 0.5247, 0.0645 }, + { 0.5220, 0.0885 }, + { 0.5192, 0.1128 }, + { 0.5164, 0.1371 }, + { 0.5136, 0.1615 }, + { 0.5108, 0.1858 }, + { 0.5080, 0.2098 }, + { 0.5052, 0.2342 }, + { 0.5024, 0.2585 }, + { 0.4996, 0.2828 }, + { 0.4969, 0.3072 }, + { 0.4941, 0.3312 }, + { 0.4913, 0.3555 }, + { 0.4885, 0.3799 }, + { 0.4857, 0.4042 }, + { 0.4829, 0.4285 }, + { 0.4802, 0.4526 }, + { 0.4774, 0.4769 }, + { 0.4746, 0.5012 }, + { 0.4718, 0.5256 }, + { 0.4690, 0.5499 }, + { 0.4662, 0.5739 }, + { 0.4634, 0.5982 }, + { 0.4606, 0.6226 }, + { 0.4578, 0.6469 }, + { 0.4550, 0.6712 }, + { 0.4523, 0.6953 }, + { 0.4495, 0.7196 }, + { 0.4467, 0.7439 }, + { 0.4439, 0.7683 }, + { 0.4411, 0.7926 }, + { 0.4383, 0.8166 }, + { 0.4355, 0.8410 }, + { 0.4327, 0.8653 }, + { 0.4300, 0.8896 }, + { 0.4272, 0.9140 }, + { 0.4244, 0.9380 }, + { 0.4216, 0.9623 }, + { 0.4188, 0.9866 }, + { 0.5490, 0.0673 }, + { 0.5463, 0.0913 }, + { 0.5435, 0.1156 }, + { 0.5407, 0.1399 }, + { 0.5379, 0.1643 }, + { 0.5351, 0.1886 }, + { 0.5323, 0.2126 }, + { 0.5295, 0.2370 }, + { 0.5267, 0.2613 }, + { 0.5239, 0.2856 }, + { 0.5211, 0.3100 }, + { 0.5184, 0.3340 }, + { 0.5156, 0.3583 }, + { 0.5128, 0.3827 }, + { 0.5100, 0.4070 }, + { 0.5072, 0.4313 }, + { 0.5044, 0.4553 }, + { 0.5017, 0.4797 }, + { 0.4989, 0.5040 }, + { 0.4961, 0.5283 }, + { 0.4933, 0.5527 }, + { 0.4905, 0.5767 }, + { 0.4877, 0.6010 }, + { 0.4849, 0.6254 }, + { 0.4821, 0.6497 }, + { 0.4793, 0.6740 }, + { 0.4766, 0.6981 }, + { 0.4738, 0.7224 }, + { 0.4710, 0.7467 }, + { 0.4682, 0.7711 }, + { 0.4654, 0.7954 }, + { 0.4626, 0.8194 }, + { 0.4598, 0.8437 }, + { 0.4570, 0.8681 }, + { 0.4542, 0.8924 }, + { 0.4515, 0.9167 }, + { 0.4487, 0.9408 }, + { 0.4459, 0.9651 }, + { 0.4431, 0.9894 }, + { 0.5733, 0.0700 }, + { 0.5705, 0.0941 }, + { 0.5677, 0.1184 }, + { 0.5649, 0.1427 }, + { 0.5621, 0.1671 }, + { 0.5593, 0.1914 }, + { 0.5566, 0.2154 }, + { 0.5538, 0.2397 }, + { 0.5510, 0.2641 }, + { 0.5482, 0.2884 }, + { 0.5454, 0.3128 }, + { 0.5426, 0.3368 }, + { 0.5398, 0.3611 }, + { 0.5371, 0.3854 }, + { 0.5343, 0.4098 }, + { 0.5315, 0.4341 }, + { 0.5287, 0.4581 }, + { 0.5259, 0.4825 }, + { 0.5231, 0.5068 }, + { 0.5203, 0.5311 }, + { 0.5175, 0.5555 }, + { 0.5148, 0.5795 }, + { 0.5120, 0.6038 }, + { 0.5092, 0.6282 }, + { 0.5064, 0.6525 }, + { 0.5036, 0.6768 }, + { 0.5008, 0.7008 }, + { 0.4980, 0.7252 }, + { 0.4952, 0.7495 }, + { 0.4924, 0.7738 }, + { 0.4896, 0.7982 }, + { 0.4869, 0.8222 }, + { 0.4841, 0.8465 }, + { 0.4813, 0.8709 }, + { 0.4785, 0.8952 }, + { 0.4757, 0.9195 }, + { 0.4729, 0.9436 }, + { 0.4702, 0.9679 }, + { 0.4674, 0.9922 }, + { 0.5975, 0.0728 }, + { 0.5948, 0.0968 }, + { 0.5920, 0.1212 }, + { 0.5892, 0.1455 }, + { 0.5864, 0.1698 }, + { 0.5836, 0.1942 }, + { 0.5808, 0.2182 }, + { 0.5780, 0.2425 }, + { 0.5752, 0.2669 }, + { 0.5725, 0.2912 }, + { 0.5697, 0.3155 }, + { 0.5669, 0.3396 }, + { 0.5641, 0.3639 }, + { 0.5613, 0.3882 }, + { 0.5585, 0.4126 }, + { 0.5557, 0.4369 }, + { 0.5530, 0.4609 }, + { 0.5502, 0.4852 }, + { 0.5474, 0.5096 }, + { 0.5446, 0.5339 }, + { 0.5418, 0.5583 }, + { 0.5390, 0.5823 }, + { 0.5362, 0.6066 }, + { 0.5334, 0.6309 }, + { 0.5306, 0.6553 }, + { 0.5278, 0.6796 }, + { 0.5251, 0.7036 }, + { 0.5223, 0.7280 }, + { 0.5195, 0.7523 }, + { 0.5167, 0.7766 }, + { 0.5139, 0.8010 }, + { 0.5111, 0.8250 }, + { 0.5083, 0.8493 }, + { 0.5056, 0.8737 }, + { 0.5028, 0.8980 }, + { 0.5000, 0.9223 }, + { 0.4972, 0.9463 }, + { 0.4944, 0.9707 }, + { 0.4916, 0.9950 }, + { 0.6218, 0.0756 }, + { 0.6191, 0.0996 }, + { 0.6163, 0.1240 }, + { 0.6135, 0.1483 }, + { 0.6107, 0.1726 }, + { 0.6079, 0.1970 }, + { 0.6051, 0.2210 }, + { 0.6023, 0.2453 }, + { 0.5995, 0.2697 }, + { 0.5967, 0.2940 }, + { 0.5940, 0.3183 }, + { 0.5912, 0.3423 }, + { 0.5884, 0.3667 }, + { 0.5856, 0.3910 }, + { 0.5828, 0.4153 }, + { 0.5800, 0.4397 }, + { 0.5773, 0.4637 }, + { 0.5745, 0.4880 }, + { 0.5717, 0.5124 }, + { 0.5689, 0.5367 }, + { 0.5661, 0.5610 }, + { 0.5633, 0.5851 }, + { 0.5605, 0.6094 }, + { 0.5577, 0.6337 }, + { 0.5549, 0.6581 }, + { 0.5521, 0.6824 }, + { 0.5494, 0.7064 }, + { 0.5466, 0.7308 }, + { 0.5438, 0.7551 }, + { 0.5410, 0.7794 }, + { 0.5382, 0.8038 }, + { 0.5354, 0.8278 }, + { 0.5326, 0.8521 }, + { 0.5298, 0.8764 }, + { 0.5271, 0.9008 }, + { 0.5243, 0.9251 }, + { 0.5215, 0.9491 }, + { 0.5187, 0.9735 }, + { 0.5159, 0.9978 }, + { 0.6461, 0.0784 }, + { 0.6433, 0.1024 }, + { 0.6405, 0.1268 }, + { 0.6377, 0.1511 }, + { 0.6349, 0.1754 }, + { 0.6321, 0.1998 }, + { 0.6294, 0.2238 }, + { 0.6266, 0.2481 }, + { 0.6238, 0.2724 }, + { 0.6210, 0.2968 }, + { 0.6182, 0.3211 }, + { 0.6154, 0.3451 }, + { 0.6127, 0.3695 }, + { 0.6099, 0.3938 }, + { 0.6071, 0.4181 }, + { 0.6043, 0.4425 }, + { 0.6015, 0.4665 }, + { 0.5987, 0.4908 }, + { 0.5959, 0.5152 }, + { 0.5931, 0.5395 }, + { 0.5903, 0.5638 }, + { 0.5876, 0.5878 }, + { 0.5848, 0.6122 }, + { 0.5820, 0.6365 }, + { 0.5792, 0.6608 }, + { 0.5764, 0.6852 }, + { 0.5736, 0.7092 }, + { 0.5708, 0.7335 }, + { 0.5680, 0.7579 }, + { 0.5652, 0.7822 }, + { 0.5625, 0.8065 }, + { 0.5597, 0.8306 }, + { 0.5569, 0.8549 }, + { 0.5541, 0.8792 }, + { 0.5513, 0.9036 }, + { 0.5485, 0.9279 }, + { 0.5458, 0.9519 }, + { 0.5430, 0.9762 }, + { 0.5402, 1.0006 }, + { 0.6704, 0.0812 }, + { 0.6676, 0.1052 }, + { 0.6648, 0.1295 }, + { 0.6620, 0.1539 }, + { 0.6592, 0.1782 }, + { 0.6564, 0.2025 }, + { 0.6537, 0.2266 }, + { 0.6509, 0.2509 }, + { 0.6481, 0.2752 }, + { 0.6453, 0.2996 }, + { 0.6425, 0.3239 }, + { 0.6397, 0.3479 }, + { 0.6369, 0.3723 }, + { 0.6342, 0.3966 }, + { 0.6314, 0.4209 }, + { 0.6286, 0.4453 }, + { 0.6258, 0.4693 }, + { 0.6230, 0.4936 }, + { 0.6202, 0.5179 }, + { 0.6174, 0.5423 }, + { 0.6146, 0.5666 }, + { 0.6119, 0.5906 }, + { 0.6091, 0.6150 }, + { 0.6063, 0.6393 }, + { 0.6035, 0.6636 }, + { 0.6007, 0.6880 }, + { 0.5979, 0.7120 }, + { 0.5951, 0.7363 }, + { 0.5923, 0.7607 }, + { 0.5895, 0.7850 }, + { 0.5867, 0.8093 }, + { 0.5840, 0.8333 }, + { 0.5812, 0.8577 }, + { 0.5784, 0.8820 }, + { 0.5756, 0.9064 }, + { 0.5728, 0.9307 }, + { 0.5701, 0.9547 }, + { 0.5673, 0.9790 }, + { 0.5645, 1.0034 }, + { 0.6946, 0.0840 }, + { 0.6919, 0.1080 }, + { 0.6891, 0.1323 }, + { 0.6863, 0.1567 }, + { 0.6835, 0.1810 }, + { 0.6807, 0.2053 }, + { 0.6779, 0.2294 }, + { 0.6751, 0.2537 }, + { 0.6723, 0.2780 }, + { 0.6696, 0.3024 }, + { 0.6668, 0.3267 }, + { 0.6640, 0.3507 }, + { 0.6612, 0.3750 }, + { 0.6584, 0.3994 }, + { 0.6556, 0.4237 }, + { 0.6528, 0.4480 }, + { 0.6501, 0.4721 }, + { 0.6473, 0.4964 }, + { 0.6445, 0.5207 }, + { 0.6417, 0.5451 }, + { 0.6389, 0.5694 }, + { 0.6361, 0.5934 }, + { 0.6333, 0.6178 }, + { 0.6305, 0.6421 }, + { 0.6277, 0.6664 }, + { 0.6249, 0.6908 }, + { 0.6222, 0.7148 }, + { 0.6194, 0.7391 }, + { 0.6166, 0.7634 }, + { 0.6138, 0.7878 }, + { 0.6110, 0.8121 }, + { 0.6082, 0.8361 }, + { 0.6055, 0.8605 }, + { 0.6027, 0.8848 }, + { 0.5999, 0.9091 }, + { 0.5971, 0.9335 }, + { 0.5943, 0.9575 }, + { 0.5915, 0.9818 }, + { 0.5887, 1.0062 }, + { 0.7189, 0.0868 }, + { 0.7161, 0.1108 }, + { 0.7133, 0.1351 }, + { 0.7105, 0.1595 }, + { 0.7077, 0.1838 }, + { 0.7050, 0.2081 }, + { 0.7022, 0.2321 }, + { 0.6994, 0.2565 }, + { 0.6966, 0.2808 }, + { 0.6938, 0.3051 }, + { 0.6910, 0.3295 }, + { 0.6883, 0.3535 }, + { 0.6855, 0.3778 }, + { 0.6827, 0.4022 }, + { 0.6799, 0.4265 }, + { 0.6771, 0.4508 }, + { 0.6743, 0.4749 }, + { 0.6715, 0.4992 }, + { 0.6687, 0.5235 }, + { 0.6659, 0.5479 }, + { 0.6631, 0.5722 }, + { 0.6604, 0.5962 }, + { 0.6576, 0.6205 }, + { 0.6548, 0.6449 }, + { 0.6520, 0.6692 }, + { 0.6492, 0.6935 }, + { 0.6464, 0.7176 }, + { 0.6436, 0.7419 }, + { 0.6408, 0.7662 }, + { 0.6381, 0.7906 }, + { 0.6353, 0.8149 }, + { 0.6325, 0.8389 }, + { 0.6297, 0.8633 }, + { 0.6269, 0.8876 }, + { 0.6241, 0.9119 }, + { 0.6213, 0.9363 }, + { 0.6186, 0.9603 }, + { 0.6158, 0.9846 }, + { 0.6130, 1.0089 }, + { 0.7432, 0.0896 }, + { 0.7404, 0.1136 }, + { 0.7376, 0.1379 }, + { 0.7348, 0.1622 }, + { 0.7320, 0.1866 }, + { 0.7292, 0.2109 }, + { 0.7265, 0.2349 }, + { 0.7237, 0.2593 }, + { 0.7209, 0.2836 }, + { 0.7181, 0.3079 }, + { 0.7153, 0.3323 }, + { 0.7126, 0.3563 }, + { 0.7098, 0.3806 }, + { 0.7070, 0.4050 }, + { 0.7042, 0.4293 }, + { 0.7014, 0.4536 }, + { 0.6986, 0.4776 }, + { 0.6958, 0.5020 }, + { 0.6930, 0.5263 }, + { 0.6902, 0.5506 }, + { 0.6874, 0.5750 }, + { 0.6847, 0.5990 }, + { 0.6819, 0.6233 }, + { 0.6791, 0.6477 }, + { 0.6763, 0.6720 }, + { 0.6735, 0.6963 }, + { 0.6707, 0.7204 }, + { 0.6679, 0.7447 }, + { 0.6651, 0.7690 }, + { 0.6623, 0.7934 }, + { 0.6596, 0.8177 }, + { 0.6568, 0.8417 }, + { 0.6540, 0.8660 }, + { 0.6512, 0.8904 }, + { 0.6484, 0.9147 }, + { 0.6456, 0.9390 }, + { 0.6429, 0.9631 }, + { 0.6401, 0.9874 }, + { 0.6373, 1.0117 }, + { 0.7674, 0.0923 }, + { 0.7647, 0.1164 }, + { 0.7619, 0.1407 }, + { 0.7591, 0.1650 }, + { 0.7563, 0.1894 }, + { 0.7535, 0.2137 }, + { 0.7507, 0.2377 }, + { 0.7479, 0.2620 }, + { 0.7452, 0.2864 }, + { 0.7424, 0.3107 }, + { 0.7396, 0.3351 }, + { 0.7368, 0.3591 }, + { 0.7340, 0.3834 }, + { 0.7312, 0.4077 }, + { 0.7284, 0.4321 }, + { 0.7256, 0.4564 }, + { 0.7229, 0.4804 }, + { 0.7201, 0.5048 }, + { 0.7173, 0.5291 }, + { 0.7145, 0.5534 }, + { 0.7117, 0.5778 }, + { 0.7089, 0.6018 }, + { 0.7061, 0.6261 }, + { 0.7033, 0.6505 }, + { 0.7005, 0.6748 }, + { 0.6977, 0.6991 }, + { 0.6950, 0.7231 }, + { 0.6922, 0.7475 }, + { 0.6894, 0.7718 }, + { 0.6866, 0.7961 }, + { 0.6838, 0.8205 }, + { 0.6811, 0.8445 }, + { 0.6783, 0.8688 }, + { 0.6755, 0.8932 }, + { 0.6727, 0.9175 }, + { 0.6699, 0.9418 }, + { 0.6671, 0.9659 }, + { 0.6643, 0.9902 }, + { 0.6615, 1.0145 }, + { 0.7917, 0.0951 }, + { 0.7890, 0.1191 }, + { 0.7862, 0.1435 }, + { 0.7834, 0.1678 }, + { 0.7806, 0.1922 }, + { 0.7778, 0.2165 }, + { 0.7750, 0.2405 }, + { 0.7722, 0.2648 }, + { 0.7694, 0.2892 }, + { 0.7667, 0.3135 }, + { 0.7639, 0.3378 }, + { 0.7611, 0.3619 }, + { 0.7583, 0.3862 }, + { 0.7555, 0.4105 }, + { 0.7527, 0.4349 }, + { 0.7499, 0.4592 }, + { 0.7472, 0.4832 }, + { 0.7444, 0.5076 }, + { 0.7416, 0.5319 }, + { 0.7388, 0.5562 }, + { 0.7360, 0.5806 }, + { 0.7332, 0.6046 }, + { 0.7304, 0.6289 }, + { 0.7276, 0.6532 }, + { 0.7248, 0.6776 }, + { 0.7220, 0.7019 }, + { 0.7193, 0.7259 }, + { 0.7165, 0.7503 }, + { 0.7137, 0.7746 }, + { 0.7109, 0.7989 }, + { 0.7081, 0.8233 }, + { 0.7053, 0.8473 }, + { 0.7026, 0.8716 }, + { 0.6998, 0.8960 }, + { 0.6970, 0.9203 }, + { 0.6942, 0.9446 }, + { 0.6914, 0.9686 }, + { 0.6886, 0.9930 }, + { 0.6858, 1.0173 }, + { 0.8160, 0.0979 }, + { 0.8132, 0.1219 }, + { 0.8104, 0.1463 }, + { 0.8076, 0.1706 }, + { 0.8048, 0.1949 }, + { 0.8021, 0.2193 }, + { 0.7993, 0.2433 }, + { 0.7965, 0.2676 }, + { 0.7937, 0.2920 }, + { 0.7909, 0.3163 }, + { 0.7881, 0.3406 }, + { 0.7854, 0.3646 }, + { 0.7826, 0.3890 }, + { 0.7798, 0.4133 }, + { 0.7770, 0.4377 }, + { 0.7742, 0.4620 }, + { 0.7714, 0.4860 }, + { 0.7686, 0.5103 }, + { 0.7658, 0.5347 }, + { 0.7630, 0.5590 }, + { 0.7602, 0.5833 }, + { 0.7575, 0.6074 }, + { 0.7547, 0.6317 }, + { 0.7519, 0.6560 }, + { 0.7491, 0.6804 }, + { 0.7463, 0.7047 }, + { 0.7435, 0.7287 }, + { 0.7407, 0.7531 }, + { 0.7380, 0.7774 }, + { 0.7352, 0.8017 }, + { 0.7324, 0.8261 }, + { 0.7296, 0.8501 }, + { 0.7268, 0.8744 }, + { 0.7240, 0.8987 }, + { 0.7212, 0.9231 }, + { 0.7184, 0.9474 }, + { 0.7157, 0.9714 }, + { 0.7129, 0.9958 }, + { 0.7101, 1.0201 }, + { 0.8402, 0.1007 }, + { 0.8375, 0.1247 }, + { 0.8347, 0.1491 }, + { 0.8319, 0.1734 }, + { 0.8291, 0.1977 }, + { 0.8263, 0.2221 }, + { 0.8236, 0.2461 }, + { 0.8208, 0.2704 }, + { 0.8180, 0.2947 }, + { 0.8152, 0.3191 }, + { 0.8124, 0.3434 }, + { 0.8096, 0.3674 }, + { 0.8068, 0.3918 }, + { 0.8040, 0.4161 }, + { 0.8012, 0.4404 }, + { 0.7984, 0.4648 }, + { 0.7957, 0.4888 }, + { 0.7929, 0.5131 }, + { 0.7901, 0.5375 }, + { 0.7873, 0.5618 }, + { 0.7845, 0.5861 }, + { 0.7817, 0.6101 }, + { 0.7789, 0.6345 }, + { 0.7761, 0.6588 }, + { 0.7733, 0.6831 }, + { 0.7706, 0.7075 }, + { 0.7678, 0.7315 }, + { 0.7650, 0.7558 }, + { 0.7622, 0.7802 }, + { 0.7594, 0.8045 }, + { 0.7566, 0.8288 }, + { 0.7539, 0.8529 }, + { 0.7511, 0.8772 }, + { 0.7483, 0.9015 }, + { 0.7455, 0.9259 }, + { 0.7427, 0.9502 }, + { 0.7399, 0.9742 }, + { 0.7371, 0.9986 }, + { 0.7343, 1.0229 }, + { 0.8645, 0.1035 }, + { 0.8618, 0.1275 }, + { 0.8590, 0.1518 }, + { 0.8562, 0.1762 }, + { 0.8534, 0.2005 }, + { 0.8506, 0.2248 }, + { 0.8478, 0.2489 }, + { 0.8451, 0.2732 }, + { 0.8423, 0.2975 }, + { 0.8395, 0.3219 }, + { 0.8367, 0.3462 }, + { 0.8339, 0.3702 }, + { 0.8311, 0.3946 }, + { 0.8283, 0.4189 }, + { 0.8255, 0.4432 }, + { 0.8227, 0.4676 }, + { 0.8200, 0.4916 }, + { 0.8172, 0.5159 }, + { 0.8144, 0.5402 }, + { 0.8116, 0.5646 }, + { 0.8088, 0.5889 }, + { 0.8060, 0.6129 }, + { 0.8032, 0.6373 }, + { 0.8004, 0.6616 }, + { 0.7976, 0.6859 }, + { 0.7948, 0.7103 }, + { 0.7921, 0.7343 }, + { 0.7893, 0.7586 }, + { 0.7865, 0.7830 }, + { 0.7837, 0.8073 }, + { 0.7809, 0.8316 }, + { 0.7782, 0.8556 }, + { 0.7754, 0.8800 }, + { 0.7726, 0.9043 }, + { 0.7698, 0.9287 }, + { 0.7670, 0.9530 }, + { 0.7642, 0.9770 }, + { 0.7614, 1.0013 }, + { 0.7586, 1.0257 }, + { 0.8888, 0.1063 }, + { 0.8860, 0.1303 }, + { 0.8832, 0.1546 }, + { 0.8805, 0.1790 }, + { 0.8777, 0.2033 }, + { 0.8749, 0.2276 }, + { 0.8721, 0.2517 }, + { 0.8693, 0.2760 }, + { 0.8665, 0.3003 }, + { 0.8637, 0.3247 }, + { 0.8609, 0.3490 }, + { 0.8582, 0.3730 }, + { 0.8554, 0.3973 }, + { 0.8526, 0.4217 }, + { 0.8498, 0.4460 }, + { 0.8470, 0.4703 }, + { 0.8442, 0.4944 }, + { 0.8414, 0.5187 }, + { 0.8386, 0.5430 }, + { 0.8358, 0.5674 }, + { 0.8330, 0.5917 }, + { 0.8303, 0.6157 }, + { 0.8275, 0.6401 }, + { 0.8247, 0.6644 }, + { 0.8219, 0.6887 }, + { 0.8191, 0.7131 }, + { 0.8163, 0.7371 }, + { 0.8136, 0.7614 }, + { 0.8108, 0.7857 }, + { 0.8080, 0.8101 }, + { 0.8052, 0.8344 }, + { 0.8024, 0.8584 }, + { 0.7996, 0.8828 }, + { 0.7968, 0.9071 }, + { 0.7940, 0.9314 }, + { 0.7912, 0.9558 }, + { 0.7885, 0.9798 }, + { 0.7857, 1.0041 }, + { 0.7829, 1.0285 }, + { 0.9131, 0.1091 }, + { 0.9103, 0.1331 }, + { 0.9075, 0.1574 }, + { 0.9047, 0.1818 }, + { 0.9020, 0.2061 }, + { 0.8992, 0.2304 }, + { 0.8964, 0.2544 }, + { 0.8936, 0.2788 }, + { 0.8908, 0.3031 }, + { 0.8880, 0.3274 }, + { 0.8852, 0.3518 }, + { 0.8825, 0.3758 }, + { 0.8797, 0.4001 }, + { 0.8769, 0.4245 }, + { 0.8741, 0.4488 }, + { 0.8713, 0.4731 }, + { 0.8685, 0.4972 }, + { 0.8657, 0.5215 }, + { 0.8629, 0.5458 }, + { 0.8601, 0.5702 }, + { 0.8573, 0.5945 }, + { 0.8546, 0.6185 }, + { 0.8518, 0.6428 }, + { 0.8490, 0.6672 }, + { 0.8462, 0.6915 }, + { 0.8434, 0.7159 }, + { 0.8406, 0.7399 }, + { 0.8378, 0.7642 }, + { 0.8351, 0.7885 }, + { 0.8323, 0.8129 }, + { 0.8295, 0.8372 }, + { 0.8267, 0.8612 }, + { 0.8239, 0.8856 }, + { 0.8211, 0.9099 }, + { 0.8183, 0.9342 }, + { 0.8155, 0.9586 }, + { 0.8128, 0.9826 }, + { 0.8100, 1.0069 }, + { 0.8072, 1.0313 }, + { 0.9373, 0.1119 }, + { 0.9346, 0.1359 }, + { 0.9318, 0.1602 }, + { 0.9290, 0.1845 }, + { 0.9262, 0.2089 }, + { 0.9234, 0.2332 }, + { 0.9207, 0.2572 }, + { 0.9179, 0.2816 }, + { 0.9151, 0.3059 }, + { 0.9123, 0.3302 }, + { 0.9095, 0.3546 }, + { 0.9067, 0.3786 }, + { 0.9039, 0.4029 }, + { 0.9011, 0.4273 }, + { 0.8983, 0.4516 }, + { 0.8955, 0.4759 }, + { 0.8928, 0.4999 }, + { 0.8900, 0.5243 }, + { 0.8872, 0.5486 }, + { 0.8844, 0.5729 }, + { 0.8816, 0.5973 }, + { 0.8788, 0.6213 }, + { 0.8760, 0.6456 }, + { 0.8732, 0.6700 }, + { 0.8705, 0.6943 }, + { 0.8677, 0.7186 }, + { 0.8649, 0.7427 }, + { 0.8621, 0.7670 }, + { 0.8593, 0.7913 }, + { 0.8565, 0.8157 }, + { 0.8537, 0.8400 }, + { 0.8510, 0.8640 }, + { 0.8482, 0.8883 }, + { 0.8454, 0.9127 }, + { 0.8426, 0.9370 }, + { 0.8398, 0.9614 }, + { 0.8370, 0.9854 }, + { 0.8342, 1.0097 }, + { 0.8314, 1.0340 }, + { 0.9616, 0.1146 }, + { 0.9588, 0.1387 }, + { 0.9561, 0.1630 }, + { 0.9533, 0.1873 }, + { 0.9505, 0.2117 }, + { 0.9477, 0.2360 }, + { 0.9449, 0.2600 }, + { 0.9421, 0.2844 }, + { 0.9393, 0.3087 }, + { 0.9365, 0.3330 }, + { 0.9337, 0.3574 }, + { 0.9310, 0.3814 }, + { 0.9282, 0.4057 }, + { 0.9254, 0.4300 }, + { 0.9226, 0.4544 }, + { 0.9198, 0.4787 }, + { 0.9170, 0.5027 }, + { 0.9142, 0.5271 }, + { 0.9114, 0.5514 }, + { 0.9086, 0.5757 }, + { 0.9058, 0.6001 }, + { 0.9031, 0.6241 }, + { 0.9003, 0.6484 }, + { 0.8975, 0.6728 }, + { 0.8947, 0.6971 }, + { 0.8919, 0.7214 }, + { 0.8892, 0.7454 }, + { 0.8864, 0.7698 }, + { 0.8836, 0.7941 }, + { 0.8808, 0.8184 }, + { 0.8780, 0.8428 }, + { 0.8752, 0.8668 }, + { 0.8724, 0.8911 }, + { 0.8696, 0.9155 }, + { 0.8668, 0.9398 }, + { 0.8640, 0.9641 }, + { 0.8613, 0.9882 }, + { 0.8585, 1.0125 }, + { 0.8557, 1.0368 }, + { 0.9831, 0.1414 }, + { 0.9803, 0.1658 }, + { 0.9776, 0.1901 }, + { 0.9748, 0.2145 }, + { 0.9720, 0.2388 }, + { 0.9692, 0.2628 }, + { 0.9664, 0.2871 }, + { 0.9636, 0.3115 }, + { 0.9608, 0.3358 }, + { 0.9580, 0.3601 }, + { 0.9553, 0.3842 }, + { 0.9525, 0.4085 }, + { 0.9497, 0.4328 }, + { 0.9469, 0.4572 }, + { 0.9441, 0.4815 }, + { 0.9413, 0.5055 }, + { 0.9385, 0.5299 }, + { 0.9357, 0.5542 }, + { 0.9329, 0.5785 }, + { 0.9301, 0.6029 }, + { 0.9274, 0.6269 }, + { 0.9246, 0.6512 }, + { 0.9218, 0.6755 }, + { 0.9190, 0.6999 }, + { 0.9162, 0.7242 }, + { 0.9134, 0.7482 }, + { 0.9107, 0.7726 }, + { 0.9079, 0.7969 }, + { 0.9051, 0.8212 }, + { 0.9023, 0.8456 }, + { 0.8995, 0.8696 }, + { 0.8967, 0.8939 }, + { 0.8939, 0.9183 }, + { 0.8911, 0.9426 }, + { 0.8883, 0.9669 }, + { 0.8856, 0.9909 }, + { 0.8828, 1.0153 }, + { 0.8800, 1.0396 }, + { 0.8772, 1.0639 }, + { 1.0074, 0.1442 }, + { 1.0046, 0.1686 }, + { 1.0018, 0.1929 }, + { 0.9990, 0.2172 }, + { 0.9962, 0.2416 }, + { 0.9935, 0.2656 }, + { 0.9907, 0.2899 }, + { 0.9879, 0.3143 }, + { 0.9851, 0.3386 }, + { 0.9823, 0.3629 }, + { 0.9795, 0.3869 }, + { 0.9767, 0.4113 }, + { 0.9739, 0.4356 }, + { 0.9711, 0.4600 }, + { 0.9683, 0.4843 }, + { 0.9656, 0.5083 }, + { 0.9628, 0.5326 }, + { 0.9600, 0.5570 }, + { 0.9572, 0.5813 }, + { 0.9544, 0.6056 }, + { 0.9516, 0.6297 }, + { 0.9488, 0.6540 }, + { 0.9461, 0.6783 }, + { 0.9433, 0.7027 }, + { 0.9405, 0.7270 }, + { 0.9377, 0.7510 }, + { 0.9349, 0.7754 }, + { 0.9321, 0.7997 }, + { 0.9293, 0.8240 }, + { 0.9265, 0.8484 }, + { 0.9238, 0.8724 }, + { 0.9210, 0.8967 }, + { 0.9182, 0.9210 }, + { 0.9154, 0.9454 }, + { 0.9126, 0.9697 }, + { 0.9098, 0.9937 }, + { 0.9070, 1.0181 }, + { 0.9042, 1.0424 }, + { 0.9014, 1.0667 }, +#endif /* ] */ + + { 0.0871, 0.0171 }, + { 0.0844, 0.0411 }, + { 0.0816, 0.0654 }, + { 0.0788, 0.0898 }, + { 0.0760, 0.1141 }, + { 0.0732, 0.1384 }, + { 0.0704, 0.1624 }, + { 0.0676, 0.1868 }, + { 0.0648, 0.2111 }, + { 0.0620, 0.2354 }, + { 0.0592, 0.2598 }, + { 0.0565, 0.2838 }, + { 0.0537, 0.3081 }, + { 0.0509, 0.3325 }, + { 0.0481, 0.3568 }, + { 0.0453, 0.3811 }, + { 0.0425, 0.4052 }, + { 0.0397, 0.4295 }, + { 0.0369, 0.4538 }, + { 0.0341, 0.4782 }, + { 0.0314, 0.5025 }, + { 0.0286, 0.5265 }, + { 0.0258, 0.5508 }, + { 0.0230, 0.5752 }, + { 0.0202, 0.5995 }, + { 0.0174, 0.6239 }, + { 0.0147, 0.6479 }, + { 0.0119, 0.6722 }, + { 0.0091, 0.6965 }, + { 0.0063, 0.7209 }, + { 0.0035, 0.7452 }, + { 0.0007, 0.7692 }, + { -0.0021, 0.7936 }, + { -0.0049, 0.8179 }, + { -0.0077, 0.8422 }, + { -0.0105, 0.8666 }, + { -0.0132, 0.8906 }, + { -0.0160, 0.9149 }, + { -0.0188, 0.9393 }, + { 0.1114, 0.0199 }, + { 0.1086, 0.0439 }, + { 0.1059, 0.0682 }, + { 0.1031, 0.0925 }, + { 0.1003, 0.1169 }, + { 0.0975, 0.1412 }, + { 0.0947, 0.1652 }, + { 0.0919, 0.1896 }, + { 0.0891, 0.2139 }, + { 0.0863, 0.2382 }, + { 0.0835, 0.2626 }, + { 0.0808, 0.2866 }, + { 0.0780, 0.3109 }, + { 0.0752, 0.3353 }, + { 0.0724, 0.3596 }, + { 0.0696, 0.3839 }, + { 0.0668, 0.4079 }, + { 0.0640, 0.4323 }, + { 0.0612, 0.4566 }, + { 0.0584, 0.4810 }, + { 0.0556, 0.5053 }, + { 0.0529, 0.5293 }, + { 0.0501, 0.5536 }, + { 0.0473, 0.5780 }, + { 0.0445, 0.6023 }, + { 0.0417, 0.6266 }, + { 0.0390, 0.6507 }, + { 0.0362, 0.6750 }, + { 0.0334, 0.6993 }, + { 0.0306, 0.7237 }, + { 0.0278, 0.7480 }, + { 0.0250, 0.7720 }, + { 0.0222, 0.7964 }, + { 0.0194, 0.8207 }, + { 0.0166, 0.8450 }, + { 0.0138, 0.8694 }, + { 0.0111, 0.8934 }, + { 0.0083, 0.9177 }, + { 0.0055, 0.9420 }, + { 0.1357, 0.0226 }, + { 0.1329, 0.0467 }, + { 0.1301, 0.0710 }, + { 0.1273, 0.0953 }, + { 0.1245, 0.1197 }, + { 0.1217, 0.1440 }, + { 0.1190, 0.1680 }, + { 0.1162, 0.1924 }, + { 0.1134, 0.2167 }, + { 0.1106, 0.2410 }, + { 0.1078, 0.2654 }, + { 0.1050, 0.2894 }, + { 0.1022, 0.3137 }, + { 0.0994, 0.3380 }, + { 0.0966, 0.3624 }, + { 0.0938, 0.3867 }, + { 0.0911, 0.4107 }, + { 0.0883, 0.4351 }, + { 0.0855, 0.4594 }, + { 0.0827, 0.4837 }, + { 0.0799, 0.5081 }, + { 0.0771, 0.5321 }, + { 0.0744, 0.5564 }, + { 0.0716, 0.5808 }, + { 0.0688, 0.6051 }, + { 0.0660, 0.6294 }, + { 0.0632, 0.6534 }, + { 0.0604, 0.6778 }, + { 0.0576, 0.7021 }, + { 0.0548, 0.7265 }, + { 0.0520, 0.7508 }, + { 0.0493, 0.7748 }, + { 0.0465, 0.7991 }, + { 0.0437, 0.8235 }, + { 0.0409, 0.8478 }, + { 0.0381, 0.8721 }, + { 0.0353, 0.8962 }, + { 0.0325, 0.9205 }, + { 0.0297, 0.9448 }, + { 0.1600, 0.0254 }, + { 0.1572, 0.0495 }, + { 0.1544, 0.0738 }, + { 0.1516, 0.0981 }, + { 0.1488, 0.1225 }, + { 0.1460, 0.1468 }, + { 0.1433, 0.1708 }, + { 0.1405, 0.1951 }, + { 0.1377, 0.2195 }, + { 0.1349, 0.2438 }, + { 0.1321, 0.2681 }, + { 0.1293, 0.2922 }, + { 0.1265, 0.3165 }, + { 0.1237, 0.3408 }, + { 0.1209, 0.3652 }, + { 0.1181, 0.3895 }, + { 0.1154, 0.4135 }, + { 0.1126, 0.4379 }, + { 0.1098, 0.4622 }, + { 0.1070, 0.4865 }, + { 0.1042, 0.5109 }, + { 0.1014, 0.5349 }, + { 0.0986, 0.5592 }, + { 0.0959, 0.5835 }, + { 0.0931, 0.6079 }, + { 0.0903, 0.6322 }, + { 0.0875, 0.6562 }, + { 0.0847, 0.6806 }, + { 0.0819, 0.7049 }, + { 0.0791, 0.7292 }, + { 0.0763, 0.7536 }, + { 0.0736, 0.7776 }, + { 0.0708, 0.8019 }, + { 0.0680, 0.8263 }, + { 0.0652, 0.8506 }, + { 0.0624, 0.8749 }, + { 0.0596, 0.8990 }, + { 0.0568, 0.9233 }, + { 0.0540, 0.9476 }, + { 0.1842, 0.0282 }, + { 0.1815, 0.0522 }, + { 0.1787, 0.0766 }, + { 0.1759, 0.1009 }, + { 0.1731, 0.1252 }, + { 0.1703, 0.1496 }, + { 0.1675, 0.1736 }, + { 0.1647, 0.1979 }, + { 0.1619, 0.2223 }, + { 0.1591, 0.2466 }, + { 0.1563, 0.2709 }, + { 0.1536, 0.2950 }, + { 0.1508, 0.3193 }, + { 0.1480, 0.3436 }, + { 0.1452, 0.3680 }, + { 0.1424, 0.3923 }, + { 0.1396, 0.4163 }, + { 0.1368, 0.4406 }, + { 0.1340, 0.4650 }, + { 0.1313, 0.4893 }, + { 0.1285, 0.5136 }, + { 0.1257, 0.5377 }, + { 0.1229, 0.5620 }, + { 0.1201, 0.5863 }, + { 0.1173, 0.6107 }, + { 0.1145, 0.6350 }, + { 0.1118, 0.6590 }, + { 0.1090, 0.6834 }, + { 0.1062, 0.7077 }, + { 0.1034, 0.7320 }, + { 0.1006, 0.7564 }, + { 0.0978, 0.7804 }, + { 0.0950, 0.8047 }, + { 0.0922, 0.8290 }, + { 0.0894, 0.8534 }, + { 0.0866, 0.8777 }, + { 0.0839, 0.9017 }, + { 0.0811, 0.9261 }, + { 0.0783, 0.9504 }, + { 0.2085, 0.0310 }, + { 0.2057, 0.0550 }, + { 0.2029, 0.0794 }, + { 0.2001, 0.1037 }, + { 0.1973, 0.1280 }, + { 0.1945, 0.1524 }, + { 0.1918, 0.1764 }, + { 0.1890, 0.2007 }, + { 0.1862, 0.2251 }, + { 0.1834, 0.2494 }, + { 0.1806, 0.2737 }, + { 0.1778, 0.2977 }, + { 0.1750, 0.3221 }, + { 0.1722, 0.3464 }, + { 0.1694, 0.3707 }, + { 0.1666, 0.3951 }, + { 0.1639, 0.4191 }, + { 0.1611, 0.4434 }, + { 0.1583, 0.4678 }, + { 0.1555, 0.4921 }, + { 0.1527, 0.5164 }, + { 0.1500, 0.5405 }, + { 0.1472, 0.5648 }, + { 0.1444, 0.5891 }, + { 0.1416, 0.6135 }, + { 0.1388, 0.6378 }, + { 0.1360, 0.6618 }, + { 0.1332, 0.6861 }, + { 0.1304, 0.7105 }, + { 0.1276, 0.7348 }, + { 0.1248, 0.7591 }, + { 0.1221, 0.7832 }, + { 0.1193, 0.8075 }, + { 0.1165, 0.8318 }, + { 0.1137, 0.8562 }, + { 0.1109, 0.8805 }, + { 0.1081, 0.9045 }, + { 0.1053, 0.9289 }, + { 0.1025, 0.9532 }, + { 0.2328, 0.0338 }, + { 0.2300, 0.0578 }, + { 0.2272, 0.0822 }, + { 0.2244, 0.1065 }, + { 0.2216, 0.1308 }, + { 0.2188, 0.1552 }, + { 0.2161, 0.1792 }, + { 0.2133, 0.2035 }, + { 0.2105, 0.2278 }, + { 0.2077, 0.2522 }, + { 0.2049, 0.2765 }, + { 0.2021, 0.3005 }, + { 0.1993, 0.3249 }, + { 0.1965, 0.3492 }, + { 0.1937, 0.3735 }, + { 0.1909, 0.3979 }, + { 0.1882, 0.4219 }, + { 0.1854, 0.4462 }, + { 0.1826, 0.4706 }, + { 0.1798, 0.4949 }, + { 0.1770, 0.5192 }, + { 0.1742, 0.5432 }, + { 0.1715, 0.5676 }, + { 0.1687, 0.5919 }, + { 0.1659, 0.6162 }, + { 0.1631, 0.6406 }, + { 0.1603, 0.6646 }, + { 0.1575, 0.6889 }, + { 0.1547, 0.7133 }, + { 0.1519, 0.7376 }, + { 0.1491, 0.7619 }, + { 0.1464, 0.7860 }, + { 0.1436, 0.8103 }, + { 0.1408, 0.8346 }, + { 0.1380, 0.8590 }, + { 0.1352, 0.8833 }, + { 0.1324, 0.9073 }, + { 0.1296, 0.9316 }, + { 0.1268, 0.9560 }, + { 0.2570, 0.0366 }, + { 0.2543, 0.0606 }, + { 0.2515, 0.0849 }, + { 0.2487, 0.1093 }, + { 0.2459, 0.1336 }, + { 0.2431, 0.1579 }, + { 0.2403, 0.1820 }, + { 0.2375, 0.2063 }, + { 0.2347, 0.2306 }, + { 0.2319, 0.2550 }, + { 0.2291, 0.2793 }, + { 0.2264, 0.3033 }, + { 0.2236, 0.3277 }, + { 0.2208, 0.3520 }, + { 0.2180, 0.3763 }, + { 0.2152, 0.4007 }, + { 0.2124, 0.4247 }, + { 0.2096, 0.4490 }, + { 0.2069, 0.4733 }, + { 0.2041, 0.4977 }, + { 0.2013, 0.5220 }, + { 0.1985, 0.5460 }, + { 0.1957, 0.5704 }, + { 0.1929, 0.5947 }, + { 0.1901, 0.6190 }, + { 0.1873, 0.6434 }, + { 0.1846, 0.6674 }, + { 0.1818, 0.6917 }, + { 0.1790, 0.7161 }, + { 0.1762, 0.7404 }, + { 0.1734, 0.7647 }, + { 0.1706, 0.7887 }, + { 0.1678, 0.8131 }, + { 0.1650, 0.8374 }, + { 0.1622, 0.8617 }, + { 0.1594, 0.8861 }, + { 0.1567, 0.9101 }, + { 0.1539, 0.9344 }, + { 0.1511, 0.9588 }, + { 0.2813, 0.0394 }, + { 0.2786, 0.0634 }, + { 0.2758, 0.0877 }, + { 0.2730, 0.1121 }, + { 0.2702, 0.1364 }, + { 0.2674, 0.1607 }, + { 0.2646, 0.1848 }, + { 0.2618, 0.2091 }, + { 0.2590, 0.2334 }, + { 0.2562, 0.2578 }, + { 0.2534, 0.2821 }, + { 0.2507, 0.3061 }, + { 0.2479, 0.3304 }, + { 0.2451, 0.3548 }, + { 0.2423, 0.3791 }, + { 0.2395, 0.4034 }, + { 0.2367, 0.4275 }, + { 0.2339, 0.4518 }, + { 0.2311, 0.4761 }, + { 0.2284, 0.5005 }, + { 0.2256, 0.5248 }, + { 0.2228, 0.5488 }, + { 0.2200, 0.5732 }, + { 0.2172, 0.5975 }, + { 0.2144, 0.6218 }, + { 0.2116, 0.6462 }, + { 0.2089, 0.6702 }, + { 0.2061, 0.6945 }, + { 0.2033, 0.7188 }, + { 0.2005, 0.7432 }, + { 0.1977, 0.7675 }, + { 0.1949, 0.7915 }, + { 0.1921, 0.8159 }, + { 0.1893, 0.8402 }, + { 0.1865, 0.8645 }, + { 0.1837, 0.8889 }, + { 0.1810, 0.9129 }, + { 0.1782, 0.9372 }, + { 0.1754, 0.9616 }, + { 0.3056, 0.0422 }, + { 0.3028, 0.0662 }, + { 0.3000, 0.0905 }, + { 0.2972, 0.1148 }, + { 0.2944, 0.1392 }, + { 0.2916, 0.1635 }, + { 0.2889, 0.1875 }, + { 0.2861, 0.2119 }, + { 0.2833, 0.2362 }, + { 0.2805, 0.2605 }, + { 0.2777, 0.2849 }, + { 0.2749, 0.3089 }, + { 0.2721, 0.3332 }, + { 0.2693, 0.3576 }, + { 0.2665, 0.3819 }, + { 0.2638, 0.4062 }, + { 0.2610, 0.4302 }, + { 0.2582, 0.4546 }, + { 0.2554, 0.4789 }, + { 0.2526, 0.5033 }, + { 0.2498, 0.5276 }, + { 0.2471, 0.5516 }, + { 0.2443, 0.5759 }, + { 0.2415, 0.6003 }, + { 0.2387, 0.6246 }, + { 0.2359, 0.6489 }, + { 0.2331, 0.6730 }, + { 0.2303, 0.6973 }, + { 0.2275, 0.7216 }, + { 0.2247, 0.7460 }, + { 0.2219, 0.7703 }, + { 0.2192, 0.7943 }, + { 0.2164, 0.8187 }, + { 0.2136, 0.8430 }, + { 0.2108, 0.8673 }, + { 0.2080, 0.8917 }, + { 0.2052, 0.9157 }, + { 0.2024, 0.9400 }, + { 0.1996, 0.9643 }, + { 0.3298, 0.0449 }, + { 0.3271, 0.0690 }, + { 0.3243, 0.0933 }, + { 0.3215, 0.1176 }, + { 0.3187, 0.1420 }, + { 0.3159, 0.1663 }, + { 0.3131, 0.1903 }, + { 0.3103, 0.2147 }, + { 0.3075, 0.2390 }, + { 0.3047, 0.2633 }, + { 0.3019, 0.2877 }, + { 0.2992, 0.3117 }, + { 0.2964, 0.3360 }, + { 0.2936, 0.3603 }, + { 0.2908, 0.3847 }, + { 0.2880, 0.4090 }, + { 0.2852, 0.4330 }, + { 0.2825, 0.4574 }, + { 0.2797, 0.4817 }, + { 0.2769, 0.5060 }, + { 0.2741, 0.5304 }, + { 0.2713, 0.5544 }, + { 0.2685, 0.5787 }, + { 0.2657, 0.6031 }, + { 0.2629, 0.6274 }, + { 0.2601, 0.6517 }, + { 0.2574, 0.6757 }, + { 0.2546, 0.7001 }, + { 0.2518, 0.7244 }, + { 0.2490, 0.7488 }, + { 0.2462, 0.7731 }, + { 0.2434, 0.7971 }, + { 0.2406, 0.8214 }, + { 0.2378, 0.8458 }, + { 0.2350, 0.8701 }, + { 0.2323, 0.8944 }, + { 0.2295, 0.9185 }, + { 0.2267, 0.9428 }, + { 0.2239, 0.9671 }, + { 0.3541, 0.0477 }, + { 0.3514, 0.0718 }, + { 0.3486, 0.0961 }, + { 0.3458, 0.1204 }, + { 0.3430, 0.1448 }, + { 0.3402, 0.1691 }, + { 0.3374, 0.1931 }, + { 0.3346, 0.2174 }, + { 0.3318, 0.2418 }, + { 0.3290, 0.2661 }, + { 0.3262, 0.2905 }, + { 0.3235, 0.3145 }, + { 0.3207, 0.3388 }, + { 0.3179, 0.3631 }, + { 0.3151, 0.3875 }, + { 0.3123, 0.4118 }, + { 0.3095, 0.4358 }, + { 0.3067, 0.4602 }, + { 0.3040, 0.4845 }, + { 0.3012, 0.5088 }, + { 0.2984, 0.5332 }, + { 0.2956, 0.5572 }, + { 0.2928, 0.5815 }, + { 0.2900, 0.6059 }, + { 0.2872, 0.6302 }, + { 0.2844, 0.6545 }, + { 0.2817, 0.6785 }, + { 0.2789, 0.7029 }, + { 0.2761, 0.7272 }, + { 0.2733, 0.7515 }, + { 0.2705, 0.7759 }, + { 0.2677, 0.7999 }, + { 0.2649, 0.8242 }, + { 0.2621, 0.8486 }, + { 0.2593, 0.8729 }, + { 0.2565, 0.8972 }, + { 0.2538, 0.9213 }, + { 0.2510, 0.9456 }, + { 0.2482, 0.9699 }, + { 0.3784, 0.0505 }, + { 0.3756, 0.0745 }, + { 0.3728, 0.0989 }, + { 0.3700, 0.1232 }, + { 0.3672, 0.1475 }, + { 0.3644, 0.1719 }, + { 0.3617, 0.1959 }, + { 0.3589, 0.2202 }, + { 0.3561, 0.2446 }, + { 0.3533, 0.2689 }, + { 0.3505, 0.2932 }, + { 0.3477, 0.3173 }, + { 0.3449, 0.3416 }, + { 0.3421, 0.3659 }, + { 0.3394, 0.3903 }, + { 0.3366, 0.4146 }, + { 0.3338, 0.4386 }, + { 0.3310, 0.4629 }, + { 0.3282, 0.4873 }, + { 0.3254, 0.5116 }, + { 0.3226, 0.5359 }, + { 0.3199, 0.5600 }, + { 0.3171, 0.5843 }, + { 0.3143, 0.6086 }, + { 0.3115, 0.6330 }, + { 0.3087, 0.6573 }, + { 0.3059, 0.6813 }, + { 0.3031, 0.7057 }, + { 0.3003, 0.7300 }, + { 0.2975, 0.7543 }, + { 0.2947, 0.7787 }, + { 0.2920, 0.8027 }, + { 0.2892, 0.8270 }, + { 0.2864, 0.8513 }, + { 0.2836, 0.8757 }, + { 0.2808, 0.9000 }, + { 0.2780, 0.9240 }, + { 0.2752, 0.9484 }, + { 0.2725, 0.9727 }, + { 0.4027, 0.0533 }, + { 0.3999, 0.0773 }, + { 0.3971, 0.1017 }, + { 0.3943, 0.1260 }, + { 0.3915, 0.1503 }, + { 0.3887, 0.1747 }, + { 0.3860, 0.1987 }, + { 0.3832, 0.2230 }, + { 0.3804, 0.2474 }, + { 0.3776, 0.2717 }, + { 0.3748, 0.2960 }, + { 0.3720, 0.3200 }, + { 0.3692, 0.3444 }, + { 0.3664, 0.3687 }, + { 0.3636, 0.3930 }, + { 0.3609, 0.4174 }, + { 0.3581, 0.4414 }, + { 0.3553, 0.4657 }, + { 0.3525, 0.4901 }, + { 0.3497, 0.5144 }, + { 0.3469, 0.5387 }, + { 0.3442, 0.5628 }, + { 0.3414, 0.5871 }, + { 0.3386, 0.6114 }, + { 0.3358, 0.6358 }, + { 0.3330, 0.6601 }, + { 0.3302, 0.6841 }, + { 0.3274, 0.7084 }, + { 0.3246, 0.7328 }, + { 0.3218, 0.7571 }, + { 0.3190, 0.7815 }, + { 0.3163, 0.8055 }, + { 0.3135, 0.8298 }, + { 0.3107, 0.8541 }, + { 0.3079, 0.8785 }, + { 0.3051, 0.9028 }, + { 0.3023, 0.9268 }, + { 0.2995, 0.9512 }, + { 0.2967, 0.9755 }, + { 0.4269, 0.0561 }, + { 0.4242, 0.0801 }, + { 0.4214, 0.1045 }, + { 0.4186, 0.1288 }, + { 0.4158, 0.1531 }, + { 0.4130, 0.1775 }, + { 0.4102, 0.2015 }, + { 0.4074, 0.2258 }, + { 0.4046, 0.2501 }, + { 0.4018, 0.2745 }, + { 0.3990, 0.2988 }, + { 0.3963, 0.3228 }, + { 0.3935, 0.3472 }, + { 0.3907, 0.3715 }, + { 0.3879, 0.3958 }, + { 0.3851, 0.4202 }, + { 0.3823, 0.4442 }, + { 0.3796, 0.4685 }, + { 0.3768, 0.4929 }, + { 0.3740, 0.5172 }, + { 0.3712, 0.5415 }, + { 0.3684, 0.5655 }, + { 0.3656, 0.5899 }, + { 0.3628, 0.6142 }, + { 0.3600, 0.6385 }, + { 0.3572, 0.6629 }, + { 0.3545, 0.6869 }, + { 0.3517, 0.7112 }, + { 0.3489, 0.7356 }, + { 0.3461, 0.7599 }, + { 0.3433, 0.7842 }, + { 0.3405, 0.8083 }, + { 0.3377, 0.8326 }, + { 0.3349, 0.8569 }, + { 0.3321, 0.8813 }, + { 0.3294, 0.9056 }, + { 0.3266, 0.9296 }, + { 0.3238, 0.9539 }, + { 0.3210, 0.9783 }, + { 0.4512, 0.0589 }, + { 0.4484, 0.0829 }, + { 0.4456, 0.1072 }, + { 0.4428, 0.1316 }, + { 0.4400, 0.1559 }, + { 0.4372, 0.1802 }, + { 0.4345, 0.2043 }, + { 0.4317, 0.2286 }, + { 0.4289, 0.2529 }, + { 0.4261, 0.2773 }, + { 0.4233, 0.3016 }, + { 0.4205, 0.3256 }, + { 0.4177, 0.3500 }, + { 0.4150, 0.3743 }, + { 0.4122, 0.3986 }, + { 0.4094, 0.4230 }, + { 0.4066, 0.4470 }, + { 0.4038, 0.4713 }, + { 0.4010, 0.4956 }, + { 0.3982, 0.5200 }, + { 0.3954, 0.5443 }, + { 0.3927, 0.5683 }, + { 0.3899, 0.5927 }, + { 0.3871, 0.6170 }, + { 0.3843, 0.6413 }, + { 0.3815, 0.6657 }, + { 0.3787, 0.6897 }, + { 0.3759, 0.7140 }, + { 0.3731, 0.7384 }, + { 0.3703, 0.7627 }, + { 0.3675, 0.7870 }, + { 0.3648, 0.8110 }, + { 0.3620, 0.8354 }, + { 0.3592, 0.8597 }, + { 0.3564, 0.8840 }, + { 0.3536, 0.9084 }, + { 0.3508, 0.9324 }, + { 0.3481, 0.9567 }, + { 0.3453, 0.9811 }, + { 0.4755, 0.0617 }, + { 0.4727, 0.0857 }, + { 0.4699, 0.1100 }, + { 0.4671, 0.1344 }, + { 0.4643, 0.1587 }, + { 0.4615, 0.1830 }, + { 0.4588, 0.2071 }, + { 0.4560, 0.2314 }, + { 0.4532, 0.2557 }, + { 0.4504, 0.2801 }, + { 0.4476, 0.3044 }, + { 0.4448, 0.3284 }, + { 0.4420, 0.3527 }, + { 0.4392, 0.3771 }, + { 0.4365, 0.4014 }, + { 0.4337, 0.4257 }, + { 0.4309, 0.4498 }, + { 0.4281, 0.4741 }, + { 0.4253, 0.4984 }, + { 0.4225, 0.5228 }, + { 0.4197, 0.5471 }, + { 0.4170, 0.5711 }, + { 0.4142, 0.5955 }, + { 0.4114, 0.6198 }, + { 0.4086, 0.6441 }, + { 0.4058, 0.6685 }, + { 0.4030, 0.6925 }, + { 0.4002, 0.7168 }, + { 0.3974, 0.7411 }, + { 0.3946, 0.7655 }, + { 0.3918, 0.7898 }, + { 0.3891, 0.8138 }, + { 0.3863, 0.8382 }, + { 0.3835, 0.8625 }, + { 0.3807, 0.8868 }, + { 0.3779, 0.9112 }, + { 0.3751, 0.9352 }, + { 0.3723, 0.9595 }, + { 0.3696, 0.9839 }, + { 0.4997, 0.0645 }, + { 0.4970, 0.0885 }, + { 0.4942, 0.1128 }, + { 0.4914, 0.1371 }, + { 0.4886, 0.1615 }, + { 0.4858, 0.1858 }, + { 0.4830, 0.2098 }, + { 0.4802, 0.2342 }, + { 0.4774, 0.2585 }, + { 0.4746, 0.2828 }, + { 0.4719, 0.3072 }, + { 0.4691, 0.3312 }, + { 0.4663, 0.3555 }, + { 0.4635, 0.3799 }, + { 0.4607, 0.4042 }, + { 0.4579, 0.4285 }, + { 0.4552, 0.4526 }, + { 0.4524, 0.4769 }, + { 0.4496, 0.5012 }, + { 0.4468, 0.5256 }, + { 0.4440, 0.5499 }, + { 0.4412, 0.5739 }, + { 0.4384, 0.5982 }, + { 0.4356, 0.6226 }, + { 0.4328, 0.6469 }, + { 0.4300, 0.6712 }, + { 0.4273, 0.6953 }, + { 0.4245, 0.7196 }, + { 0.4217, 0.7439 }, + { 0.4189, 0.7683 }, + { 0.4161, 0.7926 }, + { 0.4133, 0.8166 }, + { 0.4105, 0.8410 }, + { 0.4077, 0.8653 }, + { 0.4050, 0.8896 }, + { 0.4022, 0.9140 }, + { 0.3994, 0.9380 }, + { 0.3966, 0.9623 }, + { 0.3938, 0.9866 }, + { 0.5240, 0.0673 }, + { 0.5213, 0.0913 }, + { 0.5185, 0.1156 }, + { 0.5157, 0.1399 }, + { 0.5129, 0.1643 }, + { 0.5101, 0.1886 }, + { 0.5073, 0.2126 }, + { 0.5045, 0.2370 }, + { 0.5017, 0.2613 }, + { 0.4989, 0.2856 }, + { 0.4961, 0.3100 }, + { 0.4934, 0.3340 }, + { 0.4906, 0.3583 }, + { 0.4878, 0.3827 }, + { 0.4850, 0.4070 }, + { 0.4822, 0.4313 }, + { 0.4794, 0.4553 }, + { 0.4767, 0.4797 }, + { 0.4739, 0.5040 }, + { 0.4711, 0.5283 }, + { 0.4683, 0.5527 }, + { 0.4655, 0.5767 }, + { 0.4627, 0.6010 }, + { 0.4599, 0.6254 }, + { 0.4571, 0.6497 }, + { 0.4543, 0.6740 }, + { 0.4516, 0.6981 }, + { 0.4488, 0.7224 }, + { 0.4460, 0.7467 }, + { 0.4432, 0.7711 }, + { 0.4404, 0.7954 }, + { 0.4376, 0.8194 }, + { 0.4348, 0.8437 }, + { 0.4320, 0.8681 }, + { 0.4292, 0.8924 }, + { 0.4265, 0.9167 }, + { 0.4237, 0.9408 }, + { 0.4209, 0.9651 }, + { 0.4181, 0.9894 }, + { 0.5483, 0.0700 }, + { 0.5455, 0.0941 }, + { 0.5427, 0.1184 }, + { 0.5399, 0.1427 }, + { 0.5371, 0.1671 }, + { 0.5343, 0.1914 }, + { 0.5316, 0.2154 }, + { 0.5288, 0.2397 }, + { 0.5260, 0.2641 }, + { 0.5232, 0.2884 }, + { 0.5204, 0.3128 }, + { 0.5176, 0.3368 }, + { 0.5148, 0.3611 }, + { 0.5121, 0.3854 }, + { 0.5093, 0.4098 }, + { 0.5065, 0.4341 }, + { 0.5037, 0.4581 }, + { 0.5009, 0.4825 }, + { 0.4981, 0.5068 }, + { 0.4953, 0.5311 }, + { 0.4925, 0.5555 }, + { 0.4898, 0.5795 }, + { 0.4870, 0.6038 }, + { 0.4842, 0.6282 }, + { 0.4814, 0.6525 }, + { 0.4786, 0.6768 }, + { 0.4758, 0.7008 }, + { 0.4730, 0.7252 }, + { 0.4702, 0.7495 }, + { 0.4674, 0.7738 }, + { 0.4646, 0.7982 }, + { 0.4619, 0.8222 }, + { 0.4591, 0.8465 }, + { 0.4563, 0.8709 }, + { 0.4535, 0.8952 }, + { 0.4507, 0.9195 }, + { 0.4479, 0.9436 }, + { 0.4452, 0.9679 }, + { 0.4424, 0.9922 }, + { 0.5725, 0.0728 }, + { 0.5698, 0.0968 }, + { 0.5670, 0.1212 }, + { 0.5642, 0.1455 }, + { 0.5614, 0.1698 }, + { 0.5586, 0.1942 }, + { 0.5558, 0.2182 }, + { 0.5530, 0.2425 }, + { 0.5502, 0.2669 }, + { 0.5475, 0.2912 }, + { 0.5447, 0.3155 }, + { 0.5419, 0.3396 }, + { 0.5391, 0.3639 }, + { 0.5363, 0.3882 }, + { 0.5335, 0.4126 }, + { 0.5307, 0.4369 }, + { 0.5280, 0.4609 }, + { 0.5252, 0.4852 }, + { 0.5224, 0.5096 }, + { 0.5196, 0.5339 }, + { 0.5168, 0.5583 }, + { 0.5140, 0.5823 }, + { 0.5112, 0.6066 }, + { 0.5084, 0.6309 }, + { 0.5056, 0.6553 }, + { 0.5028, 0.6796 }, + { 0.5001, 0.7036 }, + { 0.4973, 0.7280 }, + { 0.4945, 0.7523 }, + { 0.4917, 0.7766 }, + { 0.4889, 0.8010 }, + { 0.4861, 0.8250 }, + { 0.4833, 0.8493 }, + { 0.4806, 0.8737 }, + { 0.4778, 0.8980 }, + { 0.4750, 0.9223 }, + { 0.4722, 0.9463 }, + { 0.4694, 0.9707 }, + { 0.4666, 0.9950 }, + { 0.5968, 0.0756 }, + { 0.5941, 0.0996 }, + { 0.5913, 0.1240 }, + { 0.5885, 0.1483 }, + { 0.5857, 0.1726 }, + { 0.5829, 0.1970 }, + { 0.5801, 0.2210 }, + { 0.5773, 0.2453 }, + { 0.5745, 0.2697 }, + { 0.5717, 0.2940 }, + { 0.5690, 0.3183 }, + { 0.5662, 0.3423 }, + { 0.5634, 0.3667 }, + { 0.5606, 0.3910 }, + { 0.5578, 0.4153 }, + { 0.5550, 0.4397 }, + { 0.5523, 0.4637 }, + { 0.5495, 0.4880 }, + { 0.5467, 0.5124 }, + { 0.5439, 0.5367 }, + { 0.5411, 0.5610 }, + { 0.5383, 0.5851 }, + { 0.5355, 0.6094 }, + { 0.5327, 0.6337 }, + { 0.5299, 0.6581 }, + { 0.5271, 0.6824 }, + { 0.5244, 0.7064 }, + { 0.5216, 0.7308 }, + { 0.5188, 0.7551 }, + { 0.5160, 0.7794 }, + { 0.5132, 0.8038 }, + { 0.5104, 0.8278 }, + { 0.5076, 0.8521 }, + { 0.5048, 0.8764 }, + { 0.5021, 0.9008 }, + { 0.4993, 0.9251 }, + { 0.4965, 0.9491 }, + { 0.4937, 0.9735 }, + { 0.4909, 0.9978 }, + { 0.6211, 0.0784 }, + { 0.6183, 0.1024 }, + { 0.6155, 0.1268 }, + { 0.6127, 0.1511 }, + { 0.6099, 0.1754 }, + { 0.6071, 0.1998 }, + { 0.6044, 0.2238 }, + { 0.6016, 0.2481 }, + { 0.5988, 0.2724 }, + { 0.5960, 0.2968 }, + { 0.5932, 0.3211 }, + { 0.5904, 0.3451 }, + { 0.5877, 0.3695 }, + { 0.5849, 0.3938 }, + { 0.5821, 0.4181 }, + { 0.5793, 0.4425 }, + { 0.5765, 0.4665 }, + { 0.5737, 0.4908 }, + { 0.5709, 0.5152 }, + { 0.5681, 0.5395 }, + { 0.5653, 0.5638 }, + { 0.5626, 0.5878 }, + { 0.5598, 0.6122 }, + { 0.5570, 0.6365 }, + { 0.5542, 0.6608 }, + { 0.5514, 0.6852 }, + { 0.5486, 0.7092 }, + { 0.5458, 0.7335 }, + { 0.5430, 0.7579 }, + { 0.5402, 0.7822 }, + { 0.5375, 0.8065 }, + { 0.5347, 0.8306 }, + { 0.5319, 0.8549 }, + { 0.5291, 0.8792 }, + { 0.5263, 0.9036 }, + { 0.5235, 0.9279 }, + { 0.5208, 0.9519 }, + { 0.5180, 0.9762 }, + { 0.5152, 1.0006 }, + { 0.6454, 0.0812 }, + { 0.6426, 0.1052 }, + { 0.6398, 0.1295 }, + { 0.6370, 0.1539 }, + { 0.6342, 0.1782 }, + { 0.6314, 0.2025 }, + { 0.6287, 0.2266 }, + { 0.6259, 0.2509 }, + { 0.6231, 0.2752 }, + { 0.6203, 0.2996 }, + { 0.6175, 0.3239 }, + { 0.6147, 0.3479 }, + { 0.6119, 0.3723 }, + { 0.6092, 0.3966 }, + { 0.6064, 0.4209 }, + { 0.6036, 0.4453 }, + { 0.6008, 0.4693 }, + { 0.5980, 0.4936 }, + { 0.5952, 0.5179 }, + { 0.5924, 0.5423 }, + { 0.5896, 0.5666 }, + { 0.5869, 0.5906 }, + { 0.5841, 0.6150 }, + { 0.5813, 0.6393 }, + { 0.5785, 0.6636 }, + { 0.5757, 0.6880 }, + { 0.5729, 0.7120 }, + { 0.5701, 0.7363 }, + { 0.5673, 0.7607 }, + { 0.5645, 0.7850 }, + { 0.5617, 0.8093 }, + { 0.5590, 0.8333 }, + { 0.5562, 0.8577 }, + { 0.5534, 0.8820 }, + { 0.5506, 0.9064 }, + { 0.5478, 0.9307 }, + { 0.5451, 0.9547 }, + { 0.5423, 0.9790 }, + { 0.5395, 1.0034 }, + { 0.6696, 0.0840 }, + { 0.6669, 0.1080 }, + { 0.6641, 0.1323 }, + { 0.6613, 0.1567 }, + { 0.6585, 0.1810 }, + { 0.6557, 0.2053 }, + { 0.6529, 0.2294 }, + { 0.6501, 0.2537 }, + { 0.6473, 0.2780 }, + { 0.6446, 0.3024 }, + { 0.6418, 0.3267 }, + { 0.6390, 0.3507 }, + { 0.6362, 0.3750 }, + { 0.6334, 0.3994 }, + { 0.6306, 0.4237 }, + { 0.6278, 0.4480 }, + { 0.6251, 0.4721 }, + { 0.6223, 0.4964 }, + { 0.6195, 0.5207 }, + { 0.6167, 0.5451 }, + { 0.6139, 0.5694 }, + { 0.6111, 0.5934 }, + { 0.6083, 0.6178 }, + { 0.6055, 0.6421 }, + { 0.6027, 0.6664 }, + { 0.5999, 0.6908 }, + { 0.5972, 0.7148 }, + { 0.5944, 0.7391 }, + { 0.5916, 0.7634 }, + { 0.5888, 0.7878 }, + { 0.5860, 0.8121 }, + { 0.5832, 0.8361 }, + { 0.5805, 0.8605 }, + { 0.5777, 0.8848 }, + { 0.5749, 0.9091 }, + { 0.5721, 0.9335 }, + { 0.5693, 0.9575 }, + { 0.5665, 0.9818 }, + { 0.5637, 1.0062 }, + { 0.6939, 0.0868 }, + { 0.6911, 0.1108 }, + { 0.6883, 0.1351 }, + { 0.6855, 0.1595 }, + { 0.6827, 0.1838 }, + { 0.6800, 0.2081 }, + { 0.6772, 0.2321 }, + { 0.6744, 0.2565 }, + { 0.6716, 0.2808 }, + { 0.6688, 0.3051 }, + { 0.6660, 0.3295 }, + { 0.6633, 0.3535 }, + { 0.6605, 0.3778 }, + { 0.6577, 0.4022 }, + { 0.6549, 0.4265 }, + { 0.6521, 0.4508 }, + { 0.6493, 0.4749 }, + { 0.6465, 0.4992 }, + { 0.6437, 0.5235 }, + { 0.6409, 0.5479 }, + { 0.6381, 0.5722 }, + { 0.6354, 0.5962 }, + { 0.6326, 0.6205 }, + { 0.6298, 0.6449 }, + { 0.6270, 0.6692 }, + { 0.6242, 0.6935 }, + { 0.6214, 0.7176 }, + { 0.6186, 0.7419 }, + { 0.6158, 0.7662 }, + { 0.6131, 0.7906 }, + { 0.6103, 0.8149 }, + { 0.6075, 0.8389 }, + { 0.6047, 0.8633 }, + { 0.6019, 0.8876 }, + { 0.5991, 0.9119 }, + { 0.5963, 0.9363 }, + { 0.5936, 0.9603 }, + { 0.5908, 0.9846 }, + { 0.5880, 1.0089 }, + { 0.7182, 0.0896 }, + { 0.7154, 0.1136 }, + { 0.7126, 0.1379 }, + { 0.7098, 0.1622 }, + { 0.7070, 0.1866 }, + { 0.7042, 0.2109 }, + { 0.7015, 0.2349 }, + { 0.6987, 0.2593 }, + { 0.6959, 0.2836 }, + { 0.6931, 0.3079 }, + { 0.6903, 0.3323 }, + { 0.6876, 0.3563 }, + { 0.6848, 0.3806 }, + { 0.6820, 0.4050 }, + { 0.6792, 0.4293 }, + { 0.6764, 0.4536 }, + { 0.6736, 0.4776 }, + { 0.6708, 0.5020 }, + { 0.6680, 0.5263 }, + { 0.6652, 0.5506 }, + { 0.6624, 0.5750 }, + { 0.6597, 0.5990 }, + { 0.6569, 0.6233 }, + { 0.6541, 0.6477 }, + { 0.6513, 0.6720 }, + { 0.6485, 0.6963 }, + { 0.6457, 0.7204 }, + { 0.6429, 0.7447 }, + { 0.6401, 0.7690 }, + { 0.6373, 0.7934 }, + { 0.6346, 0.8177 }, + { 0.6318, 0.8417 }, + { 0.6290, 0.8660 }, + { 0.6262, 0.8904 }, + { 0.6234, 0.9147 }, + { 0.6206, 0.9390 }, + { 0.6179, 0.9631 }, + { 0.6151, 0.9874 }, + { 0.6123, 1.0117 }, + { 0.7424, 0.0923 }, + { 0.7397, 0.1164 }, + { 0.7369, 0.1407 }, + { 0.7341, 0.1650 }, + { 0.7313, 0.1894 }, + { 0.7285, 0.2137 }, + { 0.7257, 0.2377 }, + { 0.7229, 0.2620 }, + { 0.7202, 0.2864 }, + { 0.7174, 0.3107 }, + { 0.7146, 0.3351 }, + { 0.7118, 0.3591 }, + { 0.7090, 0.3834 }, + { 0.7062, 0.4077 }, + { 0.7034, 0.4321 }, + { 0.7006, 0.4564 }, + { 0.6979, 0.4804 }, + { 0.6951, 0.5048 }, + { 0.6923, 0.5291 }, + { 0.6895, 0.5534 }, + { 0.6867, 0.5778 }, + { 0.6839, 0.6018 }, + { 0.6811, 0.6261 }, + { 0.6783, 0.6505 }, + { 0.6755, 0.6748 }, + { 0.6727, 0.6991 }, + { 0.6700, 0.7231 }, + { 0.6672, 0.7475 }, + { 0.6644, 0.7718 }, + { 0.6616, 0.7961 }, + { 0.6588, 0.8205 }, + { 0.6561, 0.8445 }, + { 0.6533, 0.8688 }, + { 0.6505, 0.8932 }, + { 0.6477, 0.9175 }, + { 0.6449, 0.9418 }, + { 0.6421, 0.9659 }, + { 0.6393, 0.9902 }, + { 0.6365, 1.0145 }, + { 0.7667, 0.0951 }, + { 0.7640, 0.1191 }, + { 0.7612, 0.1435 }, + { 0.7584, 0.1678 }, + { 0.7556, 0.1922 }, + { 0.7528, 0.2165 }, + { 0.7500, 0.2405 }, + { 0.7472, 0.2648 }, + { 0.7444, 0.2892 }, + { 0.7417, 0.3135 }, + { 0.7389, 0.3378 }, + { 0.7361, 0.3619 }, + { 0.7333, 0.3862 }, + { 0.7305, 0.4105 }, + { 0.7277, 0.4349 }, + { 0.7249, 0.4592 }, + { 0.7222, 0.4832 }, + { 0.7194, 0.5076 }, + { 0.7166, 0.5319 }, + { 0.7138, 0.5562 }, + { 0.7110, 0.5806 }, + { 0.7082, 0.6046 }, + { 0.7054, 0.6289 }, + { 0.7026, 0.6532 }, + { 0.6998, 0.6776 }, + { 0.6970, 0.7019 }, + { 0.6943, 0.7259 }, + { 0.6915, 0.7503 }, + { 0.6887, 0.7746 }, + { 0.6859, 0.7989 }, + { 0.6831, 0.8233 }, + { 0.6803, 0.8473 }, + { 0.6776, 0.8716 }, + { 0.6748, 0.8960 }, + { 0.6720, 0.9203 }, + { 0.6692, 0.9446 }, + { 0.6664, 0.9686 }, + { 0.6636, 0.9930 }, + { 0.6608, 1.0173 }, + { 0.7910, 0.0979 }, + { 0.7882, 0.1219 }, + { 0.7854, 0.1463 }, + { 0.7826, 0.1706 }, + { 0.7798, 0.1949 }, + { 0.7771, 0.2193 }, + { 0.7743, 0.2433 }, + { 0.7715, 0.2676 }, + { 0.7687, 0.2920 }, + { 0.7659, 0.3163 }, + { 0.7631, 0.3406 }, + { 0.7604, 0.3646 }, + { 0.7576, 0.3890 }, + { 0.7548, 0.4133 }, + { 0.7520, 0.4377 }, + { 0.7492, 0.4620 }, + { 0.7464, 0.4860 }, + { 0.7436, 0.5103 }, + { 0.7408, 0.5347 }, + { 0.7380, 0.5590 }, + { 0.7352, 0.5833 }, + { 0.7325, 0.6074 }, + { 0.7297, 0.6317 }, + { 0.7269, 0.6560 }, + { 0.7241, 0.6804 }, + { 0.7213, 0.7047 }, + { 0.7185, 0.7287 }, + { 0.7157, 0.7531 }, + { 0.7130, 0.7774 }, + { 0.7102, 0.8017 }, + { 0.7074, 0.8261 }, + { 0.7046, 0.8501 }, + { 0.7018, 0.8744 }, + { 0.6990, 0.8987 }, + { 0.6962, 0.9231 }, + { 0.6934, 0.9474 }, + { 0.6907, 0.9714 }, + { 0.6879, 0.9958 }, + { 0.6851, 1.0201 }, + { 0.8152, 0.1007 }, + { 0.8125, 0.1247 }, + { 0.8097, 0.1491 }, + { 0.8069, 0.1734 }, + { 0.8041, 0.1977 }, + { 0.8013, 0.2221 }, + { 0.7986, 0.2461 }, + { 0.7958, 0.2704 }, + { 0.7930, 0.2947 }, + { 0.7902, 0.3191 }, + { 0.7874, 0.3434 }, + { 0.7846, 0.3674 }, + { 0.7818, 0.3918 }, + { 0.7790, 0.4161 }, + { 0.7762, 0.4404 }, + { 0.7734, 0.4648 }, + { 0.7707, 0.4888 }, + { 0.7679, 0.5131 }, + { 0.7651, 0.5375 }, + { 0.7623, 0.5618 }, + { 0.7595, 0.5861 }, + { 0.7567, 0.6101 }, + { 0.7539, 0.6345 }, + { 0.7511, 0.6588 }, + { 0.7483, 0.6831 }, + { 0.7456, 0.7075 }, + { 0.7428, 0.7315 }, + { 0.7400, 0.7558 }, + { 0.7372, 0.7802 }, + { 0.7344, 0.8045 }, + { 0.7316, 0.8288 }, + { 0.7289, 0.8529 }, + { 0.7261, 0.8772 }, + { 0.7233, 0.9015 }, + { 0.7205, 0.9259 }, + { 0.7177, 0.9502 }, + { 0.7149, 0.9742 }, + { 0.7121, 0.9986 }, + { 0.7093, 1.0229 }, + { 0.8395, 0.1035 }, + { 0.8368, 0.1275 }, + { 0.8340, 0.1518 }, + { 0.8312, 0.1762 }, + { 0.8284, 0.2005 }, + { 0.8256, 0.2248 }, + { 0.8228, 0.2489 }, + { 0.8201, 0.2732 }, + { 0.8173, 0.2975 }, + { 0.8145, 0.3219 }, + { 0.8117, 0.3462 }, + { 0.8089, 0.3702 }, + { 0.8061, 0.3946 }, + { 0.8033, 0.4189 }, + { 0.8005, 0.4432 }, + { 0.7977, 0.4676 }, + { 0.7950, 0.4916 }, + { 0.7922, 0.5159 }, + { 0.7894, 0.5402 }, + { 0.7866, 0.5646 }, + { 0.7838, 0.5889 }, + { 0.7810, 0.6129 }, + { 0.7782, 0.6373 }, + { 0.7754, 0.6616 }, + { 0.7726, 0.6859 }, + { 0.7698, 0.7103 }, + { 0.7671, 0.7343 }, + { 0.7643, 0.7586 }, + { 0.7615, 0.7830 }, + { 0.7587, 0.8073 }, + { 0.7559, 0.8316 }, + { 0.7532, 0.8556 }, + { 0.7504, 0.8800 }, + { 0.7476, 0.9043 }, + { 0.7448, 0.9287 }, + { 0.7420, 0.9530 }, + { 0.7392, 0.9770 }, + { 0.7364, 1.0013 }, + { 0.7336, 1.0257 }, + { 0.8638, 0.1063 }, + { 0.8610, 0.1303 }, + { 0.8582, 0.1546 }, + { 0.8555, 0.1790 }, + { 0.8527, 0.2033 }, + { 0.8499, 0.2276 }, + { 0.8471, 0.2517 }, + { 0.8443, 0.2760 }, + { 0.8415, 0.3003 }, + { 0.8387, 0.3247 }, + { 0.8359, 0.3490 }, + { 0.8332, 0.3730 }, + { 0.8304, 0.3973 }, + { 0.8276, 0.4217 }, + { 0.8248, 0.4460 }, + { 0.8220, 0.4703 }, + { 0.8192, 0.4944 }, + { 0.8164, 0.5187 }, + { 0.8136, 0.5430 }, + { 0.8108, 0.5674 }, + { 0.8080, 0.5917 }, + { 0.8053, 0.6157 }, + { 0.8025, 0.6401 }, + { 0.7997, 0.6644 }, + { 0.7969, 0.6887 }, + { 0.7941, 0.7131 }, + { 0.7913, 0.7371 }, + { 0.7886, 0.7614 }, + { 0.7858, 0.7857 }, + { 0.7830, 0.8101 }, + { 0.7802, 0.8344 }, + { 0.7774, 0.8584 }, + { 0.7746, 0.8828 }, + { 0.7718, 0.9071 }, + { 0.7690, 0.9314 }, + { 0.7662, 0.9558 }, + { 0.7635, 0.9798 }, + { 0.7607, 1.0041 }, + { 0.7579, 1.0285 }, + { 0.8881, 0.1091 }, + { 0.8853, 0.1331 }, + { 0.8825, 0.1574 }, + { 0.8797, 0.1818 }, + { 0.8770, 0.2061 }, + { 0.8742, 0.2304 }, + { 0.8714, 0.2544 }, + { 0.8686, 0.2788 }, + { 0.8658, 0.3031 }, + { 0.8630, 0.3274 }, + { 0.8602, 0.3518 }, + { 0.8575, 0.3758 }, + { 0.8547, 0.4001 }, + { 0.8519, 0.4245 }, + { 0.8491, 0.4488 }, + { 0.8463, 0.4731 }, + { 0.8435, 0.4972 }, + { 0.8407, 0.5215 }, + { 0.8379, 0.5458 }, + { 0.8351, 0.5702 }, + { 0.8323, 0.5945 }, + { 0.8296, 0.6185 }, + { 0.8268, 0.6428 }, + { 0.8240, 0.6672 }, + { 0.8212, 0.6915 }, + { 0.8184, 0.7159 }, + { 0.8156, 0.7399 }, + { 0.8128, 0.7642 }, + { 0.8101, 0.7885 }, + { 0.8073, 0.8129 }, + { 0.8045, 0.8372 }, + { 0.8017, 0.8612 }, + { 0.7989, 0.8856 }, + { 0.7961, 0.9099 }, + { 0.7933, 0.9342 }, + { 0.7905, 0.9586 }, + { 0.7878, 0.9826 }, + { 0.7850, 1.0069 }, + { 0.7822, 1.0313 }, + { 0.9123, 0.1119 }, + { 0.9096, 0.1359 }, + { 0.9068, 0.1602 }, + { 0.9040, 0.1845 }, + { 0.9012, 0.2089 }, + { 0.8984, 0.2332 }, + { 0.8957, 0.2572 }, + { 0.8929, 0.2816 }, + { 0.8901, 0.3059 }, + { 0.8873, 0.3302 }, + { 0.8845, 0.3546 }, + { 0.8817, 0.3786 }, + { 0.8789, 0.4029 }, + { 0.8761, 0.4273 }, + { 0.8733, 0.4516 }, + { 0.8705, 0.4759 }, + { 0.8678, 0.4999 }, + { 0.8650, 0.5243 }, + { 0.8622, 0.5486 }, + { 0.8594, 0.5729 }, + { 0.8566, 0.5973 }, + { 0.8538, 0.6213 }, + { 0.8510, 0.6456 }, + { 0.8482, 0.6700 }, + { 0.8455, 0.6943 }, + { 0.8427, 0.7186 }, + { 0.8399, 0.7427 }, + { 0.8371, 0.7670 }, + { 0.8343, 0.7913 }, + { 0.8315, 0.8157 }, + { 0.8287, 0.8400 }, + { 0.8260, 0.8640 }, + { 0.8232, 0.8883 }, + { 0.8204, 0.9127 }, + { 0.8176, 0.9370 }, + { 0.8148, 0.9614 }, + { 0.8120, 0.9854 }, + { 0.8092, 1.0097 }, + { 0.8064, 1.0340 }, + { 0.9366, 0.1146 }, + { 0.9338, 0.1387 }, + { 0.9311, 0.1630 }, + { 0.9283, 0.1873 }, + { 0.9255, 0.2117 }, + { 0.9227, 0.2360 }, + { 0.9199, 0.2600 }, + { 0.9171, 0.2844 }, + { 0.9143, 0.3087 }, + { 0.9115, 0.3330 }, + { 0.9087, 0.3574 }, + { 0.9060, 0.3814 }, + { 0.9032, 0.4057 }, + { 0.9004, 0.4300 }, + { 0.8976, 0.4544 }, + { 0.8948, 0.4787 }, + { 0.8920, 0.5027 }, + { 0.8892, 0.5271 }, + { 0.8864, 0.5514 }, + { 0.8836, 0.5757 }, + { 0.8808, 0.6001 }, + { 0.8781, 0.6241 }, + { 0.8753, 0.6484 }, + { 0.8725, 0.6728 }, + { 0.8697, 0.6971 }, + { 0.8669, 0.7214 }, + { 0.8642, 0.7454 }, + { 0.8614, 0.7698 }, + { 0.8586, 0.7941 }, + { 0.8558, 0.8184 }, + { 0.8530, 0.8428 }, + { 0.8502, 0.8668 }, + { 0.8474, 0.8911 }, + { 0.8446, 0.9155 }, + { 0.8418, 0.9398 }, + { 0.8390, 0.9641 }, + { 0.8363, 0.9882 }, + { 0.8335, 1.0125 }, + { 0.8307, 1.0368 }, + { 0.9581, 0.1414 }, + { 0.9553, 0.1658 }, + { 0.9526, 0.1901 }, + { 0.9498, 0.2145 }, + { 0.9470, 0.2388 }, + { 0.9442, 0.2628 }, + { 0.9414, 0.2871 }, + { 0.9386, 0.3115 }, + { 0.9358, 0.3358 }, + { 0.9330, 0.3601 }, + { 0.9303, 0.3842 }, + { 0.9275, 0.4085 }, + { 0.9247, 0.4328 }, + { 0.9219, 0.4572 }, + { 0.9191, 0.4815 }, + { 0.9163, 0.5055 }, + { 0.9135, 0.5299 }, + { 0.9107, 0.5542 }, + { 0.9079, 0.5785 }, + { 0.9051, 0.6029 }, + { 0.9024, 0.6269 }, + { 0.8996, 0.6512 }, + { 0.8968, 0.6755 }, + { 0.8940, 0.6999 }, + { 0.8912, 0.7242 }, + { 0.8884, 0.7482 }, + { 0.8857, 0.7726 }, + { 0.8829, 0.7969 }, + { 0.8801, 0.8212 }, + { 0.8773, 0.8456 }, + { 0.8745, 0.8696 }, + { 0.8717, 0.8939 }, + { 0.8689, 0.9183 }, + { 0.8661, 0.9426 }, + { 0.8633, 0.9669 }, + { 0.8606, 0.9909 }, + { 0.8578, 1.0153 }, + { 0.8550, 1.0396 }, + { 0.8522, 1.0639 }, +}; + diff --git a/examples/osghangglide/terrain_texcoords.h b/examples/osghangglide/terrain_texcoords.h new file mode 100644 index 000000000..980fac44f --- /dev/null +++ b/examples/osghangglide/terrain_texcoords.h @@ -0,0 +1,2936 @@ +#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) + // disable the double to float errors. + #pragma warning( disable : 4305 ) +#endif + +static float texcoord[][2] = { +#ifdef _ORIGINAL_ /* [ */ + { 0.1121, 0.0171 }, + { 0.1094, 0.0411 }, + { 0.1066, 0.0654 }, + { 0.1038, 0.0898 }, + { 0.1010, 0.1141 }, + { 0.0982, 0.1384 }, + { 0.0954, 0.1624 }, + { 0.0926, 0.1868 }, + { 0.0898, 0.2111 }, + { 0.0870, 0.2354 }, + { 0.0842, 0.2598 }, + { 0.0815, 0.2838 }, + { 0.0787, 0.3081 }, + { 0.0759, 0.3325 }, + { 0.0731, 0.3568 }, + { 0.0703, 0.3811 }, + { 0.0675, 0.4052 }, + { 0.0647, 0.4295 }, + { 0.0619, 0.4538 }, + { 0.0591, 0.4782 }, + { 0.0564, 0.5025 }, + { 0.0536, 0.5265 }, + { 0.0508, 0.5508 }, + { 0.0480, 0.5752 }, + { 0.0452, 0.5995 }, + { 0.0424, 0.6239 }, + { 0.0397, 0.6479 }, + { 0.0369, 0.6722 }, + { 0.0341, 0.6965 }, + { 0.0313, 0.7209 }, + { 0.0285, 0.7452 }, + { 0.0257, 0.7692 }, + { 0.0229, 0.7936 }, + { 0.0201, 0.8179 }, + { 0.0173, 0.8422 }, + { 0.0145, 0.8666 }, + { 0.0118, 0.8906 }, + { 0.0090, 0.9149 }, + { 0.0062, 0.9393 }, + { 0.1364, 0.0199 }, + { 0.1336, 0.0439 }, + { 0.1309, 0.0682 }, + { 0.1281, 0.0925 }, + { 0.1253, 0.1169 }, + { 0.1225, 0.1412 }, + { 0.1197, 0.1652 }, + { 0.1169, 0.1896 }, + { 0.1141, 0.2139 }, + { 0.1113, 0.2382 }, + { 0.1085, 0.2626 }, + { 0.1058, 0.2866 }, + { 0.1030, 0.3109 }, + { 0.1002, 0.3353 }, + { 0.0974, 0.3596 }, + { 0.0946, 0.3839 }, + { 0.0918, 0.4079 }, + { 0.0890, 0.4323 }, + { 0.0862, 0.4566 }, + { 0.0834, 0.4810 }, + { 0.0806, 0.5053 }, + { 0.0779, 0.5293 }, + { 0.0751, 0.5536 }, + { 0.0723, 0.5780 }, + { 0.0695, 0.6023 }, + { 0.0667, 0.6266 }, + { 0.0640, 0.6507 }, + { 0.0612, 0.6750 }, + { 0.0584, 0.6993 }, + { 0.0556, 0.7237 }, + { 0.0528, 0.7480 }, + { 0.0500, 0.7720 }, + { 0.0472, 0.7964 }, + { 0.0444, 0.8207 }, + { 0.0416, 0.8450 }, + { 0.0388, 0.8694 }, + { 0.0361, 0.8934 }, + { 0.0333, 0.9177 }, + { 0.0305, 0.9420 }, + { 0.1607, 0.0226 }, + { 0.1579, 0.0467 }, + { 0.1551, 0.0710 }, + { 0.1523, 0.0953 }, + { 0.1495, 0.1197 }, + { 0.1467, 0.1440 }, + { 0.1440, 0.1680 }, + { 0.1412, 0.1924 }, + { 0.1384, 0.2167 }, + { 0.1356, 0.2410 }, + { 0.1328, 0.2654 }, + { 0.1300, 0.2894 }, + { 0.1272, 0.3137 }, + { 0.1244, 0.3380 }, + { 0.1216, 0.3624 }, + { 0.1188, 0.3867 }, + { 0.1161, 0.4107 }, + { 0.1133, 0.4351 }, + { 0.1105, 0.4594 }, + { 0.1077, 0.4837 }, + { 0.1049, 0.5081 }, + { 0.1021, 0.5321 }, + { 0.0994, 0.5564 }, + { 0.0966, 0.5808 }, + { 0.0938, 0.6051 }, + { 0.0910, 0.6294 }, + { 0.0882, 0.6534 }, + { 0.0854, 0.6778 }, + { 0.0826, 0.7021 }, + { 0.0798, 0.7265 }, + { 0.0770, 0.7508 }, + { 0.0743, 0.7748 }, + { 0.0715, 0.7991 }, + { 0.0687, 0.8235 }, + { 0.0659, 0.8478 }, + { 0.0631, 0.8721 }, + { 0.0603, 0.8962 }, + { 0.0575, 0.9205 }, + { 0.0547, 0.9448 }, + { 0.1850, 0.0254 }, + { 0.1822, 0.0495 }, + { 0.1794, 0.0738 }, + { 0.1766, 0.0981 }, + { 0.1738, 0.1225 }, + { 0.1710, 0.1468 }, + { 0.1683, 0.1708 }, + { 0.1655, 0.1951 }, + { 0.1627, 0.2195 }, + { 0.1599, 0.2438 }, + { 0.1571, 0.2681 }, + { 0.1543, 0.2922 }, + { 0.1515, 0.3165 }, + { 0.1487, 0.3408 }, + { 0.1459, 0.3652 }, + { 0.1431, 0.3895 }, + { 0.1404, 0.4135 }, + { 0.1376, 0.4379 }, + { 0.1348, 0.4622 }, + { 0.1320, 0.4865 }, + { 0.1292, 0.5109 }, + { 0.1264, 0.5349 }, + { 0.1236, 0.5592 }, + { 0.1209, 0.5835 }, + { 0.1181, 0.6079 }, + { 0.1153, 0.6322 }, + { 0.1125, 0.6562 }, + { 0.1097, 0.6806 }, + { 0.1069, 0.7049 }, + { 0.1041, 0.7292 }, + { 0.1013, 0.7536 }, + { 0.0986, 0.7776 }, + { 0.0958, 0.8019 }, + { 0.0930, 0.8263 }, + { 0.0902, 0.8506 }, + { 0.0874, 0.8749 }, + { 0.0846, 0.8990 }, + { 0.0818, 0.9233 }, + { 0.0790, 0.9476 }, + { 0.2092, 0.0282 }, + { 0.2065, 0.0522 }, + { 0.2037, 0.0766 }, + { 0.2009, 0.1009 }, + { 0.1981, 0.1252 }, + { 0.1953, 0.1496 }, + { 0.1925, 0.1736 }, + { 0.1897, 0.1979 }, + { 0.1869, 0.2223 }, + { 0.1841, 0.2466 }, + { 0.1813, 0.2709 }, + { 0.1786, 0.2950 }, + { 0.1758, 0.3193 }, + { 0.1730, 0.3436 }, + { 0.1702, 0.3680 }, + { 0.1674, 0.3923 }, + { 0.1646, 0.4163 }, + { 0.1618, 0.4406 }, + { 0.1590, 0.4650 }, + { 0.1563, 0.4893 }, + { 0.1535, 0.5136 }, + { 0.1507, 0.5377 }, + { 0.1479, 0.5620 }, + { 0.1451, 0.5863 }, + { 0.1423, 0.6107 }, + { 0.1395, 0.6350 }, + { 0.1368, 0.6590 }, + { 0.1340, 0.6834 }, + { 0.1312, 0.7077 }, + { 0.1284, 0.7320 }, + { 0.1256, 0.7564 }, + { 0.1228, 0.7804 }, + { 0.1200, 0.8047 }, + { 0.1172, 0.8290 }, + { 0.1144, 0.8534 }, + { 0.1116, 0.8777 }, + { 0.1089, 0.9017 }, + { 0.1061, 0.9261 }, + { 0.1033, 0.9504 }, + { 0.2335, 0.0310 }, + { 0.2307, 0.0550 }, + { 0.2279, 0.0794 }, + { 0.2251, 0.1037 }, + { 0.2223, 0.1280 }, + { 0.2195, 0.1524 }, + { 0.2168, 0.1764 }, + { 0.2140, 0.2007 }, + { 0.2112, 0.2251 }, + { 0.2084, 0.2494 }, + { 0.2056, 0.2737 }, + { 0.2028, 0.2977 }, + { 0.2000, 0.3221 }, + { 0.1972, 0.3464 }, + { 0.1944, 0.3707 }, + { 0.1916, 0.3951 }, + { 0.1889, 0.4191 }, + { 0.1861, 0.4434 }, + { 0.1833, 0.4678 }, + { 0.1805, 0.4921 }, + { 0.1777, 0.5164 }, + { 0.1750, 0.5405 }, + { 0.1722, 0.5648 }, + { 0.1694, 0.5891 }, + { 0.1666, 0.6135 }, + { 0.1638, 0.6378 }, + { 0.1610, 0.6618 }, + { 0.1582, 0.6861 }, + { 0.1554, 0.7105 }, + { 0.1526, 0.7348 }, + { 0.1498, 0.7591 }, + { 0.1471, 0.7832 }, + { 0.1443, 0.8075 }, + { 0.1415, 0.8318 }, + { 0.1387, 0.8562 }, + { 0.1359, 0.8805 }, + { 0.1331, 0.9045 }, + { 0.1303, 0.9289 }, + { 0.1275, 0.9532 }, + { 0.2578, 0.0338 }, + { 0.2550, 0.0578 }, + { 0.2522, 0.0822 }, + { 0.2494, 0.1065 }, + { 0.2466, 0.1308 }, + { 0.2438, 0.1552 }, + { 0.2411, 0.1792 }, + { 0.2383, 0.2035 }, + { 0.2355, 0.2278 }, + { 0.2327, 0.2522 }, + { 0.2299, 0.2765 }, + { 0.2271, 0.3005 }, + { 0.2243, 0.3249 }, + { 0.2215, 0.3492 }, + { 0.2187, 0.3735 }, + { 0.2159, 0.3979 }, + { 0.2132, 0.4219 }, + { 0.2104, 0.4462 }, + { 0.2076, 0.4706 }, + { 0.2048, 0.4949 }, + { 0.2020, 0.5192 }, + { 0.1992, 0.5432 }, + { 0.1965, 0.5676 }, + { 0.1937, 0.5919 }, + { 0.1909, 0.6162 }, + { 0.1881, 0.6406 }, + { 0.1853, 0.6646 }, + { 0.1825, 0.6889 }, + { 0.1797, 0.7133 }, + { 0.1769, 0.7376 }, + { 0.1741, 0.7619 }, + { 0.1714, 0.7860 }, + { 0.1686, 0.8103 }, + { 0.1658, 0.8346 }, + { 0.1630, 0.8590 }, + { 0.1602, 0.8833 }, + { 0.1574, 0.9073 }, + { 0.1546, 0.9316 }, + { 0.1518, 0.9560 }, + { 0.2820, 0.0366 }, + { 0.2793, 0.0606 }, + { 0.2765, 0.0849 }, + { 0.2737, 0.1093 }, + { 0.2709, 0.1336 }, + { 0.2681, 0.1579 }, + { 0.2653, 0.1820 }, + { 0.2625, 0.2063 }, + { 0.2597, 0.2306 }, + { 0.2569, 0.2550 }, + { 0.2541, 0.2793 }, + { 0.2514, 0.3033 }, + { 0.2486, 0.3277 }, + { 0.2458, 0.3520 }, + { 0.2430, 0.3763 }, + { 0.2402, 0.4007 }, + { 0.2374, 0.4247 }, + { 0.2346, 0.4490 }, + { 0.2319, 0.4733 }, + { 0.2291, 0.4977 }, + { 0.2263, 0.5220 }, + { 0.2235, 0.5460 }, + { 0.2207, 0.5704 }, + { 0.2179, 0.5947 }, + { 0.2151, 0.6190 }, + { 0.2123, 0.6434 }, + { 0.2096, 0.6674 }, + { 0.2068, 0.6917 }, + { 0.2040, 0.7161 }, + { 0.2012, 0.7404 }, + { 0.1984, 0.7647 }, + { 0.1956, 0.7887 }, + { 0.1928, 0.8131 }, + { 0.1900, 0.8374 }, + { 0.1872, 0.8617 }, + { 0.1844, 0.8861 }, + { 0.1817, 0.9101 }, + { 0.1789, 0.9344 }, + { 0.1761, 0.9588 }, + { 0.3063, 0.0394 }, + { 0.3036, 0.0634 }, + { 0.3008, 0.0877 }, + { 0.2980, 0.1121 }, + { 0.2952, 0.1364 }, + { 0.2924, 0.1607 }, + { 0.2896, 0.1848 }, + { 0.2868, 0.2091 }, + { 0.2840, 0.2334 }, + { 0.2812, 0.2578 }, + { 0.2784, 0.2821 }, + { 0.2757, 0.3061 }, + { 0.2729, 0.3304 }, + { 0.2701, 0.3548 }, + { 0.2673, 0.3791 }, + { 0.2645, 0.4034 }, + { 0.2617, 0.4275 }, + { 0.2589, 0.4518 }, + { 0.2561, 0.4761 }, + { 0.2534, 0.5005 }, + { 0.2506, 0.5248 }, + { 0.2478, 0.5488 }, + { 0.2450, 0.5732 }, + { 0.2422, 0.5975 }, + { 0.2394, 0.6218 }, + { 0.2366, 0.6462 }, + { 0.2339, 0.6702 }, + { 0.2311, 0.6945 }, + { 0.2283, 0.7188 }, + { 0.2255, 0.7432 }, + { 0.2227, 0.7675 }, + { 0.2199, 0.7915 }, + { 0.2171, 0.8159 }, + { 0.2143, 0.8402 }, + { 0.2115, 0.8645 }, + { 0.2087, 0.8889 }, + { 0.2060, 0.9129 }, + { 0.2032, 0.9372 }, + { 0.2004, 0.9616 }, + { 0.3306, 0.0422 }, + { 0.3278, 0.0662 }, + { 0.3250, 0.0905 }, + { 0.3222, 0.1148 }, + { 0.3194, 0.1392 }, + { 0.3166, 0.1635 }, + { 0.3139, 0.1875 }, + { 0.3111, 0.2119 }, + { 0.3083, 0.2362 }, + { 0.3055, 0.2605 }, + { 0.3027, 0.2849 }, + { 0.2999, 0.3089 }, + { 0.2971, 0.3332 }, + { 0.2943, 0.3576 }, + { 0.2915, 0.3819 }, + { 0.2888, 0.4062 }, + { 0.2860, 0.4302 }, + { 0.2832, 0.4546 }, + { 0.2804, 0.4789 }, + { 0.2776, 0.5033 }, + { 0.2748, 0.5276 }, + { 0.2721, 0.5516 }, + { 0.2693, 0.5759 }, + { 0.2665, 0.6003 }, + { 0.2637, 0.6246 }, + { 0.2609, 0.6489 }, + { 0.2581, 0.6730 }, + { 0.2553, 0.6973 }, + { 0.2525, 0.7216 }, + { 0.2497, 0.7460 }, + { 0.2469, 0.7703 }, + { 0.2442, 0.7943 }, + { 0.2414, 0.8187 }, + { 0.2386, 0.8430 }, + { 0.2358, 0.8673 }, + { 0.2330, 0.8917 }, + { 0.2302, 0.9157 }, + { 0.2274, 0.9400 }, + { 0.2246, 0.9643 }, + { 0.3548, 0.0449 }, + { 0.3521, 0.0690 }, + { 0.3493, 0.0933 }, + { 0.3465, 0.1176 }, + { 0.3437, 0.1420 }, + { 0.3409, 0.1663 }, + { 0.3381, 0.1903 }, + { 0.3353, 0.2147 }, + { 0.3325, 0.2390 }, + { 0.3297, 0.2633 }, + { 0.3269, 0.2877 }, + { 0.3242, 0.3117 }, + { 0.3214, 0.3360 }, + { 0.3186, 0.3603 }, + { 0.3158, 0.3847 }, + { 0.3130, 0.4090 }, + { 0.3102, 0.4330 }, + { 0.3075, 0.4574 }, + { 0.3047, 0.4817 }, + { 0.3019, 0.5060 }, + { 0.2991, 0.5304 }, + { 0.2963, 0.5544 }, + { 0.2935, 0.5787 }, + { 0.2907, 0.6031 }, + { 0.2879, 0.6274 }, + { 0.2851, 0.6517 }, + { 0.2824, 0.6757 }, + { 0.2796, 0.7001 }, + { 0.2768, 0.7244 }, + { 0.2740, 0.7488 }, + { 0.2712, 0.7731 }, + { 0.2684, 0.7971 }, + { 0.2656, 0.8214 }, + { 0.2628, 0.8458 }, + { 0.2600, 0.8701 }, + { 0.2573, 0.8944 }, + { 0.2545, 0.9185 }, + { 0.2517, 0.9428 }, + { 0.2489, 0.9671 }, + { 0.3791, 0.0477 }, + { 0.3764, 0.0718 }, + { 0.3736, 0.0961 }, + { 0.3708, 0.1204 }, + { 0.3680, 0.1448 }, + { 0.3652, 0.1691 }, + { 0.3624, 0.1931 }, + { 0.3596, 0.2174 }, + { 0.3568, 0.2418 }, + { 0.3540, 0.2661 }, + { 0.3512, 0.2905 }, + { 0.3485, 0.3145 }, + { 0.3457, 0.3388 }, + { 0.3429, 0.3631 }, + { 0.3401, 0.3875 }, + { 0.3373, 0.4118 }, + { 0.3345, 0.4358 }, + { 0.3317, 0.4602 }, + { 0.3290, 0.4845 }, + { 0.3262, 0.5088 }, + { 0.3234, 0.5332 }, + { 0.3206, 0.5572 }, + { 0.3178, 0.5815 }, + { 0.3150, 0.6059 }, + { 0.3122, 0.6302 }, + { 0.3094, 0.6545 }, + { 0.3067, 0.6785 }, + { 0.3039, 0.7029 }, + { 0.3011, 0.7272 }, + { 0.2983, 0.7515 }, + { 0.2955, 0.7759 }, + { 0.2927, 0.7999 }, + { 0.2899, 0.8242 }, + { 0.2871, 0.8486 }, + { 0.2843, 0.8729 }, + { 0.2815, 0.8972 }, + { 0.2788, 0.9213 }, + { 0.2760, 0.9456 }, + { 0.2732, 0.9699 }, + { 0.4034, 0.0505 }, + { 0.4006, 0.0745 }, + { 0.3978, 0.0989 }, + { 0.3950, 0.1232 }, + { 0.3922, 0.1475 }, + { 0.3894, 0.1719 }, + { 0.3867, 0.1959 }, + { 0.3839, 0.2202 }, + { 0.3811, 0.2446 }, + { 0.3783, 0.2689 }, + { 0.3755, 0.2932 }, + { 0.3727, 0.3173 }, + { 0.3699, 0.3416 }, + { 0.3671, 0.3659 }, + { 0.3644, 0.3903 }, + { 0.3616, 0.4146 }, + { 0.3588, 0.4386 }, + { 0.3560, 0.4629 }, + { 0.3532, 0.4873 }, + { 0.3504, 0.5116 }, + { 0.3476, 0.5359 }, + { 0.3449, 0.5600 }, + { 0.3421, 0.5843 }, + { 0.3393, 0.6086 }, + { 0.3365, 0.6330 }, + { 0.3337, 0.6573 }, + { 0.3309, 0.6813 }, + { 0.3281, 0.7057 }, + { 0.3253, 0.7300 }, + { 0.3225, 0.7543 }, + { 0.3197, 0.7787 }, + { 0.3170, 0.8027 }, + { 0.3142, 0.8270 }, + { 0.3114, 0.8513 }, + { 0.3086, 0.8757 }, + { 0.3058, 0.9000 }, + { 0.3030, 0.9240 }, + { 0.3002, 0.9484 }, + { 0.2975, 0.9727 }, + { 0.4277, 0.0533 }, + { 0.4249, 0.0773 }, + { 0.4221, 0.1017 }, + { 0.4193, 0.1260 }, + { 0.4165, 0.1503 }, + { 0.4137, 0.1747 }, + { 0.4110, 0.1987 }, + { 0.4082, 0.2230 }, + { 0.4054, 0.2474 }, + { 0.4026, 0.2717 }, + { 0.3998, 0.2960 }, + { 0.3970, 0.3200 }, + { 0.3942, 0.3444 }, + { 0.3914, 0.3687 }, + { 0.3886, 0.3930 }, + { 0.3859, 0.4174 }, + { 0.3831, 0.4414 }, + { 0.3803, 0.4657 }, + { 0.3775, 0.4901 }, + { 0.3747, 0.5144 }, + { 0.3719, 0.5387 }, + { 0.3692, 0.5628 }, + { 0.3664, 0.5871 }, + { 0.3636, 0.6114 }, + { 0.3608, 0.6358 }, + { 0.3580, 0.6601 }, + { 0.3552, 0.6841 }, + { 0.3524, 0.7084 }, + { 0.3496, 0.7328 }, + { 0.3468, 0.7571 }, + { 0.3440, 0.7815 }, + { 0.3413, 0.8055 }, + { 0.3385, 0.8298 }, + { 0.3357, 0.8541 }, + { 0.3329, 0.8785 }, + { 0.3301, 0.9028 }, + { 0.3273, 0.9268 }, + { 0.3245, 0.9512 }, + { 0.3217, 0.9755 }, + { 0.4519, 0.0561 }, + { 0.4492, 0.0801 }, + { 0.4464, 0.1045 }, + { 0.4436, 0.1288 }, + { 0.4408, 0.1531 }, + { 0.4380, 0.1775 }, + { 0.4352, 0.2015 }, + { 0.4324, 0.2258 }, + { 0.4296, 0.2501 }, + { 0.4268, 0.2745 }, + { 0.4240, 0.2988 }, + { 0.4213, 0.3228 }, + { 0.4185, 0.3472 }, + { 0.4157, 0.3715 }, + { 0.4129, 0.3958 }, + { 0.4101, 0.4202 }, + { 0.4073, 0.4442 }, + { 0.4046, 0.4685 }, + { 0.4018, 0.4929 }, + { 0.3990, 0.5172 }, + { 0.3962, 0.5415 }, + { 0.3934, 0.5655 }, + { 0.3906, 0.5899 }, + { 0.3878, 0.6142 }, + { 0.3850, 0.6385 }, + { 0.3822, 0.6629 }, + { 0.3795, 0.6869 }, + { 0.3767, 0.7112 }, + { 0.3739, 0.7356 }, + { 0.3711, 0.7599 }, + { 0.3683, 0.7842 }, + { 0.3655, 0.8083 }, + { 0.3627, 0.8326 }, + { 0.3599, 0.8569 }, + { 0.3571, 0.8813 }, + { 0.3544, 0.9056 }, + { 0.3516, 0.9296 }, + { 0.3488, 0.9539 }, + { 0.3460, 0.9783 }, + { 0.4762, 0.0589 }, + { 0.4734, 0.0829 }, + { 0.4706, 0.1072 }, + { 0.4678, 0.1316 }, + { 0.4650, 0.1559 }, + { 0.4622, 0.1802 }, + { 0.4595, 0.2043 }, + { 0.4567, 0.2286 }, + { 0.4539, 0.2529 }, + { 0.4511, 0.2773 }, + { 0.4483, 0.3016 }, + { 0.4455, 0.3256 }, + { 0.4427, 0.3500 }, + { 0.4400, 0.3743 }, + { 0.4372, 0.3986 }, + { 0.4344, 0.4230 }, + { 0.4316, 0.4470 }, + { 0.4288, 0.4713 }, + { 0.4260, 0.4956 }, + { 0.4232, 0.5200 }, + { 0.4204, 0.5443 }, + { 0.4177, 0.5683 }, + { 0.4149, 0.5927 }, + { 0.4121, 0.6170 }, + { 0.4093, 0.6413 }, + { 0.4065, 0.6657 }, + { 0.4037, 0.6897 }, + { 0.4009, 0.7140 }, + { 0.3981, 0.7384 }, + { 0.3953, 0.7627 }, + { 0.3925, 0.7870 }, + { 0.3898, 0.8110 }, + { 0.3870, 0.8354 }, + { 0.3842, 0.8597 }, + { 0.3814, 0.8840 }, + { 0.3786, 0.9084 }, + { 0.3758, 0.9324 }, + { 0.3731, 0.9567 }, + { 0.3703, 0.9811 }, + { 0.5005, 0.0617 }, + { 0.4977, 0.0857 }, + { 0.4949, 0.1100 }, + { 0.4921, 0.1344 }, + { 0.4893, 0.1587 }, + { 0.4865, 0.1830 }, + { 0.4838, 0.2071 }, + { 0.4810, 0.2314 }, + { 0.4782, 0.2557 }, + { 0.4754, 0.2801 }, + { 0.4726, 0.3044 }, + { 0.4698, 0.3284 }, + { 0.4670, 0.3527 }, + { 0.4642, 0.3771 }, + { 0.4615, 0.4014 }, + { 0.4587, 0.4257 }, + { 0.4559, 0.4498 }, + { 0.4531, 0.4741 }, + { 0.4503, 0.4984 }, + { 0.4475, 0.5228 }, + { 0.4447, 0.5471 }, + { 0.4420, 0.5711 }, + { 0.4392, 0.5955 }, + { 0.4364, 0.6198 }, + { 0.4336, 0.6441 }, + { 0.4308, 0.6685 }, + { 0.4280, 0.6925 }, + { 0.4252, 0.7168 }, + { 0.4224, 0.7411 }, + { 0.4196, 0.7655 }, + { 0.4168, 0.7898 }, + { 0.4141, 0.8138 }, + { 0.4113, 0.8382 }, + { 0.4085, 0.8625 }, + { 0.4057, 0.8868 }, + { 0.4029, 0.9112 }, + { 0.4001, 0.9352 }, + { 0.3973, 0.9595 }, + { 0.3946, 0.9839 }, + { 0.5247, 0.0645 }, + { 0.5220, 0.0885 }, + { 0.5192, 0.1128 }, + { 0.5164, 0.1371 }, + { 0.5136, 0.1615 }, + { 0.5108, 0.1858 }, + { 0.5080, 0.2098 }, + { 0.5052, 0.2342 }, + { 0.5024, 0.2585 }, + { 0.4996, 0.2828 }, + { 0.4969, 0.3072 }, + { 0.4941, 0.3312 }, + { 0.4913, 0.3555 }, + { 0.4885, 0.3799 }, + { 0.4857, 0.4042 }, + { 0.4829, 0.4285 }, + { 0.4802, 0.4526 }, + { 0.4774, 0.4769 }, + { 0.4746, 0.5012 }, + { 0.4718, 0.5256 }, + { 0.4690, 0.5499 }, + { 0.4662, 0.5739 }, + { 0.4634, 0.5982 }, + { 0.4606, 0.6226 }, + { 0.4578, 0.6469 }, + { 0.4550, 0.6712 }, + { 0.4523, 0.6953 }, + { 0.4495, 0.7196 }, + { 0.4467, 0.7439 }, + { 0.4439, 0.7683 }, + { 0.4411, 0.7926 }, + { 0.4383, 0.8166 }, + { 0.4355, 0.8410 }, + { 0.4327, 0.8653 }, + { 0.4300, 0.8896 }, + { 0.4272, 0.9140 }, + { 0.4244, 0.9380 }, + { 0.4216, 0.9623 }, + { 0.4188, 0.9866 }, + { 0.5490, 0.0673 }, + { 0.5463, 0.0913 }, + { 0.5435, 0.1156 }, + { 0.5407, 0.1399 }, + { 0.5379, 0.1643 }, + { 0.5351, 0.1886 }, + { 0.5323, 0.2126 }, + { 0.5295, 0.2370 }, + { 0.5267, 0.2613 }, + { 0.5239, 0.2856 }, + { 0.5211, 0.3100 }, + { 0.5184, 0.3340 }, + { 0.5156, 0.3583 }, + { 0.5128, 0.3827 }, + { 0.5100, 0.4070 }, + { 0.5072, 0.4313 }, + { 0.5044, 0.4553 }, + { 0.5017, 0.4797 }, + { 0.4989, 0.5040 }, + { 0.4961, 0.5283 }, + { 0.4933, 0.5527 }, + { 0.4905, 0.5767 }, + { 0.4877, 0.6010 }, + { 0.4849, 0.6254 }, + { 0.4821, 0.6497 }, + { 0.4793, 0.6740 }, + { 0.4766, 0.6981 }, + { 0.4738, 0.7224 }, + { 0.4710, 0.7467 }, + { 0.4682, 0.7711 }, + { 0.4654, 0.7954 }, + { 0.4626, 0.8194 }, + { 0.4598, 0.8437 }, + { 0.4570, 0.8681 }, + { 0.4542, 0.8924 }, + { 0.4515, 0.9167 }, + { 0.4487, 0.9408 }, + { 0.4459, 0.9651 }, + { 0.4431, 0.9894 }, + { 0.5733, 0.0700 }, + { 0.5705, 0.0941 }, + { 0.5677, 0.1184 }, + { 0.5649, 0.1427 }, + { 0.5621, 0.1671 }, + { 0.5593, 0.1914 }, + { 0.5566, 0.2154 }, + { 0.5538, 0.2397 }, + { 0.5510, 0.2641 }, + { 0.5482, 0.2884 }, + { 0.5454, 0.3128 }, + { 0.5426, 0.3368 }, + { 0.5398, 0.3611 }, + { 0.5371, 0.3854 }, + { 0.5343, 0.4098 }, + { 0.5315, 0.4341 }, + { 0.5287, 0.4581 }, + { 0.5259, 0.4825 }, + { 0.5231, 0.5068 }, + { 0.5203, 0.5311 }, + { 0.5175, 0.5555 }, + { 0.5148, 0.5795 }, + { 0.5120, 0.6038 }, + { 0.5092, 0.6282 }, + { 0.5064, 0.6525 }, + { 0.5036, 0.6768 }, + { 0.5008, 0.7008 }, + { 0.4980, 0.7252 }, + { 0.4952, 0.7495 }, + { 0.4924, 0.7738 }, + { 0.4896, 0.7982 }, + { 0.4869, 0.8222 }, + { 0.4841, 0.8465 }, + { 0.4813, 0.8709 }, + { 0.4785, 0.8952 }, + { 0.4757, 0.9195 }, + { 0.4729, 0.9436 }, + { 0.4702, 0.9679 }, + { 0.4674, 0.9922 }, + { 0.5975, 0.0728 }, + { 0.5948, 0.0968 }, + { 0.5920, 0.1212 }, + { 0.5892, 0.1455 }, + { 0.5864, 0.1698 }, + { 0.5836, 0.1942 }, + { 0.5808, 0.2182 }, + { 0.5780, 0.2425 }, + { 0.5752, 0.2669 }, + { 0.5725, 0.2912 }, + { 0.5697, 0.3155 }, + { 0.5669, 0.3396 }, + { 0.5641, 0.3639 }, + { 0.5613, 0.3882 }, + { 0.5585, 0.4126 }, + { 0.5557, 0.4369 }, + { 0.5530, 0.4609 }, + { 0.5502, 0.4852 }, + { 0.5474, 0.5096 }, + { 0.5446, 0.5339 }, + { 0.5418, 0.5583 }, + { 0.5390, 0.5823 }, + { 0.5362, 0.6066 }, + { 0.5334, 0.6309 }, + { 0.5306, 0.6553 }, + { 0.5278, 0.6796 }, + { 0.5251, 0.7036 }, + { 0.5223, 0.7280 }, + { 0.5195, 0.7523 }, + { 0.5167, 0.7766 }, + { 0.5139, 0.8010 }, + { 0.5111, 0.8250 }, + { 0.5083, 0.8493 }, + { 0.5056, 0.8737 }, + { 0.5028, 0.8980 }, + { 0.5000, 0.9223 }, + { 0.4972, 0.9463 }, + { 0.4944, 0.9707 }, + { 0.4916, 0.9950 }, + { 0.6218, 0.0756 }, + { 0.6191, 0.0996 }, + { 0.6163, 0.1240 }, + { 0.6135, 0.1483 }, + { 0.6107, 0.1726 }, + { 0.6079, 0.1970 }, + { 0.6051, 0.2210 }, + { 0.6023, 0.2453 }, + { 0.5995, 0.2697 }, + { 0.5967, 0.2940 }, + { 0.5940, 0.3183 }, + { 0.5912, 0.3423 }, + { 0.5884, 0.3667 }, + { 0.5856, 0.3910 }, + { 0.5828, 0.4153 }, + { 0.5800, 0.4397 }, + { 0.5773, 0.4637 }, + { 0.5745, 0.4880 }, + { 0.5717, 0.5124 }, + { 0.5689, 0.5367 }, + { 0.5661, 0.5610 }, + { 0.5633, 0.5851 }, + { 0.5605, 0.6094 }, + { 0.5577, 0.6337 }, + { 0.5549, 0.6581 }, + { 0.5521, 0.6824 }, + { 0.5494, 0.7064 }, + { 0.5466, 0.7308 }, + { 0.5438, 0.7551 }, + { 0.5410, 0.7794 }, + { 0.5382, 0.8038 }, + { 0.5354, 0.8278 }, + { 0.5326, 0.8521 }, + { 0.5298, 0.8764 }, + { 0.5271, 0.9008 }, + { 0.5243, 0.9251 }, + { 0.5215, 0.9491 }, + { 0.5187, 0.9735 }, + { 0.5159, 0.9978 }, + { 0.6461, 0.0784 }, + { 0.6433, 0.1024 }, + { 0.6405, 0.1268 }, + { 0.6377, 0.1511 }, + { 0.6349, 0.1754 }, + { 0.6321, 0.1998 }, + { 0.6294, 0.2238 }, + { 0.6266, 0.2481 }, + { 0.6238, 0.2724 }, + { 0.6210, 0.2968 }, + { 0.6182, 0.3211 }, + { 0.6154, 0.3451 }, + { 0.6127, 0.3695 }, + { 0.6099, 0.3938 }, + { 0.6071, 0.4181 }, + { 0.6043, 0.4425 }, + { 0.6015, 0.4665 }, + { 0.5987, 0.4908 }, + { 0.5959, 0.5152 }, + { 0.5931, 0.5395 }, + { 0.5903, 0.5638 }, + { 0.5876, 0.5878 }, + { 0.5848, 0.6122 }, + { 0.5820, 0.6365 }, + { 0.5792, 0.6608 }, + { 0.5764, 0.6852 }, + { 0.5736, 0.7092 }, + { 0.5708, 0.7335 }, + { 0.5680, 0.7579 }, + { 0.5652, 0.7822 }, + { 0.5625, 0.8065 }, + { 0.5597, 0.8306 }, + { 0.5569, 0.8549 }, + { 0.5541, 0.8792 }, + { 0.5513, 0.9036 }, + { 0.5485, 0.9279 }, + { 0.5458, 0.9519 }, + { 0.5430, 0.9762 }, + { 0.5402, 1.0006 }, + { 0.6704, 0.0812 }, + { 0.6676, 0.1052 }, + { 0.6648, 0.1295 }, + { 0.6620, 0.1539 }, + { 0.6592, 0.1782 }, + { 0.6564, 0.2025 }, + { 0.6537, 0.2266 }, + { 0.6509, 0.2509 }, + { 0.6481, 0.2752 }, + { 0.6453, 0.2996 }, + { 0.6425, 0.3239 }, + { 0.6397, 0.3479 }, + { 0.6369, 0.3723 }, + { 0.6342, 0.3966 }, + { 0.6314, 0.4209 }, + { 0.6286, 0.4453 }, + { 0.6258, 0.4693 }, + { 0.6230, 0.4936 }, + { 0.6202, 0.5179 }, + { 0.6174, 0.5423 }, + { 0.6146, 0.5666 }, + { 0.6119, 0.5906 }, + { 0.6091, 0.6150 }, + { 0.6063, 0.6393 }, + { 0.6035, 0.6636 }, + { 0.6007, 0.6880 }, + { 0.5979, 0.7120 }, + { 0.5951, 0.7363 }, + { 0.5923, 0.7607 }, + { 0.5895, 0.7850 }, + { 0.5867, 0.8093 }, + { 0.5840, 0.8333 }, + { 0.5812, 0.8577 }, + { 0.5784, 0.8820 }, + { 0.5756, 0.9064 }, + { 0.5728, 0.9307 }, + { 0.5701, 0.9547 }, + { 0.5673, 0.9790 }, + { 0.5645, 1.0034 }, + { 0.6946, 0.0840 }, + { 0.6919, 0.1080 }, + { 0.6891, 0.1323 }, + { 0.6863, 0.1567 }, + { 0.6835, 0.1810 }, + { 0.6807, 0.2053 }, + { 0.6779, 0.2294 }, + { 0.6751, 0.2537 }, + { 0.6723, 0.2780 }, + { 0.6696, 0.3024 }, + { 0.6668, 0.3267 }, + { 0.6640, 0.3507 }, + { 0.6612, 0.3750 }, + { 0.6584, 0.3994 }, + { 0.6556, 0.4237 }, + { 0.6528, 0.4480 }, + { 0.6501, 0.4721 }, + { 0.6473, 0.4964 }, + { 0.6445, 0.5207 }, + { 0.6417, 0.5451 }, + { 0.6389, 0.5694 }, + { 0.6361, 0.5934 }, + { 0.6333, 0.6178 }, + { 0.6305, 0.6421 }, + { 0.6277, 0.6664 }, + { 0.6249, 0.6908 }, + { 0.6222, 0.7148 }, + { 0.6194, 0.7391 }, + { 0.6166, 0.7634 }, + { 0.6138, 0.7878 }, + { 0.6110, 0.8121 }, + { 0.6082, 0.8361 }, + { 0.6055, 0.8605 }, + { 0.6027, 0.8848 }, + { 0.5999, 0.9091 }, + { 0.5971, 0.9335 }, + { 0.5943, 0.9575 }, + { 0.5915, 0.9818 }, + { 0.5887, 1.0062 }, + { 0.7189, 0.0868 }, + { 0.7161, 0.1108 }, + { 0.7133, 0.1351 }, + { 0.7105, 0.1595 }, + { 0.7077, 0.1838 }, + { 0.7050, 0.2081 }, + { 0.7022, 0.2321 }, + { 0.6994, 0.2565 }, + { 0.6966, 0.2808 }, + { 0.6938, 0.3051 }, + { 0.6910, 0.3295 }, + { 0.6883, 0.3535 }, + { 0.6855, 0.3778 }, + { 0.6827, 0.4022 }, + { 0.6799, 0.4265 }, + { 0.6771, 0.4508 }, + { 0.6743, 0.4749 }, + { 0.6715, 0.4992 }, + { 0.6687, 0.5235 }, + { 0.6659, 0.5479 }, + { 0.6631, 0.5722 }, + { 0.6604, 0.5962 }, + { 0.6576, 0.6205 }, + { 0.6548, 0.6449 }, + { 0.6520, 0.6692 }, + { 0.6492, 0.6935 }, + { 0.6464, 0.7176 }, + { 0.6436, 0.7419 }, + { 0.6408, 0.7662 }, + { 0.6381, 0.7906 }, + { 0.6353, 0.8149 }, + { 0.6325, 0.8389 }, + { 0.6297, 0.8633 }, + { 0.6269, 0.8876 }, + { 0.6241, 0.9119 }, + { 0.6213, 0.9363 }, + { 0.6186, 0.9603 }, + { 0.6158, 0.9846 }, + { 0.6130, 1.0089 }, + { 0.7432, 0.0896 }, + { 0.7404, 0.1136 }, + { 0.7376, 0.1379 }, + { 0.7348, 0.1622 }, + { 0.7320, 0.1866 }, + { 0.7292, 0.2109 }, + { 0.7265, 0.2349 }, + { 0.7237, 0.2593 }, + { 0.7209, 0.2836 }, + { 0.7181, 0.3079 }, + { 0.7153, 0.3323 }, + { 0.7126, 0.3563 }, + { 0.7098, 0.3806 }, + { 0.7070, 0.4050 }, + { 0.7042, 0.4293 }, + { 0.7014, 0.4536 }, + { 0.6986, 0.4776 }, + { 0.6958, 0.5020 }, + { 0.6930, 0.5263 }, + { 0.6902, 0.5506 }, + { 0.6874, 0.5750 }, + { 0.6847, 0.5990 }, + { 0.6819, 0.6233 }, + { 0.6791, 0.6477 }, + { 0.6763, 0.6720 }, + { 0.6735, 0.6963 }, + { 0.6707, 0.7204 }, + { 0.6679, 0.7447 }, + { 0.6651, 0.7690 }, + { 0.6623, 0.7934 }, + { 0.6596, 0.8177 }, + { 0.6568, 0.8417 }, + { 0.6540, 0.8660 }, + { 0.6512, 0.8904 }, + { 0.6484, 0.9147 }, + { 0.6456, 0.9390 }, + { 0.6429, 0.9631 }, + { 0.6401, 0.9874 }, + { 0.6373, 1.0117 }, + { 0.7674, 0.0923 }, + { 0.7647, 0.1164 }, + { 0.7619, 0.1407 }, + { 0.7591, 0.1650 }, + { 0.7563, 0.1894 }, + { 0.7535, 0.2137 }, + { 0.7507, 0.2377 }, + { 0.7479, 0.2620 }, + { 0.7452, 0.2864 }, + { 0.7424, 0.3107 }, + { 0.7396, 0.3351 }, + { 0.7368, 0.3591 }, + { 0.7340, 0.3834 }, + { 0.7312, 0.4077 }, + { 0.7284, 0.4321 }, + { 0.7256, 0.4564 }, + { 0.7229, 0.4804 }, + { 0.7201, 0.5048 }, + { 0.7173, 0.5291 }, + { 0.7145, 0.5534 }, + { 0.7117, 0.5778 }, + { 0.7089, 0.6018 }, + { 0.7061, 0.6261 }, + { 0.7033, 0.6505 }, + { 0.7005, 0.6748 }, + { 0.6977, 0.6991 }, + { 0.6950, 0.7231 }, + { 0.6922, 0.7475 }, + { 0.6894, 0.7718 }, + { 0.6866, 0.7961 }, + { 0.6838, 0.8205 }, + { 0.6811, 0.8445 }, + { 0.6783, 0.8688 }, + { 0.6755, 0.8932 }, + { 0.6727, 0.9175 }, + { 0.6699, 0.9418 }, + { 0.6671, 0.9659 }, + { 0.6643, 0.9902 }, + { 0.6615, 1.0145 }, + { 0.7917, 0.0951 }, + { 0.7890, 0.1191 }, + { 0.7862, 0.1435 }, + { 0.7834, 0.1678 }, + { 0.7806, 0.1922 }, + { 0.7778, 0.2165 }, + { 0.7750, 0.2405 }, + { 0.7722, 0.2648 }, + { 0.7694, 0.2892 }, + { 0.7667, 0.3135 }, + { 0.7639, 0.3378 }, + { 0.7611, 0.3619 }, + { 0.7583, 0.3862 }, + { 0.7555, 0.4105 }, + { 0.7527, 0.4349 }, + { 0.7499, 0.4592 }, + { 0.7472, 0.4832 }, + { 0.7444, 0.5076 }, + { 0.7416, 0.5319 }, + { 0.7388, 0.5562 }, + { 0.7360, 0.5806 }, + { 0.7332, 0.6046 }, + { 0.7304, 0.6289 }, + { 0.7276, 0.6532 }, + { 0.7248, 0.6776 }, + { 0.7220, 0.7019 }, + { 0.7193, 0.7259 }, + { 0.7165, 0.7503 }, + { 0.7137, 0.7746 }, + { 0.7109, 0.7989 }, + { 0.7081, 0.8233 }, + { 0.7053, 0.8473 }, + { 0.7026, 0.8716 }, + { 0.6998, 0.8960 }, + { 0.6970, 0.9203 }, + { 0.6942, 0.9446 }, + { 0.6914, 0.9686 }, + { 0.6886, 0.9930 }, + { 0.6858, 1.0173 }, + { 0.8160, 0.0979 }, + { 0.8132, 0.1219 }, + { 0.8104, 0.1463 }, + { 0.8076, 0.1706 }, + { 0.8048, 0.1949 }, + { 0.8021, 0.2193 }, + { 0.7993, 0.2433 }, + { 0.7965, 0.2676 }, + { 0.7937, 0.2920 }, + { 0.7909, 0.3163 }, + { 0.7881, 0.3406 }, + { 0.7854, 0.3646 }, + { 0.7826, 0.3890 }, + { 0.7798, 0.4133 }, + { 0.7770, 0.4377 }, + { 0.7742, 0.4620 }, + { 0.7714, 0.4860 }, + { 0.7686, 0.5103 }, + { 0.7658, 0.5347 }, + { 0.7630, 0.5590 }, + { 0.7602, 0.5833 }, + { 0.7575, 0.6074 }, + { 0.7547, 0.6317 }, + { 0.7519, 0.6560 }, + { 0.7491, 0.6804 }, + { 0.7463, 0.7047 }, + { 0.7435, 0.7287 }, + { 0.7407, 0.7531 }, + { 0.7380, 0.7774 }, + { 0.7352, 0.8017 }, + { 0.7324, 0.8261 }, + { 0.7296, 0.8501 }, + { 0.7268, 0.8744 }, + { 0.7240, 0.8987 }, + { 0.7212, 0.9231 }, + { 0.7184, 0.9474 }, + { 0.7157, 0.9714 }, + { 0.7129, 0.9958 }, + { 0.7101, 1.0201 }, + { 0.8402, 0.1007 }, + { 0.8375, 0.1247 }, + { 0.8347, 0.1491 }, + { 0.8319, 0.1734 }, + { 0.8291, 0.1977 }, + { 0.8263, 0.2221 }, + { 0.8236, 0.2461 }, + { 0.8208, 0.2704 }, + { 0.8180, 0.2947 }, + { 0.8152, 0.3191 }, + { 0.8124, 0.3434 }, + { 0.8096, 0.3674 }, + { 0.8068, 0.3918 }, + { 0.8040, 0.4161 }, + { 0.8012, 0.4404 }, + { 0.7984, 0.4648 }, + { 0.7957, 0.4888 }, + { 0.7929, 0.5131 }, + { 0.7901, 0.5375 }, + { 0.7873, 0.5618 }, + { 0.7845, 0.5861 }, + { 0.7817, 0.6101 }, + { 0.7789, 0.6345 }, + { 0.7761, 0.6588 }, + { 0.7733, 0.6831 }, + { 0.7706, 0.7075 }, + { 0.7678, 0.7315 }, + { 0.7650, 0.7558 }, + { 0.7622, 0.7802 }, + { 0.7594, 0.8045 }, + { 0.7566, 0.8288 }, + { 0.7539, 0.8529 }, + { 0.7511, 0.8772 }, + { 0.7483, 0.9015 }, + { 0.7455, 0.9259 }, + { 0.7427, 0.9502 }, + { 0.7399, 0.9742 }, + { 0.7371, 0.9986 }, + { 0.7343, 1.0229 }, + { 0.8645, 0.1035 }, + { 0.8618, 0.1275 }, + { 0.8590, 0.1518 }, + { 0.8562, 0.1762 }, + { 0.8534, 0.2005 }, + { 0.8506, 0.2248 }, + { 0.8478, 0.2489 }, + { 0.8451, 0.2732 }, + { 0.8423, 0.2975 }, + { 0.8395, 0.3219 }, + { 0.8367, 0.3462 }, + { 0.8339, 0.3702 }, + { 0.8311, 0.3946 }, + { 0.8283, 0.4189 }, + { 0.8255, 0.4432 }, + { 0.8227, 0.4676 }, + { 0.8200, 0.4916 }, + { 0.8172, 0.5159 }, + { 0.8144, 0.5402 }, + { 0.8116, 0.5646 }, + { 0.8088, 0.5889 }, + { 0.8060, 0.6129 }, + { 0.8032, 0.6373 }, + { 0.8004, 0.6616 }, + { 0.7976, 0.6859 }, + { 0.7948, 0.7103 }, + { 0.7921, 0.7343 }, + { 0.7893, 0.7586 }, + { 0.7865, 0.7830 }, + { 0.7837, 0.8073 }, + { 0.7809, 0.8316 }, + { 0.7782, 0.8556 }, + { 0.7754, 0.8800 }, + { 0.7726, 0.9043 }, + { 0.7698, 0.9287 }, + { 0.7670, 0.9530 }, + { 0.7642, 0.9770 }, + { 0.7614, 1.0013 }, + { 0.7586, 1.0257 }, + { 0.8888, 0.1063 }, + { 0.8860, 0.1303 }, + { 0.8832, 0.1546 }, + { 0.8805, 0.1790 }, + { 0.8777, 0.2033 }, + { 0.8749, 0.2276 }, + { 0.8721, 0.2517 }, + { 0.8693, 0.2760 }, + { 0.8665, 0.3003 }, + { 0.8637, 0.3247 }, + { 0.8609, 0.3490 }, + { 0.8582, 0.3730 }, + { 0.8554, 0.3973 }, + { 0.8526, 0.4217 }, + { 0.8498, 0.4460 }, + { 0.8470, 0.4703 }, + { 0.8442, 0.4944 }, + { 0.8414, 0.5187 }, + { 0.8386, 0.5430 }, + { 0.8358, 0.5674 }, + { 0.8330, 0.5917 }, + { 0.8303, 0.6157 }, + { 0.8275, 0.6401 }, + { 0.8247, 0.6644 }, + { 0.8219, 0.6887 }, + { 0.8191, 0.7131 }, + { 0.8163, 0.7371 }, + { 0.8136, 0.7614 }, + { 0.8108, 0.7857 }, + { 0.8080, 0.8101 }, + { 0.8052, 0.8344 }, + { 0.8024, 0.8584 }, + { 0.7996, 0.8828 }, + { 0.7968, 0.9071 }, + { 0.7940, 0.9314 }, + { 0.7912, 0.9558 }, + { 0.7885, 0.9798 }, + { 0.7857, 1.0041 }, + { 0.7829, 1.0285 }, + { 0.9131, 0.1091 }, + { 0.9103, 0.1331 }, + { 0.9075, 0.1574 }, + { 0.9047, 0.1818 }, + { 0.9020, 0.2061 }, + { 0.8992, 0.2304 }, + { 0.8964, 0.2544 }, + { 0.8936, 0.2788 }, + { 0.8908, 0.3031 }, + { 0.8880, 0.3274 }, + { 0.8852, 0.3518 }, + { 0.8825, 0.3758 }, + { 0.8797, 0.4001 }, + { 0.8769, 0.4245 }, + { 0.8741, 0.4488 }, + { 0.8713, 0.4731 }, + { 0.8685, 0.4972 }, + { 0.8657, 0.5215 }, + { 0.8629, 0.5458 }, + { 0.8601, 0.5702 }, + { 0.8573, 0.5945 }, + { 0.8546, 0.6185 }, + { 0.8518, 0.6428 }, + { 0.8490, 0.6672 }, + { 0.8462, 0.6915 }, + { 0.8434, 0.7159 }, + { 0.8406, 0.7399 }, + { 0.8378, 0.7642 }, + { 0.8351, 0.7885 }, + { 0.8323, 0.8129 }, + { 0.8295, 0.8372 }, + { 0.8267, 0.8612 }, + { 0.8239, 0.8856 }, + { 0.8211, 0.9099 }, + { 0.8183, 0.9342 }, + { 0.8155, 0.9586 }, + { 0.8128, 0.9826 }, + { 0.8100, 1.0069 }, + { 0.8072, 1.0313 }, + { 0.9373, 0.1119 }, + { 0.9346, 0.1359 }, + { 0.9318, 0.1602 }, + { 0.9290, 0.1845 }, + { 0.9262, 0.2089 }, + { 0.9234, 0.2332 }, + { 0.9207, 0.2572 }, + { 0.9179, 0.2816 }, + { 0.9151, 0.3059 }, + { 0.9123, 0.3302 }, + { 0.9095, 0.3546 }, + { 0.9067, 0.3786 }, + { 0.9039, 0.4029 }, + { 0.9011, 0.4273 }, + { 0.8983, 0.4516 }, + { 0.8955, 0.4759 }, + { 0.8928, 0.4999 }, + { 0.8900, 0.5243 }, + { 0.8872, 0.5486 }, + { 0.8844, 0.5729 }, + { 0.8816, 0.5973 }, + { 0.8788, 0.6213 }, + { 0.8760, 0.6456 }, + { 0.8732, 0.6700 }, + { 0.8705, 0.6943 }, + { 0.8677, 0.7186 }, + { 0.8649, 0.7427 }, + { 0.8621, 0.7670 }, + { 0.8593, 0.7913 }, + { 0.8565, 0.8157 }, + { 0.8537, 0.8400 }, + { 0.8510, 0.8640 }, + { 0.8482, 0.8883 }, + { 0.8454, 0.9127 }, + { 0.8426, 0.9370 }, + { 0.8398, 0.9614 }, + { 0.8370, 0.9854 }, + { 0.8342, 1.0097 }, + { 0.8314, 1.0340 }, + { 0.9616, 0.1146 }, + { 0.9588, 0.1387 }, + { 0.9561, 0.1630 }, + { 0.9533, 0.1873 }, + { 0.9505, 0.2117 }, + { 0.9477, 0.2360 }, + { 0.9449, 0.2600 }, + { 0.9421, 0.2844 }, + { 0.9393, 0.3087 }, + { 0.9365, 0.3330 }, + { 0.9337, 0.3574 }, + { 0.9310, 0.3814 }, + { 0.9282, 0.4057 }, + { 0.9254, 0.4300 }, + { 0.9226, 0.4544 }, + { 0.9198, 0.4787 }, + { 0.9170, 0.5027 }, + { 0.9142, 0.5271 }, + { 0.9114, 0.5514 }, + { 0.9086, 0.5757 }, + { 0.9058, 0.6001 }, + { 0.9031, 0.6241 }, + { 0.9003, 0.6484 }, + { 0.8975, 0.6728 }, + { 0.8947, 0.6971 }, + { 0.8919, 0.7214 }, + { 0.8892, 0.7454 }, + { 0.8864, 0.7698 }, + { 0.8836, 0.7941 }, + { 0.8808, 0.8184 }, + { 0.8780, 0.8428 }, + { 0.8752, 0.8668 }, + { 0.8724, 0.8911 }, + { 0.8696, 0.9155 }, + { 0.8668, 0.9398 }, + { 0.8640, 0.9641 }, + { 0.8613, 0.9882 }, + { 0.8585, 1.0125 }, + { 0.8557, 1.0368 }, + { 0.9831, 0.1414 }, + { 0.9803, 0.1658 }, + { 0.9776, 0.1901 }, + { 0.9748, 0.2145 }, + { 0.9720, 0.2388 }, + { 0.9692, 0.2628 }, + { 0.9664, 0.2871 }, + { 0.9636, 0.3115 }, + { 0.9608, 0.3358 }, + { 0.9580, 0.3601 }, + { 0.9553, 0.3842 }, + { 0.9525, 0.4085 }, + { 0.9497, 0.4328 }, + { 0.9469, 0.4572 }, + { 0.9441, 0.4815 }, + { 0.9413, 0.5055 }, + { 0.9385, 0.5299 }, + { 0.9357, 0.5542 }, + { 0.9329, 0.5785 }, + { 0.9301, 0.6029 }, + { 0.9274, 0.6269 }, + { 0.9246, 0.6512 }, + { 0.9218, 0.6755 }, + { 0.9190, 0.6999 }, + { 0.9162, 0.7242 }, + { 0.9134, 0.7482 }, + { 0.9107, 0.7726 }, + { 0.9079, 0.7969 }, + { 0.9051, 0.8212 }, + { 0.9023, 0.8456 }, + { 0.8995, 0.8696 }, + { 0.8967, 0.8939 }, + { 0.8939, 0.9183 }, + { 0.8911, 0.9426 }, + { 0.8883, 0.9669 }, + { 0.8856, 0.9909 }, + { 0.8828, 1.0153 }, + { 0.8800, 1.0396 }, + { 0.8772, 1.0639 }, + { 1.0074, 0.1442 }, + { 1.0046, 0.1686 }, + { 1.0018, 0.1929 }, + { 0.9990, 0.2172 }, + { 0.9962, 0.2416 }, + { 0.9935, 0.2656 }, + { 0.9907, 0.2899 }, + { 0.9879, 0.3143 }, + { 0.9851, 0.3386 }, + { 0.9823, 0.3629 }, + { 0.9795, 0.3869 }, + { 0.9767, 0.4113 }, + { 0.9739, 0.4356 }, + { 0.9711, 0.4600 }, + { 0.9683, 0.4843 }, + { 0.9656, 0.5083 }, + { 0.9628, 0.5326 }, + { 0.9600, 0.5570 }, + { 0.9572, 0.5813 }, + { 0.9544, 0.6056 }, + { 0.9516, 0.6297 }, + { 0.9488, 0.6540 }, + { 0.9461, 0.6783 }, + { 0.9433, 0.7027 }, + { 0.9405, 0.7270 }, + { 0.9377, 0.7510 }, + { 0.9349, 0.7754 }, + { 0.9321, 0.7997 }, + { 0.9293, 0.8240 }, + { 0.9265, 0.8484 }, + { 0.9238, 0.8724 }, + { 0.9210, 0.8967 }, + { 0.9182, 0.9210 }, + { 0.9154, 0.9454 }, + { 0.9126, 0.9697 }, + { 0.9098, 0.9937 }, + { 0.9070, 1.0181 }, + { 0.9042, 1.0424 }, + { 0.9014, 1.0667 }, +#endif /* ] */ + + { 0.0871, 0.0171 }, + { 0.0844, 0.0411 }, + { 0.0816, 0.0654 }, + { 0.0788, 0.0898 }, + { 0.0760, 0.1141 }, + { 0.0732, 0.1384 }, + { 0.0704, 0.1624 }, + { 0.0676, 0.1868 }, + { 0.0648, 0.2111 }, + { 0.0620, 0.2354 }, + { 0.0592, 0.2598 }, + { 0.0565, 0.2838 }, + { 0.0537, 0.3081 }, + { 0.0509, 0.3325 }, + { 0.0481, 0.3568 }, + { 0.0453, 0.3811 }, + { 0.0425, 0.4052 }, + { 0.0397, 0.4295 }, + { 0.0369, 0.4538 }, + { 0.0341, 0.4782 }, + { 0.0314, 0.5025 }, + { 0.0286, 0.5265 }, + { 0.0258, 0.5508 }, + { 0.0230, 0.5752 }, + { 0.0202, 0.5995 }, + { 0.0174, 0.6239 }, + { 0.0147, 0.6479 }, + { 0.0119, 0.6722 }, + { 0.0091, 0.6965 }, + { 0.0063, 0.7209 }, + { 0.0035, 0.7452 }, + { 0.0007, 0.7692 }, + { -0.0021, 0.7936 }, + { -0.0049, 0.8179 }, + { -0.0077, 0.8422 }, + { -0.0105, 0.8666 }, + { -0.0132, 0.8906 }, + { -0.0160, 0.9149 }, + { -0.0188, 0.9393 }, + { 0.1114, 0.0199 }, + { 0.1086, 0.0439 }, + { 0.1059, 0.0682 }, + { 0.1031, 0.0925 }, + { 0.1003, 0.1169 }, + { 0.0975, 0.1412 }, + { 0.0947, 0.1652 }, + { 0.0919, 0.1896 }, + { 0.0891, 0.2139 }, + { 0.0863, 0.2382 }, + { 0.0835, 0.2626 }, + { 0.0808, 0.2866 }, + { 0.0780, 0.3109 }, + { 0.0752, 0.3353 }, + { 0.0724, 0.3596 }, + { 0.0696, 0.3839 }, + { 0.0668, 0.4079 }, + { 0.0640, 0.4323 }, + { 0.0612, 0.4566 }, + { 0.0584, 0.4810 }, + { 0.0556, 0.5053 }, + { 0.0529, 0.5293 }, + { 0.0501, 0.5536 }, + { 0.0473, 0.5780 }, + { 0.0445, 0.6023 }, + { 0.0417, 0.6266 }, + { 0.0390, 0.6507 }, + { 0.0362, 0.6750 }, + { 0.0334, 0.6993 }, + { 0.0306, 0.7237 }, + { 0.0278, 0.7480 }, + { 0.0250, 0.7720 }, + { 0.0222, 0.7964 }, + { 0.0194, 0.8207 }, + { 0.0166, 0.8450 }, + { 0.0138, 0.8694 }, + { 0.0111, 0.8934 }, + { 0.0083, 0.9177 }, + { 0.0055, 0.9420 }, + { 0.1357, 0.0226 }, + { 0.1329, 0.0467 }, + { 0.1301, 0.0710 }, + { 0.1273, 0.0953 }, + { 0.1245, 0.1197 }, + { 0.1217, 0.1440 }, + { 0.1190, 0.1680 }, + { 0.1162, 0.1924 }, + { 0.1134, 0.2167 }, + { 0.1106, 0.2410 }, + { 0.1078, 0.2654 }, + { 0.1050, 0.2894 }, + { 0.1022, 0.3137 }, + { 0.0994, 0.3380 }, + { 0.0966, 0.3624 }, + { 0.0938, 0.3867 }, + { 0.0911, 0.4107 }, + { 0.0883, 0.4351 }, + { 0.0855, 0.4594 }, + { 0.0827, 0.4837 }, + { 0.0799, 0.5081 }, + { 0.0771, 0.5321 }, + { 0.0744, 0.5564 }, + { 0.0716, 0.5808 }, + { 0.0688, 0.6051 }, + { 0.0660, 0.6294 }, + { 0.0632, 0.6534 }, + { 0.0604, 0.6778 }, + { 0.0576, 0.7021 }, + { 0.0548, 0.7265 }, + { 0.0520, 0.7508 }, + { 0.0493, 0.7748 }, + { 0.0465, 0.7991 }, + { 0.0437, 0.8235 }, + { 0.0409, 0.8478 }, + { 0.0381, 0.8721 }, + { 0.0353, 0.8962 }, + { 0.0325, 0.9205 }, + { 0.0297, 0.9448 }, + { 0.1600, 0.0254 }, + { 0.1572, 0.0495 }, + { 0.1544, 0.0738 }, + { 0.1516, 0.0981 }, + { 0.1488, 0.1225 }, + { 0.1460, 0.1468 }, + { 0.1433, 0.1708 }, + { 0.1405, 0.1951 }, + { 0.1377, 0.2195 }, + { 0.1349, 0.2438 }, + { 0.1321, 0.2681 }, + { 0.1293, 0.2922 }, + { 0.1265, 0.3165 }, + { 0.1237, 0.3408 }, + { 0.1209, 0.3652 }, + { 0.1181, 0.3895 }, + { 0.1154, 0.4135 }, + { 0.1126, 0.4379 }, + { 0.1098, 0.4622 }, + { 0.1070, 0.4865 }, + { 0.1042, 0.5109 }, + { 0.1014, 0.5349 }, + { 0.0986, 0.5592 }, + { 0.0959, 0.5835 }, + { 0.0931, 0.6079 }, + { 0.0903, 0.6322 }, + { 0.0875, 0.6562 }, + { 0.0847, 0.6806 }, + { 0.0819, 0.7049 }, + { 0.0791, 0.7292 }, + { 0.0763, 0.7536 }, + { 0.0736, 0.7776 }, + { 0.0708, 0.8019 }, + { 0.0680, 0.8263 }, + { 0.0652, 0.8506 }, + { 0.0624, 0.8749 }, + { 0.0596, 0.8990 }, + { 0.0568, 0.9233 }, + { 0.0540, 0.9476 }, + { 0.1842, 0.0282 }, + { 0.1815, 0.0522 }, + { 0.1787, 0.0766 }, + { 0.1759, 0.1009 }, + { 0.1731, 0.1252 }, + { 0.1703, 0.1496 }, + { 0.1675, 0.1736 }, + { 0.1647, 0.1979 }, + { 0.1619, 0.2223 }, + { 0.1591, 0.2466 }, + { 0.1563, 0.2709 }, + { 0.1536, 0.2950 }, + { 0.1508, 0.3193 }, + { 0.1480, 0.3436 }, + { 0.1452, 0.3680 }, + { 0.1424, 0.3923 }, + { 0.1396, 0.4163 }, + { 0.1368, 0.4406 }, + { 0.1340, 0.4650 }, + { 0.1313, 0.4893 }, + { 0.1285, 0.5136 }, + { 0.1257, 0.5377 }, + { 0.1229, 0.5620 }, + { 0.1201, 0.5863 }, + { 0.1173, 0.6107 }, + { 0.1145, 0.6350 }, + { 0.1118, 0.6590 }, + { 0.1090, 0.6834 }, + { 0.1062, 0.7077 }, + { 0.1034, 0.7320 }, + { 0.1006, 0.7564 }, + { 0.0978, 0.7804 }, + { 0.0950, 0.8047 }, + { 0.0922, 0.8290 }, + { 0.0894, 0.8534 }, + { 0.0866, 0.8777 }, + { 0.0839, 0.9017 }, + { 0.0811, 0.9261 }, + { 0.0783, 0.9504 }, + { 0.2085, 0.0310 }, + { 0.2057, 0.0550 }, + { 0.2029, 0.0794 }, + { 0.2001, 0.1037 }, + { 0.1973, 0.1280 }, + { 0.1945, 0.1524 }, + { 0.1918, 0.1764 }, + { 0.1890, 0.2007 }, + { 0.1862, 0.2251 }, + { 0.1834, 0.2494 }, + { 0.1806, 0.2737 }, + { 0.1778, 0.2977 }, + { 0.1750, 0.3221 }, + { 0.1722, 0.3464 }, + { 0.1694, 0.3707 }, + { 0.1666, 0.3951 }, + { 0.1639, 0.4191 }, + { 0.1611, 0.4434 }, + { 0.1583, 0.4678 }, + { 0.1555, 0.4921 }, + { 0.1527, 0.5164 }, + { 0.1500, 0.5405 }, + { 0.1472, 0.5648 }, + { 0.1444, 0.5891 }, + { 0.1416, 0.6135 }, + { 0.1388, 0.6378 }, + { 0.1360, 0.6618 }, + { 0.1332, 0.6861 }, + { 0.1304, 0.7105 }, + { 0.1276, 0.7348 }, + { 0.1248, 0.7591 }, + { 0.1221, 0.7832 }, + { 0.1193, 0.8075 }, + { 0.1165, 0.8318 }, + { 0.1137, 0.8562 }, + { 0.1109, 0.8805 }, + { 0.1081, 0.9045 }, + { 0.1053, 0.9289 }, + { 0.1025, 0.9532 }, + { 0.2328, 0.0338 }, + { 0.2300, 0.0578 }, + { 0.2272, 0.0822 }, + { 0.2244, 0.1065 }, + { 0.2216, 0.1308 }, + { 0.2188, 0.1552 }, + { 0.2161, 0.1792 }, + { 0.2133, 0.2035 }, + { 0.2105, 0.2278 }, + { 0.2077, 0.2522 }, + { 0.2049, 0.2765 }, + { 0.2021, 0.3005 }, + { 0.1993, 0.3249 }, + { 0.1965, 0.3492 }, + { 0.1937, 0.3735 }, + { 0.1909, 0.3979 }, + { 0.1882, 0.4219 }, + { 0.1854, 0.4462 }, + { 0.1826, 0.4706 }, + { 0.1798, 0.4949 }, + { 0.1770, 0.5192 }, + { 0.1742, 0.5432 }, + { 0.1715, 0.5676 }, + { 0.1687, 0.5919 }, + { 0.1659, 0.6162 }, + { 0.1631, 0.6406 }, + { 0.1603, 0.6646 }, + { 0.1575, 0.6889 }, + { 0.1547, 0.7133 }, + { 0.1519, 0.7376 }, + { 0.1491, 0.7619 }, + { 0.1464, 0.7860 }, + { 0.1436, 0.8103 }, + { 0.1408, 0.8346 }, + { 0.1380, 0.8590 }, + { 0.1352, 0.8833 }, + { 0.1324, 0.9073 }, + { 0.1296, 0.9316 }, + { 0.1268, 0.9560 }, + { 0.2570, 0.0366 }, + { 0.2543, 0.0606 }, + { 0.2515, 0.0849 }, + { 0.2487, 0.1093 }, + { 0.2459, 0.1336 }, + { 0.2431, 0.1579 }, + { 0.2403, 0.1820 }, + { 0.2375, 0.2063 }, + { 0.2347, 0.2306 }, + { 0.2319, 0.2550 }, + { 0.2291, 0.2793 }, + { 0.2264, 0.3033 }, + { 0.2236, 0.3277 }, + { 0.2208, 0.3520 }, + { 0.2180, 0.3763 }, + { 0.2152, 0.4007 }, + { 0.2124, 0.4247 }, + { 0.2096, 0.4490 }, + { 0.2069, 0.4733 }, + { 0.2041, 0.4977 }, + { 0.2013, 0.5220 }, + { 0.1985, 0.5460 }, + { 0.1957, 0.5704 }, + { 0.1929, 0.5947 }, + { 0.1901, 0.6190 }, + { 0.1873, 0.6434 }, + { 0.1846, 0.6674 }, + { 0.1818, 0.6917 }, + { 0.1790, 0.7161 }, + { 0.1762, 0.7404 }, + { 0.1734, 0.7647 }, + { 0.1706, 0.7887 }, + { 0.1678, 0.8131 }, + { 0.1650, 0.8374 }, + { 0.1622, 0.8617 }, + { 0.1594, 0.8861 }, + { 0.1567, 0.9101 }, + { 0.1539, 0.9344 }, + { 0.1511, 0.9588 }, + { 0.2813, 0.0394 }, + { 0.2786, 0.0634 }, + { 0.2758, 0.0877 }, + { 0.2730, 0.1121 }, + { 0.2702, 0.1364 }, + { 0.2674, 0.1607 }, + { 0.2646, 0.1848 }, + { 0.2618, 0.2091 }, + { 0.2590, 0.2334 }, + { 0.2562, 0.2578 }, + { 0.2534, 0.2821 }, + { 0.2507, 0.3061 }, + { 0.2479, 0.3304 }, + { 0.2451, 0.3548 }, + { 0.2423, 0.3791 }, + { 0.2395, 0.4034 }, + { 0.2367, 0.4275 }, + { 0.2339, 0.4518 }, + { 0.2311, 0.4761 }, + { 0.2284, 0.5005 }, + { 0.2256, 0.5248 }, + { 0.2228, 0.5488 }, + { 0.2200, 0.5732 }, + { 0.2172, 0.5975 }, + { 0.2144, 0.6218 }, + { 0.2116, 0.6462 }, + { 0.2089, 0.6702 }, + { 0.2061, 0.6945 }, + { 0.2033, 0.7188 }, + { 0.2005, 0.7432 }, + { 0.1977, 0.7675 }, + { 0.1949, 0.7915 }, + { 0.1921, 0.8159 }, + { 0.1893, 0.8402 }, + { 0.1865, 0.8645 }, + { 0.1837, 0.8889 }, + { 0.1810, 0.9129 }, + { 0.1782, 0.9372 }, + { 0.1754, 0.9616 }, + { 0.3056, 0.0422 }, + { 0.3028, 0.0662 }, + { 0.3000, 0.0905 }, + { 0.2972, 0.1148 }, + { 0.2944, 0.1392 }, + { 0.2916, 0.1635 }, + { 0.2889, 0.1875 }, + { 0.2861, 0.2119 }, + { 0.2833, 0.2362 }, + { 0.2805, 0.2605 }, + { 0.2777, 0.2849 }, + { 0.2749, 0.3089 }, + { 0.2721, 0.3332 }, + { 0.2693, 0.3576 }, + { 0.2665, 0.3819 }, + { 0.2638, 0.4062 }, + { 0.2610, 0.4302 }, + { 0.2582, 0.4546 }, + { 0.2554, 0.4789 }, + { 0.2526, 0.5033 }, + { 0.2498, 0.5276 }, + { 0.2471, 0.5516 }, + { 0.2443, 0.5759 }, + { 0.2415, 0.6003 }, + { 0.2387, 0.6246 }, + { 0.2359, 0.6489 }, + { 0.2331, 0.6730 }, + { 0.2303, 0.6973 }, + { 0.2275, 0.7216 }, + { 0.2247, 0.7460 }, + { 0.2219, 0.7703 }, + { 0.2192, 0.7943 }, + { 0.2164, 0.8187 }, + { 0.2136, 0.8430 }, + { 0.2108, 0.8673 }, + { 0.2080, 0.8917 }, + { 0.2052, 0.9157 }, + { 0.2024, 0.9400 }, + { 0.1996, 0.9643 }, + { 0.3298, 0.0449 }, + { 0.3271, 0.0690 }, + { 0.3243, 0.0933 }, + { 0.3215, 0.1176 }, + { 0.3187, 0.1420 }, + { 0.3159, 0.1663 }, + { 0.3131, 0.1903 }, + { 0.3103, 0.2147 }, + { 0.3075, 0.2390 }, + { 0.3047, 0.2633 }, + { 0.3019, 0.2877 }, + { 0.2992, 0.3117 }, + { 0.2964, 0.3360 }, + { 0.2936, 0.3603 }, + { 0.2908, 0.3847 }, + { 0.2880, 0.4090 }, + { 0.2852, 0.4330 }, + { 0.2825, 0.4574 }, + { 0.2797, 0.4817 }, + { 0.2769, 0.5060 }, + { 0.2741, 0.5304 }, + { 0.2713, 0.5544 }, + { 0.2685, 0.5787 }, + { 0.2657, 0.6031 }, + { 0.2629, 0.6274 }, + { 0.2601, 0.6517 }, + { 0.2574, 0.6757 }, + { 0.2546, 0.7001 }, + { 0.2518, 0.7244 }, + { 0.2490, 0.7488 }, + { 0.2462, 0.7731 }, + { 0.2434, 0.7971 }, + { 0.2406, 0.8214 }, + { 0.2378, 0.8458 }, + { 0.2350, 0.8701 }, + { 0.2323, 0.8944 }, + { 0.2295, 0.9185 }, + { 0.2267, 0.9428 }, + { 0.2239, 0.9671 }, + { 0.3541, 0.0477 }, + { 0.3514, 0.0718 }, + { 0.3486, 0.0961 }, + { 0.3458, 0.1204 }, + { 0.3430, 0.1448 }, + { 0.3402, 0.1691 }, + { 0.3374, 0.1931 }, + { 0.3346, 0.2174 }, + { 0.3318, 0.2418 }, + { 0.3290, 0.2661 }, + { 0.3262, 0.2905 }, + { 0.3235, 0.3145 }, + { 0.3207, 0.3388 }, + { 0.3179, 0.3631 }, + { 0.3151, 0.3875 }, + { 0.3123, 0.4118 }, + { 0.3095, 0.4358 }, + { 0.3067, 0.4602 }, + { 0.3040, 0.4845 }, + { 0.3012, 0.5088 }, + { 0.2984, 0.5332 }, + { 0.2956, 0.5572 }, + { 0.2928, 0.5815 }, + { 0.2900, 0.6059 }, + { 0.2872, 0.6302 }, + { 0.2844, 0.6545 }, + { 0.2817, 0.6785 }, + { 0.2789, 0.7029 }, + { 0.2761, 0.7272 }, + { 0.2733, 0.7515 }, + { 0.2705, 0.7759 }, + { 0.2677, 0.7999 }, + { 0.2649, 0.8242 }, + { 0.2621, 0.8486 }, + { 0.2593, 0.8729 }, + { 0.2565, 0.8972 }, + { 0.2538, 0.9213 }, + { 0.2510, 0.9456 }, + { 0.2482, 0.9699 }, + { 0.3784, 0.0505 }, + { 0.3756, 0.0745 }, + { 0.3728, 0.0989 }, + { 0.3700, 0.1232 }, + { 0.3672, 0.1475 }, + { 0.3644, 0.1719 }, + { 0.3617, 0.1959 }, + { 0.3589, 0.2202 }, + { 0.3561, 0.2446 }, + { 0.3533, 0.2689 }, + { 0.3505, 0.2932 }, + { 0.3477, 0.3173 }, + { 0.3449, 0.3416 }, + { 0.3421, 0.3659 }, + { 0.3394, 0.3903 }, + { 0.3366, 0.4146 }, + { 0.3338, 0.4386 }, + { 0.3310, 0.4629 }, + { 0.3282, 0.4873 }, + { 0.3254, 0.5116 }, + { 0.3226, 0.5359 }, + { 0.3199, 0.5600 }, + { 0.3171, 0.5843 }, + { 0.3143, 0.6086 }, + { 0.3115, 0.6330 }, + { 0.3087, 0.6573 }, + { 0.3059, 0.6813 }, + { 0.3031, 0.7057 }, + { 0.3003, 0.7300 }, + { 0.2975, 0.7543 }, + { 0.2947, 0.7787 }, + { 0.2920, 0.8027 }, + { 0.2892, 0.8270 }, + { 0.2864, 0.8513 }, + { 0.2836, 0.8757 }, + { 0.2808, 0.9000 }, + { 0.2780, 0.9240 }, + { 0.2752, 0.9484 }, + { 0.2725, 0.9727 }, + { 0.4027, 0.0533 }, + { 0.3999, 0.0773 }, + { 0.3971, 0.1017 }, + { 0.3943, 0.1260 }, + { 0.3915, 0.1503 }, + { 0.3887, 0.1747 }, + { 0.3860, 0.1987 }, + { 0.3832, 0.2230 }, + { 0.3804, 0.2474 }, + { 0.3776, 0.2717 }, + { 0.3748, 0.2960 }, + { 0.3720, 0.3200 }, + { 0.3692, 0.3444 }, + { 0.3664, 0.3687 }, + { 0.3636, 0.3930 }, + { 0.3609, 0.4174 }, + { 0.3581, 0.4414 }, + { 0.3553, 0.4657 }, + { 0.3525, 0.4901 }, + { 0.3497, 0.5144 }, + { 0.3469, 0.5387 }, + { 0.3442, 0.5628 }, + { 0.3414, 0.5871 }, + { 0.3386, 0.6114 }, + { 0.3358, 0.6358 }, + { 0.3330, 0.6601 }, + { 0.3302, 0.6841 }, + { 0.3274, 0.7084 }, + { 0.3246, 0.7328 }, + { 0.3218, 0.7571 }, + { 0.3190, 0.7815 }, + { 0.3163, 0.8055 }, + { 0.3135, 0.8298 }, + { 0.3107, 0.8541 }, + { 0.3079, 0.8785 }, + { 0.3051, 0.9028 }, + { 0.3023, 0.9268 }, + { 0.2995, 0.9512 }, + { 0.2967, 0.9755 }, + { 0.4269, 0.0561 }, + { 0.4242, 0.0801 }, + { 0.4214, 0.1045 }, + { 0.4186, 0.1288 }, + { 0.4158, 0.1531 }, + { 0.4130, 0.1775 }, + { 0.4102, 0.2015 }, + { 0.4074, 0.2258 }, + { 0.4046, 0.2501 }, + { 0.4018, 0.2745 }, + { 0.3990, 0.2988 }, + { 0.3963, 0.3228 }, + { 0.3935, 0.3472 }, + { 0.3907, 0.3715 }, + { 0.3879, 0.3958 }, + { 0.3851, 0.4202 }, + { 0.3823, 0.4442 }, + { 0.3796, 0.4685 }, + { 0.3768, 0.4929 }, + { 0.3740, 0.5172 }, + { 0.3712, 0.5415 }, + { 0.3684, 0.5655 }, + { 0.3656, 0.5899 }, + { 0.3628, 0.6142 }, + { 0.3600, 0.6385 }, + { 0.3572, 0.6629 }, + { 0.3545, 0.6869 }, + { 0.3517, 0.7112 }, + { 0.3489, 0.7356 }, + { 0.3461, 0.7599 }, + { 0.3433, 0.7842 }, + { 0.3405, 0.8083 }, + { 0.3377, 0.8326 }, + { 0.3349, 0.8569 }, + { 0.3321, 0.8813 }, + { 0.3294, 0.9056 }, + { 0.3266, 0.9296 }, + { 0.3238, 0.9539 }, + { 0.3210, 0.9783 }, + { 0.4512, 0.0589 }, + { 0.4484, 0.0829 }, + { 0.4456, 0.1072 }, + { 0.4428, 0.1316 }, + { 0.4400, 0.1559 }, + { 0.4372, 0.1802 }, + { 0.4345, 0.2043 }, + { 0.4317, 0.2286 }, + { 0.4289, 0.2529 }, + { 0.4261, 0.2773 }, + { 0.4233, 0.3016 }, + { 0.4205, 0.3256 }, + { 0.4177, 0.3500 }, + { 0.4150, 0.3743 }, + { 0.4122, 0.3986 }, + { 0.4094, 0.4230 }, + { 0.4066, 0.4470 }, + { 0.4038, 0.4713 }, + { 0.4010, 0.4956 }, + { 0.3982, 0.5200 }, + { 0.3954, 0.5443 }, + { 0.3927, 0.5683 }, + { 0.3899, 0.5927 }, + { 0.3871, 0.6170 }, + { 0.3843, 0.6413 }, + { 0.3815, 0.6657 }, + { 0.3787, 0.6897 }, + { 0.3759, 0.7140 }, + { 0.3731, 0.7384 }, + { 0.3703, 0.7627 }, + { 0.3675, 0.7870 }, + { 0.3648, 0.8110 }, + { 0.3620, 0.8354 }, + { 0.3592, 0.8597 }, + { 0.3564, 0.8840 }, + { 0.3536, 0.9084 }, + { 0.3508, 0.9324 }, + { 0.3481, 0.9567 }, + { 0.3453, 0.9811 }, + { 0.4755, 0.0617 }, + { 0.4727, 0.0857 }, + { 0.4699, 0.1100 }, + { 0.4671, 0.1344 }, + { 0.4643, 0.1587 }, + { 0.4615, 0.1830 }, + { 0.4588, 0.2071 }, + { 0.4560, 0.2314 }, + { 0.4532, 0.2557 }, + { 0.4504, 0.2801 }, + { 0.4476, 0.3044 }, + { 0.4448, 0.3284 }, + { 0.4420, 0.3527 }, + { 0.4392, 0.3771 }, + { 0.4365, 0.4014 }, + { 0.4337, 0.4257 }, + { 0.4309, 0.4498 }, + { 0.4281, 0.4741 }, + { 0.4253, 0.4984 }, + { 0.4225, 0.5228 }, + { 0.4197, 0.5471 }, + { 0.4170, 0.5711 }, + { 0.4142, 0.5955 }, + { 0.4114, 0.6198 }, + { 0.4086, 0.6441 }, + { 0.4058, 0.6685 }, + { 0.4030, 0.6925 }, + { 0.4002, 0.7168 }, + { 0.3974, 0.7411 }, + { 0.3946, 0.7655 }, + { 0.3918, 0.7898 }, + { 0.3891, 0.8138 }, + { 0.3863, 0.8382 }, + { 0.3835, 0.8625 }, + { 0.3807, 0.8868 }, + { 0.3779, 0.9112 }, + { 0.3751, 0.9352 }, + { 0.3723, 0.9595 }, + { 0.3696, 0.9839 }, + { 0.4997, 0.0645 }, + { 0.4970, 0.0885 }, + { 0.4942, 0.1128 }, + { 0.4914, 0.1371 }, + { 0.4886, 0.1615 }, + { 0.4858, 0.1858 }, + { 0.4830, 0.2098 }, + { 0.4802, 0.2342 }, + { 0.4774, 0.2585 }, + { 0.4746, 0.2828 }, + { 0.4719, 0.3072 }, + { 0.4691, 0.3312 }, + { 0.4663, 0.3555 }, + { 0.4635, 0.3799 }, + { 0.4607, 0.4042 }, + { 0.4579, 0.4285 }, + { 0.4552, 0.4526 }, + { 0.4524, 0.4769 }, + { 0.4496, 0.5012 }, + { 0.4468, 0.5256 }, + { 0.4440, 0.5499 }, + { 0.4412, 0.5739 }, + { 0.4384, 0.5982 }, + { 0.4356, 0.6226 }, + { 0.4328, 0.6469 }, + { 0.4300, 0.6712 }, + { 0.4273, 0.6953 }, + { 0.4245, 0.7196 }, + { 0.4217, 0.7439 }, + { 0.4189, 0.7683 }, + { 0.4161, 0.7926 }, + { 0.4133, 0.8166 }, + { 0.4105, 0.8410 }, + { 0.4077, 0.8653 }, + { 0.4050, 0.8896 }, + { 0.4022, 0.9140 }, + { 0.3994, 0.9380 }, + { 0.3966, 0.9623 }, + { 0.3938, 0.9866 }, + { 0.5240, 0.0673 }, + { 0.5213, 0.0913 }, + { 0.5185, 0.1156 }, + { 0.5157, 0.1399 }, + { 0.5129, 0.1643 }, + { 0.5101, 0.1886 }, + { 0.5073, 0.2126 }, + { 0.5045, 0.2370 }, + { 0.5017, 0.2613 }, + { 0.4989, 0.2856 }, + { 0.4961, 0.3100 }, + { 0.4934, 0.3340 }, + { 0.4906, 0.3583 }, + { 0.4878, 0.3827 }, + { 0.4850, 0.4070 }, + { 0.4822, 0.4313 }, + { 0.4794, 0.4553 }, + { 0.4767, 0.4797 }, + { 0.4739, 0.5040 }, + { 0.4711, 0.5283 }, + { 0.4683, 0.5527 }, + { 0.4655, 0.5767 }, + { 0.4627, 0.6010 }, + { 0.4599, 0.6254 }, + { 0.4571, 0.6497 }, + { 0.4543, 0.6740 }, + { 0.4516, 0.6981 }, + { 0.4488, 0.7224 }, + { 0.4460, 0.7467 }, + { 0.4432, 0.7711 }, + { 0.4404, 0.7954 }, + { 0.4376, 0.8194 }, + { 0.4348, 0.8437 }, + { 0.4320, 0.8681 }, + { 0.4292, 0.8924 }, + { 0.4265, 0.9167 }, + { 0.4237, 0.9408 }, + { 0.4209, 0.9651 }, + { 0.4181, 0.9894 }, + { 0.5483, 0.0700 }, + { 0.5455, 0.0941 }, + { 0.5427, 0.1184 }, + { 0.5399, 0.1427 }, + { 0.5371, 0.1671 }, + { 0.5343, 0.1914 }, + { 0.5316, 0.2154 }, + { 0.5288, 0.2397 }, + { 0.5260, 0.2641 }, + { 0.5232, 0.2884 }, + { 0.5204, 0.3128 }, + { 0.5176, 0.3368 }, + { 0.5148, 0.3611 }, + { 0.5121, 0.3854 }, + { 0.5093, 0.4098 }, + { 0.5065, 0.4341 }, + { 0.5037, 0.4581 }, + { 0.5009, 0.4825 }, + { 0.4981, 0.5068 }, + { 0.4953, 0.5311 }, + { 0.4925, 0.5555 }, + { 0.4898, 0.5795 }, + { 0.4870, 0.6038 }, + { 0.4842, 0.6282 }, + { 0.4814, 0.6525 }, + { 0.4786, 0.6768 }, + { 0.4758, 0.7008 }, + { 0.4730, 0.7252 }, + { 0.4702, 0.7495 }, + { 0.4674, 0.7738 }, + { 0.4646, 0.7982 }, + { 0.4619, 0.8222 }, + { 0.4591, 0.8465 }, + { 0.4563, 0.8709 }, + { 0.4535, 0.8952 }, + { 0.4507, 0.9195 }, + { 0.4479, 0.9436 }, + { 0.4452, 0.9679 }, + { 0.4424, 0.9922 }, + { 0.5725, 0.0728 }, + { 0.5698, 0.0968 }, + { 0.5670, 0.1212 }, + { 0.5642, 0.1455 }, + { 0.5614, 0.1698 }, + { 0.5586, 0.1942 }, + { 0.5558, 0.2182 }, + { 0.5530, 0.2425 }, + { 0.5502, 0.2669 }, + { 0.5475, 0.2912 }, + { 0.5447, 0.3155 }, + { 0.5419, 0.3396 }, + { 0.5391, 0.3639 }, + { 0.5363, 0.3882 }, + { 0.5335, 0.4126 }, + { 0.5307, 0.4369 }, + { 0.5280, 0.4609 }, + { 0.5252, 0.4852 }, + { 0.5224, 0.5096 }, + { 0.5196, 0.5339 }, + { 0.5168, 0.5583 }, + { 0.5140, 0.5823 }, + { 0.5112, 0.6066 }, + { 0.5084, 0.6309 }, + { 0.5056, 0.6553 }, + { 0.5028, 0.6796 }, + { 0.5001, 0.7036 }, + { 0.4973, 0.7280 }, + { 0.4945, 0.7523 }, + { 0.4917, 0.7766 }, + { 0.4889, 0.8010 }, + { 0.4861, 0.8250 }, + { 0.4833, 0.8493 }, + { 0.4806, 0.8737 }, + { 0.4778, 0.8980 }, + { 0.4750, 0.9223 }, + { 0.4722, 0.9463 }, + { 0.4694, 0.9707 }, + { 0.4666, 0.9950 }, + { 0.5968, 0.0756 }, + { 0.5941, 0.0996 }, + { 0.5913, 0.1240 }, + { 0.5885, 0.1483 }, + { 0.5857, 0.1726 }, + { 0.5829, 0.1970 }, + { 0.5801, 0.2210 }, + { 0.5773, 0.2453 }, + { 0.5745, 0.2697 }, + { 0.5717, 0.2940 }, + { 0.5690, 0.3183 }, + { 0.5662, 0.3423 }, + { 0.5634, 0.3667 }, + { 0.5606, 0.3910 }, + { 0.5578, 0.4153 }, + { 0.5550, 0.4397 }, + { 0.5523, 0.4637 }, + { 0.5495, 0.4880 }, + { 0.5467, 0.5124 }, + { 0.5439, 0.5367 }, + { 0.5411, 0.5610 }, + { 0.5383, 0.5851 }, + { 0.5355, 0.6094 }, + { 0.5327, 0.6337 }, + { 0.5299, 0.6581 }, + { 0.5271, 0.6824 }, + { 0.5244, 0.7064 }, + { 0.5216, 0.7308 }, + { 0.5188, 0.7551 }, + { 0.5160, 0.7794 }, + { 0.5132, 0.8038 }, + { 0.5104, 0.8278 }, + { 0.5076, 0.8521 }, + { 0.5048, 0.8764 }, + { 0.5021, 0.9008 }, + { 0.4993, 0.9251 }, + { 0.4965, 0.9491 }, + { 0.4937, 0.9735 }, + { 0.4909, 0.9978 }, + { 0.6211, 0.0784 }, + { 0.6183, 0.1024 }, + { 0.6155, 0.1268 }, + { 0.6127, 0.1511 }, + { 0.6099, 0.1754 }, + { 0.6071, 0.1998 }, + { 0.6044, 0.2238 }, + { 0.6016, 0.2481 }, + { 0.5988, 0.2724 }, + { 0.5960, 0.2968 }, + { 0.5932, 0.3211 }, + { 0.5904, 0.3451 }, + { 0.5877, 0.3695 }, + { 0.5849, 0.3938 }, + { 0.5821, 0.4181 }, + { 0.5793, 0.4425 }, + { 0.5765, 0.4665 }, + { 0.5737, 0.4908 }, + { 0.5709, 0.5152 }, + { 0.5681, 0.5395 }, + { 0.5653, 0.5638 }, + { 0.5626, 0.5878 }, + { 0.5598, 0.6122 }, + { 0.5570, 0.6365 }, + { 0.5542, 0.6608 }, + { 0.5514, 0.6852 }, + { 0.5486, 0.7092 }, + { 0.5458, 0.7335 }, + { 0.5430, 0.7579 }, + { 0.5402, 0.7822 }, + { 0.5375, 0.8065 }, + { 0.5347, 0.8306 }, + { 0.5319, 0.8549 }, + { 0.5291, 0.8792 }, + { 0.5263, 0.9036 }, + { 0.5235, 0.9279 }, + { 0.5208, 0.9519 }, + { 0.5180, 0.9762 }, + { 0.5152, 1.0006 }, + { 0.6454, 0.0812 }, + { 0.6426, 0.1052 }, + { 0.6398, 0.1295 }, + { 0.6370, 0.1539 }, + { 0.6342, 0.1782 }, + { 0.6314, 0.2025 }, + { 0.6287, 0.2266 }, + { 0.6259, 0.2509 }, + { 0.6231, 0.2752 }, + { 0.6203, 0.2996 }, + { 0.6175, 0.3239 }, + { 0.6147, 0.3479 }, + { 0.6119, 0.3723 }, + { 0.6092, 0.3966 }, + { 0.6064, 0.4209 }, + { 0.6036, 0.4453 }, + { 0.6008, 0.4693 }, + { 0.5980, 0.4936 }, + { 0.5952, 0.5179 }, + { 0.5924, 0.5423 }, + { 0.5896, 0.5666 }, + { 0.5869, 0.5906 }, + { 0.5841, 0.6150 }, + { 0.5813, 0.6393 }, + { 0.5785, 0.6636 }, + { 0.5757, 0.6880 }, + { 0.5729, 0.7120 }, + { 0.5701, 0.7363 }, + { 0.5673, 0.7607 }, + { 0.5645, 0.7850 }, + { 0.5617, 0.8093 }, + { 0.5590, 0.8333 }, + { 0.5562, 0.8577 }, + { 0.5534, 0.8820 }, + { 0.5506, 0.9064 }, + { 0.5478, 0.9307 }, + { 0.5451, 0.9547 }, + { 0.5423, 0.9790 }, + { 0.5395, 1.0034 }, + { 0.6696, 0.0840 }, + { 0.6669, 0.1080 }, + { 0.6641, 0.1323 }, + { 0.6613, 0.1567 }, + { 0.6585, 0.1810 }, + { 0.6557, 0.2053 }, + { 0.6529, 0.2294 }, + { 0.6501, 0.2537 }, + { 0.6473, 0.2780 }, + { 0.6446, 0.3024 }, + { 0.6418, 0.3267 }, + { 0.6390, 0.3507 }, + { 0.6362, 0.3750 }, + { 0.6334, 0.3994 }, + { 0.6306, 0.4237 }, + { 0.6278, 0.4480 }, + { 0.6251, 0.4721 }, + { 0.6223, 0.4964 }, + { 0.6195, 0.5207 }, + { 0.6167, 0.5451 }, + { 0.6139, 0.5694 }, + { 0.6111, 0.5934 }, + { 0.6083, 0.6178 }, + { 0.6055, 0.6421 }, + { 0.6027, 0.6664 }, + { 0.5999, 0.6908 }, + { 0.5972, 0.7148 }, + { 0.5944, 0.7391 }, + { 0.5916, 0.7634 }, + { 0.5888, 0.7878 }, + { 0.5860, 0.8121 }, + { 0.5832, 0.8361 }, + { 0.5805, 0.8605 }, + { 0.5777, 0.8848 }, + { 0.5749, 0.9091 }, + { 0.5721, 0.9335 }, + { 0.5693, 0.9575 }, + { 0.5665, 0.9818 }, + { 0.5637, 1.0062 }, + { 0.6939, 0.0868 }, + { 0.6911, 0.1108 }, + { 0.6883, 0.1351 }, + { 0.6855, 0.1595 }, + { 0.6827, 0.1838 }, + { 0.6800, 0.2081 }, + { 0.6772, 0.2321 }, + { 0.6744, 0.2565 }, + { 0.6716, 0.2808 }, + { 0.6688, 0.3051 }, + { 0.6660, 0.3295 }, + { 0.6633, 0.3535 }, + { 0.6605, 0.3778 }, + { 0.6577, 0.4022 }, + { 0.6549, 0.4265 }, + { 0.6521, 0.4508 }, + { 0.6493, 0.4749 }, + { 0.6465, 0.4992 }, + { 0.6437, 0.5235 }, + { 0.6409, 0.5479 }, + { 0.6381, 0.5722 }, + { 0.6354, 0.5962 }, + { 0.6326, 0.6205 }, + { 0.6298, 0.6449 }, + { 0.6270, 0.6692 }, + { 0.6242, 0.6935 }, + { 0.6214, 0.7176 }, + { 0.6186, 0.7419 }, + { 0.6158, 0.7662 }, + { 0.6131, 0.7906 }, + { 0.6103, 0.8149 }, + { 0.6075, 0.8389 }, + { 0.6047, 0.8633 }, + { 0.6019, 0.8876 }, + { 0.5991, 0.9119 }, + { 0.5963, 0.9363 }, + { 0.5936, 0.9603 }, + { 0.5908, 0.9846 }, + { 0.5880, 1.0089 }, + { 0.7182, 0.0896 }, + { 0.7154, 0.1136 }, + { 0.7126, 0.1379 }, + { 0.7098, 0.1622 }, + { 0.7070, 0.1866 }, + { 0.7042, 0.2109 }, + { 0.7015, 0.2349 }, + { 0.6987, 0.2593 }, + { 0.6959, 0.2836 }, + { 0.6931, 0.3079 }, + { 0.6903, 0.3323 }, + { 0.6876, 0.3563 }, + { 0.6848, 0.3806 }, + { 0.6820, 0.4050 }, + { 0.6792, 0.4293 }, + { 0.6764, 0.4536 }, + { 0.6736, 0.4776 }, + { 0.6708, 0.5020 }, + { 0.6680, 0.5263 }, + { 0.6652, 0.5506 }, + { 0.6624, 0.5750 }, + { 0.6597, 0.5990 }, + { 0.6569, 0.6233 }, + { 0.6541, 0.6477 }, + { 0.6513, 0.6720 }, + { 0.6485, 0.6963 }, + { 0.6457, 0.7204 }, + { 0.6429, 0.7447 }, + { 0.6401, 0.7690 }, + { 0.6373, 0.7934 }, + { 0.6346, 0.8177 }, + { 0.6318, 0.8417 }, + { 0.6290, 0.8660 }, + { 0.6262, 0.8904 }, + { 0.6234, 0.9147 }, + { 0.6206, 0.9390 }, + { 0.6179, 0.9631 }, + { 0.6151, 0.9874 }, + { 0.6123, 1.0117 }, + { 0.7424, 0.0923 }, + { 0.7397, 0.1164 }, + { 0.7369, 0.1407 }, + { 0.7341, 0.1650 }, + { 0.7313, 0.1894 }, + { 0.7285, 0.2137 }, + { 0.7257, 0.2377 }, + { 0.7229, 0.2620 }, + { 0.7202, 0.2864 }, + { 0.7174, 0.3107 }, + { 0.7146, 0.3351 }, + { 0.7118, 0.3591 }, + { 0.7090, 0.3834 }, + { 0.7062, 0.4077 }, + { 0.7034, 0.4321 }, + { 0.7006, 0.4564 }, + { 0.6979, 0.4804 }, + { 0.6951, 0.5048 }, + { 0.6923, 0.5291 }, + { 0.6895, 0.5534 }, + { 0.6867, 0.5778 }, + { 0.6839, 0.6018 }, + { 0.6811, 0.6261 }, + { 0.6783, 0.6505 }, + { 0.6755, 0.6748 }, + { 0.6727, 0.6991 }, + { 0.6700, 0.7231 }, + { 0.6672, 0.7475 }, + { 0.6644, 0.7718 }, + { 0.6616, 0.7961 }, + { 0.6588, 0.8205 }, + { 0.6561, 0.8445 }, + { 0.6533, 0.8688 }, + { 0.6505, 0.8932 }, + { 0.6477, 0.9175 }, + { 0.6449, 0.9418 }, + { 0.6421, 0.9659 }, + { 0.6393, 0.9902 }, + { 0.6365, 1.0145 }, + { 0.7667, 0.0951 }, + { 0.7640, 0.1191 }, + { 0.7612, 0.1435 }, + { 0.7584, 0.1678 }, + { 0.7556, 0.1922 }, + { 0.7528, 0.2165 }, + { 0.7500, 0.2405 }, + { 0.7472, 0.2648 }, + { 0.7444, 0.2892 }, + { 0.7417, 0.3135 }, + { 0.7389, 0.3378 }, + { 0.7361, 0.3619 }, + { 0.7333, 0.3862 }, + { 0.7305, 0.4105 }, + { 0.7277, 0.4349 }, + { 0.7249, 0.4592 }, + { 0.7222, 0.4832 }, + { 0.7194, 0.5076 }, + { 0.7166, 0.5319 }, + { 0.7138, 0.5562 }, + { 0.7110, 0.5806 }, + { 0.7082, 0.6046 }, + { 0.7054, 0.6289 }, + { 0.7026, 0.6532 }, + { 0.6998, 0.6776 }, + { 0.6970, 0.7019 }, + { 0.6943, 0.7259 }, + { 0.6915, 0.7503 }, + { 0.6887, 0.7746 }, + { 0.6859, 0.7989 }, + { 0.6831, 0.8233 }, + { 0.6803, 0.8473 }, + { 0.6776, 0.8716 }, + { 0.6748, 0.8960 }, + { 0.6720, 0.9203 }, + { 0.6692, 0.9446 }, + { 0.6664, 0.9686 }, + { 0.6636, 0.9930 }, + { 0.6608, 1.0173 }, + { 0.7910, 0.0979 }, + { 0.7882, 0.1219 }, + { 0.7854, 0.1463 }, + { 0.7826, 0.1706 }, + { 0.7798, 0.1949 }, + { 0.7771, 0.2193 }, + { 0.7743, 0.2433 }, + { 0.7715, 0.2676 }, + { 0.7687, 0.2920 }, + { 0.7659, 0.3163 }, + { 0.7631, 0.3406 }, + { 0.7604, 0.3646 }, + { 0.7576, 0.3890 }, + { 0.7548, 0.4133 }, + { 0.7520, 0.4377 }, + { 0.7492, 0.4620 }, + { 0.7464, 0.4860 }, + { 0.7436, 0.5103 }, + { 0.7408, 0.5347 }, + { 0.7380, 0.5590 }, + { 0.7352, 0.5833 }, + { 0.7325, 0.6074 }, + { 0.7297, 0.6317 }, + { 0.7269, 0.6560 }, + { 0.7241, 0.6804 }, + { 0.7213, 0.7047 }, + { 0.7185, 0.7287 }, + { 0.7157, 0.7531 }, + { 0.7130, 0.7774 }, + { 0.7102, 0.8017 }, + { 0.7074, 0.8261 }, + { 0.7046, 0.8501 }, + { 0.7018, 0.8744 }, + { 0.6990, 0.8987 }, + { 0.6962, 0.9231 }, + { 0.6934, 0.9474 }, + { 0.6907, 0.9714 }, + { 0.6879, 0.9958 }, + { 0.6851, 1.0201 }, + { 0.8152, 0.1007 }, + { 0.8125, 0.1247 }, + { 0.8097, 0.1491 }, + { 0.8069, 0.1734 }, + { 0.8041, 0.1977 }, + { 0.8013, 0.2221 }, + { 0.7986, 0.2461 }, + { 0.7958, 0.2704 }, + { 0.7930, 0.2947 }, + { 0.7902, 0.3191 }, + { 0.7874, 0.3434 }, + { 0.7846, 0.3674 }, + { 0.7818, 0.3918 }, + { 0.7790, 0.4161 }, + { 0.7762, 0.4404 }, + { 0.7734, 0.4648 }, + { 0.7707, 0.4888 }, + { 0.7679, 0.5131 }, + { 0.7651, 0.5375 }, + { 0.7623, 0.5618 }, + { 0.7595, 0.5861 }, + { 0.7567, 0.6101 }, + { 0.7539, 0.6345 }, + { 0.7511, 0.6588 }, + { 0.7483, 0.6831 }, + { 0.7456, 0.7075 }, + { 0.7428, 0.7315 }, + { 0.7400, 0.7558 }, + { 0.7372, 0.7802 }, + { 0.7344, 0.8045 }, + { 0.7316, 0.8288 }, + { 0.7289, 0.8529 }, + { 0.7261, 0.8772 }, + { 0.7233, 0.9015 }, + { 0.7205, 0.9259 }, + { 0.7177, 0.9502 }, + { 0.7149, 0.9742 }, + { 0.7121, 0.9986 }, + { 0.7093, 1.0229 }, + { 0.8395, 0.1035 }, + { 0.8368, 0.1275 }, + { 0.8340, 0.1518 }, + { 0.8312, 0.1762 }, + { 0.8284, 0.2005 }, + { 0.8256, 0.2248 }, + { 0.8228, 0.2489 }, + { 0.8201, 0.2732 }, + { 0.8173, 0.2975 }, + { 0.8145, 0.3219 }, + { 0.8117, 0.3462 }, + { 0.8089, 0.3702 }, + { 0.8061, 0.3946 }, + { 0.8033, 0.4189 }, + { 0.8005, 0.4432 }, + { 0.7977, 0.4676 }, + { 0.7950, 0.4916 }, + { 0.7922, 0.5159 }, + { 0.7894, 0.5402 }, + { 0.7866, 0.5646 }, + { 0.7838, 0.5889 }, + { 0.7810, 0.6129 }, + { 0.7782, 0.6373 }, + { 0.7754, 0.6616 }, + { 0.7726, 0.6859 }, + { 0.7698, 0.7103 }, + { 0.7671, 0.7343 }, + { 0.7643, 0.7586 }, + { 0.7615, 0.7830 }, + { 0.7587, 0.8073 }, + { 0.7559, 0.8316 }, + { 0.7532, 0.8556 }, + { 0.7504, 0.8800 }, + { 0.7476, 0.9043 }, + { 0.7448, 0.9287 }, + { 0.7420, 0.9530 }, + { 0.7392, 0.9770 }, + { 0.7364, 1.0013 }, + { 0.7336, 1.0257 }, + { 0.8638, 0.1063 }, + { 0.8610, 0.1303 }, + { 0.8582, 0.1546 }, + { 0.8555, 0.1790 }, + { 0.8527, 0.2033 }, + { 0.8499, 0.2276 }, + { 0.8471, 0.2517 }, + { 0.8443, 0.2760 }, + { 0.8415, 0.3003 }, + { 0.8387, 0.3247 }, + { 0.8359, 0.3490 }, + { 0.8332, 0.3730 }, + { 0.8304, 0.3973 }, + { 0.8276, 0.4217 }, + { 0.8248, 0.4460 }, + { 0.8220, 0.4703 }, + { 0.8192, 0.4944 }, + { 0.8164, 0.5187 }, + { 0.8136, 0.5430 }, + { 0.8108, 0.5674 }, + { 0.8080, 0.5917 }, + { 0.8053, 0.6157 }, + { 0.8025, 0.6401 }, + { 0.7997, 0.6644 }, + { 0.7969, 0.6887 }, + { 0.7941, 0.7131 }, + { 0.7913, 0.7371 }, + { 0.7886, 0.7614 }, + { 0.7858, 0.7857 }, + { 0.7830, 0.8101 }, + { 0.7802, 0.8344 }, + { 0.7774, 0.8584 }, + { 0.7746, 0.8828 }, + { 0.7718, 0.9071 }, + { 0.7690, 0.9314 }, + { 0.7662, 0.9558 }, + { 0.7635, 0.9798 }, + { 0.7607, 1.0041 }, + { 0.7579, 1.0285 }, + { 0.8881, 0.1091 }, + { 0.8853, 0.1331 }, + { 0.8825, 0.1574 }, + { 0.8797, 0.1818 }, + { 0.8770, 0.2061 }, + { 0.8742, 0.2304 }, + { 0.8714, 0.2544 }, + { 0.8686, 0.2788 }, + { 0.8658, 0.3031 }, + { 0.8630, 0.3274 }, + { 0.8602, 0.3518 }, + { 0.8575, 0.3758 }, + { 0.8547, 0.4001 }, + { 0.8519, 0.4245 }, + { 0.8491, 0.4488 }, + { 0.8463, 0.4731 }, + { 0.8435, 0.4972 }, + { 0.8407, 0.5215 }, + { 0.8379, 0.5458 }, + { 0.8351, 0.5702 }, + { 0.8323, 0.5945 }, + { 0.8296, 0.6185 }, + { 0.8268, 0.6428 }, + { 0.8240, 0.6672 }, + { 0.8212, 0.6915 }, + { 0.8184, 0.7159 }, + { 0.8156, 0.7399 }, + { 0.8128, 0.7642 }, + { 0.8101, 0.7885 }, + { 0.8073, 0.8129 }, + { 0.8045, 0.8372 }, + { 0.8017, 0.8612 }, + { 0.7989, 0.8856 }, + { 0.7961, 0.9099 }, + { 0.7933, 0.9342 }, + { 0.7905, 0.9586 }, + { 0.7878, 0.9826 }, + { 0.7850, 1.0069 }, + { 0.7822, 1.0313 }, + { 0.9123, 0.1119 }, + { 0.9096, 0.1359 }, + { 0.9068, 0.1602 }, + { 0.9040, 0.1845 }, + { 0.9012, 0.2089 }, + { 0.8984, 0.2332 }, + { 0.8957, 0.2572 }, + { 0.8929, 0.2816 }, + { 0.8901, 0.3059 }, + { 0.8873, 0.3302 }, + { 0.8845, 0.3546 }, + { 0.8817, 0.3786 }, + { 0.8789, 0.4029 }, + { 0.8761, 0.4273 }, + { 0.8733, 0.4516 }, + { 0.8705, 0.4759 }, + { 0.8678, 0.4999 }, + { 0.8650, 0.5243 }, + { 0.8622, 0.5486 }, + { 0.8594, 0.5729 }, + { 0.8566, 0.5973 }, + { 0.8538, 0.6213 }, + { 0.8510, 0.6456 }, + { 0.8482, 0.6700 }, + { 0.8455, 0.6943 }, + { 0.8427, 0.7186 }, + { 0.8399, 0.7427 }, + { 0.8371, 0.7670 }, + { 0.8343, 0.7913 }, + { 0.8315, 0.8157 }, + { 0.8287, 0.8400 }, + { 0.8260, 0.8640 }, + { 0.8232, 0.8883 }, + { 0.8204, 0.9127 }, + { 0.8176, 0.9370 }, + { 0.8148, 0.9614 }, + { 0.8120, 0.9854 }, + { 0.8092, 1.0097 }, + { 0.8064, 1.0340 }, + { 0.9366, 0.1146 }, + { 0.9338, 0.1387 }, + { 0.9311, 0.1630 }, + { 0.9283, 0.1873 }, + { 0.9255, 0.2117 }, + { 0.9227, 0.2360 }, + { 0.9199, 0.2600 }, + { 0.9171, 0.2844 }, + { 0.9143, 0.3087 }, + { 0.9115, 0.3330 }, + { 0.9087, 0.3574 }, + { 0.9060, 0.3814 }, + { 0.9032, 0.4057 }, + { 0.9004, 0.4300 }, + { 0.8976, 0.4544 }, + { 0.8948, 0.4787 }, + { 0.8920, 0.5027 }, + { 0.8892, 0.5271 }, + { 0.8864, 0.5514 }, + { 0.8836, 0.5757 }, + { 0.8808, 0.6001 }, + { 0.8781, 0.6241 }, + { 0.8753, 0.6484 }, + { 0.8725, 0.6728 }, + { 0.8697, 0.6971 }, + { 0.8669, 0.7214 }, + { 0.8642, 0.7454 }, + { 0.8614, 0.7698 }, + { 0.8586, 0.7941 }, + { 0.8558, 0.8184 }, + { 0.8530, 0.8428 }, + { 0.8502, 0.8668 }, + { 0.8474, 0.8911 }, + { 0.8446, 0.9155 }, + { 0.8418, 0.9398 }, + { 0.8390, 0.9641 }, + { 0.8363, 0.9882 }, + { 0.8335, 1.0125 }, + { 0.8307, 1.0368 }, + { 0.9581, 0.1414 }, + { 0.9553, 0.1658 }, + { 0.9526, 0.1901 }, + { 0.9498, 0.2145 }, + { 0.9470, 0.2388 }, + { 0.9442, 0.2628 }, + { 0.9414, 0.2871 }, + { 0.9386, 0.3115 }, + { 0.9358, 0.3358 }, + { 0.9330, 0.3601 }, + { 0.9303, 0.3842 }, + { 0.9275, 0.4085 }, + { 0.9247, 0.4328 }, + { 0.9219, 0.4572 }, + { 0.9191, 0.4815 }, + { 0.9163, 0.5055 }, + { 0.9135, 0.5299 }, + { 0.9107, 0.5542 }, + { 0.9079, 0.5785 }, + { 0.9051, 0.6029 }, + { 0.9024, 0.6269 }, + { 0.8996, 0.6512 }, + { 0.8968, 0.6755 }, + { 0.8940, 0.6999 }, + { 0.8912, 0.7242 }, + { 0.8884, 0.7482 }, + { 0.8857, 0.7726 }, + { 0.8829, 0.7969 }, + { 0.8801, 0.8212 }, + { 0.8773, 0.8456 }, + { 0.8745, 0.8696 }, + { 0.8717, 0.8939 }, + { 0.8689, 0.9183 }, + { 0.8661, 0.9426 }, + { 0.8633, 0.9669 }, + { 0.8606, 0.9909 }, + { 0.8578, 1.0153 }, + { 0.8550, 1.0396 }, + { 0.8522, 1.0639 }, +}; + diff --git a/examples/osghangglide/trees.cpp b/examples/osghangglide/trees.cpp new file mode 100644 index 000000000..c38abb8ff --- /dev/null +++ b/examples/osghangglide/trees.cpp @@ -0,0 +1,273 @@ +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "hat.h" + +#ifdef _MSC_VER +#pragma warning( disable : 4244 ) +#pragma warning( disable : 4305 ) +#endif + +using namespace osg; + +#define sqr(x) ((x)*(x)) + +extern void getDatabaseCenterRadius( float dbcenter[3], float *dbradius ); + +static float dbcenter[3], dbradius; + +static struct _tree +{ + int n; + float x, y, z; + float w, h; +} + + +trees[] = +{ + { 0, -0.4769, -0.8972, -0.4011, 0.2000, 0.1200 }, + { 1, -0.2543, -0.9117, -0.3873, 0.2000, 0.1200 }, + { 2, -0.0424, -0.8538, -0.3728, 0.2000, 0.1200 }, + { 3, 0.1590, -0.8827, -0.3594, 0.2000, 0.1200 }, + { 4, -0.4981, -1.0853, -0.4016, 0.3500, 0.1200 }, + { 5, -0.5405, -1.2590, -0.4050, 0.2000, 0.1200 }, + { 6, -0.5723, -1.5339, -0.4152, 0.2000, 0.1200 }, + { 7, -0.6252, -1.8667, -0.4280, 0.2000, 0.1200 }, + { 8, -0.5617, -2.1851, -0.4309, 0.2000, 0.1200 }, + { 9, -0.5087, -2.4166, -0.4215, 0.2000, 0.1200 }, + { 10, -0.4345, -2.3443, -0.4214, 0.2000, 0.1200 }, + { 11, -3.0308, -1.5484, -0.4876, 0.2000, 0.1200 }, + { 12, -3.0202, -1.6497, -0.4963, 0.2000, 0.1200 }, + { 13, -2.9355, -1.8378, -0.4969, 0.2000, 0.1200 }, + { 14, -0.6040, -2.0259, -0.4300, 0.2000, 0.1200 }, + { 15, -0.5442, -1.3442, -0.4080, 0.1000, 0.1200 }, + { 16, -0.5639, -1.6885, -0.4201, 0.1000, 0.1200 }, + { 17, 0.9246, 3.4835, 0.5898, 0.2500, 0.1000 }, + { 18, 0.0787, 3.8687, 0.3329, 0.2500, 0.1200 }, + { 19, 0.2885, 3.7130, 0.4047, 0.2500, 0.1200 }, + { 20, 0.2033, 3.6228, 0.3704, 0.2500, 0.1200 }, + { 21, -0.2098, 3.9015, 0.2327, 0.2500, 0.1200 }, + { 22, -0.3738, 3.7376, 0.1722, 0.2500, 0.1200 }, + { 23, -0.2557, 3.6064, 0.1989, 0.2500, 0.1200 }, + { 24, 0.0590, 3.7294, 0.3210, 0.2500, 0.1200 }, + { 25, -0.4721, 3.8851, 0.1525, 0.2500, 0.1200 }, + { 26, 0.9639, 3.2048, 0.5868, 0.1200, 0.0800 }, + { 27, 0.7082, -1.0409, -0.3221, 0.1000, 0.1000 }, + { 28, -0.2426, -2.3442, -0.4150, 0.1000, 0.1380 }, + { 29, -0.1770, -2.4179, -0.4095, 0.1000, 0.1580 }, + { 30, -0.0852, -2.5327, -0.4056, 0.1000, 0.1130 }, + { 31, -0.0131, -2.6065, -0.4031, 0.1000, 0.1150 }, + { 32, 0.0787, -2.6638, -0.4012, 0.1000, 0.1510 }, + { 33, 0.1049, -2.7622, -0.3964, 0.1000, 0.1270 }, + { 34, 0.1770, -2.8687, -0.3953, 0.1000, 0.1100 }, + { 35, 0.3213, -2.9507, -0.3974, 0.1000, 0.1190 }, + { 36, 0.4065, -3.0163, -0.4014, 0.1000, 0.1120 }, + { 37, 0.3738, -3.1802, -0.4025, 0.1000, 0.1860 }, + { 38, 0.5508, -3.2048, -0.3966, 0.1000, 0.1490 }, + { 39, 0.5836, -3.3031, -0.3900, 0.1000, 0.1670 }, + { 40, -0.3082, -2.7212, -0.3933, 0.1000, 0.1840 }, + { 41, -0.1967, -2.6474, -0.4017, 0.1000, 0.1600 }, + { 42, -0.1180, -2.7458, -0.3980, 0.1000, 0.1250 }, + { 43, -0.3344, -2.8359, -0.3964, 0.1000, 0.1430 }, + { 44, -0.2492, -2.8933, -0.3838, 0.1000, 0.1890 }, + { 45, -0.1246, -3.0491, -0.3768, 0.1000, 0.1830 }, + { 46, 0.0000, -3.0818, -0.3696, 0.1000, 0.1370 }, + { 47, -0.2295, -3.0409, -0.3706, 0.1000, 0.1660 }, + { 48, -1.3245, 2.6638, 0.0733, 0.0500, 0.0500 }, + { 49, 2.2425, -1.5491, -0.2821, 0.2300, 0.1200 }, + { 50, 0.2164, -2.1311, -0.4000, 0.1000, 0.0690 }, + { 51, 0.2885, -2.2130, -0.4000, 0.1000, 0.0790 }, + { 52, 0.3606, -2.2786, -0.4000, 0.1000, 0.0565 }, + { 53, 0.4328, -2.3442, -0.4000, 0.1000, 0.0575 }, + { 54, 0.5246, -2.4343, -0.4086, 0.1000, 0.0755 }, + { 55, 0.6360, -2.5245, -0.4079, 0.1000, 0.0635 }, + { 56, 0.7541, -2.4261, -0.4007, 0.1000, 0.0550 }, + { 57, 0.7934, -2.2786, -0.3944, 0.1000, 0.0595 }, + { 58, 1.0295, -2.2868, -0.3837, 0.1000, 0.0560 }, + { 59, 0.8459, -2.6474, -0.4051, 0.1000, 0.0930 }, + { 60, 1.0426, -2.6884, -0.4001, 0.1000, 0.0745 }, + { 61, 1.1475, -2.7458, -0.3883, 0.1000, 0.0835 }, + { 62, -0.1967, -1.4180, -0.3988, 0.1000, 0.0920 }, + { 63, -0.0131, -1.2704, -0.3856, 0.1000, 0.0690 }, + { 64, 0.2098, -1.2049, -0.3664, 0.1000, 0.0790 }, + { 65, 0.3410, -1.3196, -0.3652, 0.1000, 0.0565 }, + { 66, 0.5705, -1.2704, -0.3467, 0.1000, 0.0575 }, + { 67, 0.6360, -1.4344, -0.3532, 0.1000, 0.0755 }, + { 68, 0.9246, -1.4180, -0.3329, 0.1000, 0.0635 }, + { 69, 1.0623, -1.3360, -0.3183, 0.1000, 0.0550 }, + { 70, 1.2393, -1.3934, -0.3103, 0.1000, 0.0595 }, + { 71, 1.3639, -1.4753, -0.3079, 0.1000, 0.0560 }, + { 72, 1.4819, -1.5983, -0.3210, 0.1000, 0.0930 }, + { 73, 1.7835, -1.5819, -0.3065, 0.1000, 0.0745 }, + { 74, 1.9343, -2.1065, -0.3307, 0.1000, 0.0835 }, + { 75, 2.1245, -2.3196, -0.3314, 0.1000, 0.0920 }, + { 76, 2.2556, -2.3032, -0.3230, 0.1000, 0.0800 }, + { 77, 2.4196, -2.3688, -0.3165, 0.1000, 0.0625 }, + { 78, 1.7835, -2.5327, -0.3543, 0.1000, 0.0715 }, + { 79, 1.7180, -2.8933, -0.3742, 0.1000, 0.0945 }, + { 80, 1.9343, -3.0409, -0.3727, 0.1000, 0.0915 }, + { 81, 2.4524, -3.4671, -0.3900, 0.1000, 0.0685 }, + { 82, 2.4786, -2.8851, -0.3538, 0.1000, 0.0830 }, + { 83, 2.3343, -2.6228, -0.3420, 0.1000, 0.0830 }, + { 84, 2.8130, -2.0737, -0.2706, 0.1000, 0.0890 }, + { 85, 2.6360, -1.8278, -0.2661, 0.1000, 0.0975 }, + { 86, 2.3958, -1.7130, -0.2774, 0.2000, 0.1555 }, + { 87, 2.2688, -1.2868, -0.2646, 0.1000, 0.0835 }, + { 88, 2.4196, -1.1147, -0.2486, 0.1000, 0.0770 }, + { 89, 2.7802, -2.3933, -0.3017, 0.1000, 0.0655 }, + { 90, 3.0163, -2.4179, -0.2905, 0.1000, 0.0725 }, + { 91, 2.9310, -2.2540, -0.2798, 0.1000, 0.0910 }, + { 92, 2.6622, -2.0983, -0.2823, 0.1000, 0.0680 }, + { 93, 2.3147, -1.9753, -0.2973, 0.1000, 0.0620 }, + { 94, 2.1573, -1.8770, -0.3013, 0.1000, 0.0525 }, + { 95, 2.0196, -1.7868, -0.3044, 0.1000, 0.0970 }, + { 96, 2.7802, -3.3031, -0.3900, 0.1000, 0.0510 }, + { 97, 2.8589, -3.1720, -0.3900, 0.1000, 0.0755 }, + { 98, 3.0163, -2.8114, -0.3383, 0.1000, 0.0835 }, + { 99, 3.5081, -2.4179, -0.2558, 0.1000, 0.0770 }, + { 100, 3.5277, -2.3196, -0.2366, 0.1000, 0.0765 }, + { 101, 3.6654, -2.5819, -0.2566, 0.1000, 0.0805 }, + { 102, 3.7179, -2.7622, -0.2706, 0.1000, 0.0980 }, + { 103, 3.7769, -2.4671, -0.2339, 0.1000, 0.0640 }, + { 104, 3.3441, -2.4671, -0.2693, 0.1000, 0.0940 }, + { -1, 0, 0, 0, 0, 0 }, +}; + +static Geometry *makeTree( _tree *tree, StateSet *dstate ) +{ + float vv[][3] = + { + { -tree->w/2.0, 0.0, 0.0 }, + { tree->w/2.0, 0.0, 0.0 }, + { tree->w/2.0, 0.0, 2 * tree->h }, + { -tree->w/2.0, 0.0, 2 * tree->h }, + }; + + Vec3Array& v = *(new Vec3Array(4)); + Vec2Array& t = *(new Vec2Array(4)); + Vec4Array& l = *(new Vec4Array(1)); + + int i; + + l[0][0] = l[0][1] = l[0][2] = l[0][3] = 1; + + for( i = 0; i < 4; i++ ) + { + v[i][0] = vv[i][0]; + v[i][1] = vv[i][1]; + v[i][2] = vv[i][2]; + } + + t[0][0] = 0.0; t[0][1] = 0.0; + t[1][0] = 1.0; t[1][1] = 0.0; + t[2][0] = 1.0; t[2][1] = 1.0; + t[3][0] = 0.0; t[3][1] = 1.0; + + Geometry *geom = new Geometry; + + geom->setVertexArray( &v ); + + geom->setTexCoordArray( 0, &t ); + + geom->setColorArray( &l ); + geom->setColorBinding( Geometry::BIND_OVERALL ); + + geom->addPrimitiveSet( new DrawArrays(PrimitiveSet::QUADS,0,4) ); + + geom->setStateSet( dstate ); + + return geom; +} + + +static float ttx, tty; + +static int ct( const void *a, const void *b ) +{ + _tree *ta = (_tree *)a; + _tree *tb = (_tree *)b; + + float da = sqrtf( sqr(ta->x - ttx) + sqr(ta->y - tty) ); + float db = sqrtf( sqr(tb->x - ttx) + sqr(tb->y - tty) ); + + if( da < db ) + return -1; + else + return 1; +} + + +Node *makeTrees( void ) +{ + Group *group = new Group; + int i; + + getDatabaseCenterRadius( dbcenter, &dbradius ); + struct _tree *t; + + Texture2D *tex = new Texture2D; + tex->setImage(osgDB::readImageFile("Images/tree0.rgba")); + + StateSet *dstate = new StateSet; + + dstate->setTextureAttributeAndModes(0, tex, StateAttribute::ON ); + dstate->setTextureAttribute(0, new TexEnv ); + + dstate->setAttributeAndModes( new BlendFunc, StateAttribute::ON ); + + AlphaFunc* alphaFunc = new AlphaFunc; + alphaFunc->setFunction(AlphaFunc::GEQUAL,0.05f); + dstate->setAttributeAndModes( alphaFunc, StateAttribute::ON ); + + dstate->setMode( GL_LIGHTING, StateAttribute::OFF ); + + dstate->setRenderingHint( StateSet::TRANSPARENT_BIN ); + + int tt[] = { 15, 30, 45, 58, 72, 75, 93, 96, 105, -1 }; + int *ttp = tt; + + i = 0; + while( i < 105 ) + { + ttx = trees[i].x; + tty = trees[i].y; + qsort( &trees[i], 105 - i, sizeof( _tree ), ct ); + + i += *ttp; + ttp++; + } + + t = trees; + i = 0; + ttp = tt; + while( *ttp != -1 ) + { + Billboard *bb = new Billboard; + //int starti = i; + + for( ; i < (*ttp); i++ ) + { + t->x -= 0.3f; + float h = Hat(t->x, t->y, t->z ); + Vec3 pos( t->x, t->y, t->z-h ); + Geometry *geom = makeTree( t, dstate ); + bb->addDrawable( geom, pos ); + t++; + } + group->addChild( bb ); + ttp++; + } + + return group; +} diff --git a/examples/osghud/GNUmakefile b/examples/osghud/GNUmakefile index fc4eccd47..8882265d5 100644 --- a/examples/osghud/GNUmakefile +++ b/examples/osghud/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osghud.cpp\ -LIBS += -losgProducer -lProducer -losgText $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgProducer -lProducer -losgText -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osghud/GNUmakefile.inst b/examples/osghud/GNUmakefile.inst index 79d06f5b3..0be7f372e 100644 --- a/examples/osghud/GNUmakefile.inst +++ b/examples/osghud/GNUmakefile.inst @@ -4,12 +4,11 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osghud.cpp\ -LIBS += -losgProducer -lProducer -losgText $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgProducer -lProducer -losgText -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osghud INC += $(PRODUCER_INCLUDE_DIR) LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgimpostor/GNUmakefile b/examples/osgimpostor/GNUmakefile new file mode 100644 index 000000000..a65a1e968 --- /dev/null +++ b/examples/osgimpostor/GNUmakefile @@ -0,0 +1,19 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + TestManipulator.cpp\ + osgimpostor.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgimpostor + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgimpostor/GNUmakefile.inst b/examples/osgimpostor/GNUmakefile.inst new file mode 100644 index 000000000..6b3d97838 --- /dev/null +++ b/examples/osgimpostor/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgimpostor.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgimpostor + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgimpostor/TestManipulator.cpp b/examples/osgimpostor/TestManipulator.cpp new file mode 100644 index 000000000..95c30e31e --- /dev/null +++ b/examples/osgimpostor/TestManipulator.cpp @@ -0,0 +1,382 @@ +#include "TestManipulator.h" +#include + +using namespace osg; +using namespace osgGA; + +TestManipulator::TestManipulator() +{ + _modelScale = 0.01f; + _minimumZoomScale = 0.05f; + _thrown = false; + + _distance = 1.0f; +} + + +TestManipulator::~TestManipulator() +{ +} + + +void TestManipulator::setNode(osg::Node* node) +{ + _node = node; + if (_node.get()) + { + const osg::BoundingSphere& boundingSphere=_node->getBound(); + _modelScale = boundingSphere._radius; + } +} + + +const osg::Node* TestManipulator::getNode() const +{ + return _node.get(); +} + + +osg::Node* TestManipulator::getNode() +{ + return _node.get(); +} + + + /*ea*/ +void TestManipulator::home(const GUIEventAdapter& ,GUIActionAdapter& us) +{ + if(_node.get() && _camera.get()) + { + + const osg::BoundingSphere& boundingSphere=_node->getBound(); + + _camera->setView(boundingSphere.center()+osg::Vec3(0.0f, 0.0f, 20.0f), + boundingSphere.center()+osg::Vec3(0.0f, 1.0f, 20.0f), + osg::Vec3(0.0f, 0.0f, 1.0f)); + + computeLocalDataFromCamera(); + + us.requestRedraw(); + } +} + + +void TestManipulator::init(const GUIEventAdapter& ,GUIActionAdapter& ) +{ + flushMouseEventStack(); + + computeLocalDataFromCamera(); +} + +bool TestManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us) +{ + if(!_camera.get()) return false; + + switch(ea.getEventType()) + { + case(GUIEventAdapter::PUSH): + { + flushMouseEventStack(); + addMouseEvent(ea); + if (calcMovement()) us.requestRedraw(); + us.requestContinuousUpdate(false); + _thrown = false; + return true; + } + + case(GUIEventAdapter::RELEASE): + { + if (ea.getButtonMask()==0) + { + + if (isMouseMoving()) + { + if (calcMovement()) + { + us.requestRedraw(); + us.requestContinuousUpdate(true); + _thrown = true; + } + } + else + { + flushMouseEventStack(); + addMouseEvent(ea); + if (calcMovement()) us.requestRedraw(); + us.requestContinuousUpdate(false); + _thrown = false; + } + + } + else + { + flushMouseEventStack(); + addMouseEvent(ea); + if (calcMovement()) us.requestRedraw(); + us.requestContinuousUpdate(false); + _thrown = false; + } + return true; + } + + case(GUIEventAdapter::DRAG): + { + addMouseEvent(ea); + if (calcMovement()) us.requestRedraw(); + us.requestContinuousUpdate(false); + _thrown = false; + return true; + } + + case(GUIEventAdapter::MOVE): + { + return false; + } + + case(GUIEventAdapter::KEYDOWN): + if (ea.getKey()==' ') + { + flushMouseEventStack(); + _thrown = false; + home(ea,us); + us.requestRedraw(); + us.requestContinuousUpdate(false); + return true; + } else if (ea.getKey()=='+') + { + _camera->setFusionDistanceRatio(_camera->getFusionDistanceRatio()*1.25f); + return true; + } + else if (ea.getKey()=='-') + { + _camera->setFusionDistanceRatio(_camera->getFusionDistanceRatio()/1.25f); + return true; + } +// this is quick hack to test out othographic projection. +// else if (ea.getKey()=='O') +// { +// float dist = _camera->getLookDistance(); +// _camera->setOrtho(-dist,dist,-dist,dist,-dist,dist); +// return true; +// } + return false; + case(GUIEventAdapter::FRAME): + _camera->setFusionDistanceMode(osg::Camera::PROPORTIONAL_TO_LOOK_DISTANCE); + if (_thrown) + { + if (calcMovement()) us.requestRedraw(); + return true; + } + return false; + default: + return false; + } +} + + +bool TestManipulator::isMouseMoving() +{ + if (_ga_t0.get()==NULL || _ga_t1.get()==NULL) return false; + + static const float velocity = 100.0f; + + float dx = _ga_t0->getX()-_ga_t1->getX(); + float dy = _ga_t0->getY()-_ga_t1->getY(); + float len = sqrtf(dx*dx+dy*dy); + float dt = _ga_t0->time()-_ga_t1->time(); + + return (len>dt*velocity); +} + + +void TestManipulator::flushMouseEventStack() +{ + _ga_t1 = NULL; + _ga_t0 = NULL; +} + + +void TestManipulator::addMouseEvent(const GUIEventAdapter& ea) +{ + _ga_t1 = _ga_t0; + _ga_t0 = &ea; +} + + + +void TestManipulator::computeLocalDataFromCamera() +{ + // maths from gluLookAt/osg::Matrix::makeLookAt + osg::Vec3 f(_camera->getCenterPoint()-_camera->getEyePoint()); + f.normalize(); + osg::Vec3 s(f^_camera->getUpVector()); + s.normalize(); + osg::Vec3 u(s^f); + u.normalize(); + + osg::Matrix rotation_matrix(s[0], u[0], -f[0], 0.0f, + s[1], u[1], -f[1], 0.0f, + s[2], u[2], -f[2], 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + + _center = _camera->getCenterPoint(); + _distance = _camera->getLookDistance(); + _rotation.set(rotation_matrix); + _rotation = _rotation.inverse(); + +} + +void TestManipulator::computeCameraFromLocalData() +{ + osg::Matrix new_rotation; + new_rotation.makeRotate(_rotation); + + osg::Vec3 up = osg::Vec3(0.0f,1.0f,0.0) * new_rotation; + osg::Vec3 eye = (osg::Vec3(0.0f,0.0f,_distance) * new_rotation) + _center; + + _camera->setLookAt(eye,_center,up); +} + + +bool TestManipulator::calcMovement() +{ + + // return if less then two events have been added. + if (_ga_t0.get()==NULL || _ga_t1.get()==NULL) return false; + + float dx = _ga_t0->getX()-_ga_t1->getX(); + float dy = _ga_t0->getY()-_ga_t1->getY(); + + + // return if there is no movement. + if (dx==0 && dy==0) return false; + + unsigned int buttonMask = _ga_t1->getButtonMask(); + if (buttonMask==GUIEventAdapter::LEFT_MOUSE_BUTTON) + { + + // rotate camera. + + float rx0 = (_ga_t0->getXmax()-_ga_t0->getXmin())/2.0f; + + osg::Quat new_rotate; + float xRot = dx / rx0; + new_rotate.makeRotate(xRot / 5.0f, osg::Vec3(0.0f, 0.0f, 1.0f)); + + _rotation = _rotation*new_rotate; + + computeCameraFromLocalData(); + + return true; + + } + else if (buttonMask==GUIEventAdapter::MIDDLE_MOUSE_BUTTON) + { + + // pan model. + + osg::Vec3 dv = osg::Vec3(0.0f, 0.0f, 1.0f) * dy; + + _center += dv; + + computeCameraFromLocalData(); + + return true; + + } + else if (buttonMask==GUIEventAdapter::RIGHT_MOUSE_BUTTON) + { + + osg::Vec3 uv = _camera->getUpVector(); + osg::Vec3 sv = _camera->getSideVector(); + osg::Vec3 fv = uv ^ sv; + osg::Vec3 dv = fv*dy-sv*dx; + + _center += dv; + computeCameraFromLocalData(); + + return true; + } + + return false; +} + + +/* + * This size should really be based on the distance from the center of + * rotation to the point on the object underneath the mouse. That + * point would then track the mouse as closely as possible. This is a + * simple example, though, so that is left as an Exercise for the + * Programmer. + */ +const float TRACKBALLSIZE = 0.8f; + +/* + * Ok, simulate a track-ball. Project the points onto the virtual + * trackball, then figure out the axis of rotation, which is the cross + * product of P1 P2 and O P1 (O is the center of the ball, 0,0,0) + * Note: This is a deformed trackball-- is a trackball in the center, + * but is deformed into a hyperbolic sheet of rotation away from the + * center. This particular function was chosen after trying out + * several variations. + * + * It is assumed that the arguments to this routine are in the range + * (-1.0 ... 1.0) + */ +void TestManipulator::trackball(osg::Vec3& axis,float& angle, float p1x, float p1y, float p2x, float p2y) +{ + /* + * First, figure out z-coordinates for projection of P1 and P2 to + * deformed sphere + */ + + osg::Vec3 uv = _camera->getUpVector(); + osg::Vec3 sv = _camera->getSideVector(); + osg::Vec3 lv = _camera->getLookVector(); + + osg::Vec3 p1 = sv*p1x+uv*p1y-lv*tb_project_to_sphere(TRACKBALLSIZE,p1x,p1y); + osg::Vec3 p2 = sv*p2x+uv*p2y-lv*tb_project_to_sphere(TRACKBALLSIZE,p2x,p2y); + + /* + * Now, we want the cross product of P1 and P2 + */ + + axis = p2^p1; + axis.normalize(); + + /* + * Figure out how much to rotate around that axis. + */ + float t = (p2-p1).length() / (2.0*TRACKBALLSIZE); + + /* + * Avoid problems with out-of-control values... + */ + if (t > 1.0) t = 1.0; + if (t < -1.0) t = -1.0; + angle = inRadians(asin(t)); + +} + + +/* + * Project an x,y pair onto a sphere of radius r OR a hyperbolic sheet + * if we are away from the center of the sphere. + */ +float TestManipulator::tb_project_to_sphere(float r, float x, float y) +{ + float d, t, z; + + d = sqrt(x*x + y*y); + /* Inside sphere */ + if (d < r * 0.70710678118654752440) + { + z = sqrt(r*r - d*d); + } /* On hyperbola */ + else + { + t = r / 1.41421356237309504880; + z = t*t / d; + } + return z; +} diff --git a/examples/osgimpostor/TestManipulator.h b/examples/osgimpostor/TestManipulator.h new file mode 100644 index 000000000..8424c890e --- /dev/null +++ b/examples/osgimpostor/TestManipulator.h @@ -0,0 +1,80 @@ +//C++ header - Open Scene Graph - Copyright (C) 1998-2002 Robert Osfield +//Distributed under the terms of the GNU Library General Public License (LGPL) +//as published by the Free Software Foundation. + +#ifndef OSGGA_TESTMANIPULATOR +#define OSGGA_TESTMANIPULATOR 1 + +#include + +class TestManipulator : public osgGA::CameraManipulator +{ + public: + + TestManipulator(); + virtual ~TestManipulator(); + + /** Attach a node to the manipulator. + Automatically detaches previously attached node. + setNode(NULL) detaches previously nodes. + Is ignored by manipulators which do not require a reference model.*/ + virtual void setNode(osg::Node*); + + /** Return node if attached.*/ + virtual const osg::Node* getNode() const; + + /** Return node if attached.*/ + virtual osg::Node* getNode(); + + /** Move the camera to the default position. + May be ignored by manipulators if home functionality is not appropriate.*/ + virtual void home(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& us); + + /** Start/restart the manipulator.*/ + virtual void init(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& us); + + + /** handle events, return true if handled, false otherwise.*/ + virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& us); + + private: + + /** Reset the internal GUIEvent stack.*/ + void flushMouseEventStack(); + /** Add the current mouse GUIEvent to internal stack.*/ + void addMouseEvent(const osgGA::GUIEventAdapter& ea); + + void computeLocalDataFromCamera(); + + void computeCameraFromLocalData(); + + /** For the give mouse movement calculate the movement of the camera. + Return true is camera has moved and a redraw is required.*/ + bool calcMovement(); + + void trackball(osg::Vec3& axis,float& angle, float p1x, float p1y, float p2x, float p2y); + float tb_project_to_sphere(float r, float x, float y); + + + /** Check the speed at which the mouse is moving. + If speed is below a threshold then return false, otherwise return true.*/ + bool isMouseMoving(); + + // Internal event stack comprising last three mouse events. + osg::ref_ptr _ga_t1; + osg::ref_ptr _ga_t0; + + osg::ref_ptr _node; + + float _modelScale; + float _minimumZoomScale; + + bool _thrown; + + osg::Vec3 _center; + osg::Quat _rotation; + float _distance; + +}; + +#endif diff --git a/examples/osgimpostor/osgimpostor.cpp b/examples/osgimpostor/osgimpostor.cpp new file mode 100644 index 000000000..0b0fcbb3d --- /dev/null +++ b/examples/osgimpostor/osgimpostor.cpp @@ -0,0 +1,344 @@ +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + +#include + +#include "TestManipulator.h" + + +#include +#include + +// container storing all house nodes +typedef osg::ref_ptr NodePtr; +typedef std::list NodeContainer; +typedef NodeContainer::iterator NodeIterator; + +NodeContainer nodes; + +// +osg::Group * Root = 0; + +const int HOUSES_SIZE = 25000; // total number of houses +double XDim = 5000.0f; // area dimension +/- XDim +double ZDim = 5000.0f; // area dimension +/- YDim + +int GridX = 20; // number of grids in x direction +int GridY = 20; // number of grids in y direction + +bool UseImpostor = true; // use impostor (or do not use) + +float Threshold = 3000.0f; // distance where impostor are shown + +// create houses and store nodes in container +void CreateHouses() +{ + int i; + + GLubyte indices[48] = { + 0, 2, 1, + 3, 2, 0, + 0, 4, 7, + 7, 3, 0, + 0, 1, 5, + 5, 4, 0, + 1, 6, 5, + 2, 6, 1, + 2, 3, 7, + 2, 7, 6, + 4, 8, 7, + 5, 6, 9, + 4, 5, 8, + 8, 5, 9, + 6, 7, 8, + 8, 9, 6 + }; + + // use the same color, normal and indices for all houses. + osg::Vec4Array* colors = new osg::Vec4Array(1); + (*colors)[0] = osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f); + + // normals + osg::Vec3Array * normals = new osg::Vec3Array(16); + (*normals)[0] = osg::Vec3( 0.0f, -0.0f, -1.0f); + (*normals)[1] = osg::Vec3( 0.0f, -0.0f, -1.0f); + (*normals)[2] = osg::Vec3( 0.0f, -1.0f, 0.0f); + (*normals)[3] = osg::Vec3( 0.0f, -1.0f, 0.0f); + (*normals)[4] = osg::Vec3( 1.0f, -0.0f, 0.0f); + (*normals)[5] = osg::Vec3( 1.0f, -0.0f, 0.0f); + (*normals)[6] = osg::Vec3( 0.0f, 1.0f, 0.0f); + (*normals)[7] = osg::Vec3( 0.0f, 1.0f, 0.0f); + (*normals)[8] = osg::Vec3(-1.0f, -0.0f, 0.0f); + (*normals)[9] = osg::Vec3(-1.0f, -0.0f, 0.0f); + (*normals)[10] = osg::Vec3( 0.0f, -0.928477f, 0.371391f); + (*normals)[11] = osg::Vec3( 0.0f, 0.928477f, 0.371391f); + (*normals)[12] = osg::Vec3( 0.707107f, 0.0f, 0.707107f); + (*normals)[13] = osg::Vec3( 0.707107f, 0.0f, 0.707107f); + (*normals)[14] = osg::Vec3(-0.707107f, 0.0f, 0.707107f); + (*normals)[15] = osg::Vec3(-0.707107f, 0.0f, 0.707107f); + + // coordIndices + osg::UByteArray* coordIndices = new osg::UByteArray(48,indices); + + // share the primtive set. + osg::PrimitiveSet* primitives = new osg::DrawArrays(osg::PrimitiveSet::TRIANGLES,0,48); + + for (int q = 0; q < HOUSES_SIZE; q++) + { + float xPos = ((static_cast (rand()) / + static_cast (RAND_MAX)) + * 2.0 * XDim) - XDim; + + float yPos = ((static_cast (rand()) / + static_cast (RAND_MAX)) + * 2 * ZDim) - ZDim; + + float scale = 10.0f; + + osg::Vec3 offset(xPos,yPos,0.0f); + + // coords + osg::Vec3Array* coords = new osg::Vec3Array(10); + (*coords)[0] = osg::Vec3( 0.5f, -0.7f, 0.0f); + (*coords)[1] = osg::Vec3( 0.5f, 0.7f, 0.0f); + (*coords)[2] = osg::Vec3(-0.5f, 0.7f, 0.0f); + (*coords)[3] = osg::Vec3(-0.5f, -0.7f, 0.0f); + (*coords)[4] = osg::Vec3( 0.5f, -0.7f, 1.0f); + (*coords)[5] = osg::Vec3( 0.5f, 0.7f, 1.0f); + (*coords)[6] = osg::Vec3(-0.5f, 0.7f, 1.0f); + (*coords)[7] = osg::Vec3(-0.5f, -0.7f, 1.0f); + (*coords)[8] = osg::Vec3( 0.0f, -0.5f, 1.5f); + (*coords)[9] = osg::Vec3( 0.0f, 0.5f, 1.5f); + + for (i = 0; i < 10; i++) + { + (*coords)[i] = (*coords)[i] * scale + offset; + } + + + // create geometry + osg::Geometry * geometry = new osg::Geometry(); + + geometry->addPrimitiveSet(primitives); + + geometry->setVertexArray(coords); + geometry->setVertexIndices(coordIndices); + + geometry->setColorArray(colors); + geometry->setColorBinding(osg::Geometry::BIND_OVERALL); + + geometry->setNormalArray(normals); + geometry->setNormalBinding(osg::Geometry::BIND_PER_PRIMITIVE); + + osg::Geode * geode = new osg::Geode(); + geode->addDrawable(geometry); + + nodes.push_back(geode); + } +} + +void LayoutAsGrid() +{ + // calculate bounding box + osg::BoundingBox bbox; + for (NodeIterator node = nodes.begin(); node != nodes.end(); ++node) + bbox.expandBy((*node)->getBound()); + + // setup grid information + osg::Group ** groups = new osg::Group*[GridX * GridY]; + int i; + for (i = 0; i < GridX * GridY; i++) + groups[i] = new osg::Group(); + + float xGridStart = bbox.xMin(); + float xGridSize = (bbox.xMax() - bbox.xMin()) / GridX; + + float yGridStart = bbox.yMin(); + float yGridSize = (bbox.yMax() - bbox.yMin()) / GridY; + + // arrange buildings into right grid + for (NodeIterator nodeIter = nodes.begin(); nodeIter != nodes.end(); ++nodeIter) + { + osg::Node * node = nodeIter->get(); + osg::Vec3 center = node->getBound().center(); + + int x = (int)floor((center.x() - xGridStart) / xGridSize); + int z = (int)floor((center.y() - yGridStart) / yGridSize); + + groups[z * GridX + x]->addChild(node); + } + + // add nodes to building root + for (i = 0; i < GridX * GridY; i++) + { + osg::StateSet * stateset = new osg::StateSet(); + + osg::Material * material = new osg::Material(); + osg::Vec4 color = osg::Vec4( + 0.5f + (static_cast (rand()) / (2.0*static_cast (RAND_MAX))), + 0.5f + (static_cast (rand()) / (2.0*static_cast (RAND_MAX))), + 0.5f + (static_cast (rand()) / ( 2.0*static_cast(RAND_MAX))), + 1.0f); + + material->setAmbient(osg::Material::FRONT_AND_BACK, color); + material->setDiffuse(osg::Material::FRONT_AND_BACK, color); + stateset->setAttributeAndModes(material, osg::StateAttribute::ON); + + groups[i]->setStateSet(stateset); + + if (UseImpostor) + { + osg::Impostor * impostor = new osg::Impostor(); + impostor->setImpostorThreshold(static_cast (Threshold)); + impostor->addChild(groups[i]); + impostor->setRange(0, 0.0f, 1e7f); + impostor->setCenter(groups[i]->getBound().center()); + Root->addChild(impostor); + } + else + { + Root->addChild(groups[i]); + } + } + + delete[] groups; +} + + +int main( int argc, char **argv ) +{ + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // add local test manipulator more suitable for testing impostors. + unsigned int pos = viewer.addCameraManipulator(new TestManipulator); + viewer.selectCameraManipulator(pos); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + + + // load the nodes from the commandline arguments. + osg::Node* model = osgDB::readNodeFiles(arguments); + if (model) + { + // the osgUtil::InsertImpostorsVisitor used lower down to insert impostors + // only operators on subclass of Group's, if the model top node is not + // a group then it won't be able to insert an impostor. We therefore + // manually insert an impostor above the model. + if (dynamic_cast(model)==0) + { + const osg::BoundingSphere& bs = model->getBound(); + if (bs.valid()) + { + + osg::Impostor* impostor = new osg::Impostor; + + // standard LOD settings + impostor->addChild(model); + impostor->setRange(0,0.0f,1e7f); + impostor->setCenter(bs.center()); + + // impostor specfic settings. + impostor->setImpostorThresholdToBound(5.0f); + + model = impostor; + + } + } + + // we insert an impostor node above the model, so we keep a handle + // on the rootnode of the model, the is required since the + // InsertImpostorsVisitor can add a new root in automatically and + // we would know about it, other than by following the parent path + // up from model. This is really what should be done, but I'll pass + // on it right now as it requires a getRoots() method to be added to + // osg::Node, and we're about to make a release so no new features! + osg::Group* rootnode = new osg::Group; + rootnode->addChild(model); + + + // now insert impostors in the model using the InsertImpostorsVisitor. + osgUtil::InsertImpostorsVisitor ov; + + // traverse the model and collect all osg::Group's and osg::LOD's. + // however, don't traverse the rootnode since we want to keep it as + // the start of traversal, otherwise the insertImpostor could insert + // and Impostor above the current root, making it nolonger a root! + model->accept(ov); + + // insert the Impostors above groups and LOD's + ov.insertImpostors(); + } + else + { + // no user model so we'll create our own world. + model = Root = new osg::Group(); + CreateHouses(); + LayoutAsGrid(); + } + + // add model to viewer. + viewer.setSceneData(model); + + // register trackball, flight and drive. + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osglight/GNUmakefile b/examples/osglight/GNUmakefile new file mode 100644 index 000000000..e216563cb --- /dev/null +++ b/examples/osglight/GNUmakefile @@ -0,0 +1,19 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osglight.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osglight + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules + diff --git a/examples/osglight/GNUmakefile.inst b/examples/osglight/GNUmakefile.inst new file mode 100644 index 000000000..457b42650 --- /dev/null +++ b/examples/osglight/GNUmakefile.inst @@ -0,0 +1,15 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osglight.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osglight + + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osglight/osglight.cpp b/examples/osglight/osglight.cpp new file mode 100644 index 000000000..73dbee065 --- /dev/null +++ b/examples/osglight/osglight.cpp @@ -0,0 +1,379 @@ +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include "stdio.h" + + +// callback to make the loaded model oscilate up and down. +class ModelTransformCallback : public osg::NodeCallback +{ + public: + + ModelTransformCallback(const osg::BoundingSphere& bs) + { + _firstTime = 0.0; + _period = 4.0f; + _range = bs.radius()*0.5f; + } + + virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + { + osg::PositionAttitudeTransform* pat = dynamic_cast(node); + const osg::FrameStamp* frameStamp = nv->getFrameStamp(); + if (pat && frameStamp) + { + if (_firstTime==0.0) + { + _firstTime = frameStamp->getReferenceTime(); + } + + double phase = (frameStamp->getReferenceTime()-_firstTime)/_period; + phase -= floor(phase); + phase *= (2.0 * osg::PI); + + osg::Quat rotation; + rotation.makeRotate(phase,1.0f,1.0f,1.0f); + + pat->setAttitude(rotation); + + pat->setPosition(osg::Vec3(0.0f,0.0f,sin(phase))*_range); + } + + // must traverse the Node's subgraph + traverse(node,nv); + } + + double _firstTime; + double _period; + double _range; + +}; + + +osg::Node* createLights(osg::BoundingBox& bb,osg::StateSet* rootStateSet) +{ + osg::Group* lightGroup = new osg::Group; + + float modelSize = bb.radius(); + + // create a spot light. + osg::Light* myLight1 = new osg::Light; + myLight1->setLightNum(0); + myLight1->setPosition(osg::Vec4(bb.corner(4),1.0f)); + myLight1->setAmbient(osg::Vec4(1.0f,0.0f,0.0f,1.0f)); + myLight1->setDiffuse(osg::Vec4(1.0f,0.0f,0.0f,1.0f)); + myLight1->setSpotCutoff(20.0f); + myLight1->setSpotExponent(50.0f); + myLight1->setDirection(osg::Vec3(1.0f,1.0f,-1.0f)); + + osg::LightSource* lightS1 = new osg::LightSource; + lightS1->setLight(myLight1); + lightS1->setLocalStateSetModes(osg::StateAttribute::ON); + + lightS1->setStateSetModes(*rootStateSet,osg::StateAttribute::ON); + lightGroup->addChild(lightS1); + + + // create a local light. + osg::Light* myLight2 = new osg::Light; + myLight2->setLightNum(1); + myLight2->setPosition(osg::Vec4(0.0,0.0,0.0,1.0f)); + myLight2->setAmbient(osg::Vec4(0.0f,1.0f,1.0f,1.0f)); + myLight2->setDiffuse(osg::Vec4(0.0f,1.0f,1.0f,1.0f)); + myLight2->setConstantAttenuation(1.0f); + myLight2->setLinearAttenuation(2.0f/modelSize); + myLight2->setQuadraticAttenuation(2.0f/osg::square(modelSize)); + + osg::LightSource* lightS2 = new osg::LightSource; + lightS2->setLight(myLight2); + lightS2->setLocalStateSetModes(osg::StateAttribute::ON); + + lightS2->setStateSetModes(*rootStateSet,osg::StateAttribute::ON); + + osg::MatrixTransform* mt = new osg::MatrixTransform(); + { + // set up the animation path + osg::AnimationPath* animationPath = new osg::AnimationPath; + animationPath->insert(0.0,osg::AnimationPath::ControlPoint(bb.corner(0))); + animationPath->insert(1.0,osg::AnimationPath::ControlPoint(bb.corner(1))); + animationPath->insert(2.0,osg::AnimationPath::ControlPoint(bb.corner(2))); + animationPath->insert(3.0,osg::AnimationPath::ControlPoint(bb.corner(3))); + animationPath->insert(4.0,osg::AnimationPath::ControlPoint(bb.corner(4))); + animationPath->insert(5.0,osg::AnimationPath::ControlPoint(bb.corner(5))); + animationPath->insert(6.0,osg::AnimationPath::ControlPoint(bb.corner(6))); + animationPath->insert(7.0,osg::AnimationPath::ControlPoint(bb.corner(7))); + animationPath->insert(8.0,osg::AnimationPath::ControlPoint(bb.corner(0))); + animationPath->setLoopMode(osg::AnimationPath::SWING); + + mt->setUpdateCallback(new osg::AnimationPathCallback(animationPath)); + } + + // create marker for point light. + osg::Geometry* marker = new osg::Geometry; + osg::Vec3Array* vertices = new osg::Vec3Array; + vertices->push_back(osg::Vec3(0.0,0.0,0.0)); + marker->setVertexArray(vertices); + marker->addPrimitiveSet(new osg::DrawArrays(GL_POINTS,0,1)); + + osg::StateSet* stateset = new osg::StateSet; + osg::Point* point = new osg::Point; + point->setSize(4.0f); + stateset->setAttribute(point); + + marker->setStateSet(stateset); + + osg::Geode* markerGeode = new osg::Geode; + markerGeode->addDrawable(marker); + + mt->addChild(lightS2); + mt->addChild(markerGeode); + + lightGroup->addChild(mt); + + return lightGroup; +} + +osg::Geometry* createWall(const osg::Vec3& v1,const osg::Vec3& v2,const osg::Vec3& v3,osg::StateSet* stateset) +{ + + // create a drawable for occluder. + osg::Geometry* geom = new osg::Geometry; + + geom->setStateSet(stateset); + + unsigned int noXSteps = 100; + unsigned int noYSteps = 100; + + osg::Vec3Array* coords = new osg::Vec3Array; + coords->reserve(noXSteps*noYSteps); + + + osg::Vec3 dx = (v2-v1)/((float)noXSteps-1.0f); + osg::Vec3 dy = (v3-v1)/((float)noYSteps-1.0f); + + unsigned int row; + osg::Vec3 vRowStart = v1; + for(row=0;rowpush_back(v); + v += dx; + } + vRowStart+=dy; + } + + geom->setVertexArray(coords); + + osg::Vec4Array* colors = new osg::Vec4Array(1); + (*colors)[0].set(1.0f,1.0f,1.0f,1.0f); + geom->setColorArray(colors); + geom->setColorBinding(osg::Geometry::BIND_OVERALL); + + + for(row=0;rowreserve(noXSteps*2); + for(unsigned int col=0;colpush_back((row+1)*noXSteps+col); + quadstrip->push_back(row*noXSteps+col); + } + geom->addPrimitiveSet(quadstrip); + } + + // create the normals. + osgUtil::SmoothingVisitor::smooth(*geom); + + return geom; + +} + + +osg::Node* createRoom(osg::Node* loadedModel) +{ + // default scale for this model. + osg::BoundingSphere bs(osg::Vec3(0.0f,0.0f,0.0f),1.0f); + + osg::Group* root = new osg::Group; + + if (loadedModel) + { + const osg::BoundingSphere& loaded_bs = loadedModel->getBound(); + + osg::PositionAttitudeTransform* pat = new osg::PositionAttitudeTransform(); + pat->setPivotPoint(loaded_bs.center()); + + pat->setUpdateCallback(new ModelTransformCallback(loaded_bs)); + pat->addChild(loadedModel); + + bs = pat->getBound(); + + root->addChild(pat); + + } + + bs.radius()*=1.5f; + + // create a bounding box, which we'll use to size the room. + osg::BoundingBox bb; + bb.expandBy(bs); + + + // create statesets. + osg::StateSet* rootStateSet = new osg::StateSet; + root->setStateSet(rootStateSet); + + osg::StateSet* wall = new osg::StateSet; + wall->setMode(GL_CULL_FACE,osg::StateAttribute::ON); + + osg::StateSet* floor = new osg::StateSet; + floor->setMode(GL_CULL_FACE,osg::StateAttribute::ON); + + osg::StateSet* roof = new osg::StateSet; + roof->setMode(GL_CULL_FACE,osg::StateAttribute::ON); + + osg::Geode* geode = new osg::Geode; + + // create front side. + geode->addDrawable(createWall(bb.corner(0), + bb.corner(4), + bb.corner(1), + wall)); + + // right side + geode->addDrawable(createWall(bb.corner(1), + bb.corner(5), + bb.corner(3), + wall)); + + // left side + geode->addDrawable(createWall(bb.corner(2), + bb.corner(6), + bb.corner(0), + wall)); + // back side + geode->addDrawable(createWall(bb.corner(3), + bb.corner(7), + bb.corner(2), + wall)); + + // floor + geode->addDrawable(createWall(bb.corner(0), + bb.corner(1), + bb.corner(2), + floor)); + + // roof + geode->addDrawable(createWall(bb.corner(6), + bb.corner(7), + bb.corner(4), + roof)); + + root->addChild(geode); + + root->addChild(createLights(bb,rootStateSet)); + + return root; + +} + +int main( int argc, char **argv ) +{ + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + + // load the nodes from the commandline arguments. + osg::Node* loadedModel = osgDB::readNodeFiles(arguments); + + // create a room made of foor walls, a floor, a roof, and swinging light fitting. + osg::Node* rootnode = createRoom(loadedModel); + + // run optimization over the scene graph + osgUtil::Optimizer optimzer; + optimzer.optimize(rootnode); + + // add a viewport to the viewer and attach the scene graph. + viewer.setSceneData( rootnode ); + + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + // set all the sceneview's up so that their left and right add cull masks are set up. + for(osgProducer::OsgCameraGroup::SceneHandlerList::iterator itr=viewer.getSceneHandlerList().begin(); + itr!=viewer.getSceneHandlerList().end(); + ++itr) + { + osgUtil::SceneView* sceneview = *itr; + // switch off small feature culling to prevent the light points from being culled. + sceneview->setCullingMode( sceneview->getCullingMode() & ~osg::CullStack::SMALL_FEATURE_CULLING); + //sceneview->setCullingMode( 0); + } + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osglightpoint/GNUmakefile b/examples/osglightpoint/GNUmakefile new file mode 100644 index 000000000..d4f5f5d10 --- /dev/null +++ b/examples/osglightpoint/GNUmakefile @@ -0,0 +1,19 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osglightpoint.cpp\ + +LIBS += -losgSim -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osglightpoint + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules + diff --git a/examples/osglightpoint/GNUmakefile.inst b/examples/osglightpoint/GNUmakefile.inst new file mode 100644 index 000000000..cfa759326 --- /dev/null +++ b/examples/osglightpoint/GNUmakefile.inst @@ -0,0 +1,15 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osglightpoint.cpp\ + +LIBS += -losgSim -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osglightpoint + + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osglightpoint/osglightpoint.cpp b/examples/osglightpoint/osglightpoint.cpp new file mode 100644 index 000000000..56e60312f --- /dev/null +++ b/examples/osglightpoint/osglightpoint.cpp @@ -0,0 +1,189 @@ +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include + +#include + + +#define INTERPOLATE(member) lp.member = start.member*rstart + end.member*rend; + +void addToLightPointNode(osgSim::LightPointNode& lpn,osgSim::LightPoint& start,osgSim::LightPoint& end,unsigned int noSteps) +{ + if (noSteps<=1) + { + lpn.addLightPoint(start); + return; + } + + float rend = 0.0f; + float rdelta = 1.0f/((float)noSteps-1.0f); + + lpn._lightPointList.reserve(noSteps); + + for(unsigned int i=0;iaddPulse(1.0,osg::Vec4(1.0f,0.0f,0.0f,1.0f)); +// bs->addPulse(0.5,osg::Vec4(0.0f,0.0f,0.0f,0.0f)); // off +// bs->addPulse(1.5,osg::Vec4(1.0f,1.0f,0.0f,1.0f)); +// bs->addPulse(0.5,osg::Vec4(0.0f,0.0f,0.0f,0.0f)); // off +// bs->addPulse(1.0,osg::Vec4(1.0f,1.0f,1.0f,1.0f)); +// bs->addPulse(0.5,osg::Vec4(0.0f,0.0f,0.0f,0.0f)); // off + + +// osgSim::Sector* sector = new osgSim::ConeSector(osg::Vec3(0.0f,0.0f,1.0f),osg::inDegrees(45.0),osg::inDegrees(45.0)); +// osgSim::Sector* sector = new osgSim::ElevationSector(-osg::inDegrees(45.0),osg::inDegrees(45.0),osg::inDegrees(45.0)); +// osgSim::Sector* sector = new osgSim::AzimSector(-osg::inDegrees(45.0),osg::inDegrees(45.0),osg::inDegrees(90.0)); +// osgSim::Sector* sector = new osgSim::AzimElevationSector(osg::inDegrees(180),osg::inDegrees(90), // azim range +// osg::inDegrees(0.0),osg::inDegrees(90.0), // elevation range +// osg::inDegrees(5.0)); + + for(int i=0;isetSequenceGroup(new osgSim::BlinkSequence::SequenceGroup((double)i*0.1)); +// start._blinkSequence = local_bs; + +// start._sector = sector; + + osgSim::LightPointNode* lpn = new osgSim::LightPointNode; + addToLightPointNode(*lpn,start,end,noStepsX); + + start._position += start_delta; + end._position += end_delta; + + transform->addChild(lpn); + } + + osg::Group* group = new osg::Group; + group->addChild(transform); + + + return group; +} + + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + + osg::Group* rootnode = new osg::Group; + + // load the nodes from the commandline arguments. + rootnode->addChild(osgDB::readNodeFiles(arguments)); + rootnode->addChild(createLightPointsDatabase()); + if (!rootnode) + { + return 1; + } + + // run optimization over the scene graph + osgUtil::Optimizer optimzer; + optimzer.optimize(rootnode); + + // add a viewport to the viewer and attach the scene graph. + viewer.setSceneData( rootnode ); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osglogo/GNUmakefile b/examples/osglogo/GNUmakefile new file mode 100644 index 000000000..929c21dd3 --- /dev/null +++ b/examples/osglogo/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osglogo.cpp\ + +LIBS += -losgText -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osglogo + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osglogo/GNUmakefile.inst b/examples/osglogo/GNUmakefile.inst new file mode 100644 index 000000000..749c60a8d --- /dev/null +++ b/examples/osglogo/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osglogo.cpp\ + +LIBS += -losgText -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osglogo + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osglogo/osglogo.cpp b/examples/osglogo/osglogo.cpp new file mode 100644 index 000000000..1f30a18f2 --- /dev/null +++ b/examples/osglogo/osglogo.cpp @@ -0,0 +1,465 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#include + +#include + +static bool s_ProfessionalServices = false; + +class MyBillboardTransform : public osg::PositionAttitudeTransform +{ + public: + + MyBillboardTransform(): + _axis(0.0f,0.0f,1.0f), + _normal(0.0f,-1.0f,0.0f) + { + } + + bool computeLocalToWorldMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const + { + osg::Quat billboardRotation; + osgUtil::CullVisitor* cullvisitor = dynamic_cast(nv); + if (cullvisitor) + { + osg::Vec3 eyevector = cullvisitor->getEyeLocal()-_position; + eyevector.normalize(); + + osg::Vec3 side = _axis^_normal; + side.normalize(); + + float angle = atan2(eyevector*_normal,eyevector*side); + billboardRotation.makeRotate(osg::PI_2-angle,_axis); + + } + + + matrix.preMult(osg::Matrix::translate(-_pivotPoint)* + osg::Matrix::rotate(_attitude)* + osg::Matrix::rotate(billboardRotation)* + osg::Matrix::translate(_position)); + return true; + } + + + + void setAxis(const osg::Vec3& axis) { _axis = axis; } + + void setNormal(const osg::Vec3& normal) { _normal = normal; } + + protected: + + virtual ~MyBillboardTransform() {} + + osg::Vec3 _axis; + osg::Vec3 _normal; +}; + + +osg::Geometry* createWing(const osg::Vec3& left, const osg::Vec3& nose, const osg::Vec3& right,float chordRatio,const osg::Vec4& color) +{ + osg::Geometry* geom = new osg::Geometry; + + osg::Vec3 normal = (nose-right)^(left-nose); + normal.normalize(); + + osg::Vec3 left_to_right = right-left; + osg::Vec3 mid = (right+left)*0.5f; + osg::Vec3 mid_to_nose = (nose-mid)*chordRatio*0.5f; + + osg::Vec3Array* vertices = new osg::Vec3Array; + vertices->push_back(left); + //vertices->push_back(mid+mid_to_nose); + + unsigned int noSteps = 40; + for(unsigned int i=1;ipush_back(left + left_to_right*ratio + mid_to_nose* (cosf((ratio-0.5f)*osg::PI*2.0f)+1.0f)); + } + + vertices->push_back(right); + vertices->push_back(nose); + + geom->setVertexArray(vertices); + + + osg::Vec3Array* normals = new osg::Vec3Array; + normals->push_back(normal); + geom->setNormalArray(normals); + geom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + + osg::Vec4Array* colors = new osg::Vec4Array; + colors->push_back(color); + geom->setColorArray(colors); + geom->setColorBinding(osg::Geometry::BIND_OVERALL); + + + geom->addPrimitiveSet(new osg::DrawArrays(GL_POLYGON,0,vertices->getNumElements())); + + osgUtil::Tesselator tesselator; + tesselator.retesselatePolygons(*geom); + + return geom; + +} + +osg:: Node* createTextBelow(const osg::BoundingBox& bb) +{ + osg::Geode* geode = new osg::Geode(); + + std::string font("fonts/arial.ttf"); + + osgText::Text* text = new osgText::Text; + + text->setFont(font); + text->setFontSize(64,64); + text->setAlignment(osgText::Text::CENTER_CENTER); + text->setAxisAlignment(osgText::Text::XZ_PLANE); + text->setPosition(bb.center()-osg::Vec3(0.0f,0.0f,(bb.zMax()-bb.zMin()))); + text->setColor(osg::Vec4(0.37f,0.48f,0.67f,1.0f)); + text->setText("OpenSceneGraph"); + + geode->addDrawable( text ); + + return geode; +} + +osg:: Node* createTextLeft(const osg::BoundingBox& bb) +{ + osg::Geode* geode = new osg::Geode(); + + + osg::StateSet* stateset = geode->getOrCreateStateSet(); + stateset->setMode(GL_LIGHTING,osg::StateAttribute::OFF); + + + //std::string font("fonts/times.ttf"); + std::string font("fonts/arial.ttf"); + + osgText::Text* text = new osgText::Text; + + text->setFont(font); + text->setFontSize(120,120); + text->setAlignment(osgText::Text::RIGHT_CENTER); + text->setAxisAlignment(osgText::Text::XZ_PLANE); + text->setCharacterSize((bb.zMax()-bb.zMin())*0.8f); + text->setPosition(bb.center()-osg::Vec3((bb.xMax()-bb.xMin()),-(bb.yMax()-bb.yMin())*0.5f,(bb.zMax()-bb.zMin())*0.3f)); + //text->setColor(osg::Vec4(0.37f,0.48f,0.67f,1.0f)); // Neil's orignal OSG colour + text->setColor(osg::Vec4(0.20f,0.45f,0.60f,1.0f)); // OGL logo colour + text->setText("OpenSceneGraph"); + + geode->addDrawable( text ); + + + if (s_ProfessionalServices) + { + //osgText::Text* subscript = new osgText::Text(new osgText::TextureFont(font,45)); + + osgText::Text* subscript = new osgText::Text; + subscript->setFont(font); + subscript->setText("Professional Services"); + subscript->setAlignment(osgText::Text::RIGHT_CENTER); + subscript->setAxisAlignment(osgText::Text::XZ_PLANE); + subscript->setPosition(bb.center()-osg::Vec3((bb.xMax()-bb.xMin())*3.5f,-(bb.yMax()-bb.yMin())*0.5f,(bb.zMax()-bb.zMin())*0.6f)); + subscript->setColor(osg::Vec4(0.0f,0.0f,0.0f,1.0f)); // black + + geode->addDrawable( subscript ); + } + + return geode; +} + +osg:: Node* createGlobe(const osg::BoundingBox& bb,float ratio) +{ + osg::Geode* geode = new osg::Geode(); + + osg::StateSet* stateset = geode->getOrCreateStateSet(); + + osg::Image* image = osgDB::readImageFile("Images/land_shallow_topo_2048.jpg"); + if (image) + { + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + texture->setMaxAnisotropy(8); + stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); + } + + osg::Material* material = new osg::Material; + stateset->setAttribute(material); + + + // the globe + geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(bb.center(),bb.radius()*ratio))); + + + osg::MatrixTransform* xform = new osg::MatrixTransform; + xform->setUpdateCallback(new osgUtil::TransformCallback(bb.center(),osg::Vec3(0.0f,0.0f,1.0f),osg::inDegrees(30.0f))); + xform->addChild(geode); + + return xform; +} + +osg:: Node* createBox(const osg::BoundingBox& bb,float chordRatio) +{ + osg::Geode* geode = new osg::Geode(); + + osg::Vec4 white(1.0f,1.0f,1.0f,1.0f); + + // front faces. + geode->addDrawable(createWing(bb.corner(4),bb.corner(6),bb.corner(7),chordRatio,white)); + geode->addDrawable(createWing(bb.corner(7),bb.corner(5),bb.corner(4),chordRatio,white)); + + geode->addDrawable(createWing(bb.corner(4),bb.corner(5),bb.corner(1),chordRatio,white)); + geode->addDrawable(createWing(bb.corner(1),bb.corner(0),bb.corner(4),chordRatio,white)); + + geode->addDrawable(createWing(bb.corner(1),bb.corner(5),bb.corner(7),chordRatio,white)); + geode->addDrawable(createWing(bb.corner(7),bb.corner(3),bb.corner(1),chordRatio,white)); + + // back faces + geode->addDrawable(createWing(bb.corner(2),bb.corner(0),bb.corner(1),chordRatio,white)); + geode->addDrawable(createWing(bb.corner(1),bb.corner(3),bb.corner(2),chordRatio,white)); + + geode->addDrawable(createWing(bb.corner(2),bb.corner(3),bb.corner(7),chordRatio,white)); + geode->addDrawable(createWing(bb.corner(7),bb.corner(6),bb.corner(2),chordRatio,white)); + + geode->addDrawable(createWing(bb.corner(2),bb.corner(6),bb.corner(4),chordRatio,white)); + geode->addDrawable(createWing(bb.corner(4),bb.corner(0),bb.corner(2),chordRatio,white)); + + return geode; +} + +osg:: Node* createBoxNo5(const osg::BoundingBox& bb,float chordRatio) +{ + osg::Geode* geode = new osg::Geode(); + + osg::Vec4 white(1.0f,1.0f,1.0f,1.0f); + + // front faces. + geode->addDrawable(createWing(bb.corner(4),bb.corner(6),bb.corner(7),chordRatio,white)); + + geode->addDrawable(createWing(bb.corner(1),bb.corner(0),bb.corner(4),chordRatio,white)); + + geode->addDrawable(createWing(bb.corner(7),bb.corner(3),bb.corner(1),chordRatio,white)); + + // back faces + geode->addDrawable(createWing(bb.corner(2),bb.corner(0),bb.corner(1),chordRatio,white)); + geode->addDrawable(createWing(bb.corner(1),bb.corner(3),bb.corner(2),chordRatio,white)); + + geode->addDrawable(createWing(bb.corner(2),bb.corner(3),bb.corner(7),chordRatio,white)); + geode->addDrawable(createWing(bb.corner(7),bb.corner(6),bb.corner(2),chordRatio,white)); + + geode->addDrawable(createWing(bb.corner(2),bb.corner(6),bb.corner(4),chordRatio,white)); + geode->addDrawable(createWing(bb.corner(4),bb.corner(0),bb.corner(2),chordRatio,white)); + + return geode; +} + +osg:: Node* createBoxNo5No2(const osg::BoundingBox& bb,float chordRatio) +{ + osg::Geode* geode = new osg::Geode(); + +// osg::Vec4 red(1.0f,0.0f,0.0f,1.0f); +// osg::Vec4 green(0.0f,1.0f,0.0f,1.0f); +// osg::Vec4 blue(0.0f,0.0f,1.0f,1.0f); + + osg::Vec4 red(1.0f,0.12f,0.06f,1.0f); + osg::Vec4 green(0.21f,0.48f,0.03f,1.0f); + osg::Vec4 blue(0.20f,0.45f,0.60f,1.0f); + + // front faces. + geode->addDrawable(createWing(bb.corner(4),bb.corner(6),bb.corner(7),chordRatio,red)); + + geode->addDrawable(createWing(bb.corner(1),bb.corner(0),bb.corner(4),chordRatio,green)); + + geode->addDrawable(createWing(bb.corner(7),bb.corner(3),bb.corner(1),chordRatio,blue)); + + return geode; +} + +osg:: Node* createBackdrop(const osg::Vec3& corner,const osg::Vec3& top,const osg::Vec3& right) +{ + + + + osg::Geometry* geom = new osg::Geometry; + + osg::Vec3 normal = (corner-top)^(right-corner); + normal.normalize(); + + osg::Vec3Array* vertices = new osg::Vec3Array; + vertices->push_back(top); + vertices->push_back(corner); + + vertices->push_back(right); + vertices->push_back(right+(top-corner)); + + geom->setVertexArray(vertices); + + osg::Vec3Array* normals = new osg::Vec3Array; + normals->push_back(normal); + geom->setNormalArray(normals); + geom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + osg::Vec4Array* colors = new osg::Vec4Array; + colors->push_back(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); + geom->setColorArray(colors); + geom->setColorBinding(osg::Geometry::BIND_OVERALL); + + geom->addPrimitiveSet(new osg::DrawArrays(GL_QUADS,0,vertices->getNumElements())); + + osg::Geode* geode = new osg::Geode(); + geode->addDrawable(geom); + + return geode; +} + +osg::Node* createLogo() +{ + osg::BoundingBox bb(osg::Vec3(0.0f,0.0f,0.0f),osg::Vec3(100.0f,100.0f,100.0f)); + float chordRatio = 0.5f; + float sphereRatio = 0.6f; + + // create a group to hold the whole model. + osg::Group* logo_group = new osg::Group; + + osg::Quat r1,r2; + r1.makeRotate(-osg::inDegrees(45.0f),0.0f,0.0f,1.0f); + r2.makeRotate(osg::inDegrees(45.0f),1.0f,0.0f,0.0f); + + + MyBillboardTransform* xform = new MyBillboardTransform; + xform->setPivotPoint(bb.center()); + xform->setPosition(bb.center()); + xform->setAttitude(r1*r2); + + +// // create a transform to orientate the box and globe. +// osg::MatrixTransform* xform = new osg::MatrixTransform; +// xform->setDataVariance(osg::Object::STATIC); +// xform->setMatrix(osg::Matrix::translate(-bb.center())* +// osg::Matrix::rotate(-osg::inDegrees(45.0f),0.0f,0.0f,1.0f)* +// osg::Matrix::rotate(osg::inDegrees(45.0f),1.0f,0.0f,0.0f)* +// osg::Matrix::translate(bb.center())); + + // add the box and globe to it. + //xform->addChild(createBox(bb,chordRatio)); + //xform->addChild(createBoxNo5(bb,chordRatio)); + xform->addChild(createBoxNo5No2(bb,chordRatio)); + // add the transform to the group. + logo_group->addChild(xform); + + logo_group->addChild(createGlobe(bb,sphereRatio)); + + // add the text to the group. + //group->addChild(createTextBelow(bb)); + logo_group->addChild(createTextLeft(bb)); + + + // create the backdrop to render the shadow to. + osg::Vec3 corner(-900.0f,150.0f,-100.0f); + osg::Vec3 top(0.0f,0.0f,300.0f); top += corner; + osg::Vec3 right(1100.0f,0.0f,0.0f); right += corner; + + +// osg::Group* backdrop = new osg::Group; +// backdrop->addChild(createBackdrop(corner,top,right)); + + osg::ClearNode* backdrop = new osg::ClearNode; + backdrop->setClearColor(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); + + //osg::Vec3 lightPosition(-500.0f,-2500.0f,500.0f); + //osg::Node* scene = createShadowedScene(logo_group,backdrop,lightPosition,0.0f,0); + + osg::Group* scene = new osg::Group; + + osg::StateSet* stateset = scene->getOrCreateStateSet(); + stateset->setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF); + + + scene->addChild(logo_group); + scene->addChild(backdrop); + + return scene; +} + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + arguments.getApplicationUsage()->addCommandLineOption("ps","Render the Professional Services logo"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + while (arguments.read("ps")) s_ProfessionalServices = true; + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + osg::Node* node = createLogo(); + + // add model to viewer. + viewer.setSceneData( node ); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgmultitexture/GNUmakefile b/examples/osgmultitexture/GNUmakefile new file mode 100644 index 000000000..a3b15b53e --- /dev/null +++ b/examples/osgmultitexture/GNUmakefile @@ -0,0 +1,19 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgmultitexture.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgmultitexture + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules + diff --git a/examples/osgmultitexture/GNUmakefile.inst b/examples/osgmultitexture/GNUmakefile.inst new file mode 100644 index 000000000..9c8d67cfc --- /dev/null +++ b/examples/osgmultitexture/GNUmakefile.inst @@ -0,0 +1,15 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgmultitexture.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgmultitexture + + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgmultitexture/osgmultitexture.cpp b/examples/osgmultitexture/osgmultitexture.cpp new file mode 100644 index 000000000..0aba8f0e4 --- /dev/null +++ b/examples/osgmultitexture/osgmultitexture.cpp @@ -0,0 +1,112 @@ +#include + +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include + + +int main( int argc, char **argv ) +{ + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // load the nodes from the commandline arguments. + osg::Node* rootnode = osgDB::readNodeFiles(arguments); + if (!rootnode) + { +// write_usage(osg::notify(osg::NOTICE),argv[0]); + return 1; + } + + osg::Image* image = osgDB::readImageFile("Images/reflect.rgb"); + if (image) + { + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + osg::TexGen* texgen = new osg::TexGen; + texgen->setMode(osg::TexGen::SPHERE_MAP); + + osg::TexEnv* texenv = new osg::TexEnv; + texenv->setMode(osg::TexEnv::BLEND); + texenv->setColor(osg::Vec4(0.3f,0.3f,0.3f,0.3f)); + + osg::StateSet* stateset = new osg::StateSet; + stateset->setTextureAttributeAndModes(1,texture,osg::StateAttribute::ON); + stateset->setTextureAttributeAndModes(1,texgen,osg::StateAttribute::ON); + stateset->setTextureAttribute(1,texenv); + + rootnode->setStateSet(stateset); + } + else + { + osg::notify(osg::NOTICE)<<"unable to load reflect map, model will not be mutlitextured"< + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include + + +class OccluderEventHandler : public osgGA::GUIEventHandler +{ + public: + + OccluderEventHandler(osgUtil::SceneView* sceneview,osg::Group* rootnode):_sceneview(sceneview),_rootnode(rootnode) {} + + virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&); + + virtual void accept(osgGA::GUIEventHandlerVisitor& v) + { + v.visit(*this); + } + + void addPoint(const osg::Vec3& pos); + + void endOccluder(); + + + osg::ref_ptr _sceneview; + osg::ref_ptr _rootnode; + osg::ref_ptr _occluders; + osg::ref_ptr _convexPlanarOccluder; +}; + +bool OccluderEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&) +{ + switch(ea.getEventType()) + { + case(osgGA::GUIEventAdapter::KEYDOWN): + { + if (ea.getKey()=='a') + { + + int x = ea.getX(); + int y = ea.getY(); + + osg::Vec3 near_point,far_point; + if (!_sceneview->projectWindowXYIntoObject(x,ea.getYmax()-y,near_point,far_point)) + { + return true; + } + + osg::ref_ptr lineSegment = new osg::LineSegment; + lineSegment->set(near_point,far_point); + + osgUtil::IntersectVisitor iv; + iv.addLineSegment(lineSegment.get()); + + _rootnode->accept(iv); + + if (iv.hits()) + { + + osgUtil::IntersectVisitor::HitList& hitList = iv.getHitList(lineSegment.get()); + if (!hitList.empty()) + { + + osgUtil::Hit& hit = hitList.front(); + addPoint(hit.getWorldIntersectPoint()); + } + + } + + return true; + } + else if (ea.getKey()=='e') + { + endOccluder(); + return true; + } + else if (ea.getKey()=='O') + { + if (_occluders.valid()) + { + std::cout<<"saving occluders to 'saved_occluders.osg'"<getOccluder(); + occluder.add(pos); + +} + +void OccluderEventHandler::endOccluder() +{ + if (_convexPlanarOccluder.valid()) + { + if (_convexPlanarOccluder->getOccluder().getVertexList().size()>=3) + { + osg::OccluderNode* occluderNode = new osg::OccluderNode; + occluderNode->setOccluder(_convexPlanarOccluder.get()); + + if (!_occluders.valid()) + { + _occluders = new osg::Group; + _rootnode->addChild(_occluders.get()); + } + _occluders->addChild(occluderNode); + + std::cout<<"created occluder"<setOccluder(cpo); + occluderNode->setName("occluder"); + + // set the occluder up for the front face of the bounding box. + osg::ConvexPlanarPolygon& occluder = cpo->getOccluder(); + occluder.add(v1); + occluder.add(v2); + occluder.add(v3); + occluder.add(v4); + + // create a whole at the center of the occluder if needed. + if (holeRatio>0.0f) + { + // create hole. + float ratio = holeRatio; + float one_minus_ratio = 1-ratio; + osg::Vec3 center = (v1+v2+v3+v4)*0.25f; + osg::Vec3 v1dash = v1*ratio + center*one_minus_ratio; + osg::Vec3 v2dash = v2*ratio + center*one_minus_ratio; + osg::Vec3 v3dash = v3*ratio + center*one_minus_ratio; + osg::Vec3 v4dash = v4*ratio + center*one_minus_ratio; + + osg::ConvexPlanarPolygon hole; + hole.add(v1dash); + hole.add(v2dash); + hole.add(v3dash); + hole.add(v4dash); + + cpo->addHole(hole); + } + + + // create a drawable for occluder. + osg::Geometry* geom = new osg::Geometry; + + osg::Vec3Array* coords = new osg::Vec3Array(occluder.getVertexList().begin(),occluder.getVertexList().end()); + geom->setVertexArray(coords); + + osg::Vec4Array* colors = new osg::Vec4Array(1); + (*colors)[0].set(1.0f,1.0f,1.0f,0.5f); + geom->setColorArray(colors); + geom->setColorBinding(osg::Geometry::BIND_OVERALL); + + geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,4)); + + osg::Geode* geode = new osg::Geode; + geode->addDrawable(geom); + + osg::StateSet* stateset = new osg::StateSet; + stateset->setMode(GL_LIGHTING,osg::StateAttribute::OFF); + stateset->setMode(GL_BLEND,osg::StateAttribute::ON); + stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN); + + geom->setStateSet(stateset); + + // add the occluder geode as a child of the occluder, + // as the occluder can't self occlude its subgraph the + // geode will never be occluder by this occluder. + occluderNode->addChild(geode); + + return occluderNode; + + } + +osg::Group* createOccludersAroundModel(osg::Node* model) +{ + osg::Group* scene = new osg::Group; + scene->setName("rootgroup"); + + + // add the loaded model into a the scene group. + scene->addChild(model); + model->setName("model"); + + // get the bounding volume of the model. + const osg::BoundingSphere bs = model->getBound(); + + // create a bounding box around the sphere. + osg::BoundingBox bb; + bb.expandBy(bs); + + // front + scene->addChild(createOccluder(bb.corner(0), + bb.corner(1), + bb.corner(5), + bb.corner(4))); + + // right side + scene->addChild(createOccluder(bb.corner(1), + bb.corner(3), + bb.corner(7), + bb.corner(5))); + + // left side + scene->addChild(createOccluder(bb.corner(2), + bb.corner(0), + bb.corner(4), + bb.corner(6))); + + // back side + scene->addChild(createOccluder(bb.corner(3), + bb.corner(2), + bb.corner(6), + bb.corner(7), + 0.5f)); // create a hole half the size of the occluder. + + return scene; +} + + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + arguments.getApplicationUsage()->addCommandLineOption("-c","Mannually create occluders"); + + // initialize the viewer. + osgProducer::Viewer viewer(arguments); + + bool manuallyCreateOccluders = false; + while (arguments.read("-c")) { manuallyCreateOccluders = true; } + + // register trackball, flight and drive. + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // load the nodes from the commandline arguments. + osg::Node* loadedmodel = osgDB::readNodeFiles(arguments); + if (!loadedmodel) + { +// write_usage(osg::notify(osg::NOTICE),argv[0]); + return 1; + } + + // run optimization over the scene graph + osgUtil::Optimizer optimzer; + optimzer.optimize(loadedmodel); + + // add the occluders to the loaded model. + osg::Group* rootnode = NULL; + + if (manuallyCreateOccluders) + { + rootnode = new osg::Group; + rootnode->addChild(loadedmodel); + } + else + { + rootnode = createOccludersAroundModel(loadedmodel); + } + + + // add a viewport to the viewer and attach the scene graph. + viewer.setSceneData( rootnode ); + + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + if (manuallyCreateOccluders) + { + osgUtil::SceneView* sceneview = viewer.getSceneHandlerList()[0]; + + viewer.getEventHandlerList().push_front(new OccluderEventHandler(sceneview,rootnode)); + } + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgparticle/GNUmakefile b/examples/osgparticle/GNUmakefile new file mode 100644 index 000000000..b5b348124 --- /dev/null +++ b/examples/osgparticle/GNUmakefile @@ -0,0 +1,19 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgparticle.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) -losgParticle + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgparticle + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules + diff --git a/examples/osgparticle/GNUmakefile.inst b/examples/osgparticle/GNUmakefile.inst new file mode 100644 index 000000000..8a2cbe7e2 --- /dev/null +++ b/examples/osgparticle/GNUmakefile.inst @@ -0,0 +1,16 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgparticle.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) -losgParticle + +EXEC = osgparticle + + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules + diff --git a/examples/osgparticle/osgparticle.cpp b/examples/osgparticle/osgparticle.cpp new file mode 100644 index 000000000..f0539098f --- /dev/null +++ b/examples/osgparticle/osgparticle.cpp @@ -0,0 +1,405 @@ +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + +////////////////////////////////////////////////////////////////////////////// +// CUSTOM OPERATOR CLASS +////////////////////////////////////////////////////////////////////////////// + +// This class demonstrates Operator subclassing. This way you can create +// custom operators to apply your motion effects to the particles. See docs +// for more details. +class VortexOperator: public osgParticle::Operator { +public: + VortexOperator() + : osgParticle::Operator(), center_(0, 0, 0), axis_(0, 0, 1), intensity_(0.1f) {} + + VortexOperator(const VortexOperator ©, const osg::CopyOp ©op = osg::CopyOp::SHALLOW_COPY) + : osgParticle::Operator(copy, copyop), center_(copy.center_), axis_(copy.axis_), intensity_(copy.intensity_) {} + + META_Object(osgParticle, VortexOperator); + + void setCenter(const osg::Vec3 &c) + { + center_ = c; + } + + void setAxis(const osg::Vec3 &a) + { + axis_ = a / a.length(); + } + + // this method is called by ModularProgram before applying + // operators on the particle set via the operate() method. + void beginOperate(osgParticle::Program *prg) + { + // we have to check whether the reference frame is relative to parents + // or it's absolute; in the first case, we must transform the vectors + // from local to world space. + if (prg->getReferenceFrame() == osgParticle::Program::RELATIVE_TO_PARENTS) { + // transform the center point (full transformation) + xf_center_ = prg->transformLocalToWorld(center_); + // transform the axis vector (only rotation and scale) + xf_axis_ = prg->rotateLocalToWorld(axis_); + } else { + xf_center_ = center_; + xf_axis_ = axis_; + } + } + + // apply a vortex-like acceleration. This code is not optimized, + // it's here only for demonstration purposes. + void operate(osgParticle::Particle *P, double dt) + { + float l = xf_axis_ * (P->getPosition() - xf_center_); + osg::Vec3 lc = xf_center_ + xf_axis_ * l; + osg::Vec3 R = P->getPosition() - lc; + osg::Vec3 v = (R ^ xf_axis_) * P->getMassInv() * intensity_; + + // compute new position + osg::Vec3 newpos = P->getPosition() + v * dt; + + // update the position of the particle without modifying its + // velocity vector (this is unusual, normally you should call + // the Particle::setVelocity() or Particle::addVelocity() + // methods). + P->setPosition(newpos); + } + +protected: + virtual ~VortexOperator() {} + +private: + osg::Vec3 center_; + osg::Vec3 xf_center_; + osg::Vec3 axis_; + osg::Vec3 xf_axis_; + float intensity_; +}; + + +////////////////////////////////////////////////////////////////////////////// +// SIMPLE PARTICLE SYSTEM CREATION +////////////////////////////////////////////////////////////////////////////// + + +osgParticle::ParticleSystem *create_simple_particle_system(osg::Group *root) +{ + + // Ok folks, this is the first particle system we build; it will be + // very simple, with no textures and no special effects, just default + // values except for a couple of attributes. + + // First of all, we create the ParticleSystem object; it will hold + // our particles and expose the interface for managing them; this object + // is a Drawable, so we'll have to add it to a Geode later. + + osgParticle::ParticleSystem *ps = new osgParticle::ParticleSystem; + + // As for other Drawable classes, the aspect of graphical elements of + // ParticleSystem (the particles) depends on the StateAttribute's we + // give it. The ParticleSystem class has an helper function that let + // us specify a set of the most common attributes: setDefaultAttributes(). + // This method can accept up to three parameters; the first is a texture + // name (std::string), which can be empty to disable texturing, the second + // sets whether particles have to be "emissive" (additive blending) or not; + // the third parameter enables or disables lighting. + + ps->setDefaultAttributes("", true, false); + + // Now that our particle system is set we have to create an emitter, that is + // an object (actually a Node descendant) that generate new particles at + // each frame. The best choice is to use a ModularEmitter, which allow us to + // achieve a wide variety of emitting styles by composing the emitter using + // three objects: a "counter", a "placer" and a "shooter". The counter must + // tell the ModularEmitter how many particles it has to create for the + // current frame; then, the ModularEmitter creates these particles, and for + // each new particle it instructs the placer and the shooter to set its + // position vector and its velocity vector, respectively. + // By default, a ModularEmitter object initializes itself with a counter of + // type RandomRateCounter, a placer of type PointPlacer and a shooter of + // type RadialShooter (see documentation for details). We are going to leave + // these default objects there, but we'll modify the counter so that it + // counts faster (more particles are emitted at each frame). + + osgParticle::ModularEmitter *emitter = new osgParticle::ModularEmitter; + + // the first thing you *MUST* do after creating an emitter is to set the + // destination particle system, otherwise it won't know where to create + // new particles. + + emitter->setParticleSystem(ps); + + // Ok, get a pointer to the emitter's Counter object. We could also + // create a new RandomRateCounter object and assign it to the emitter, + // but since the default counter is already a RandomRateCounter, we + // just get a pointer to it and change a value. + + osgParticle::RandomRateCounter *rrc = + static_cast(emitter->getCounter()); + + // Now set the rate range to a better value. The actual rate at each frame + // will be chosen randomly within that range. + + rrc->setRateRange(20, 30); // generate 20 to 30 particles per second + + // The emitter is done! Let's add it to the scene graph. The cool thing is + // that any emitter node will take into account the accumulated local-to-world + // matrix, so you can attach an emitter to a transform node and see it move. + + root->addChild(emitter); + + // Ok folks, we have almost finished. We don't add any particle modifier + // here (see ModularProgram and Operator classes), so all we still need is + // to create a Geode and add the particle system to it, so it can be + // displayed. + + osg::Geode *geode = new osg::Geode; + geode->addDrawable(ps); + + // add the geode to the scene graph + root->addChild(geode); + + return ps; + +} + + + +////////////////////////////////////////////////////////////////////////////// +// COMPLEX PARTICLE SYSTEM CREATION +////////////////////////////////////////////////////////////////////////////// + + +osgParticle::ParticleSystem *create_complex_particle_system(osg::Group *root) +{ + // Are you ready for a more complex particle system? Well, read on! + + // Now we take one step we didn't before: create a particle template. + // A particle template is simply a Particle object for which you set + // the desired properties (see documentation for details). When the + // particle system has to create a new particle and it's been assigned + // a particle template, the new particle will inherit the template's + // properties. + // You can even assign different particle templates to each emitter; in + // this case, the emitter's template will override the particle system's + // default template. + + osgParticle::Particle ptemplate; + + ptemplate.setLifeTime(3); // 3 seconds of life + + // the following ranges set the envelope of the respective + // graphical properties in time. + ptemplate.setSizeRange(osgParticle::rangef(0.75f, 3.0f)); + ptemplate.setAlphaRange(osgParticle::rangef(0.0f, 1.5f)); + ptemplate.setColorRange(osgParticle::rangev4( + osg::Vec4(1, 0.5f, 0.3f, 1.5f), + osg::Vec4(0, 0.7f, 1.0f, 0.0f))); + + // these are physical properties of the particle + ptemplate.setRadius(0.05f); // 5 cm wide particles + ptemplate.setMass(0.05f); // 50 g heavy + + // As usual, let's create the ParticleSystem object and set its + // default state attributes. This time we use a texture named + // "smoke.rgb", you can find it in the data distribution of OSG. + // We turn off the additive blending, because smoke has no self- + // illumination. + osgParticle::ParticleSystem *ps = new osgParticle::ParticleSystem; + ps->setDefaultAttributes("Images/smoke.rgb", false, false); + + // assign the particle template to the system. + ps->setDefaultParticleTemplate(ptemplate); + + // now we have to create an emitter; this will be a ModularEmitter, for which + // we define a RandomRateCounter as counter, a SectorPlacer as placer, and + // a RadialShooter as shooter. + osgParticle::ModularEmitter *emitter = new osgParticle::ModularEmitter; + emitter->setParticleSystem(ps); + + // setup the counter + osgParticle::RandomRateCounter *counter = new osgParticle::RandomRateCounter; + counter->setRateRange(60, 60); + emitter->setCounter(counter); + + // setup the placer; it will be a circle of radius 5 (the particles will + // be placed inside this circle). + osgParticle::SectorPlacer *placer = new osgParticle::SectorPlacer; + placer->setCenter(8, 0, 10); + placer->setRadiusRange(2.5, 5); + placer->setPhiRange(0, 2 * osg::PI); // 360° angle to make a circle + emitter->setPlacer(placer); + + // now let's setup the shooter; we use a RadialShooter but we set the + // initial speed to zero, because we want the particles to fall down + // only under the effect of the gravity force. Since we se the speed + // to zero, there is no need to setup the shooting angles. + osgParticle::RadialShooter *shooter = new osgParticle::RadialShooter; + shooter->setInitialSpeedRange(0, 0); + emitter->setShooter(shooter); + + // add the emitter to the scene graph + root->addChild(emitter); + + // WELL, we got our particle system and a nice emitter. Now we want to + // simulate the effect of the earth gravity, so first of all we have to + // create a Program. It is a particle processor just like the Emitter + // class, but it allows to modify particle properties *after* they have + // been created. + // The ModularProgram class can be thought as a sequence of operators, + // each one performing some actions on the particles. So, the trick is: + // create the ModularProgram object, create one or more Operator objects, + // add those operators to the ModularProgram, and finally add the + // ModularProgram object to the scene graph. + // NOTE: since the Program objects perform actions after the particles + // have been emitted by one or more Emitter objects, all instances of + // Program (and its descendants) should be placed *after* the instances + // of Emitter objects in the scene graph. + + osgParticle::ModularProgram *program = new osgParticle::ModularProgram; + program->setParticleSystem(ps); + + // create an operator that simulates the gravity acceleration. + osgParticle::AccelOperator *op1 = new osgParticle::AccelOperator; + op1->setToGravity(); + program->addOperator(op1); + + // now create a custom operator, we have defined it before (see + // class VortexOperator). + VortexOperator *op2 = new VortexOperator; + op2->setCenter(osg::Vec3(8, 0, 0)); + program->addOperator(op2); + + // let's add a fluid operator to simulate air friction. + osgParticle::FluidFrictionOperator *op3 = new osgParticle::FluidFrictionOperator; + op3->setFluidToAir(); + program->addOperator(op3); + + // add the program to the scene graph + root->addChild(program); + + // create a Geode to contain our particle system. + osg::Geode *geode = new osg::Geode; + geode->addDrawable(ps); + + // add the geode to the scene graph. + root->addChild(geode); + + return ps; +} + + +////////////////////////////////////////////////////////////////////////////// +// MAIN SCENE GRAPH BUILDING FUNCTION +////////////////////////////////////////////////////////////////////////////// + + +void build_world(osg::Group *root) +{ + + // In this function we are going to create two particle systems; + // the first one will be very simple, based mostly on default properties; + // the second one will be a little bit more complex, showing how to + // create custom operators. + // To avoid inserting too much code in a single function, we have + // splitted the work into two functions which accept a Group node as + // parameter, and return a pointer to the particle system they created. + + osgParticle::ParticleSystem *ps1 = create_simple_particle_system(root); + osgParticle::ParticleSystem *ps2 = create_complex_particle_system(root); + + // Now that the particle systems and all other related objects have been + // created, we have to add an "updater" node to the scene graph. This node + // will react to cull traversal by updating the specified particles system. + + osgParticle::ParticleSystemUpdater *psu = new osgParticle::ParticleSystemUpdater; + psu->addParticleSystem(ps1); + psu->addParticleSystem(ps2); + + // add the updater node to the scene graph + root->addChild(psu); + +} + + +////////////////////////////////////////////////////////////////////////////// +// main() +////////////////////////////////////////////////////////////////////////////// + + +int main(int argc, char **argv) +{ + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] image_file_left_eye image_file_right_eye"); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + osg::Group *root = new osg::Group; + build_world(root); + + // add a viewport to the viewer and attach the scene graph. + viewer.setSceneData(root); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgprerender/GNUmakefile b/examples/osgprerender/GNUmakefile new file mode 100644 index 000000000..6dd871ac9 --- /dev/null +++ b/examples/osgprerender/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgprerender.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgprerender + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgprerender/GNUmakefile.inst b/examples/osgprerender/GNUmakefile.inst new file mode 100644 index 000000000..f02e41ae9 --- /dev/null +++ b/examples/osgprerender/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgprerender.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgprerender + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgprerender/osgprerender.cpp b/examples/osgprerender/osgprerender.cpp new file mode 100644 index 000000000..662767a28 --- /dev/null +++ b/examples/osgprerender/osgprerender.cpp @@ -0,0 +1,444 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +class MyUpdateCallback : public osg::NodeCallback +{ + public: + + MyUpdateCallback(osg::Node* subgraph): + _subgraph(subgraph) {} + + virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + { + // traverse the subgraph to update any nodes. + if (_subgraph.valid()) _subgraph->accept(*nv); + + // must traverse the Node's subgraph + traverse(node,nv); + } + + osg::ref_ptr _subgraph; +}; + +class MyCullCallback : public osg::NodeCallback +{ + public: + + MyCullCallback(osg::Node* subgraph,osg::Texture2D* texture): + _subgraph(subgraph), + _texture(texture), + _localState(new osg::StateSet) {} + + MyCullCallback(osg::Node* subgraph,osg::Image* image): + _subgraph(subgraph), + _image(image), + _localState(new osg::StateSet) {} + + virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + { + + osgUtil::CullVisitor* cullVisitor = dynamic_cast(nv); + if (cullVisitor && (_texture.valid()|| _image.valid()) && _subgraph.valid()) + { + doPreRender(*node,*cullVisitor); + + // must traverse the subgraph + traverse(node,nv); + + } + else + { + // must traverse the subgraph + traverse(node,nv); + } + } + + void doPreRender(osg::Node& node, osgUtil::CullVisitor& cv); + + osg::ref_ptr _subgraph; + osg::ref_ptr _texture; + osg::ref_ptr _image; + osg::ref_ptr _localState; + +}; + +void MyCullCallback::doPreRender(osg::Node&, osgUtil::CullVisitor& cv) +{ + const osg::BoundingSphere& bs = _subgraph->getBound(); + if (!bs.valid()) + { + osg::notify(osg::WARN) << "bb invalid"<<_subgraph.get()< rtts = new osgUtil::RenderToTextureStage; + + // set up lighting. + // currently ignore lights in the scene graph itself.. + // will do later. + osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->_stage; + + // set up the background color and clear mask. + rtts->setClearColor(osg::Vec4(0.1f,0.1f,0.3f,0.0f)); + rtts->setClearMask(previous_stage->getClearMask()); + + // set up to charge the same RenderStageLighting is the parent previous stage. + rtts->setRenderStageLighting(previous_stage->getRenderStageLighting()); + + + // record the render bin, to be restored after creation + // of the render to text + osgUtil::RenderBin* previousRenderBin = cv.getCurrentRenderBin(); + + // set the current renderbin to be the newly created stage. + cv.setCurrentRenderBin(rtts.get()); + + + float znear = 1.0f*bs.radius(); + float zfar = 3.0f*bs.radius(); + + // 2:1 aspect ratio as per flag geomtry below. + float top = 0.25f*znear; + float right = 0.5f*znear; + + znear *= 0.9f; + zfar *= 1.1f; + + // set up projection. + osg::RefMatrix* projection = new osg::RefMatrix; + projection->makeFrustum(-right,right,-top,top,znear,zfar); + + cv.pushProjectionMatrix(projection); + + osg::RefMatrix* matrix = new osg::RefMatrix; + matrix->makeLookAt(bs.center()+osg::Vec3(0.0f,2.0f,0.0f)*bs.radius(),bs.center(),osg::Vec3(0.0f,0.0f,1.0f)); + + cv.pushModelViewMatrix(matrix); + + cv.pushStateSet(_localState.get()); + + { + + // traverse the subgraph + _subgraph->accept(cv); + + } + + cv.popStateSet(); + + // restore the previous model view matrix. + cv.popModelViewMatrix(); + + // restore the previous model view matrix. + cv.popProjectionMatrix(); + + // restore the previous renderbin. + cv.setCurrentRenderBin(previousRenderBin); + + if (rtts->_renderGraphList.size()==0 && rtts->_bins.size()==0) + { + // getting to this point means that all the subgraph has been + // culled by small feature culling or is beyond LOD ranges. + return; + } + + + + int height = 256; + int width = 512; + + + const osg::Viewport& viewport = *cv.getViewport(); + + // offset the impostor viewport from the center of the main window + // viewport as often the edges of the viewport might be obscured by + // other windows, which can cause image/reading writing problems. + int center_x = viewport.x()+viewport.width()/2; + int center_y = viewport.y()+viewport.height()/2; + + osg::Viewport* new_viewport = new osg::Viewport; + new_viewport->setViewport(center_x-width/2,center_y-height/2,width,height); + rtts->setViewport(new_viewport); + + _localState->setAttribute(new_viewport); + + // and the render to texture stage to the current stages + // dependancy list. + cv.getCurrentRenderBin()->_stage->addToDependencyList(rtts.get()); + + // if one exist attach texture to the RenderToTextureStage. + if (_texture.valid()) rtts->setTexture(_texture.get()); + + // if one exist attach image to the RenderToTextureStage. + if (_image.valid()) rtts->setImage(_image.get()); + +} + +// call back which cretes a deformation field to oscilate the model. +class MyGeometryCallback : + public osg::Drawable::UpdateCallback, + public osg::Drawable::AttributeFunctor +{ + public: + + MyGeometryCallback(const osg::Vec3& o, + const osg::Vec3& x,const osg::Vec3& y,const osg::Vec3& z, + double period,double xphase,double amplitude): + _firstCall(true), + _startTime(0.0), + _time(0.0), + _period(period), + _xphase(xphase), + _amplitude(amplitude), + _origin(o), + _xAxis(x), + _yAxis(y), + _zAxis(z) {} + + virtual void update(osg::NodeVisitor* nv,osg::Drawable* drawable) + { + const osg::FrameStamp* fs = nv->getFrameStamp(); + double referenceTime = fs->getReferenceTime(); + if (_firstCall) + { + _firstCall = false; + _startTime = referenceTime; + } + + _time = referenceTime-_startTime; + + drawable->accept(*this); + drawable->dirtyBound(); + + osg::Geometry* geometry = dynamic_cast(drawable); + if (geometry) + { + osgUtil::SmoothingVisitor::smooth(*geometry); + } + + } + + virtual void apply(osg::Drawable::AttributeType type,unsigned int count,osg::Vec3* begin) + { + if (type == osg::Drawable::VERTICES) + { + const float TwoPI=2.0f*osg::PI; + const float phase = -_time/_period; + + osg::Vec3* end = begin+count; + for (osg::Vec3* itr=begin;itrsetSupportsDisplayList(false); + + osg::Vec3 origin(0.0f,0.0f,0.0f); + osg::Vec3 xAxis(1.0f,0.0f,0.0f); + osg::Vec3 yAxis(0.0f,0.0f,1.0f); + osg::Vec3 zAxis(0.0f,-1.0f,0.0f); + float height = 100.0f; + float width = 200.0f; + int noSteps = 20; + + osg::Vec3Array* vertices = new osg::Vec3Array; + osg::Vec3 bottom = origin; + osg::Vec3 top = origin; top.z()+= height; + osg::Vec3 dv = xAxis*(width/((float)(noSteps-1))); + + osg::Vec2Array* texcoords = new osg::Vec2Array; + osg::Vec2 bottom_texcoord(0.0f,0.0f); + osg::Vec2 top_texcoord(0.0f,1.0f); + osg::Vec2 dv_texcoord(1.0f/(float)(noSteps-1),0.0f); + + for(int i=0;ipush_back(top); + vertices->push_back(bottom); + top+=dv; + bottom+=dv; + + texcoords->push_back(top_texcoord); + texcoords->push_back(bottom_texcoord); + top_texcoord+=dv_texcoord; + bottom_texcoord+=dv_texcoord; + } + + + // pass the created vertex array to the points geometry object. + polyGeom->setVertexArray(vertices); + + polyGeom->setTexCoordArray(0,texcoords); + + + osg::Vec4Array* colors = new osg::Vec4Array; + colors->push_back(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); + polyGeom->setColorArray(colors); + polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); + + polyGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUAD_STRIP,0,vertices->size())); + + // new we need to add the texture to the Drawable, we do so by creating a + // StateSet to contain the Texture StateAttribute. + osg::StateSet* stateset = new osg::StateSet; + + osg::Texture2D* texture = new osg::Texture2D; + texture->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR); + texture->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); + stateset->setTextureAttributeAndModes(0, texture,osg::StateAttribute::ON); + + polyGeom->setStateSet(stateset); + + polyGeom->setUpdateCallback(new MyGeometryCallback(origin,xAxis,yAxis,zAxis,1.0,1.0/width,0.2f)); + + osg::Geode* geode = new osg::Geode(); + geode->addDrawable(polyGeom); + + osg::Group* parent = new osg::Group; + + parent->setUpdateCallback(new MyUpdateCallback(subgraph)); + + parent->setCullCallback(new MyCullCallback(subgraph,texture)); + + parent->addChild(geode); + + return parent; +} + +int main( int argc, char **argv ) +{ + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + + // load the nodes from the commandline arguments. + osg::Node* loadedModel = osgDB::readNodeFiles(arguments); + if (!loadedModel) + { +// write_usage(osg::notify(osg::NOTICE),argv[0]); + return 1; + } + + // create a transform to spin the model. + osg::MatrixTransform* loadedModelTransform = new osg::MatrixTransform; + loadedModelTransform->addChild(loadedModel); + + osg::NodeCallback* nc = new osgUtil::TransformCallback(loadedModelTransform->getBound().center(),osg::Vec3(0.0f,0.0f,1.0f),osg::inDegrees(45.0f)); + loadedModelTransform->setUpdateCallback(nc); + + osg::Group* rootNode = new osg::Group(); +// rootNode->addChild(loadedModelTransform); + rootNode->addChild(createPreRenderSubGraph(loadedModelTransform)); + + + // add model to the viewer. + viewer.setSceneData( rootNode ); + + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgreflect/GNUmakefile b/examples/osgreflect/GNUmakefile index 3c3c72176..f88a5de4e 100644 --- a/examples/osgreflect/GNUmakefile +++ b/examples/osgreflect/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgreflect.cpp\ -LIBS += -losgProducer -lProducer $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgreflect/GNUmakefile.inst b/examples/osgreflect/GNUmakefile.inst index 7b9129ffa..009b2098b 100644 --- a/examples/osgreflect/GNUmakefile.inst +++ b/examples/osgreflect/GNUmakefile.inst @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgviewer.cpp\ -LIBS += -losgProducer -lProducer $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgviewer @@ -12,4 +12,7 @@ INC += $(PRODUCER_INCLUDE_DIR) LDFLAGS += $(PRODUCER_LIB_DIR) +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + include $(TOPDIR)/Make/makerules diff --git a/examples/osgscribe/GNUmakefile b/examples/osgscribe/GNUmakefile new file mode 100644 index 000000000..746d6f8eb --- /dev/null +++ b/examples/osgscribe/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgscribe.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgscribe + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgscribe/GNUmakefile.inst b/examples/osgscribe/GNUmakefile.inst new file mode 100644 index 000000000..43353f354 --- /dev/null +++ b/examples/osgscribe/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgscribe.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgscribe + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgscribe/osgscribe.cpp b/examples/osgscribe/osgscribe.cpp new file mode 100644 index 000000000..0cf2d33d8 --- /dev/null +++ b/examples/osgscribe/osgscribe.cpp @@ -0,0 +1,129 @@ +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include + +#include + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // load the nodes from the commandline arguments. + osg::Node* loadedModel = osgDB::readNodeFiles(arguments); + if (!loadedModel) + { + return 1; + } + + // to do scribe mode we create a top most group to contain the + // original model, and then a second group contains the same model + // but overrides various state attributes, so that the second instance + // is rendered as wireframe. + + osg::Group* rootnode = new osg::Group; + + osg::Group* decorator = new osg::Group; + + rootnode->addChild(loadedModel); + + + rootnode->addChild(decorator); + + decorator->addChild(loadedModel); + + // set up the state so that the underlying color is not seen through + // and that the drawing mode is changed to wireframe, and a polygon offset + // is added to ensure that we see the wireframe itself, and turn off + // so texturing too. + osg::StateSet* stateset = new osg::StateSet; + osg::Material* material = new osg::Material; + osg::PolygonOffset* polyoffset = new osg::PolygonOffset; + polyoffset->setFactor(-1.0f); + polyoffset->setUnits(-1.0f); + osg::PolygonMode* polymode = new osg::PolygonMode; + polymode->setMode(osg::PolygonMode::FRONT_AND_BACK,osg::PolygonMode::LINE); + stateset->setAttributeAndModes(material,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON); + stateset->setAttributeAndModes(polyoffset,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON); + stateset->setAttributeAndModes(polymode,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON); + stateset->setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF); + stateset->setTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF); + +// osg::LineStipple* linestipple = new osg::LineStipple; +// linestipple->setFactor(1); +// linestipple->setPattern(0xf0f0); +// stateset->setAttributeAndModes(linestipple,osg::StateAttribute::OVERRIDE_ON); + + decorator->setStateSet(stateset); + + + // run optimization over the scene graph + osgUtil::Optimizer optimzer; + optimzer.optimize(rootnode); + + // add a viewport to the viewer and attach the scene graph. + viewer.setSceneData( rootnode ); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgsequence/GNUmakefile b/examples/osgsequence/GNUmakefile new file mode 100644 index 000000000..8e726169b --- /dev/null +++ b/examples/osgsequence/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgsequence.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgsequence + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgsequence/GNUmakefile.inst b/examples/osgsequence/GNUmakefile.inst new file mode 100644 index 000000000..d792d5ca7 --- /dev/null +++ b/examples/osgsequence/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgtexture.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgtexture + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgsequence/osgsequence.cpp b/examples/osgsequence/osgsequence.cpp new file mode 100644 index 000000000..81c1ee0fb --- /dev/null +++ b/examples/osgsequence/osgsequence.cpp @@ -0,0 +1,201 @@ +// -*-c++-*- + +#include +#include +#include + +#include + +#include + +#include + + +// +// A simple demo demonstrating usage of osg::Sequence. +// + +// simple event handler to start/stop sequences +class MyEventHandler : public osgGA::GUIEventHandler { +public: + /// Constructor. + MyEventHandler(std::vector* seq) + { + _seq = seq; + } + + /// Handle events. + virtual bool handle(const osgGA::GUIEventAdapter& ea, + osgGA::GUIActionAdapter&) + { + bool handled = false; + + if (ea.getEventType() == osgGA::GUIEventAdapter::KEYDOWN) + { + const char keys[] = "!@#$%^&*()"; + for (unsigned int i = 0; i < (sizeof(keys) / sizeof(keys[0])); i++) { + if (i < _seq->size() && ea.getKey() == keys[i]) + { + // toggle sequence + osg::Sequence* seq = (*_seq)[i]; + osg::Sequence::SequenceMode mode = seq->getMode(); + switch (mode) { + case osg::Sequence::START: + seq->setMode(osg::Sequence::PAUSE); + break; + case osg::Sequence::STOP: + seq->setMode(osg::Sequence::START); + break; + case osg::Sequence::PAUSE: + seq->setMode(osg::Sequence::RESUME); + break; + default: + break; + } + std::cerr << "Toggled sequence " << i << std::endl; + handled = true; + } + } + } + + return handled; + } + + /// accept visits. + virtual void accept(osgGA::GUIEventHandlerVisitor&) {} + +private: + std::vector* _seq; +}; + +osg::Sequence* generateSeq(osg::Sequence::LoopMode mode, + float speed, int nreps, + std::vector& model) +{ + osg::Sequence* seqNode = new osg::Sequence; + + // add children, show each child for 1.0 seconds + for (unsigned int i = 0; i < model.size(); i++) { + seqNode->addChild(model[i]); + seqNode->setTime(i, 1.0f); + } + + // interval + seqNode->setInterval(mode, 0, -1); + + // speed-up factor and number of repeats for entire sequence + seqNode->setDuration(speed, nreps); + + // stopped + seqNode->setMode(osg::Sequence::STOP); + + return seqNode; +} + +int main( int argc, char **argv ) +{ + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // assumes any remaining parameters are models + std::vector model; + for (int i = 1; i < arguments.argc(); i++) + { + std::cerr << "Loading " << arguments[i] << std::endl; + osg::Node* node = osgDB::readNodeFile(arguments[i]); + if (node) + model.push_back(node); + } + if (model.empty()) { + return -1; + } + + // root + osg::Group* rootNode = new osg::Group; + + // create sequences + std::vector seq; + + const osg::Sequence::LoopMode mode[] = { osg::Sequence::LOOP, + osg::Sequence::SWING, + osg::Sequence::LOOP }; + const float speed[] = { 0.5f, 1.0f, 1.5f }; + const int nreps[] = { -1, 5, 1 }; + + float x = 0.0f; + for (unsigned int j = 0; j < (sizeof(speed) / sizeof(speed[0])); j++) { + osg::Sequence* seqNode = generateSeq(mode[j], speed[j], nreps[j], + model); + if (!seqNode) + continue; + seq.push_back(seqNode); + + // position sequence + osg::Matrix matrix; + matrix.makeTranslate(x, 0.0, 0.0); + + osg::MatrixTransform* xform = new osg::MatrixTransform; + xform->setMatrix(matrix); + xform->addChild(seqNode); + + rootNode->addChild(xform); + + x += seqNode->getBound()._radius * 1.5f; + } + + + // add model to viewer. + viewer.setSceneData(rootNode); + + // register additional event handler + viewer.getEventHandlerList().push_front(new MyEventHandler(&seq)); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgshadowtexture/CreateShadowedScene.cpp b/examples/osgshadowtexture/CreateShadowedScene.cpp new file mode 100644 index 000000000..9926f72a8 --- /dev/null +++ b/examples/osgshadowtexture/CreateShadowedScene.cpp @@ -0,0 +1,274 @@ +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "CreateShadowedScene.h" + +using namespace osg; + +class CreateShadowTextureCullCallback : public osg::NodeCallback +{ + public: + + CreateShadowTextureCullCallback(osg::Node* shadower,const osg::Vec3& position, const osg::Vec4& ambientLightColor, unsigned int textureUnit): + _shadower(shadower), + _position(position), + _ambientLightColor(ambientLightColor), + _unit(textureUnit), + _shadowState(new osg::StateSet) + { + _texture = new osg::Texture2D; + _texture->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR); + _texture->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); + } + + virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + { + + osgUtil::CullVisitor* cullVisitor = dynamic_cast(nv); + if (cullVisitor && (_texture.valid() && _shadower.valid())) + { + doPreRender(*node,*cullVisitor); + + } + else + { + // must traverse the shadower + traverse(node,nv); + } + } + + protected: + + void doPreRender(osg::Node& node, osgUtil::CullVisitor& cv); + + osg::ref_ptr _shadower; + osg::ref_ptr _texture; + osg::Vec3 _position; + osg::Vec4 _ambientLightColor; + unsigned int _unit; + osg::ref_ptr _shadowState; + + // we need this to get round the order dependance + // of eye linear tex gen... + class MyTexGen : public TexGen + { + public: + + void setMatrix(const osg::Matrix& matrix) + { + _matrix = matrix; + } + + virtual void apply(osg::State& state) const + { + glPushMatrix(); + glLoadMatrixf(_matrix.ptr()); + TexGen::apply(state); + glPopMatrix(); + } + + osg::Matrix _matrix; + }; + +}; + +void CreateShadowTextureCullCallback::doPreRender(osg::Node& node, osgUtil::CullVisitor& cv) +{ + + const osg::BoundingSphere& bs = _shadower->getBound(); + if (!bs.valid()) + { + osg::notify(osg::WARN) << "bb invalid"<<_shadower.get()< rtts = new osgUtil::RenderToTextureStage; + + // set up lighting. + // currently ignore lights in the scene graph itself.. + // will do later. + osgUtil::RenderStage* previous_stage = cv.getCurrentRenderBin()->_stage; + + // set up the background color and clear mask. + rtts->setClearColor(osg::Vec4(1.0f,1.0f,1.0f,0.0f)); + rtts->setClearMask(previous_stage->getClearMask()); + + // set up to charge the same RenderStageLighting is the parent previous stage. + rtts->setRenderStageLighting(previous_stage->getRenderStageLighting()); + + + // record the render bin, to be restored after creation + // of the render to text + osgUtil::RenderBin* previousRenderBin = cv.getCurrentRenderBin(); + + // set the current renderbin to be the newly created stage. + cv.setCurrentRenderBin(rtts.get()); + + + float centerDistance = (_position-bs.center()).length(); + + float znear = centerDistance+bs.radius(); + float zfar = centerDistance-bs.radius(); + float zNearRatio = 0.001f; + if (znearmakeFrustum(-right,right,-top,top,znear,zfar); + + cv.pushProjectionMatrix(projection); + + osg::RefMatrix* matrix = new osg::RefMatrix; + matrix->makeLookAt(_position,bs.center(),osg::Vec3(0.0f,1.0f,0.0f)); + + + osg::Matrix MV = cv.getModelViewMatrix(); + + // compute the matrix which takes a vertex from local coords into tex coords + // will use this later to specify osg::TexGen.. + osg::Matrix MVPT = + *matrix * + *projection * + osg::Matrix::translate(1.0,1.0,1.0) * + osg::Matrix::scale(0.5f,0.5f,0.5f); + + cv.pushModelViewMatrix(matrix); + + // make the material black for a shadow. + osg::Material* material = new osg::Material; + material->setAmbient(osg::Material::FRONT_AND_BACK,_ambientLightColor); + material->setDiffuse(osg::Material::FRONT_AND_BACK,osg::Vec4(0.0f,0.0f,0.0f,1.0f)); + material->setEmission(osg::Material::FRONT_AND_BACK,osg::Vec4(0.0f,0.0f,0.0f,1.0f)); + material->setShininess(osg::Material::FRONT_AND_BACK,0.0f); + _shadowState->setAttribute(material,osg::StateAttribute::OVERRIDE); + + cv.pushStateSet(_shadowState.get()); + + { + + // traverse the shadower + _shadower->accept(cv); + + } + + cv.popStateSet(); + + // restore the previous model view matrix. + cv.popModelViewMatrix(); + + + // restore the previous model view matrix. + cv.popProjectionMatrix(); + + // restore the previous renderbin. + cv.setCurrentRenderBin(previousRenderBin); + + if (rtts->_renderGraphList.size()==0 && rtts->_bins.size()==0) + { + // getting to this point means that all the shadower has been + // culled by small feature culling or is beyond LOD ranges. + return; + } + + + + int height = 256; + int width = 256; + + + const osg::Viewport& viewport = *cv.getViewport(); + + // offset the impostor viewport from the center of the main window + // viewport as often the edges of the viewport might be obscured by + // other windows, which can cause image/reading writing problems. + int center_x = viewport.x()+viewport.width()/2; + int center_y = viewport.y()+viewport.height()/2; + + osg::Viewport* new_viewport = new osg::Viewport; + new_viewport->setViewport(center_x-width/2,center_y-height/2,width,height); + rtts->setViewport(new_viewport); + + _shadowState->setAttribute(new_viewport); + + // and the render to texture stage to the current stages + // dependancy list. + cv.getCurrentRenderBin()->_stage->addToDependencyList(rtts.get()); + + // if one exist attach texture to the RenderToTextureStage. + if (_texture.valid()) rtts->setTexture(_texture.get()); + + + // set up the stateset to decorate the shadower with the shadow texture + // with the appropriate tex gen coords. + osg::StateSet* stateset = new osg::StateSet; + + + MyTexGen* texgen = new MyTexGen; + texgen->setMatrix(MV); + texgen->setMode(osg::TexGen::EYE_LINEAR); + texgen->setPlane(osg::TexGen::S,osg::Plane(MVPT(0,0),MVPT(1,0),MVPT(2,0),MVPT(3,0))); + texgen->setPlane(osg::TexGen::T,osg::Plane(MVPT(0,1),MVPT(1,1),MVPT(2,1),MVPT(3,1))); + texgen->setPlane(osg::TexGen::R,osg::Plane(MVPT(0,2),MVPT(1,2),MVPT(2,2),MVPT(3,2))); + texgen->setPlane(osg::TexGen::Q,osg::Plane(MVPT(0,3),MVPT(1,3),MVPT(2,3),MVPT(3,3))); + + stateset->setTextureAttributeAndModes(_unit,_texture.get(),osg::StateAttribute::ON); + stateset->setTextureAttribute(_unit,texgen); + stateset->setTextureMode(_unit,GL_TEXTURE_GEN_S,osg::StateAttribute::ON); + stateset->setTextureMode(_unit,GL_TEXTURE_GEN_T,osg::StateAttribute::ON); + stateset->setTextureMode(_unit,GL_TEXTURE_GEN_R,osg::StateAttribute::ON); + stateset->setTextureMode(_unit,GL_TEXTURE_GEN_Q,osg::StateAttribute::ON); + + cv.pushStateSet(stateset); + + // must traverse the shadower + traverse(&node,&cv); + + cv.popStateSet(); + +} + + +// set up a light source with the shadower and shodower subgraphs below it +// with the appropriate callbacks set up. +osg::Group* createShadowedScene(osg::Node* shadower,osg::Node* shadowed,const osg::Vec3& lightPosition,float radius,unsigned int textureUnit) +{ + osg::LightSource* lightgroup = new osg::LightSource; + + osg::Light* light = new osg::Light; + light->setPosition(osg::Vec4(lightPosition,1.0f)); + light->setLightNum(0); + + lightgroup->setLight(light); + + osg::Vec4 ambientLightColor(0.1f,0.1f,0.1f,1.0f); + + // add the shadower + lightgroup->addChild(shadower); + + // add the shadowed with the callback to generate the shadow texture. + shadowed->setCullCallback(new CreateShadowTextureCullCallback(shadower,lightPosition,ambientLightColor,textureUnit)); + lightgroup->addChild(shadowed); + + osg::Geode* lightgeode = new osg::Geode; + lightgeode->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::OFF); + lightgeode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(lightPosition,radius))); + + lightgroup->addChild(lightgeode); + + return lightgroup; +} + diff --git a/examples/osgshadowtexture/CreateShadowedScene.h b/examples/osgshadowtexture/CreateShadowedScene.h new file mode 100644 index 000000000..870deba40 --- /dev/null +++ b/examples/osgshadowtexture/CreateShadowedScene.h @@ -0,0 +1,12 @@ +#ifndef CREATESHADOWEDSCENE_H +#define CREATESHADOWEDSCENE_H + +#include +#include + +// function to create a lightsource which contain a shadower and showed subgraph, +// the showadowed subgrph has a cull callback to fire off a pre render to texture +// of the shadowed subgraph. +extern osg::Group* createShadowedScene(osg::Node* shadower,osg::Node* shadowed,const osg::Vec3& lightPosition,float radius,unsigned int textureUnit=1); + +#endif diff --git a/examples/osgshadowtexture/GNUmakefile b/examples/osgshadowtexture/GNUmakefile new file mode 100644 index 000000000..dfc2ac14a --- /dev/null +++ b/examples/osgshadowtexture/GNUmakefile @@ -0,0 +1,19 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + CreateShadowedScene.cpp\ + osgshadowtexture.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgshadowtexture + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgshadowtexture/GNUmakefile.inst b/examples/osgshadowtexture/GNUmakefile.inst new file mode 100644 index 000000000..a71550ecd --- /dev/null +++ b/examples/osgshadowtexture/GNUmakefile.inst @@ -0,0 +1,15 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + CreateShadowedScene.cpp\ + osgshadowtexture.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgshadowtexture + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgshadowtexture/osgshadowtexture.cpp b/examples/osgshadowtexture/osgshadowtexture.cpp new file mode 100644 index 000000000..1a7e305a4 --- /dev/null +++ b/examples/osgshadowtexture/osgshadowtexture.cpp @@ -0,0 +1,240 @@ +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include + + +#include + + +// include the call which creates the shadowed subgraph. +#include "CreateShadowedScene.h" + + +// for the grid data.. +#include "../osghangglide/terrain_coords.h" + + + +osg::AnimationPath* createAnimationPath(const osg::Vec3& center,float radius,double looptime) +{ + // set up the animation path + osg::AnimationPath* animationPath = new osg::AnimationPath; + animationPath->setLoopMode(osg::AnimationPath::LOOP); + + int numSamples = 40; + float yaw = 0.0f; + float yaw_delta = 2.0f*osg::PI/((float)numSamples-1.0f); + float roll = osg::inDegrees(30.0f); + + double time=0.0f; + double time_delta = looptime/(double)numSamples; + for(int i=0;iinsert(time,osg::AnimationPath::ControlPoint(position,rotation)); + + yaw += yaw_delta; + time += time_delta; + + } + return animationPath; +} + +osg::Node* createBase(const osg::Vec3& center,float radius) +{ + + osg::Geode* geode = new osg::Geode; + + // set up the texture of the base. + osg::StateSet* stateset = new osg::StateSet(); + osg::Image* image = osgDB::readImageFile("Images/lz.rgb"); + if (image) + { + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); + } + + geode->setStateSet( stateset ); + + + osg::Grid* grid = new osg::Grid; + grid->allocateGrid(38,39); + grid->setOrigin(center+osg::Vec3(-radius,-radius,0.0f)); + grid->setXInterval(radius*2.0f/(float)(38-1)); + grid->setYInterval(radius*2.0f/(float)(39-1)); + + float minHeight = FLT_MAX; + float maxHeight = -FLT_MAX; + + + unsigned int r; + for(r=0;r<39;++r) + { + for(unsigned int c=0;c<38;++c) + { + float h = vertex[r+c*39][2]; + if (h>maxHeight) maxHeight=h; + if (hsetHeight(c,r,(h+hieghtOffset)*hieghtScale); + } + } + + geode->addDrawable(new osg::ShapeDrawable(grid)); + + osg::Group* group = new osg::Group; + group->addChild(geode); + + return group; + +} + +osg::Node* createMovingModel(const osg::Vec3& center, float radius) +{ + float animationLength = 10.0f; + + osg::AnimationPath* animationPath = createAnimationPath(center,radius,animationLength); + + osg::Group* model = new osg::Group; + + osg::Node* cessna = osgDB::readNodeFile("cessna.osg"); + if (cessna) + { + const osg::BoundingSphere& bs = cessna->getBound(); + + float size = radius/bs.radius()*0.3f; + osg::MatrixTransform* positioned = new osg::MatrixTransform; + positioned->setDataVariance(osg::Object::STATIC); + positioned->setMatrix(osg::Matrix::translate(-bs.center())* + osg::Matrix::scale(size,size,size)* + osg::Matrix::rotate(osg::inDegrees(180.0f),0.0f,0.0f,2.0f)); + + positioned->addChild(cessna); + + osg::MatrixTransform* xform = new osg::MatrixTransform; + xform->setUpdateCallback(new osg::AnimationPathCallback(animationPath,0.0f,2.0)); + xform->addChild(positioned); + + model->addChild(xform); + } + + return model; +} + + + + +osg::Node* createModel() +{ + osg::Vec3 center(0.0f,0.0f,0.0f); + float radius = 100.0f; + osg::Vec3 lightPosition(center+osg::Vec3(0.0f,0.0f,radius)); + + // the shadower model + osg::Node* shadower = createMovingModel(center,radius*0.5f); + + // the shadowed model + osg::Node* shadowed = createBase(center-osg::Vec3(0.0f,0.0f,radius*0.25),radius); + + // combine the models together to create one which has the shadower and the shadowed with the required callback. + osg::Group* root = createShadowedScene(shadower,shadowed,lightPosition,radius/100.0f,1); + + return root; +} + + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // load the nodes from the commandline arguments. + osg::Node* model = createModel(); + if (!model) + { + return 1; + } + + // comment out optimization over the scene graph right now as it optimizers away the shadow... will look into this.. + //osgUtil::Optimizer optimzer; + //optimzer.optimize(rootnode); + + // add a viewport to the viewer and attach the scene graph. + viewer.setSceneData( model ); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgshape/GNUmakefile b/examples/osgshape/GNUmakefile new file mode 100644 index 000000000..44b32ed29 --- /dev/null +++ b/examples/osgshape/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgshape.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgshape + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgshape/GNUmakefile.inst b/examples/osgshape/GNUmakefile.inst new file mode 100644 index 000000000..472a7b2e9 --- /dev/null +++ b/examples/osgshape/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgshape.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgshape + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgshape/osgshape.cpp b/examples/osgshape/osgshape.cpp new file mode 100644 index 000000000..faa23f455 --- /dev/null +++ b/examples/osgshape/osgshape.cpp @@ -0,0 +1,143 @@ +#include +#include +#include +#include + +#include + +#include + +#include + +#include + +// for the grid data.. +#include "../osghangglide/terrain_coords.h" + +osg::Geode* createShapes() +{ + osg::Geode* geode = new osg::Geode(); + + // --------------------------------------- + // Set up a StateSet to texture the objects + // --------------------------------------- + osg::StateSet* stateset = new osg::StateSet(); + + osg::Image* image = osgDB::readImageFile("Images/lz.rgb"); + if (image) + { + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); + } + + geode->setStateSet( stateset ); + + float radius = 0.8f; + float height = 1.0f; + + geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f,0.0f,0.0f),radius))); + geode->addDrawable(new osg::ShapeDrawable(new osg::Box(osg::Vec3(2.0f,0.0f,0.0f),2*radius))); + geode->addDrawable(new osg::ShapeDrawable(new osg::Cone(osg::Vec3(4.0f,0.0f,0.0f),radius,height))); + geode->addDrawable(new osg::ShapeDrawable(new osg::Cylinder(osg::Vec3(6.0f,0.0f,0.0f),radius,height))); + + osg::Grid* grid = new osg::Grid; + grid->allocateGrid(38,39); + grid->setXInterval(0.28f); + grid->setYInterval(0.28f); + + for(unsigned int r=0;r<39;++r) + { + for(unsigned int c=0;c<38;++c) + { + grid->setHeight(c,r,vertex[r+c*39][2]); + } + } + geode->addDrawable(new osg::ShapeDrawable(grid)); + + osg::ConvexHull* mesh = new osg::ConvexHull; + osg::Vec3Array* vertices = new osg::Vec3Array(4); + (*vertices)[0].set(7.0+0.0f,-1.0f+2.0f,-1.0f+0.0f); + (*vertices)[1].set(7.0+1.0f,-1.0f+0.0f,-1.0f+0.0f); + (*vertices)[2].set(7.0+2.0f,-1.0f+2.0f,-1.0f+0.0f); + (*vertices)[3].set(7.0+1.0f,-1.0f+1.0f,-1.0f+2.0f); + osg::UByteArray* indices = new osg::UByteArray(12); + (*indices)[0]=0; + (*indices)[1]=2; + (*indices)[2]=1; + (*indices)[3]=0; + (*indices)[4]=1; + (*indices)[5]=3; + (*indices)[6]=1; + (*indices)[7]=2; + (*indices)[8]=3; + (*indices)[9]=2; + (*indices)[10]=0; + (*indices)[11]=3; + mesh->setVertices(vertices); + mesh->setIndices(indices); + geode->addDrawable(new osg::ShapeDrawable(mesh)); + + return geode; +} + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + osg::Node* node = createShapes(); + + // add model to viewer. + viewer.setSceneData( node ); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgteapot/GNUmakefile b/examples/osgteapot/GNUmakefile new file mode 100644 index 000000000..31db33066 --- /dev/null +++ b/examples/osgteapot/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgteapot.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgteapot + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgteapot/GNUmakefile.inst b/examples/osgteapot/GNUmakefile.inst new file mode 100644 index 000000000..528129bed --- /dev/null +++ b/examples/osgteapot/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgcube.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgcube + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgteapot/osgteapot.cpp b/examples/osgteapot/osgteapot.cpp new file mode 100644 index 000000000..1d2acf410 --- /dev/null +++ b/examples/osgteapot/osgteapot.cpp @@ -0,0 +1,374 @@ +#include +#include +#include + +#include + +#include + +#include + + +// The classic OpenGL teapot... taken form glut-3.7/lib/glut/glut_teapot.c + +/* Copyright (c) Mark J. Kilgard, 1994. */ + +/** +(c) Copyright 1993, Silicon Graphics, Inc. + +ALL RIGHTS RESERVED + +Permission to use, copy, modify, and distribute this software +for any purpose and without fee is hereby granted, provided +that the above copyright notice appear in all copies and that +both the copyright notice and this permission notice appear in +supporting documentation, and that the name of Silicon +Graphics, Inc. not be used in advertising or publicity +pertaining to distribution of the software without specific, +written prior permission. + +THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU +"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR +OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO +EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE +ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, +INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, +SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR +NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY +OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR +PERFORMANCE OF THIS SOFTWARE. + +US Government Users Restricted Rights + +Use, duplication, or disclosure by the Government is subject to +restrictions set forth in FAR 52.227.19(c)(2) or subparagraph +(c)(1)(ii) of the Rights in Technical Data and Computer +Software clause at DFARS 252.227-7013 and/or in similar or +successor clauses in the FAR or the DOD or NASA FAR +Supplement. Unpublished-- rights reserved under the copyright +laws of the United States. Contractor/manufacturer is Silicon +Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA +94039-7311. + +OpenGL(TM) is a trademark of Silicon Graphics, Inc. +*/ + + +/* Rim, body, lid, and bottom data must be reflected in x and + y; handle and spout data across the y axis only. */ + +static int patchdata[][16] = +{ + /* rim */ + {102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15}, + /* body */ + {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27}, + {24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40}, + /* lid */ + {96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101, + 101, 0, 1, 2, 3,}, + {0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117}, + /* bottom */ + {118, 118, 118, 118, 124, 122, 119, 121, 123, 126, + 125, 120, 40, 39, 38, 37}, + /* handle */ + {41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56}, + {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 28, 65, 66, 67}, + /* spout */ + {68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83}, + {80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95} +}; +/* *INDENT-OFF* */ + +static float cpdata[][3] = +{ + {0.2, 0, 2.7}, {0.2, -0.112, 2.7}, {0.112, -0.2, 2.7}, {0, + -0.2, 2.7}, {1.3375, 0, 2.53125}, {1.3375, -0.749, 2.53125}, + {0.749, -1.3375, 2.53125}, {0, -1.3375, 2.53125}, {1.4375, + 0, 2.53125}, {1.4375, -0.805, 2.53125}, {0.805, -1.4375, + 2.53125}, {0, -1.4375, 2.53125}, {1.5, 0, 2.4}, {1.5, -0.84, + 2.4}, {0.84, -1.5, 2.4}, {0, -1.5, 2.4}, {1.75, 0, 1.875}, + {1.75, -0.98, 1.875}, {0.98, -1.75, 1.875}, {0, -1.75, + 1.875}, {2, 0, 1.35}, {2, -1.12, 1.35}, {1.12, -2, 1.35}, + {0, -2, 1.35}, {2, 0, 0.9}, {2, -1.12, 0.9}, {1.12, -2, + 0.9}, {0, -2, 0.9}, {-2, 0, 0.9}, {2, 0, 0.45}, {2, -1.12, + 0.45}, {1.12, -2, 0.45}, {0, -2, 0.45}, {1.5, 0, 0.225}, + {1.5, -0.84, 0.225}, {0.84, -1.5, 0.225}, {0, -1.5, 0.225}, + {1.5, 0, 0.15}, {1.5, -0.84, 0.15}, {0.84, -1.5, 0.15}, {0, + -1.5, 0.15}, {-1.6, 0, 2.025}, {-1.6, -0.3, 2.025}, {-1.5, + -0.3, 2.25}, {-1.5, 0, 2.25}, {-2.3, 0, 2.025}, {-2.3, -0.3, + 2.025}, {-2.5, -0.3, 2.25}, {-2.5, 0, 2.25}, {-2.7, 0, + 2.025}, {-2.7, -0.3, 2.025}, {-3, -0.3, 2.25}, {-3, 0, + 2.25}, {-2.7, 0, 1.8}, {-2.7, -0.3, 1.8}, {-3, -0.3, 1.8}, + {-3, 0, 1.8}, {-2.7, 0, 1.575}, {-2.7, -0.3, 1.575}, {-3, + -0.3, 1.35}, {-3, 0, 1.35}, {-2.5, 0, 1.125}, {-2.5, -0.3, + 1.125}, {-2.65, -0.3, 0.9375}, {-2.65, 0, 0.9375}, {-2, + -0.3, 0.9}, {-1.9, -0.3, 0.6}, {-1.9, 0, 0.6}, {1.7, 0, + 1.425}, {1.7, -0.66, 1.425}, {1.7, -0.66, 0.6}, {1.7, 0, + 0.6}, {2.6, 0, 1.425}, {2.6, -0.66, 1.425}, {3.1, -0.66, + 0.825}, {3.1, 0, 0.825}, {2.3, 0, 2.1}, {2.3, -0.25, 2.1}, + {2.4, -0.25, 2.025}, {2.4, 0, 2.025}, {2.7, 0, 2.4}, {2.7, + -0.25, 2.4}, {3.3, -0.25, 2.4}, {3.3, 0, 2.4}, {2.8, 0, + 2.475}, {2.8, -0.25, 2.475}, {3.525, -0.25, 2.49375}, + {3.525, 0, 2.49375}, {2.9, 0, 2.475}, {2.9, -0.15, 2.475}, + {3.45, -0.15, 2.5125}, {3.45, 0, 2.5125}, {2.8, 0, 2.4}, + {2.8, -0.15, 2.4}, {3.2, -0.15, 2.4}, {3.2, 0, 2.4}, {0, 0, + 3.15}, {0.8, 0, 3.15}, {0.8, -0.45, 3.15}, {0.45, -0.8, + 3.15}, {0, -0.8, 3.15}, {0, 0, 2.85}, {1.4, 0, 2.4}, {1.4, + -0.784, 2.4}, {0.784, -1.4, 2.4}, {0, -1.4, 2.4}, {0.4, 0, + 2.55}, {0.4, -0.224, 2.55}, {0.224, -0.4, 2.55}, {0, -0.4, + 2.55}, {1.3, 0, 2.55}, {1.3, -0.728, 2.55}, {0.728, -1.3, + 2.55}, {0, -1.3, 2.55}, {1.3, 0, 2.4}, {1.3, -0.728, 2.4}, + {0.728, -1.3, 2.4}, {0, -1.3, 2.4}, {0, 0, 0}, {1.425, + -0.798, 0}, {1.5, 0, 0.075}, {1.425, 0, 0}, {0.798, -1.425, + 0}, {0, -1.5, 0.075}, {0, -1.425, 0}, {1.5, -0.84, 0.075}, + {0.84, -1.5, 0.075} +}; + +static float tex[2][2][2] = +{ + { {0, 0}, + {1, 0}}, + { {0, 1}, + {1, 1}} +}; + +/* *INDENT-ON* */ + +static void +teapot(GLint grid, GLenum type) +{ + float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3]; + long i, j, k, l; + + glPushAttrib(GL_ENABLE_BIT | GL_EVAL_BIT); + glEnable(GL_AUTO_NORMAL); + glEnable(GL_NORMALIZE); + glEnable(GL_MAP2_VERTEX_3); + glEnable(GL_MAP2_TEXTURE_COORD_2); + for (i = 0; i < 10; i++) { + for (j = 0; j < 4; j++) { + for (k = 0; k < 4; k++) { + for (l = 0; l < 3; l++) { + p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; + q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l]; + if (l == 1) + q[j][k][l] *= -1.0; + if (i < 6) { + r[j][k][l] = + cpdata[patchdata[i][j * 4 + (3 - k)]][l]; + if (l == 0) + r[j][k][l] *= -1.0; + s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; + if (l == 0) + s[j][k][l] *= -1.0; + if (l == 1) + s[j][k][l] *= -1.0; + } + } + } + } + glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2, + &tex[0][0][0]); + glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, + &p[0][0][0]); + glMapGrid2f(grid, 0.0, 1.0, grid, 0.0, 1.0); + glEvalMesh2(type, 0, grid, 0, grid); + glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, + &q[0][0][0]); + glEvalMesh2(type, 0, grid, 0, grid); + if (i < 6) { + glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, + &r[0][0][0]); + glEvalMesh2(type, 0, grid, 0, grid); + glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, + &s[0][0][0]); + glEvalMesh2(type, 0, grid, 0, grid); + } + } + glPopAttrib(); +} + + +// Now the OSG wrapper for the above OpenGL code, the most complicated bit is computing +// the bounding box for the above example, normally you'll find this the easy bit. +class Teapot : public osg::Drawable +{ + public: + Teapot() {} + + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + Teapot(const Teapot& teapot,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): + osg::Drawable(teapot,copyop) {} + + META_Object(myTeapotApp,Teapot) + + + // the draw immediate mode method is where the OSG wraps up the drawing of + // of OpenGL primitives. + virtual void drawImplementation(osg::State&) const + { + // teapot(..) doens't use vertex arrays at all so we don't need to toggle their state + // if we did we'd need to something like following call + // state.disableAllVertexArrays(), see src/osg/Geometry.cpp for the low down. + + // just call the OpenGL code. + teapot(14,GL_FILL); + } + + + protected: + + virtual ~Teapot() {} + + // we need to set up the bounding box of the data too, so that the scene graph knows where this + // objects is, for both positioning the camera at start up, and most importantly for culling. + virtual bool computeBound() const + { + _bbox.init(); + + // follow is some truely horrible code required to calculate the + // bounding box of the teapot. Have used the original code above to do + // help compute it. + float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3]; + long i, j, k, l; + + for (i = 0; i < 10; i++) { + for (j = 0; j < 4; j++) { + for (k = 0; k < 4; k++) { + + for (l = 0; l < 3; l++) { + p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; + q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l]; + if (l == 1) + q[j][k][l] *= -1.0; + + if (i < 6) { + r[j][k][l] = + cpdata[patchdata[i][j * 4 + (3 - k)]][l]; + if (l == 0) + r[j][k][l] *= -1.0; + s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; + if (l == 0) + s[j][k][l] *= -1.0; + if (l == 1) + s[j][k][l] *= -1.0; + } + } + + _bbox.expandBy(osg::Vec3(p[j][k][0],p[j][k][1],p[j][k][2])); + _bbox.expandBy(osg::Vec3(q[j][k][0],q[j][k][1],q[j][k][2])); + + if (i < 6) + { + _bbox.expandBy(osg::Vec3(r[j][k][0],r[j][k][1],r[j][k][2])); + _bbox.expandBy(osg::Vec3(s[j][k][0],s[j][k][1],s[j][k][2])); + } + + + } + } + } + + _bbox_computed = true; + return true; + } +}; + + +osg::Geode* createTeapot() +{ + osg::Geode* geode = new osg::Geode(); + + // add the teapot to the geode. + geode->addDrawable( new Teapot ); + + // add a reflection map to the teapot. + osg::Image* image = osgDB::readImageFile("Images/reflect.rgb"); + if (image) + { + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + osg::TexGen* texgen = new osg::TexGen; + texgen->setMode(osg::TexGen::SPHERE_MAP); + + osg::StateSet* stateset = new osg::StateSet; + stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); + stateset->setTextureAttributeAndModes(0,texgen,osg::StateAttribute::ON); + + geode->setStateSet(stateset); + } + + return geode; +} + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // add model to viewer. + viewer.setSceneData( createTeapot() ); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgtext/GNUmakefile b/examples/osgtext/GNUmakefile index b43ff33f3..a67ece645 100644 --- a/examples/osgtext/GNUmakefile +++ b/examples/osgtext/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgtext.cpp\ -LIBS += -losgProducer -lProducer -losgText $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgProducer -lProducer -losgText -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgtext/GNUmakefile.inst b/examples/osgtext/GNUmakefile.inst index d9d42d341..a25c4a203 100644 --- a/examples/osgtext/GNUmakefile.inst +++ b/examples/osgtext/GNUmakefile.inst @@ -4,12 +4,11 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgtext.cpp\ -LIBS += -losgProducer -lProducer -losgText $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgProducer -lProducer -losgText -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgtext INC += $(PRODUCER_INCLUDE_DIR) LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgtexture1D/GNUmakefile b/examples/osgtexture1D/GNUmakefile new file mode 100644 index 000000000..865641507 --- /dev/null +++ b/examples/osgtexture1D/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgtexture1D.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgtexture1D + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgtexture1D/GNUmakefile.inst b/examples/osgtexture1D/GNUmakefile.inst new file mode 100644 index 000000000..732d5998c --- /dev/null +++ b/examples/osgtexture1D/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgtexture1D.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgtexture1D + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgtexture1D/osgtexture1D.cpp b/examples/osgtexture1D/osgtexture1D.cpp new file mode 100644 index 000000000..8b0a2a5b4 --- /dev/null +++ b/examples/osgtexture1D/osgtexture1D.cpp @@ -0,0 +1,227 @@ +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + + +// Creates a stateset which contains a 1D texture which is populated by contour banded color +// this is then used in conjunction with TexGen to create contoured models, either in +// object linear coords - like contours on a map, or eye linear which contour the distance from +// the eye. An app callback toggles between the two tex gen modes. +osg::StateSet* create1DTextureStateToDecorate(osg::Node* loadedModel) +{ + + const osg::BoundingSphere& bs = loadedModel->getBound(); + + osg::Image* image = new osg::Image; + + int noPixels = 1024; + + // allocate the image data, noPixels x 1 x 1 with 4 rgba floats - equivilant to a Vec4! + image->allocateImage(noPixels,1,1,GL_RGBA,GL_FLOAT); + image->setInternalTextureFormat(GL_RGBA); + + typedef std::vector ColorBands; + ColorBands colorbands; + colorbands.push_back(osg::Vec4(0.0f,0.0,0.0,1.0f)); + colorbands.push_back(osg::Vec4(1.0f,0.0,0.0,1.0f)); + colorbands.push_back(osg::Vec4(1.0f,1.0,0.0,1.0f)); + colorbands.push_back(osg::Vec4(0.0f,1.0,0.0,1.0f)); + colorbands.push_back(osg::Vec4(0.0f,1.0,1.0,1.0f)); + colorbands.push_back(osg::Vec4(0.0f,0.0,1.0,1.0f)); + colorbands.push_back(osg::Vec4(1.0f,0.0,1.0,1.0f)); + colorbands.push_back(osg::Vec4(1.0f,1.0,1.0,1.0f)); + + float nobands = colorbands.size(); + float delta = nobands/(float)noPixels; + float pos = 0.0f; + + // fill in the image data. + osg::Vec4* dataPtr = (osg::Vec4*)image->data(); + for(int i=0;isetWrap(osg::Texture1D::WRAP_S,osg::Texture1D::MIRROR); + texture->setFilter(osg::Texture1D::MIN_FILTER,osg::Texture1D::LINEAR); + texture->setImage(image); + + float zBase = bs.center().z()-bs.radius(); + float zScale = 2.0f/bs.radius(); + + osg::TexGen* texgen = new osg::TexGen; + texgen->setMode(osg::TexGen::OBJECT_LINEAR); + texgen->setPlane(osg::TexGen::S,osg::Vec4(0.0f,0.0f,zScale,-zBase)); + + osg::Material* material = new osg::Material; + + osg::StateSet* stateset = new osg::StateSet; + + stateset->setTextureAttribute(0,texture,osg::StateAttribute::OVERRIDE); + stateset->setTextureMode(0,GL_TEXTURE_1D,osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE); + stateset->setTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OFF|osg::StateAttribute::OVERRIDE); + stateset->setTextureMode(0,GL_TEXTURE_3D,osg::StateAttribute::OFF|osg::StateAttribute::OVERRIDE); + + stateset->setTextureAttribute(0,texgen,osg::StateAttribute::OVERRIDE); + stateset->setTextureMode(0,GL_TEXTURE_GEN_S,osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE); + + stateset->setAttribute(material,osg::StateAttribute::OVERRIDE); + + return stateset; +} + + +// An app callback which alternates the tex gen mode between object linear and eye linear to illustrate what differences it makes. +class AnimateStateCallback : public osg::NodeCallback +{ + public: + AnimateStateCallback() {} + + void animateState(osg::StateSet* stateset,double time) + { + // here we simply get any existing texgen, and then increment its + // plane, pushing the R coordinate through the texture. + osg::StateAttribute* attribute = stateset->getTextureAttribute(0,osg::StateAttribute::TEXGEN); + osg::TexGen* texgen = dynamic_cast(attribute); + if (texgen) + { + const double timeInterval = 1.0f; + + static double previousTime = time; + static bool state = false; + while (time>previousTime+timeInterval) + { + previousTime+=timeInterval; + state = !state; + } + + if (state) + { + texgen->setMode(osg::TexGen::OBJECT_LINEAR); + } + else + { + texgen->setMode(osg::TexGen::EYE_LINEAR); + } + } + + } + + virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + { + + osg::StateSet* stateset = node->getStateSet(); + if (stateset && nv->getFrameStamp()) + { + // we have an exisitng stateset, so lets animate it. + animateState(stateset,nv->getFrameStamp()->getReferenceTime()); + } + + // note, callback is repsonsible for scenegraph traversal so + // should always include call the traverse(node,nv) to ensure + // that the rest of cullbacks and the scene graph are traversed. + traverse(node,nv); + } +}; + + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // load the images specified on command line + osg::Node* loadedModel = osgDB::readNodeFiles(arguments); + + + if (loadedModel) + { + + osg::StateSet* stateset = create1DTextureStateToDecorate(loadedModel); + if (!stateset) + { + std::cout<<"Error: failed to create 1D texture state."<setStateSet(stateset); + loadedModel->setUpdateCallback(new AnimateStateCallback()); + + // add model to viewer. + viewer.setSceneData( loadedModel ); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + } + else + { + osg::notify(osg::NOTICE)<getCommandLineUsage()< +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + + +// +// A simple demo demonstrating different texturing modes, +// including using of texture extensions. +// + + +// include std to get round dumb compilers which can't handle std::hex/dec. +using namespace std; + +typedef std::vector< osg::ref_ptr > ImageList; + + +class Texture2DCallback : public osg::NodeCallback +{ + public: + Texture2DCallback(osg::Texture2D* texture):_texture(texture) + { + _filterRange.push_back(osg::Texture2D::LINEAR); + _filterRange.push_back(osg::Texture2D::LINEAR_MIPMAP_LINEAR); + _filterRange.push_back(osg::Texture2D::LINEAR_MIPMAP_NEAREST); + _filterRange.push_back(osg::Texture2D::NEAREST); + _filterRange.push_back(osg::Texture2D::NEAREST_MIPMAP_LINEAR); + _filterRange.push_back(osg::Texture2D::NEAREST_MIPMAP_NEAREST); + _currPos = 0; + _prevTime = 0.0; + } + + virtual ~Texture2DCallback() {} + + virtual void operator()(osg::Node*, osg::NodeVisitor* nv) + { + if (nv->getFrameStamp()) + { + double currTime = nv->getFrameStamp()->getReferenceTime(); + if (currTime-_prevTime>1.0) + { + cout<<"Updating texturing filter to "<setFilter(osg::Texture2D::MAG_FILTER,_filterRange[_currPos]); + _currPos++; + if (_currPos>=_filterRange.size()) _currPos=0; + _prevTime = currTime; + } + } + } + + osg::ref_ptr _texture; + std::vector _filterRange; + unsigned int _currPos; + double _prevTime; +}; + + +/** + * Function to read several images files (typically one) as specified + * on the command line, and return them in an ImageList + */ +ImageList getImagesFromFiles(osg::ArgumentParser& arguments) +{ + + ImageList imageList; + + for(int i=1;isetVertexArray(coords); + + osg::Vec3Array* norms = new osg::Vec3Array(1); + (*norms)[0].set(0.0f,-1.0f,0.0f); + geom->setNormalArray(norms); + geom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + osg::Vec2Array* tcoords = new osg::Vec2Array(4); + (*tcoords)[0].set(0.0f,textureCoordMax); + (*tcoords)[1].set(0.0f,0.0f); + (*tcoords)[2].set(textureCoordMax,0.0f); + (*tcoords)[3].set(textureCoordMax,textureCoordMax); + geom->setTexCoordArray(0,tcoords); + + geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,4)); + + return geom; +} + +osg::Node* createTexturedItem(const osg::Vec3& offset,osg::Texture2D* texture,osg::Node* geometry) +{ + // create a tranform node to position each square in appropriate + // place and also to add individual texture set to it, so that + // that state is inherited down to its children. + osg::MatrixTransform* local_transform = new osg::MatrixTransform; + local_transform->postMult(osg::Matrix::translate(offset)); + + // create the StateSet to store the texture data + osg::StateSet* stateset = new osg::StateSet; + + stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); + + // turn the face culling off so you can see the texture from + // all angles. + stateset->setMode(GL_CULL_FACE,osg::StateAttribute::OFF); + + // attach the setset to tranform node. + local_transform->setStateSet(stateset); + + // add the geode to the transform. + local_transform->addChild(geometry); + + return local_transform; +} + +osg::Node* createLayer(const osg::Vec3& offset,osg::Image* image,osg::Node* geometry,osg::Node* geometryRep) +{ + if (image==NULL) return NULL; + + osg::MatrixTransform* top_transform = new osg::MatrixTransform; + top_transform->postMult(osg::Matrix::translate(offset)); + + osg::Vec3 local_offset(0.0f,0.0f,0.0f); + osg::Vec3 local_delta(3.0f,0.0f,0.0f); + +// // use DrawPixels drawable to draw a pixel image. +// { +// +// osg::DrawPixels* drawimage = new osg::DrawPixels; +// drawimage->setPosition(local_offset); +// drawimage->setImage(image); +// +// osg::Geode* geode = new osg::Geode; +// geode->addDrawable(drawimage); +// +// // add the transform node to root group node. +// top_transform->addChild(geode); +// +// local_offset += local_delta; +// } + + + // defaults mipmapped texturing. + { + // create the texture attribute + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + // add the transform node to root group node. + top_transform->addChild(createTexturedItem(local_offset,texture,geometry)); + + local_offset += local_delta; + + // top_transform->setUpdateCallback(new TextureCallback(texture)); + + } + + + // bilinear + { + // create the texture attribute + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + // set up bilinear filtering. + texture->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR_MIPMAP_NEAREST); + texture->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); + + // add the transform node to root group node. + top_transform->addChild(createTexturedItem(local_offset,texture,geometry)); + + local_offset += local_delta; + + } + + // trilinear + { + // create the texture attribute + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + // set up trilinear filtering. + texture->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR_MIPMAP_LINEAR); + texture->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); + + // add the transform node to root group node. + top_transform->addChild(createTexturedItem(local_offset,texture,geometry)); + + local_offset += local_delta; + + } + + + // anisotropic + { + // create the texture attribute + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + // set up anistropic filtering. + texture->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR_MIPMAP_LINEAR); + texture->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); + texture->setMaxAnisotropy(2.0f); + + // add the transform node to root group node. + top_transform->addChild(createTexturedItem(local_offset,texture,geometry)); + + local_offset += local_delta; + + } + + // arb compression + { + // create the texture attribute + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + texture->setInternalFormatMode(osg::Texture2D::USE_ARB_COMPRESSION); + + // add the transform node to root group node. + top_transform->addChild(createTexturedItem(local_offset,texture,geometry)); + + local_offset += local_delta; + + } + + // s3tc_dxt1 compression + { + // create the texture attribute + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + texture->setInternalFormatMode(osg::Texture2D::USE_S3TC_DXT1_COMPRESSION); + + // add the transform node to root group node. + top_transform->addChild(createTexturedItem(local_offset,texture,geometry)); + + local_offset += local_delta; + + } + + // default wrap mode. (osg::Texture2D::CLAMP) + { + // create the texture attribute + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + // add the transform node to root group node. + top_transform->addChild(createTexturedItem(local_offset,texture,geometryRep)); + + local_offset += local_delta; + + } + + // clamp-to-edge mode. + { + // create the texture attribute + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + texture->setWrap(osg::Texture2D::WRAP_S,osg::Texture2D::CLAMP_TO_EDGE); + texture->setWrap(osg::Texture2D::WRAP_T,osg::Texture2D::CLAMP_TO_EDGE); + + // add the transform node to root group node. + top_transform->addChild(createTexturedItem(local_offset,texture,geometryRep)); + + local_offset += local_delta; + + } + + // repeat wrap mode. + { + // create the texture attribute + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + texture->setWrap(osg::Texture2D::WRAP_S,osg::Texture2D::REPEAT); + texture->setWrap(osg::Texture2D::WRAP_T,osg::Texture2D::REPEAT); + + // add the transform node to root group node. + top_transform->addChild(createTexturedItem(local_offset,texture,geometryRep)); + + local_offset += local_delta; + + } + + // mirror wrap mode. + { + // create the texture attribute + osg::Texture2D* texture = new osg::Texture2D; + texture->setImage(image); + + texture->setWrap(osg::Texture2D::WRAP_S,osg::Texture2D::MIRROR); + texture->setWrap(osg::Texture2D::WRAP_T,osg::Texture2D::MIRROR); + + // add the transform node to root group node. + top_transform->addChild(createTexturedItem(local_offset,texture,geometryRep)); + + local_offset += local_delta; + + } + + return top_transform; +} + +osg::Node* createModelFromImages(ImageList& imageList) +{ + + if (imageList.empty()) return NULL; + + // create the root node which will hold the model. + osg::Group* root = new osg::Group(); + + // create a single drawable to be shared by each texture instance. + osg::Drawable* drawable_noTexCoodRep = createSquare(1.0f); + + // add the drawable into a single goede to be shared... + osg::Geode* geode_noTexCoodRep = new osg::Geode(); + geode_noTexCoodRep->addDrawable(drawable_noTexCoodRep); + + + // create a single drawable to be shared by each texture instance. + osg::Drawable* drawable_texCoodRep = createSquare(2.0f); + + // add the drawable into a single goede to be shared... + osg::Geode* geode_texCoodRep = new osg::Geode(); + geode_texCoodRep->addDrawable(drawable_texCoodRep); + + osg::Vec3 offset(0.0f,0.0f,0.0f); + osg::Vec3 delta(0.0f,0.0f,3.0f); + + // step through the image list processing each image in turn. + for(ImageList::iterator itr=imageList.begin(); + itr!=imageList.end(); + ++itr) + { + + // add the transform node to root group node. + root->addChild(createLayer(offset,itr->get(),geode_noTexCoodRep,geode_texCoodRep)); + + offset += delta; + + } + + return root; +} + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // load the images specified on command line + ImageList imageList = getImagesFromFiles(arguments); + + + if (!imageList.empty()) + { + + // create a model from the images. + osg::Node* rootNode = createModelFromImages(imageList); + + imageList.clear(); + + // add model to viewer. + viewer.setSceneData( rootNode ); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + } + else + { + return 0; + } + + + + return 0; +} diff --git a/examples/osgtexture3D/GNUmakefile b/examples/osgtexture3D/GNUmakefile new file mode 100644 index 000000000..7d85d59df --- /dev/null +++ b/examples/osgtexture3D/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgtexture3D.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgtexture3D + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgtexture3D/GNUmakefile.inst b/examples/osgtexture3D/GNUmakefile.inst new file mode 100644 index 000000000..ce6ff11ab --- /dev/null +++ b/examples/osgtexture3D/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgtexture3D.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgtexture3D + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgtexture3D/osgtexture3D.cpp b/examples/osgtexture3D/osgtexture3D.cpp new file mode 100644 index 000000000..64966439c --- /dev/null +++ b/examples/osgtexture3D/osgtexture3D.cpp @@ -0,0 +1,265 @@ +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + + +// +// A simple demo demonstrating different texturing modes, +// including using of texture extensions. +// + + +typedef std::vector< osg::ref_ptr > ImageList; + + +class ConstructStateCallback : public osg::NodeCallback +{ + public: + ConstructStateCallback() {} + + osg::StateSet* constructState() + { + + // read 4 2d images + osg::ref_ptr image_0 = osgDB::readImageFile("Images/lz.rgb"); + osg::ref_ptr image_1 = osgDB::readImageFile("Images/reflect.rgb"); + osg::ref_ptr image_2 = osgDB::readImageFile("Images/tank.rgb"); + osg::ref_ptr image_3 = osgDB::readImageFile("Images/skymap.jpg"); + + if (!image_0 || !image_1 || !image_2 || !image_3) + { + std::cout << "Warning: could not open files."<getPixelFormat()!=image_1->getPixelFormat() || image_0->getPixelFormat()!=image_2->getPixelFormat() || image_0->getPixelFormat()!=image_3->getPixelFormat()) + { + std::cout << "Warning: image pixel formats not compatible."<maxTexture3DSize(); + if (textureSize > 256) + textureSize = 256; + + // scale them all to the same size. + image_0->scaleImage(textureSize,textureSize,1); + image_1->scaleImage(textureSize,textureSize,1); + image_2->scaleImage(textureSize,textureSize,1); + image_3->scaleImage(textureSize,textureSize,1); + + + // then allocated a 3d image to use for texturing. + osg::Image* image_3d = new osg::Image; + image_3d->allocateImage(textureSize,textureSize,4, + image_0->getPixelFormat(),image_0->getDataType()); + + // copy the 2d images into the 3d image. + image_3d->copySubImage(0,0,0,image_0.get()); + image_3d->copySubImage(0,0,1,image_1.get()); + image_3d->copySubImage(0,0,2,image_2.get()); + image_3d->copySubImage(0,0,3,image_3.get()); + + image_3d->setInternalTextureFormat(image_0->getInternalTextureFormat()); + + // set up the 3d texture itself, + // note, well set the filtering up so that mip mapping is disabled, + // gluBuild3DMipsmaps doesn't do a very good job of handled the + // inbalanced dimensions of the 256x256x4 texture. + osg::Texture3D* texture3D = new osg::Texture3D; + texture3D->setFilter(osg::Texture3D::MIN_FILTER,osg::Texture3D::LINEAR); + texture3D->setFilter(osg::Texture3D::MAG_FILTER,osg::Texture3D::LINEAR); + texture3D->setImage(image_3d); + + + // create a texgen to generate a R texture coordinate, the geometry + // itself will supply the S & T texture coordinates. + // in the animateStateSet callback well alter this R value to + // move the texture through the 3d texture, 3d texture filtering + // will do the blending for us. + osg::TexGen* texgen = new osg::TexGen; + texgen->setMode(osg::TexGen::OBJECT_LINEAR); + texgen->setPlane(osg::TexGen::R, osg::Vec4(0.0f,0.0f,0.0f,0.2f)); + + // create the StateSet to store the texture data + osg::StateSet* stateset = new osg::StateSet; + stateset->setTextureMode(0,GL_TEXTURE_GEN_R,osg::StateAttribute::ON); + stateset->setTextureAttribute(0,texgen); + stateset->setTextureAttributeAndModes(0,texture3D,osg::StateAttribute::ON); + + return stateset; + } + + void animateState(osg::StateSet* stateset) + { + // here we simply get any existing texgen, and then increment its + // plane, pushing the R coordinate through the texture. + osg::StateAttribute* attribute = stateset->getTextureAttribute(0,osg::StateAttribute::TEXGEN); + osg::TexGen* texgen = dynamic_cast(attribute); + if (texgen) + { + texgen->getPlane(osg::TexGen::R)[3] += 0.001f; + } + + } + + virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + { + + osg::StateSet* stateset = node->getStateSet(); + if (stateset) + { + // we have an exisitng stateset, so lets animate it. + animateState(stateset); + } + else + { + // no state exist yet, so we must be in the first + // pass, so lets create our stateset with all the + // textures in it. + stateset = constructState(); + if (stateset) node->setStateSet(stateset); + } + + // note, callback is repsonsible for scenegraph traversal so + // should always include call the traverse(node,nv) to ensure + // that the rest of cullbacks and the scene graph are traversed. + traverse(node,nv); + } +}; + +/** create 2,2 square with center at 0,0,0 and aligned along the XZ plan */ +osg::Drawable* createSquare(float textureCoordMax=1.0f) +{ + // set up the Geometry. + osg::Geometry* geom = new osg::Geometry; + + osg::Vec3Array* coords = new osg::Vec3Array(4); + (*coords)[0].set(-1.0f,0.0f,1.0f); + (*coords)[1].set(-1.0f,0.0f,-1.0f); + (*coords)[2].set(1.0f,0.0f,-1.0f); + (*coords)[3].set(1.0f,0.0f,1.0f); + geom->setVertexArray(coords); + + osg::Vec3Array* norms = new osg::Vec3Array(1); + (*norms)[0].set(0.0f,-1.0f,0.0f); + geom->setNormalArray(norms); + geom->setNormalBinding(osg::Geometry::BIND_OVERALL); + + osg::Vec2Array* tcoords = new osg::Vec2Array(4); + (*tcoords)[0].set(0.0f,textureCoordMax); + (*tcoords)[1].set(0.0f,0.0f); + (*tcoords)[2].set(textureCoordMax,0.0f); + (*tcoords)[3].set(textureCoordMax,textureCoordMax); + geom->setTexCoordArray(0,tcoords); + + geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,4)); + + return geom; +} + +osg::Node* createModel() +{ + + // create the geometry of the model, just a simple 2d quad right now. + osg::Geode* geode = new osg::Geode; + geode->addDrawable(createSquare()); + + // normally we'd create the stateset's to contain all the textures + // etc here, but, the above technique uses osg::Image::scaleImage and + // osg::Image::copySubImage() which are implemented with OpenGL utility + // library, which unfortunately can't be used until we have a valid + // OpenGL context, and at this point in initilialization we don't have + // a valid OpenGL context, so we have to delay creation of state until + // there is a valid OpenGL context. I'll manage this by using an + // app callback which will create the state during the first traversal. + // A bit hacky, and my plan is to reimplement the osg::scaleImage and + // osg::Image::copySubImage() without using GLU which will get round + // this current limitation. + geode->setUpdateCallback(new ConstructStateCallback()); + + return geode; + +} + + +int main( int argc, char **argv ) +{ + + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + // create a model from the images. + osg::Node* rootNode = createModel(); + + if (rootNode) + { + + // set the scene to render + viewer.setSceneData(rootNode); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + } + + return 0; +} diff --git a/examples/osgunittests/GNUmakefile b/examples/osgunittests/GNUmakefile new file mode 100644 index 000000000..7ec40ee1f --- /dev/null +++ b/examples/osgunittests/GNUmakefile @@ -0,0 +1,19 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgunittests.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgunittests + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules + diff --git a/examples/osgunittests/GNUmakefile.inst b/examples/osgunittests/GNUmakefile.inst new file mode 100644 index 000000000..506a44333 --- /dev/null +++ b/examples/osgunittests/GNUmakefile.inst @@ -0,0 +1,15 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgunittests.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgunittests + + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgunittests/osgunittests.cpp b/examples/osgunittests/osgunittests.cpp new file mode 100644 index 000000000..299a674d0 --- /dev/null +++ b/examples/osgunittests/osgunittests.cpp @@ -0,0 +1,56 @@ +#include +#include +#include + +int main( int argc, char** argv ) +{ + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options]"); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + arguments.getApplicationUsage()->addCommandLineOption("qt","Display qualified tests."); + + + bool printQualifiedTest = false; + while (arguments.read("qt")) printQualifiedTest = true; + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + std::cout<getCommandLineUsage()<write(std::cout,arguments.getApplicationUsage()->getCommandLineOptions()); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + + if (printQualifiedTest) + { + std::cout<<"***** Qualified Tests ******"<accept( printer ); + std::cout<accept( runner ); + + return 0; +} diff --git a/examples/osgversion/GNUmakefile b/examples/osgversion/GNUmakefile new file mode 100755 index 000000000..d0345b7ea --- /dev/null +++ b/examples/osgversion/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgversion.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgversion + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgversion/GNUmakefile.inst b/examples/osgversion/GNUmakefile.inst new file mode 100644 index 000000000..29f5d6046 --- /dev/null +++ b/examples/osgversion/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgversion.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgversion + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgversion/osgversion.cpp b/examples/osgversion/osgversion.cpp new file mode 100644 index 000000000..43b7d4477 --- /dev/null +++ b/examples/osgversion/osgversion.cpp @@ -0,0 +1,9 @@ +#include +#include + + +int main( int, char **) +{ + printf( "%s\n", osgGetVersion() ); + return 0; +} diff --git a/examples/osgvertexprogram/GNUmakefile b/examples/osgvertexprogram/GNUmakefile new file mode 100644 index 000000000..3e5a77399 --- /dev/null +++ b/examples/osgvertexprogram/GNUmakefile @@ -0,0 +1,18 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgvertexprogram.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +INSTFILES = \ + $(CXXFILES)\ + GNUmakefile.inst=GNUmakefile + +EXEC = osgvertexprogram + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgvertexprogram/GNUmakefile.inst b/examples/osgvertexprogram/GNUmakefile.inst new file mode 100644 index 000000000..df0dd67bc --- /dev/null +++ b/examples/osgvertexprogram/GNUmakefile.inst @@ -0,0 +1,14 @@ +TOPDIR = ../.. +include $(TOPDIR)/Make/makedefs + +CXXFILES =\ + osgvertexprogram.cpp\ + +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) + +EXEC = osgvertexprogram + +INC += $(PRODUCER_INCLUDE_DIR) +LDFLAGS += $(PRODUCER_LIB_DIR) + +include $(TOPDIR)/Make/makerules diff --git a/examples/osgvertexprogram/osgvertexprogram.cpp b/examples/osgvertexprogram/osgvertexprogram.cpp new file mode 100644 index 000000000..28c4cd350 --- /dev/null +++ b/examples/osgvertexprogram/osgvertexprogram.cpp @@ -0,0 +1,424 @@ +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include + +float refract = 1.01; // ratio of indicies of refraction +float fresnel = 1.1; // Fresnel multiplier + + +const char vpstr[] = + "!!ARBvp1.0 # Refraction \n" + " \n" + "ATTRIB iPos = vertex.position; \n" + "#ATTRIB iCol = vertex.color.primary; \n" + "ATTRIB iNormal = vertex.normal; \n" + "PARAM esEyePos = { 0, 0, 0, 1 }; \n" + "PARAM const0123 = { 0, 1, 2, 3 }; \n" + "PARAM fresnel = program.local[0]; \n" + "PARAM refract = program.local[1]; \n" + "PARAM itMV[4] = { state.matrix.modelview.invtrans }; \n" + "PARAM MVP[4] = { state.matrix.mvp }; \n" + "PARAM MV[4] = { state.matrix.modelview }; \n" + "PARAM texmat[4] = { state.matrix.texture[0] }; \n" + "TEMP esPos; # position in eye-space \n" + "TEMP esNormal; # normal in eye-space \n" + "TEMP tmp, IdotN, K; \n" + "TEMP esE; # eye vector \n" + "TEMP esI; # incident vector (=-E) \n" + "TEMP esR; # first refract- then reflect-vector \n" + "OUTPUT oPos = result.position; \n" + "OUTPUT oColor = result.color; \n" + "OUTPUT oRefractMap = result.texcoord[0]; \n" + "OUTPUT oReflectMap = result.texcoord[1]; \n" + " \n" + "# transform vertex to clip space \n" + "DP4 oPos.x, MVP[0], iPos; \n" + "DP4 oPos.y, MVP[1], iPos; \n" + "DP4 oPos.z, MVP[2], iPos; \n" + "DP4 oPos.w, MVP[3], iPos; \n" + " \n" + "# Transform the normal to eye space. \n" + "DP3 esNormal.x, itMV[0], iNormal; \n" + "DP3 esNormal.y, itMV[1], iNormal; \n" + "DP3 esNormal.z, itMV[2], iNormal; \n" + " \n" + "# normalize normal \n" + "DP3 esNormal.w, esNormal, esNormal; \n" + "RSQ esNormal.w, esNormal.w; \n" + "MUL esNormal, esNormal, esNormal.w; \n" + " \n" + "# transform vertex position to eye space \n" + "DP4 esPos.x, MV[0], iPos; \n" + "DP4 esPos.y, MV[1], iPos; \n" + "DP4 esPos.z, MV[2], iPos; \n" + "DP4 esPos.w, MV[3], iPos; \n" + " \n" + "# vertex to eye vector \n" + "ADD esE, -esPos, esEyePos; \n" + "#MOV esE, -esPos; \n" + " \n" + "# normalize eye vector \n" + "DP3 esE.w, esE, esE; \n" + "RSQ esE.w, esE.w; \n" + "MUL esE, esE, esE.w; \n" + " \n" + "# calculate some handy values \n" + "MOV esI, -esE; \n" + "DP3 IdotN, esNormal, esI; \n" + " \n" + "# calculate refraction vector, Renderman style \n" + " \n" + "# k = 1-index*index*(1-(I dot N)^2) \n" + "MAD tmp, -IdotN, IdotN, const0123.y; \n" + "MUL tmp, tmp, refract.y; \n" + "ADD K.x, const0123.y, -tmp; \n" + " \n" + "# k<0, R = [0,0,0] \n" + "# k>=0, R = index*I-(index*(I dot N) + sqrt(k))*N \n" + "RSQ K.y, K.x; \n" + "RCP K.y, K.y; # K.y = sqrt(k) \n" + "MAD tmp.x, refract.x, IdotN, K.y; \n" + "MUL tmp, esNormal, tmp.x; \n" + "MAD esR, refract.x, esI, tmp; \n" + " \n" + "# transform refracted ray by cubemap transform \n" + "DP3 oRefractMap.x, texmat[0], esR; \n" + "DP3 oRefractMap.y, texmat[1], esR; \n" + "DP3 oRefractMap.z, texmat[2], esR; \n" + " \n" + "# calculate reflection vector \n" + "# R = 2*N*(N dot E)-E \n" + "MUL tmp, esNormal, const0123.z; \n" + "DP3 esR.w, esNormal, esE; \n" + "MAD esR, esR.w, tmp, -esE; \n" + " \n" + "# transform reflected ray by cubemap transform \n" + "DP3 oReflectMap.x, texmat[0], esR; \n" + "DP3 oReflectMap.y, texmat[1], esR; \n" + "DP3 oReflectMap.z, texmat[2], esR; \n" + " \n" + "# Fresnel approximation = fresnel*(1-(N dot I))^2 \n" + "ADD tmp.x, const0123.y, -IdotN; \n" + "MUL tmp.x, tmp.x, tmp.x; \n" + "MUL oColor, tmp.x, fresnel; \n" + " \n" + "END \n"; + + +osg::TextureCubeMap* readCubeMap() +{ + osg::TextureCubeMap* cubemap = new osg::TextureCubeMap; + //#define CUBEMAP_FILENAME(face) "nvlobby_" #face ".png" + //#define CUBEMAP_FILENAME(face) "Cubemap_axis/" #face ".png" + #define CUBEMAP_FILENAME(face) "Cubemap_snow/" #face ".jpg" + + osg::Image* imagePosX = osgDB::readImageFile(CUBEMAP_FILENAME(posx)); + osg::Image* imageNegX = osgDB::readImageFile(CUBEMAP_FILENAME(negx)); + osg::Image* imagePosY = osgDB::readImageFile(CUBEMAP_FILENAME(posy)); + osg::Image* imageNegY = osgDB::readImageFile(CUBEMAP_FILENAME(negy)); + osg::Image* imagePosZ = osgDB::readImageFile(CUBEMAP_FILENAME(posz)); + osg::Image* imageNegZ = osgDB::readImageFile(CUBEMAP_FILENAME(negz)); + + if (imagePosX && imageNegX && imagePosY && imageNegY && imagePosZ && imageNegZ) + { + cubemap->setImage(osg::TextureCubeMap::POSITIVE_X, imagePosX); + cubemap->setImage(osg::TextureCubeMap::NEGATIVE_X, imageNegX); + cubemap->setImage(osg::TextureCubeMap::POSITIVE_Y, imagePosY); + cubemap->setImage(osg::TextureCubeMap::NEGATIVE_Y, imageNegY); + cubemap->setImage(osg::TextureCubeMap::POSITIVE_Z, imagePosZ); + cubemap->setImage(osg::TextureCubeMap::NEGATIVE_Z, imageNegZ); + + cubemap->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE); + cubemap->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE); + cubemap->setWrap(osg::Texture::WRAP_R, osg::Texture::CLAMP_TO_EDGE); + + cubemap->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR_MIPMAP_LINEAR); + cubemap->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR); + } + + return cubemap; +} + + +// Update texture matrix for cubemaps +struct TexMatCallback : public osg::NodeCallback +{ +public: + + TexMatCallback(osg::TexMat& tm) : + _texMat(tm) + { + } + + virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + { + osgUtil::CullVisitor* cv = dynamic_cast(nv); + if (cv) + { + const osg::Matrix& MV = cv->getModelViewMatrix(); + const osg::Matrix R = osg::Matrix::rotate( osg::DegreesToRadians(112.0f), 0.0f,0.0f,1.0f)* + osg::Matrix::rotate( osg::DegreesToRadians(90.0f), 1.0f,0.0f,0.0f); + + osg::Quat q; + q.set(MV); + const osg::Matrix C = osg::Matrix::rotate( q.inverse() ); + + _texMat.setMatrix( C*R ); + } + + traverse(node,nv); + } + + osg::TexMat& _texMat; +}; + + +struct MoveEarthySkyWithEyePointCallback : public osg::Transform::ComputeTransformCallback +{ + /** Get the transformation matrix which moves from local coords to world coords.*/ + virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,const osg::Transform*, osg::NodeVisitor* nv) const + { + osgUtil::CullVisitor* cv = dynamic_cast(nv); + if (cv) + { + osg::Vec3 eyePointLocal = cv->getEyeLocal(); + matrix.preMult(osg::Matrix::translate(eyePointLocal)); + } + return true; + } + + /** Get the transformation matrix which moves from world coords to local coords.*/ + virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,const osg::Transform*, osg::NodeVisitor* nv) const + { + osgUtil::CullVisitor* cv = dynamic_cast(nv); + if (cv) + { + osg::Vec3 eyePointLocal = cv->getEyeLocal(); + matrix.postMult(osg::Matrix::translate(-eyePointLocal)); + } + return true; + } +}; + + +osg::Node* createSkyBox() +{ + + osg::StateSet* stateset = new osg::StateSet(); + + osg::TexEnv* te = new osg::TexEnv; + te->setMode(osg::TexEnv::REPLACE); + stateset->setTextureAttributeAndModes(0, te, osg::StateAttribute::ON); + + osg::TexGen *tg = new osg::TexGen; + tg->setMode(osg::TexGen::NORMAL_MAP); + stateset->setTextureAttributeAndModes(0, tg, osg::StateAttribute::ON); + + osg::TexMat *tm = new osg::TexMat; + stateset->setTextureAttribute(0, tm); + + osg::TextureCubeMap* skymap = readCubeMap(); + stateset->setTextureAttributeAndModes(0, skymap, osg::StateAttribute::ON); + + stateset->setMode( GL_LIGHTING, osg::StateAttribute::OFF ); + stateset->setMode( GL_CULL_FACE, osg::StateAttribute::OFF ); + + // clear the depth to the far plane. + osg::Depth* depth = new osg::Depth; + depth->setFunction(osg::Depth::ALWAYS); + depth->setRange(1.0,1.0); + stateset->setAttributeAndModes(depth, osg::StateAttribute::ON ); + + stateset->setRenderBinDetails(-1,"RenderBin"); + + osg::Drawable* drawable = new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f,0.0f,0.0f),1)); + + osg::Geode* geode = new osg::Geode; + geode->setCullingActive(false); + geode->setStateSet( stateset ); + geode->addDrawable(drawable); + + + osg::Transform* transform = new osg::Transform; + transform->setCullingActive(false); + transform->setComputeTransformCallback(new MoveEarthySkyWithEyePointCallback); + transform->addChild(geode); + + osg::ClearNode* clearNode = new osg::ClearNode; +// clearNode->setRequiresClear(false); + clearNode->setCullCallback(new TexMatCallback(*tm)); + clearNode->addChild(transform); + + return clearNode; +} + + + + +osg::Node* addRefractStateSet(osg::Node* node) +{ + osg::StateSet* stateset = new osg::StateSet(); + + osg::TextureCubeMap* reflectmap = readCubeMap(); + stateset->setTextureAttributeAndModes( 0, reflectmap, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE ); + stateset->setTextureAttributeAndModes( 1, reflectmap, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE ); + + osg::TexMat* texMat = new osg::TexMat; + stateset->setTextureAttribute(0, texMat); + + // --------------------------------------------------- + // Vertex Program + // --------------------------------------------------- + osg::VertexProgram* vp = new osg::VertexProgram(); + vp->setVertexProgram( vpstr ); + vp->setProgramLocalParameter( 0, osg::Vec4( fresnel, fresnel, fresnel, 1.0f ) ); + vp->setProgramLocalParameter( 1, osg::Vec4( refract, refract*refract, 0.0f, 0.0f ) ); + stateset->setAttributeAndModes( vp, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE ); + + // --------------------------------------------------- + // fragment = refraction*(1-fresnel) + reflection*fresnel + // T0 = texture unit 0, refraction map + // T1 = texture unit 1, reflection map + // C.rgb = primary color, water color + // C.a = primary color, fresnel factor + // Cp = result from previous texture environment + // --------------------------------------------------- + + // REPLACE function: Arg0 + // = T0 + osg::TexEnvCombine *te0 = new osg::TexEnvCombine; + te0->setCombine_RGB(osg::TexEnvCombine::REPLACE); + te0->setSource0_RGB(osg::TexEnvCombine::TEXTURE0); + te0->setOperand0_RGB(osg::TexEnvCombine::SRC_COLOR); + + // INTERPOLATE function: Arg0 * (Arg2) + Arg1 * (1-Arg2) + // = T1 * C0.a + Cp * (1-C0.a) + osg::TexEnvCombine *te1 = new osg::TexEnvCombine; + + // rgb = Cp + Ct + te1->setCombine_RGB(osg::TexEnvCombine::INTERPOLATE); + te1->setSource0_RGB(osg::TexEnvCombine::TEXTURE1); + te1->setOperand0_RGB(osg::TexEnvCombine::SRC_COLOR); + te1->setSource1_RGB(osg::TexEnvCombine::PREVIOUS); + te1->setOperand1_RGB(osg::TexEnvCombine::SRC_COLOR); + te1->setSource2_RGB(osg::TexEnvCombine::PRIMARY_COLOR); + te1->setOperand2_RGB(osg::TexEnvCombine::SRC_COLOR); + + stateset->setTextureAttributeAndModes(0, te0, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); + stateset->setTextureAttributeAndModes(1, te1, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); + + osg::Group* group = new osg::Group; + group->addChild(node); + group->setCullCallback(new TexMatCallback(*texMat)); + group->setStateSet( stateset ); + + return group; +} + + +int main(int argc, char *argv[]) +{ + // use an ArgumentParser object to manage the program arguments. + osg::ArgumentParser arguments(&argc,argv); + + // set up the usage document, in case we need to print out how to use this program. + arguments.getApplicationUsage()->setCommandLineUsage(arguments.getProgramName()+" [options] filename ..."); + arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + + // construct the viewer. + osgProducer::Viewer viewer(arguments); + + // set up the value with sensible default event handlers. + viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + + // get details on keyboard and mouse bindings used by the viewer. + viewer.getUsage(*arguments.getApplicationUsage()); + + // if user request help write it out to cout. + if (arguments.read("-h") || arguments.read("--help")) + { + arguments.getApplicationUsage()->write(std::cout); + return 1; + } + + // any option left unread are converted into errors to write out later. + arguments.reportRemainingOptionsAsUnrecognized(); + + // report any errors if they have occured when parsing the program aguments. + if (arguments.errors()) + { + arguments.writeErrorMessages(std::cout); + return 1; + } + + osg::Group* rootnode = new osg::Group; + + rootnode->addChild(createSkyBox()); + + // load the nodes from the commandline arguments. + osg::Node* model = osgDB::readNodeFiles(arguments); + if (!model) + { + const float radius = 1.0f; + osg::Geode* geode = new osg::Geode; + geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f,0.0f,0.0f),radius))); + model = geode; + } + + // run optimization over the scene graph + osgUtil::Optimizer optimzer; + optimzer.optimize(model); + + // create normals. + osgUtil::SmoothingVisitor smoother; + model->accept(smoother); + + rootnode->addChild( addRefractStateSet(model) ); + + // add a viewport to the viewer and attach the scene graph. + viewer.setSceneData(rootnode); + + // create the windows and run the threads. + viewer.realize(Producer::CameraGroup::ThreadPerCamera); + + while( !viewer.done() ) + { + // wait for all cull and draw threads to complete. + viewer.sync(); + + // update the scene by traversing it with the the update visitor which will + // call all node update callbacks and animations. + viewer.update(); + + // fire off the cull and draw traversals of the scene. + viewer.frame(); + + } + + return 0; +} diff --git a/examples/osgviewer/GNUmakefile b/examples/osgviewer/GNUmakefile index 25dfd1cef..9a0bf15ca 100644 --- a/examples/osgviewer/GNUmakefile +++ b/examples/osgviewer/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgviewer.cpp\ -LIBS += -losgProducer -lProducer $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgviewer/GNUmakefile.inst b/examples/osgviewer/GNUmakefile.inst index 7b9129ffa..939ec0787 100644 --- a/examples/osgviewer/GNUmakefile.inst +++ b/examples/osgviewer/GNUmakefile.inst @@ -4,12 +4,11 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgviewer.cpp\ -LIBS += -losgProducer -lProducer $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgProducer -lProducer -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgviewer INC += $(PRODUCER_INCLUDE_DIR) LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/rundemos.bat b/rundemos.bat index 13ae9c1de..441d6f10a 100644 --- a/rundemos.bat +++ b/rundemos.bat @@ -4,32 +4,32 @@ osgversion echo osglogo osglogo -echo sgv osgcool.osg -sgv osgcool.osg +echo osgviewer osgcool.osg +osgviewer osgcool.osg -echo sgv cow.osg -sgv cow.osg +echo osgviewer cow.osg +osgviewer cow.osg -echo sgv -stereo cessna.osg -sgv -stereo cessna.osg +echo osgviewer --stereo cessna.osg +osgviewer --stereo cessna.osg -echo sgv cessnafire.osg -sgv cessnafire.osg +echo osgviewer cessnafire.osg +osgviewer cessnafire.osg -echo sgv spaceship.osg -sgv spaceship.osg +echo osgviewer spaceship.osg +osgviewer spaceship.osg -echo sgv cube_mapped_torus.osg -sgv cube_mapped_torus.osg +echo osgviewer cube_mapped_torus.osg +osgviewer cube_mapped_torus.osg echo osgvertexprogram osgvertexprogram -echo sgv Town.osg -sgv Town.osg +echo osgviewer Town.osg +osgviewer Town.osg -#echo sgv afterescher.geo -#sgv afterescher.geo +#echo osgviewer afterescher.geo +#osgviewer afterescher.geo echo osgshape osgshape @@ -58,9 +58,6 @@ osglightpoint echo osgbillboard osgbillboard -echo osgcube -osgcube - echo osgcubemap cessna.osg osgcubemap cessna.osg @@ -103,8 +100,5 @@ osgtexture2D Images/reflect.rgb Images/lz.rgb echo osgtexture3D osgtexture3D -echo osgviews cow.osg -osgviews cow.osg - echo osgoccluder glider.osg osgoccluder glider.osg diff --git a/src/osgProducer/Viewer.cpp b/src/osgProducer/Viewer.cpp index 2456fdac2..c9a95ed45 100644 --- a/src/osgProducer/Viewer.cpp +++ b/src/osgProducer/Viewer.cpp @@ -230,6 +230,8 @@ void Viewer::update() handled = (*handler_itr)->handle(*(*event_itr),*this); } } + + _updateVisitor->setTraversalNumber(_frameStamp->getFrameNumber()); // update the scene by traversing it with the the update visitor which will // call all node update callbacks and animations.