#include <simgear/compiler.h>
-#include <plib/sg.h>
#include <simgear/math/sg_random.h>
#include <simgear/misc/sg_path.hxx>
#include <simgear/misc/PathOptions.hxx>
#include <simgear/props/props.hxx>
#include <simgear/scene/model/model.hxx>
+#include <simgear/scene/model/SGReaderWriterXMLOptions.hxx>
#include <simgear/scene/util/StateAttributeFactory.hxx>
#include <simgear/scene/util/SGUpdateVisitor.hxx>
double SGNewCloud::sprite_density = 1.0;
-
SGNewCloud::SGNewCloud(string type,
const SGPath &tex_path,
string tex,
"texture"),
"image"),
texture);
- osg::ref_ptr<osgDB::ReaderWriter::Options> options
+ ref_ptr<osgDB::ReaderWriter::Options> options
= makeOptionsFromPath(tex_path);
- if ((effect = makeEffect(pcloudEffect, true, options)))
+ ref_ptr<SGReaderWriterXMLOptions> sgOptions
+ = new SGReaderWriterXMLOptions(*options.get());
+ if ((effect = makeEffect(pcloudEffect, true, sgOptions.get())))
effectMap.insert(EffectMap::value_type(texture, effect));
} else {
effect = iter->second.get();
z = height * cos(elev) * 0.5f;
}
- // Determine the height and width as scaling factors on the minimum size (used to create the quad)
+ // Determine the height and width as scaling factors on the minimum size (used to create the quad).
float sprite_width = 1.0f + sg_random() * (max_sprite_width - min_sprite_width) / min_sprite_width;
float sprite_height = 1.0f + sg_random() * (max_sprite_height - min_sprite_height) / min_sprite_height;