so it's more obvious that "addCloud" won't keep a reference to SGNewCloud.
last_coverage = coverage;
}
-void SGCloudField::addCloud( SGVec3f& pos, SGNewCloud *cloud) {
+void SGCloudField::addCloud( SGVec3f& pos, osg::ref_ptr<EffectGeode> geode) {
defined3D = true;
- osg::ref_ptr<osg::Geode> geode = cloud->genCloud();
-
+
// Determine which quadtree to put it in.
int x = (int) floor((pos.x() + fieldSize/2.0) * QUADTREE_SIZE / fieldSize);
if (x >= QUADTREE_SIZE) x = (QUADTREE_SIZE - 1);
class SGNewCloud;
+namespace simgear
+{
+ class EffectGeode;
+}
+
/**
* A layer of 3D clouds.
*/
void clear(void);
// add one cloud, data is not copied, ownership given
- void addCloud( SGVec3f& pos, SGNewCloud *cloud);
+ void addCloud( SGVec3f& pos, osg::ref_ptr<simgear::EffectGeode> cloud);
/**
* reposition the cloud layer at the specified origin and