Removed redundent _boundingBoxComputed

This commit is contained in:
Robert Osfield 2016-06-14 18:27:27 +01:00
parent 99bb4b8d17
commit 819ce6c0d1
2 changed files with 2 additions and 5 deletions

View File

@ -457,7 +457,6 @@ class OSG_EXPORT Drawable : public Node
BoundingBox _initialBound; BoundingBox _initialBound;
ref_ptr<ComputeBoundingBoxCallback> _computeBoundCallback; ref_ptr<ComputeBoundingBoxCallback> _computeBoundCallback;
mutable BoundingBox _boundingBox; mutable BoundingBox _boundingBox;
mutable bool _boundingBoxComputed;
ref_ptr<Shape> _shape; ref_ptr<Shape> _shape;

View File

@ -213,8 +213,6 @@ void Drawable::deleteDisplayList(unsigned int contextID,GLuint globj, unsigned i
Drawable::Drawable() Drawable::Drawable()
{ {
_boundingBoxComputed = false;
// Note, if your are defining a subclass from drawable which is // Note, if your are defining a subclass from drawable which is
// dynamically updated then you should set both the following to // dynamically updated then you should set both the following to
// to false in your constructor. This will prevent any display // to false in your constructor. This will prevent any display
@ -238,7 +236,6 @@ Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop):
_initialBound(drawable._initialBound), _initialBound(drawable._initialBound),
_computeBoundCallback(drawable._computeBoundCallback), _computeBoundCallback(drawable._computeBoundCallback),
_boundingBox(drawable._boundingBox), _boundingBox(drawable._boundingBox),
_boundingBoxComputed(drawable._boundingBoxComputed),
_shape(copyop(drawable._shape.get())), _shape(copyop(drawable._shape.get())),
_supportsDisplayList(drawable._supportsDisplayList), _supportsDisplayList(drawable._supportsDisplayList),
_useDisplayList(drawable._useDisplayList), _useDisplayList(drawable._useDisplayList),
@ -584,5 +581,6 @@ BoundingBox Drawable::computeBoundingBox() const
void Drawable::setBound(const BoundingBox& bb) const void Drawable::setBound(const BoundingBox& bb) const
{ {
_boundingBox = bb; _boundingBox = bb;
_boundingBoxComputed = true; _boundingSphere = computeBound();
_boundingSphereComputed = true;
} }