mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-23 09:28:45 +00:00
Changed: #964 Allow disabling of consistency check in rbank build tool, because it's immensely slow.
This commit is contained in:
parent
0fbbc2d533
commit
deb29392c5
3 changed files with 35 additions and 25 deletions
|
@ -1614,6 +1614,8 @@ void NLPACS::CZoneTessellation::generateBorders(float smooth)
|
||||||
sint lsurf = cborder.Left;
|
sint lsurf = cborder.Left;
|
||||||
sint rsurf = cborder.Right;
|
sint rsurf = cborder.Right;
|
||||||
|
|
||||||
|
if (CheckConsistency)
|
||||||
|
{
|
||||||
if (lsurf >= 0)
|
if (lsurf >= 0)
|
||||||
{
|
{
|
||||||
CComputableSurface& surf = Surfaces[lsurf];
|
CComputableSurface& surf = Surfaces[lsurf];
|
||||||
|
@ -1622,7 +1624,6 @@ void NLPACS::CZoneTessellation::generateBorders(float smooth)
|
||||||
nlwarning("Before smooth of border '%d', surface '%d' not consistent", border, lsurf);
|
nlwarning("Before smooth of border '%d', surface '%d' not consistent", border, lsurf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsurf >= 0)
|
if (rsurf >= 0)
|
||||||
{
|
{
|
||||||
CComputableSurface& surf = Surfaces[rsurf];
|
CComputableSurface& surf = Surfaces[rsurf];
|
||||||
|
@ -1631,6 +1632,7 @@ void NLPACS::CZoneTessellation::generateBorders(float smooth)
|
||||||
nlwarning("Before smooth of border '%d', surface '%d' not consistent", border, rsurf);
|
nlwarning("Before smooth of border '%d', surface '%d' not consistent", border, rsurf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
float smScale = (Borders[border].Right < 0) ? 0.2f : 1.0f;
|
float smScale = (Borders[border].Right < 0) ? 0.2f : 1.0f;
|
||||||
uint before = (uint)Borders[border].Vertices.size();
|
uint before = (uint)Borders[border].Vertices.size();
|
||||||
|
@ -1643,6 +1645,8 @@ void NLPACS::CZoneTessellation::generateBorders(float smooth)
|
||||||
totalBefore += before;
|
totalBefore += before;
|
||||||
totalAfter += after;
|
totalAfter += after;
|
||||||
|
|
||||||
|
if (CheckConsistency)
|
||||||
|
{
|
||||||
if (lsurf >= 0)
|
if (lsurf >= 0)
|
||||||
{
|
{
|
||||||
CComputableSurface& surf = Surfaces[lsurf];
|
CComputableSurface& surf = Surfaces[lsurf];
|
||||||
|
@ -1651,7 +1655,6 @@ void NLPACS::CZoneTessellation::generateBorders(float smooth)
|
||||||
nlwarning("After smooth of border '%d', surface '%d' not consistent", border, lsurf);
|
nlwarning("After smooth of border '%d', surface '%d' not consistent", border, lsurf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsurf >= 0)
|
if (rsurf >= 0)
|
||||||
{
|
{
|
||||||
CComputableSurface& surf = Surfaces[rsurf];
|
CComputableSurface& surf = Surfaces[rsurf];
|
||||||
|
@ -1661,6 +1664,7 @@ void NLPACS::CZoneTessellation::generateBorders(float smooth)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (Verbose)
|
if (Verbose)
|
||||||
nlinfo("smooth process: %d -> %d (%.1f percent reduction)", totalBefore, totalAfter, 100.0*(1.0-(double)totalAfter/(double)totalBefore));
|
nlinfo("smooth process: %d -> %d (%.1f percent reduction)", totalBefore, totalAfter, 100.0*(1.0-(double)totalAfter/(double)totalBefore));
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,7 @@ extern std::string GlobalUL;
|
||||||
extern std::string GlobalDR;
|
extern std::string GlobalDR;
|
||||||
extern bool ProcessGlobal;
|
extern bool ProcessGlobal;
|
||||||
extern bool Verbose;
|
extern bool Verbose;
|
||||||
|
extern bool CheckConsistency;
|
||||||
|
|
||||||
extern CPrimChecker PrimChecker;
|
extern CPrimChecker PrimChecker;
|
||||||
|
|
||||||
|
@ -392,6 +393,7 @@ public:
|
||||||
template<class A>
|
template<class A>
|
||||||
void floodFill(CSurfElement *first, sint32 surfId, const A &cmp, CZoneTessellation *zoneTessel)
|
void floodFill(CSurfElement *first, sint32 surfId, const A &cmp, CZoneTessellation *zoneTessel)
|
||||||
{
|
{
|
||||||
|
if (Verbose)
|
||||||
nldebug("flood fill surface %d", surfId);
|
nldebug("flood fill surface %d", surfId);
|
||||||
|
|
||||||
std::vector<CSurfElement *> stack;
|
std::vector<CSurfElement *> stack;
|
||||||
|
@ -433,6 +435,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Verbose)
|
||||||
nldebug("%d elements added", Elements.size());
|
nldebug("%d elements added", Elements.size());
|
||||||
|
|
||||||
Center = NLMISC::CVector::Null;
|
Center = NLMISC::CVector::Null;
|
||||||
|
|
|
@ -86,6 +86,7 @@ string LevelDesignWorldPath;
|
||||||
string IgLandPath;
|
string IgLandPath;
|
||||||
string IgVillagePath;
|
string IgVillagePath;
|
||||||
bool Verbose = false;
|
bool Verbose = false;
|
||||||
|
bool CheckConsistency = true;
|
||||||
|
|
||||||
CPrimChecker PrimChecker;
|
CPrimChecker PrimChecker;
|
||||||
|
|
||||||
|
@ -187,6 +188,8 @@ void initMoulinette()
|
||||||
|
|
||||||
WaterThreshold = getFloat(cf, "WaterThreshold", 1.0);
|
WaterThreshold = getFloat(cf, "WaterThreshold", 1.0);
|
||||||
|
|
||||||
|
CheckConsistency = getBool(cf, "CheckConsistency", true);
|
||||||
|
|
||||||
//if (TessellateZones || MoulineZones)
|
//if (TessellateZones || MoulineZones)
|
||||||
{
|
{
|
||||||
ZoneExt = getString(cf, "ZoneExt", ".zonew");
|
ZoneExt = getString(cf, "ZoneExt", ".zonew");
|
||||||
|
|
Loading…
Reference in a new issue