Hi
I was wondering if someone could help explain this piece of code or at
least point me in the right direction. It was posted by Yuen Helbig in
2008
osg::TriangleIndexFunctor<TriangleIndexVisitor> tif;
tempGeode.geode->getDrawable(j)->accept(tif);
With TriangleIndexVisitor defined as:
class TriangleIndexVisitor
{
public:
CArray<int,int> indices;
void operator()(const int v1, const int v2, const int v3)
{
// toss the computed indices into the indices array
indices.Add( v1 );
indices.Add( v2 );
indices.Add( v3 );
}
};
I think I am struggling with the concept of how accept and operator
work.
All the best
Fred
--
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org