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

@@ -131,12 +131,12 @@ namespace osgParticle
/// Transform a vector from world to local coordinates, discarding translation (valid only during cull traversal).
inline osg::Vec3 rotateWorldToLocal(const osg::Vec3& P);
virtual osg::BoundingSphere computeBound() const;
protected:
virtual ~ParticleProcessor() {}
ParticleProcessor& operator=(const ParticleProcessor&) { return *this; }
inline bool computeBound() const;
virtual void process(double dt) = 0;
private:
@@ -249,13 +249,6 @@ namespace osgParticle
return _resetTime;
}
inline bool ParticleProcessor::computeBound() const
{
_bsphere.init();
_bsphere_computed = true;
return true;
}
inline const osg::Matrix& ParticleProcessor::getLocalToWorldMatrix()
{
if (_need_ltw_matrix) {