Christian Verbeek wrote:
I also tried the InfinitePlane:
osg::InfinitePlane* plane = new osg::InfinitePlane;
osg::ShapeDrawable* planeDrawable = new osg::ShapeDrawable(plane);
osg::Geode* planeGeode = new osg::Geode();
planeGeode->setStateSet( gridState );
planeGeode->addDrawable(planeDrawable);
root->addChild(planeGeode);

but the plane is not visible. Maybe I am totally wrong about what the
osg::InfinitePlane is good for. But as a floor in an environment is
something very fundamental, I would hope that there is a better way than
creating a large flat box. Is there?

An infinite plane is a little hungry on resources ;-)

Yes, there is a better way. Create a Geode/Geometry with four vertices, four texture coords and one (or better four normals) and you're all set. Place a MatrixTransform above it and move it with your object so that it's always under it.

/ulrich

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to