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:
Robert Osfield
2005-05-12 14:03:22 +00:00
parent ad2bd31ac8
commit bf4d63f6ea
52 changed files with 337 additions and 377 deletions

View File

@@ -159,13 +159,14 @@ namespace osgParticle
virtual void drawImplementation(osg::State& state) const;
virtual osg::BoundingBox computeBound() const;
protected:
virtual ~ParticleSystem();
ParticleSystem& operator=(const ParticleSystem&) { return *this; }
inline virtual bool computeBound() const;
inline void update_bounds(const osg::Vec3& p, float r);
void single_pass_render(osg::State& state, const osg::Matrix& modelview) const;
@@ -298,18 +299,6 @@ namespace osgParticle
return _last_frame;
}
inline bool ParticleSystem::computeBound() const
{
if (!_bounds_computed) {
_bbox = _def_bbox;
} else {
_bbox._min = _bmin;
_bbox._max = _bmax;
}
_bbox_computed = true;
return true;
}
inline void ParticleSystem::update_bounds(const osg::Vec3& p, float r)
{
if (_reset_bounds_flag) {