Hi,

I have created semi-transparent hemispheres in my scene by deriving from an 
osg::Drawable and in the drawImplementation I am using gluCylinders and 
gluQuadrics. These display OK.

What I would like to do is only view the front face of the drawable when the 
camera is outside of the hemisphere and only the back face when the camera is 
inside the hemisphere.

I have created a custom Drawable::CullCallback in which I am getting the 
bounding box of the drawable and using the CullVisitor I am checking if the 
bounding box contains the view point as follows:

if ( drawable->getBound().contains( cullVisitor->getViewPoint() )
{
  cull front face
}
else
{
  cull back face
}

This doesn't work and when I put a breakpoint on the true branch of the if 
statement it never goes in even when I move my camera inside the hemisphere.

I was just wondering if there is anything I am missing with this being a custom 
drawable using glu methods?

Cheers,
Mike

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





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

Reply via email to