Updates NEWS file for 0.9.0 release.

Added default computeBound() implementation to osg::Drawable which uses
a PrimtiveFunctor to compute the bounding box in a generic way, that
will work for all Drawable subclasses that implement the accept(PrimitiveFunctor&).
This commit is contained in:
Robert Osfield
2002-07-18 22:35:54 +00:00
parent e492b79da5
commit 3cba9a52ef
9 changed files with 173 additions and 55 deletions

View File

@@ -222,25 +222,25 @@ void Geometry::accept(PrimitiveFunctor& functor)
}
const bool Geometry::computeBound() const
{
_bbox.init();
const Vec3Array* coords = dynamic_cast<const Vec3Array*>(_vertexArray.get());
if (coords)
{
for(Vec3Array::const_iterator itr=coords->begin();
itr!=coords->end();
++itr)
{
_bbox.expandBy(*itr);
}
}
_bbox_computed = true;
return _bbox.valid();
}
// just use the base Drawable's PrimitiveFunctor based implementation.
// const bool Geometry::computeBound() const
// {
// _bbox.init();
//
// const Vec3Array* coords = dynamic_cast<const Vec3Array*>(_vertexArray.get());
// if (coords)
// {
// for(Vec3Array::const_iterator itr=coords->begin();
// itr!=coords->end();
// ++itr)
// {
// _bbox.expandBy(*itr);
// }
// }
// _bbox_computed = true;
//
// return _bbox.valid();
// }
bool Geometry::verifyBindings() const
{