Sometimes our scene only consists of lines. When we use COMPUTE_NEAR_FAR_USING_PRIMITIVES, the near and far aren't computed correctly, because the TriangleFunctor used with ComputeNearestPointFunctor doesn't look at points or lines.
In order to get this to work, if I want to consider lines the way the current code considers triangles, I'd need to write a functor that uses lines or points. I think I'd want to use the lines if possible, and consider individual points only if that is what the geometry is. I'm not sure it would be useful to write general LineFunctor and PointFunctor classes and make them available. So maybe I could put something intended just for this purpose into the CullVisitor. Maybe extend TriangleFunctor to do what it currently does, but handle lines and points differently? I don't want to clutter up CullVisitor.cpp with a large object if I can help it. I could just use TemplatePrimitiveFunctor and implement all the operators. Maybe that would be simpler, because some could forward to others. Is there a better approach here? It does seem a bit of a lack to me that computing near and far doesn't handle scene without faces. It also makes me wonder about the various cases that use TriangleFunctor. Are they all only relevant for faces? thanks andy
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

