Show
Ignore:
Timestamp:
08/26/11 17:36:33 (3 years ago)
Author:
robert
Message:

Added names to models to help with debugging.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgshadow/osgshadow.cpp

    r12763 r12766  
    525525        hints->setDetailRatio(2.0f); 
    526526        osg::ref_ptr<osg::ShapeDrawable> shape; 
    527  
    528527        shape = new osg::ShapeDrawable(new osg::Box(osg::Vec3(0.0f, 0.0f, -2.0f), 10, 10.0f, 0.1f), hints.get()); 
    529528        shape->setColor(osg::Vec4(0.5f, 0.5f, 0.7f, 1.0f)); 
     529        shape->setName("base box"); 
    530530        geode_1->addDrawable(shape.get()); 
    531531 
    532532        shape = new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f, 0.0f, 0.0f), radius * 2), hints.get()); 
    533533        shape->setColor(osg::Vec4(0.8f, 0.8f, 0.8f, 1.0f)); 
     534        shape->setName("center sphere"); 
    534535        geode_1->addDrawable(shape.get()); 
    535536 
    536537        shape = new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(-3.0f, 0.0f, 0.0f), radius), hints.get()); 
    537538        shape->setColor(osg::Vec4(0.6f, 0.8f, 0.8f, 1.0f)); 
     539        shape->setName("cyan sphere"); 
    538540        geode_2->addDrawable(shape.get()); 
    539541 
    540542        shape = new osg::ShapeDrawable(new osg::Box(osg::Vec3(3.0f, 0.0f, 0.0f), 2 * radius), hints.get()); 
    541543        shape->setColor(osg::Vec4(0.4f, 0.9f, 0.3f, 1.0f)); 
     544        shape->setName("green box"); 
    542545        geode_2->addDrawable(shape.get()); 
    543546 
    544547        shape = new osg::ShapeDrawable(new osg::Cone(osg::Vec3(0.0f, -3.0f, 0.0f), radius, height), hints.get()); 
    545548        shape->setColor(osg::Vec4(0.2f, 0.5f, 0.7f, 1.0f)); 
     549        shape->setName("blue cone"); 
    546550        geode_2->addDrawable(shape.get()); 
    547551 
    548552        shape = new osg::ShapeDrawable(new osg::Cylinder(osg::Vec3(0.0f, 3.0f, 0.0f), radius, height), hints.get()); 
    549553        shape->setColor(osg::Vec4(1.0f, 0.3f, 0.3f, 1.0f)); 
     554        shape->setName("red cyclinder"); 
    550555        geode_2->addDrawable(shape.get()); 
    551556 
    552557        shape = new osg::ShapeDrawable(new osg::Box(osg::Vec3(0.0f, 0.0f, 3.0f), 2.0f, 2.0f, 0.1f), hints.get()); 
    553558        shape->setColor(osg::Vec4(0.8f, 0.8f, 0.4f, 1.0f)); 
     559        shape->setName("rotating box"); 
    554560        geode_3->addDrawable(shape.get()); 
    555561