- Timestamp:
- 11/09/05 14:18:46 (8 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgdelaunay/osgdelaunay.cpp
r4706 r4709 140 140 141 141 class LinearConstraint: public osgUtil::DelaunayConstraint { 142 /** forces edges of a " road" to fit triangles142 /** forces edges of a "Images/road" to fit triangles 143 143 * if 2 roads cross, then the overlap will be replaced by a 'cross road' 144 144 * and the roads built up to the cross roads with a texture along its length. */ … … 216 216 dstate->setMode( GL_LIGHTING, osg::StateAttribute::ON ); 217 217 218 osg::Image* image = osgDB::readImageFile(" stoneWall.jpg");218 osg::Image* image = osgDB::readImageFile("Images/Brick-Std-Orange.TGA"); 219 219 if (image) 220 220 { … … 345 345 osg::Vec3Array *points=new osg::Vec3Array; 346 346 347 osg::Image* image = osgDB::readImageFile(" Lands-Flowers-Small_Purple.png");347 osg::Image* image = osgDB::readImageFile("Images/blueFlowers.png"); 348 348 if (image) 349 349 { … … 631 631 trig->removeInternalTriangles(dc.get()); 632 632 633 wc->setTexture(" Brick-Norman-Brown.TGA"); // wall looks like brick633 wc->setTexture("Images/Brick-Norman-Brown.TGA"); // wall looks like brick 634 634 geode->addDrawable(wc->makeWallGeometry()); // this creates wall at wc drawarrays 635 635 if (ndcs>3) { 636 636 trig->removeInternalTriangles(dc2.get()); 637 637 osg::ref_ptr<osg::Vec3Array> arpts=dc2->getPoints(points); 638 dc2->setTexture(" Lands-Needles_2.png");638 dc2->setTexture("Images/purpleFlowers.png"); 639 639 geode->addDrawable(dc2->makeAreal(arpts.get())); // this creates fill in geometry 640 640 641 if (ndcs>4) { // a simple " road"641 if (ndcs>4) { // a simple "Images/road" 642 642 trig->removeInternalTriangles(dc3.get()); 643 dc3->setTexture (" road.png");643 dc3->setTexture ("Images/road.png"); 644 644 dc3->setTexrep(40,9.5); // texture is repeated at this frequency 645 645 geode->addDrawable(dc3->makeGeometry(points)); // this creates road geometry … … 652 652 } 653 653 trig->removeInternalTriangles(forest.get()); 654 forest->setTexture(" forestRoof.png");654 forest->setTexture("Images/forestRoof.png"); 655 655 osg::ref_ptr<osg::Vec3Array> locpts=forest->getPoints(points); 656 656 geode->addDrawable(forest->makeAreal(locpts.get())); 657 657 658 forest->setWallTexture(" forestEdge.png");658 forest->setWallTexture("Images/forestWall.png"); 659 659 geode->addDrawable(forest->makeWallGeometry(locpts.get()) ); 660 660 for (osg::Vec3Array::iterator vit=(*locpts).begin(); vit!=(*locpts).end(); vit++) { … … 663 663 664 664 if (ndcs>6) {// road & forest overlap 665 forestroad->setTexture (" road.png");665 forestroad->setTexture ("Images/road.png"); 666 666 forestroad->setTexrep(40,22); // texture is repeated at this frequency 667 667 geode->addDrawable(forestroad->makeGeometry(points)); // this creates road geometry 668 forestroad2->setTexture (" road.png");668 forestroad2->setTexture ("Images/road.png"); 669 669 forestroad2->setTexrep(40,22); // texture is repeated at this frequency 670 670 geode->addDrawable(forestroad2->makeGeometry(points)); // this creates road geometry 671 forestroad3->setTexture (" road.png");671 forestroad3->setTexture ("Images/road.png"); 672 672 forestroad3->setTexrep(40,22); // texture is repeated at this frequency 673 673 geode->addDrawable(forestroad3->makeGeometry(points)); // this creates road geometry … … 676 676 // dc6->makeDrawable(); 677 677 // dc6a->makeDrawable(); 678 dc6->setTexture (" road.png");678 dc6->setTexture ("Images/road.png"); 679 679 dc6->setTexrep(40,22); // texture is repeated at this frequency 680 680 geode->addDrawable(dc6->makeGeometry(points)); // this creates road geometry 681 681 trig->removeInternalTriangles(dc6a.get()); 682 dc6a->setTexture (" road.png");682 dc6a->setTexture ("Images/road.png"); 683 683 dc6a->setTexrep(40,22); // texture is repeated at this frequency 684 684 geode->addDrawable(dc6a->makeGeometry(points)); // this creates road geometry 685 685 if (dc8.valid()) { 686 686 trig->removeInternalTriangles(dc8.get()); 687 dc8->setTexture (" road.png");687 dc8->setTexture ("Images/road.png"); 688 688 dc8->setTexrep(40,16); // texture is repeated at this frequency 689 689 geode->addDrawable(dc8->makeGeometry(points)); // this creates road geometry
