}
-static void gen_random_surface_points( ssgLeaf *leaf, ssgVertexArray *lights,
- double factor ) {
+void sgGenRandomSurfacePoints( ssgLeaf *leaf, double factor,
+ ssgVertexArray *lights )
+{
int tris = leaf->getNumTriangles();
if ( tris > 0 ) {
short int n1, n2, n3;
}
+ssgVertexArray *sgGenRandomSurfacePoints( ssgLeaf *leaf, double factor ) {
+ ssgVertexArray *result = new ssgVertexArray();
+ sgGenRandomSurfacePoints( leaf, factor, result );
+
+ return result;
+}
+
////////////////////////////////////////////////////////////////////////
// Scenery loaders.
<< coverage << ", pushing up to 10000");
coverage = 10000;
}
- gen_random_surface_points(leaf, lights, coverage);
+ sgGenRandomSurfacePoints(leaf, coverage, lights );
}
}
const bool calc_lights, ssgVertexArray *lights );
+// return a newly created list of points randomly spread across the
+// specified leaf. "factor" specifies density ... on average there
+// will be one object per the area specified by "factor" in m^2 A
+// larger factor will mean fewer objects.
+ssgVertexArray *sgGenRandomSurfacePoints( ssgLeaf *leaf, double factor );
+
+// Another varient of the same routine.
+void sgGenRandomSurfacePoints( ssgLeaf *leaf, double factor,
+ ssgVertexArray *lights );
+
#endif // _SG_LEAF_HXX