assert(v.getNode(v3s16(-1,0,-1)).d == 2);
EXCEPTION_CHECK(InvalidPositionException, v.getNode(v3s16(0,1,1)));
+#if 0
/*
Water stuff
*/
dstream<<"Final result of flowWater:"<<std::endl;
v.print(dstream, VOXELPRINT_WATERPRESSURE);
+#endif
//assert(0);
}
{
//g_heightmap_debugprint = true;
const s16 BS1 = 4;
- UnlimitedHeightmap hm1(BS1,
+ /*UnlimitedHeightmap hm1(BS1,
new ConstantGenerator(0.0),
new ConstantGenerator(0.0),
- new ConstantGenerator(5.0));
+ new ConstantGenerator(5.0));*/
+ PointAttributeDatabase padb;
+ UnlimitedHeightmap hm1(BS1, &padb);
// Go through it so it generates itself
for(s16 y=0; y<=BS1; y++){
for(s16 x=0; x<=BS1; x++){
dstream<<std::endl;
const s16 BS1 = 8;
- UnlimitedHeightmap hm1(BS1,
+ /*UnlimitedHeightmap hm1(BS1,
new ConstantGenerator(10.0),
new ConstantGenerator(0.3),
- new ConstantGenerator(0.0));
+ new ConstantGenerator(0.0));*/
+
+ PointAttributeDatabase padb;
+
+ padb.getList("hm_baseheight")->addPoint(v2s16(-BS1,0), Attribute(0));
+ padb.getList("hm_randmax")->addPoint(v2s16(-BS1,0), Attribute(0));
+ padb.getList("hm_randfactor")->addPoint(v2s16(-BS1,0), Attribute(0.0));
+
+ padb.getList("hm_baseheight")->addPoint(v2s16(0,0), Attribute(-20));
+ padb.getList("hm_randmax")->addPoint(v2s16(0,0), Attribute(0));
+ padb.getList("hm_randfactor")->addPoint(v2s16(0,0), Attribute(0.5));
+
+ padb.getList("hm_baseheight")->addPoint(v2s16(BS1*2,BS1), Attribute(0));
+ padb.getList("hm_randmax")->addPoint(v2s16(BS1*2,BS1), Attribute(30));
+ padb.getList("hm_randfactor")->addPoint(v2s16(BS1*2,BS1), Attribute(0.63));
+
+ UnlimitedHeightmap hm1(BS1, &padb);
// Force hm1 to generate a some heightmap
hm1.getGroundHeight(v2s16(0,0));