#include <osgDB/Registry>
#include <simgear/sg_inlines.h>
-#include <simgear/math/point3d.hxx>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/math/sg_random.h>
#include <simgear/scene/material/mat.hxx>
root_props = p;
}
- osg::Node* sgGetRandomModel(SGMatModel *obj) {
- return obj->get_random_model( root_props );
+osg::Node* sgGetRandomModel(SGMatModel *obj, mt seed) {
+ return obj->get_random_model( root_props, seed );
}
-osg::Node* sgGetModel(int i, SGMatModel *obj) {
- return obj->get_model(i, root_props );
- }
-
-static void random_pt_inside_tri( float *res,
- float *n1, float *n2, float *n3 )
+namespace simgear
{
- double a = sg_random();
- double b = sg_random();
- if ( a + b > 1.0 ) {
- a = 1.0 - a;
- b = 1.0 - b;
- }
- double c = 1 - a - b;
-
- res[0] = n1[0]*a + n2[0]*b + n3[0]*c;
- res[1] = n1[1]*a + n2[1]*b + n3[1]*c;
- res[2] = n1[2]*a + n2[2]*b + n3[2]*c;
+SGPropertyNode* getPropertyRoot()
+{
+ return root_props;
+}
}
-