Hi Nick,

Well the changes are minors. I just wanted to change de reflector from the 
sphere to the bottom plane (or box).

here is my reflector function, I changed the sphere to a box geode, ie the 
bottom plane/box.

Code:

osg::NodePathcreateReflector()
{
        osg::PositionAttitudeTransform* pat = new 
osg::PositionAttitudeTransform;
        pat->setPosition(osg::Vec3(0.0f,0.0f,0.0f));
        
pat->setAttitude(osg::Quat(osg::inDegrees(0.0f),osg::Vec3(0.0f,0.0f,1.0f)));

        osg::Geode* geode_1 = new osg::Geode;
        osg::ShapeDrawable* shape = new osg::ShapeDrawable(new 
osg::Box(osg::Vec3(0.0f, 0.0f, -2.0f), 10, 10.f, 0.1));
        shape->setColor(osg::Vec4(0.5f, 0.5f, 0.7f, 1.0f));
        geode_1->addDrawable(shape);

        //osg::Geode* node = new osg::Geode;
        //const float radius = 0.8f;
        //osg::ref_ptr<osg::TessellationHints> hints = new 
osg::TessellationHints;
        //hints->setDetailRatio(2.0f);
        //osg::ShapeDrawable* shape = new osg::ShapeDrawable(new 
osg::Sphere(osg::Vec3(0.0f, 0.0f, 0.0f), radius * 1.5f), hints.get());
        //shape->setColor(osg::Vec4(0.8f, 0.8f, 0.8f, 1.0f));
        //node->addDrawable(shape);

        pat->addChild(geode_1);

        osg::NodePath nodeList;
        nodeList.push_back(pat);
        nodeList.push_back(geode_1);

        return nodeList;
}




And I have commented the code corresponding to the same bottom plane in the 
_create_scene() function.

Code:
//shape = new osg::ShapeDrawable(new osg::Box(osg::Vec3(0.0f, 0.0f, -2.0f), 10, 
10.f, 0.1), hints.get());
//shape->setColor(osg::Vec4(0.5f, 0.5f, 0.7f, 1.0f));
//geode_1->addDrawable(shape.get());




Sebastien

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23919#23919





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to