From deef029823fa6ddfceffbece6ece4e33d444bd20 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 23 Mar 2018 19:54:01 +0000 Subject: [PATCH] Fixed member variable names to avoid conflicts with osg::Node --- include/osg/Drawable | 20 ++++++++++---------- src/osg/Drawable.cpp | 5 ++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/include/osg/Drawable b/include/osg/Drawable index 43b673579..083c47105 100644 --- a/include/osg/Drawable +++ b/include/osg/Drawable @@ -113,10 +113,10 @@ class OSG_EXPORT Drawable : public Node /** Set the initial bounding volume to use when computing the overall bounding volume.*/ - void setInitialBound(const osg::BoundingBox& bbox) { _initialBound = bbox; dirtyBound(); } + void setInitialBound(const osg::BoundingBox& bbox) { _initialBoundingBox = bbox; dirtyBound(); } /** Set the initial bounding volume to use when computing the overall bounding volume.*/ - const BoundingBox& getInitialBound() const { return _initialBound; } + const BoundingBox& getInitialBound() const { return _initialBoundingBox; } inline const BoundingSphere& getBound() const { @@ -131,10 +131,10 @@ class OSG_EXPORT Drawable : public Node { if(!_boundingSphereComputed) { - _boundingBox = _initialBound; + _boundingBox = _initialBoundingBox; - if (_computeBoundCallback.valid()) - _boundingBox.expandBy(_computeBoundCallback->computeBound(*this)); + if (_computeBoundingBoxCallback.valid()) + _boundingBox.expandBy(_computeBoundingBoxCallback->computeBound(*this)); else _boundingBox.expandBy(computeBoundingBox()); @@ -171,13 +171,13 @@ class OSG_EXPORT Drawable : public Node }; /** Set the compute bound callback to override the default computeBound.*/ - void setComputeBoundingBoxCallback(ComputeBoundingBoxCallback* callback) { _computeBoundCallback = callback; } + void setComputeBoundingBoxCallback(ComputeBoundingBoxCallback* callback) { _computeBoundingBoxCallback = callback; } /** Get the compute bound callback.*/ - ComputeBoundingBoxCallback* getComputeBoundingBoxCallback() { return _computeBoundCallback.get(); } + ComputeBoundingBoxCallback* getComputeBoundingBoxCallback() { return _computeBoundingBoxCallback.get(); } /** Get the const compute bound callback.*/ - const ComputeBoundingBoxCallback* getComputeBoundingBoxCallback() const { return _computeBoundCallback.get(); } + const ComputeBoundingBoxCallback* getComputeBoundingBoxCallback() const { return _computeBoundingBoxCallback.get(); } /** Set the Shape of the \c Drawable. The shape can be used to @@ -524,8 +524,8 @@ class OSG_EXPORT Drawable : public Node friend class Geode; friend class StateSet; - BoundingBox _initialBound; - ref_ptr _computeBoundCallback; + BoundingBox _initialBoundingBox; + ref_ptr _computeBoundingBoxCallback; mutable BoundingBox _boundingBox; ref_ptr _shape; diff --git a/src/osg/Drawable.cpp b/src/osg/Drawable.cpp index 7ab550080..6c382d85d 100644 --- a/src/osg/Drawable.cpp +++ b/src/osg/Drawable.cpp @@ -240,8 +240,8 @@ Drawable::Drawable() Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop): Node(drawable,copyop), - _initialBound(drawable._initialBound), - _computeBoundCallback(drawable._computeBoundCallback), + _initialBoundingBox(drawable._initialBoundingBox), + _computeBoundingBoxCallback(drawable._computeBoundingBoxCallback), _boundingBox(drawable._boundingBox), _shape(copyop(drawable._shape.get())), _supportsDisplayList(drawable._supportsDisplayList), @@ -252,7 +252,6 @@ Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop): _drawCallback(drawable._drawCallback), _createVertexArrayStateCallback(drawable._createVertexArrayStateCallback) { - setStateSet(copyop(drawable._stateset.get())); } Drawable::~Drawable()