diff --git a/include/osg/Drawable b/include/osg/Drawable index 382a49641..cb9824680 100644 --- a/include/osg/Drawable +++ b/include/osg/Drawable @@ -384,6 +384,9 @@ class SG_EXPORT Drawable : public Object implemented by subclasses.*/ virtual bool computeBound() const; + /** set the bounding box .*/ + void setBound(const BoundingBox& bb) const; + void addParent(osg::Node* node); void removeParent(osg::Node* node); diff --git a/src/osg/Drawable.cpp b/src/osg/Drawable.cpp index 864ce8781..f79d2cbca 100644 --- a/src/osg/Drawable.cpp +++ b/src/osg/Drawable.cpp @@ -326,3 +326,8 @@ bool Drawable::computeBound() const return true; } +void Drawable::setBound(const BoundingBox& bb) const +{ + _bbox = bb; + _bbox_computed = true; +}