Changeset 12766 for OpenSceneGraph/trunk/examples/osgshadow/osgshadow.cpp
- Timestamp:
- 08/26/11 17:36:33 (21 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgshadow/osgshadow.cpp
r12763 r12766 525 525 hints->setDetailRatio(2.0f); 526 526 osg::ref_ptr<osg::ShapeDrawable> shape; 527 528 527 shape = new osg::ShapeDrawable(new osg::Box(osg::Vec3(0.0f, 0.0f, -2.0f), 10, 10.0f, 0.1f), hints.get()); 529 528 shape->setColor(osg::Vec4(0.5f, 0.5f, 0.7f, 1.0f)); 529 shape->setName("base box"); 530 530 geode_1->addDrawable(shape.get()); 531 531 532 532 shape = new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f, 0.0f, 0.0f), radius * 2), hints.get()); 533 533 shape->setColor(osg::Vec4(0.8f, 0.8f, 0.8f, 1.0f)); 534 shape->setName("center sphere"); 534 535 geode_1->addDrawable(shape.get()); 535 536 536 537 shape = new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(-3.0f, 0.0f, 0.0f), radius), hints.get()); 537 538 shape->setColor(osg::Vec4(0.6f, 0.8f, 0.8f, 1.0f)); 539 shape->setName("cyan sphere"); 538 540 geode_2->addDrawable(shape.get()); 539 541 540 542 shape = new osg::ShapeDrawable(new osg::Box(osg::Vec3(3.0f, 0.0f, 0.0f), 2 * radius), hints.get()); 541 543 shape->setColor(osg::Vec4(0.4f, 0.9f, 0.3f, 1.0f)); 544 shape->setName("green box"); 542 545 geode_2->addDrawable(shape.get()); 543 546 544 547 shape = new osg::ShapeDrawable(new osg::Cone(osg::Vec3(0.0f, -3.0f, 0.0f), radius, height), hints.get()); 545 548 shape->setColor(osg::Vec4(0.2f, 0.5f, 0.7f, 1.0f)); 549 shape->setName("blue cone"); 546 550 geode_2->addDrawable(shape.get()); 547 551 548 552 shape = new osg::ShapeDrawable(new osg::Cylinder(osg::Vec3(0.0f, 3.0f, 0.0f), radius, height), hints.get()); 549 553 shape->setColor(osg::Vec4(1.0f, 0.3f, 0.3f, 1.0f)); 554 shape->setName("red cyclinder"); 550 555 geode_2->addDrawable(shape.get()); 551 556 552 557 shape = new osg::ShapeDrawable(new osg::Box(osg::Vec3(0.0f, 0.0f, 3.0f), 2.0f, 2.0f, 0.1f), hints.get()); 553 558 shape->setColor(osg::Vec4(0.8f, 0.8f, 0.4f, 1.0f)); 559 shape->setName("rotating box"); 554 560 geode_3->addDrawable(shape.get()); 555 561
