1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 17:10:36 +00:00

'subdivide first' option in rug (does not work well)

This commit is contained in:
Zeno Rogue 2018-02-27 19:27:20 +01:00
parent c251f7cf30
commit 884c1b6455

21
rug.cpp
View File

@ -17,6 +17,10 @@ struct rug_exception { };
bool fast_euclidean = true;
bool good_shape;
bool subdivide_first = false;
bool subdivide_further();
void subdivide();
ld modelscale = 1;
ld model_distance = 2;
@ -586,8 +590,13 @@ void buildRug() {
printf("vertices = %d triangles= %d\n", size(points), size(triangles));
calcLengths();
if(subdivide_first)
for(int i=0; i<20 && subdivide_further(); i++)
subdivide();
sort(points.begin(), points.end(), psort);
calcLengths();
verify();
@ -1715,15 +1724,13 @@ int rugArgs() {
rug::init();
}
#if CAP_ODS
else if(argis("-ods")) {
ods = true;
else if(argis("-sdfoff")) {
subdivide_first = false;
}
else if(argis("-ipd")) {
shift(); ipd = argf();
else if(argis("-sdfon")) {
subdivide_first = true;
}
#endif
else return 1;
return 0;