Added support for recording camera animation paths in osgGLUT::Viewer, and fixed
the osgGA::AnimationPathManipulator to handle it. Added a new Drawable::ConstAttributeFunctor and make the accept(PrimitiveFunctor) be a const method so can disallows modification. Added Drawable::supports(...) methods for each of the AttributeFunctor, ConstAttributeFunctor and PrimitiveFunctor so that programs can querry whether it is possible to use functors with that object type.
This commit is contained in:
@@ -880,8 +880,32 @@ void GeoSet::accept(AttributeFunctor& auf)
|
||||
}
|
||||
}
|
||||
|
||||
void GeoSet::accept(ConstAttributeFunctor& auf) const
|
||||
{
|
||||
if (_numcoords == 0) computeNumVerts();
|
||||
|
||||
void GeoSet::accept(PrimitiveFunctor& functor)
|
||||
if (_coords && _numcoords)
|
||||
{
|
||||
auf.apply(VERTICES,_numcoords,_coords);
|
||||
}
|
||||
|
||||
if (_normals && _numnormals)
|
||||
{
|
||||
auf.apply(NORMALS,_numnormals,_normals);
|
||||
}
|
||||
|
||||
if (_colors && _numcolors)
|
||||
{
|
||||
auf.apply(COLORS,_numcolors,_colors);
|
||||
}
|
||||
|
||||
if (_tcoords && _numtcoords)
|
||||
{
|
||||
auf.apply(TEXTURE_COORDS_0,_numtcoords,_tcoords);
|
||||
}
|
||||
}
|
||||
|
||||
void GeoSet::accept(PrimitiveFunctor& functor) const
|
||||
{
|
||||
// will easily convert into a Geometry.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user