Added new Node/Drawable::s/getInitialBound and Node/Drawable::s/getComputeBoundCallback
methods and reimplement computeBound so that it passes back a bounding volume rather than modifying the local one.
This commit is contained in:
@@ -100,12 +100,12 @@ class OSGSIM_EXPORT Impostor : public osg::LOD
|
||||
/** Get a const list of ImpostorSprites attached to this const Impostor. */
|
||||
inline const ImpostorSpriteList& getImpostorSpriteList(unsigned int contexID) const { return _impostorSpriteListBuffer[contexID]; }
|
||||
|
||||
virtual osg::BoundingSphere computeBound() const;
|
||||
|
||||
protected :
|
||||
|
||||
virtual ~Impostor() {}
|
||||
|
||||
virtual bool computeBound() const;
|
||||
|
||||
mutable osg::buffered_object<ImpostorSpriteList> _impostorSpriteListBuffer;
|
||||
|
||||
|
||||
|
||||
@@ -148,6 +148,8 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable
|
||||
// for debugging purposes.
|
||||
osg::Vec4 _color;
|
||||
|
||||
virtual osg::BoundingBox computeBound() const;
|
||||
|
||||
protected:
|
||||
|
||||
ImpostorSprite(const ImpostorSprite&):Drawable() {}
|
||||
@@ -155,8 +157,6 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable
|
||||
|
||||
virtual ~ImpostorSprite();
|
||||
|
||||
virtual bool computeBound() const;
|
||||
|
||||
Impostor* _parent;
|
||||
|
||||
friend class osgSim::ImpostorSpriteManager;
|
||||
|
||||
@@ -82,6 +82,8 @@ class OSGSIM_EXPORT LightPointNode : public osg::Node
|
||||
|
||||
osgSim::LightPointSystem* getLightPointSystem() { return _lightSystem.get(); }
|
||||
|
||||
virtual osg::BoundingSphere computeBound() const;
|
||||
|
||||
protected:
|
||||
|
||||
~LightPointNode() {}
|
||||
@@ -90,8 +92,6 @@ class OSGSIM_EXPORT LightPointNode : public osg::Node
|
||||
// view frustum check.
|
||||
mutable osg::BoundingBox _bbox;
|
||||
|
||||
virtual bool computeBound() const;
|
||||
|
||||
LightPointList _lightPointList;
|
||||
|
||||
float _minPixelSize;
|
||||
|
||||
Reference in New Issue
Block a user