mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Changed: #964 Allow disabling of consistency check in rbank build tool, because it's immensely slow.
This commit is contained in:
parent
d97fbb4340
commit
86413711f6
3 changed files with 35 additions and 25 deletions
|
@ -1614,21 +1614,23 @@ void NLPACS::CZoneTessellation::generateBorders(float smooth)
|
||||||
sint lsurf = cborder.Left;
|
sint lsurf = cborder.Left;
|
||||||
sint rsurf = cborder.Right;
|
sint rsurf = cborder.Right;
|
||||||
|
|
||||||
if (lsurf >= 0)
|
if (CheckConsistency)
|
||||||
{
|
{
|
||||||
CComputableSurface& surf = Surfaces[lsurf];
|
if (lsurf >= 0)
|
||||||
if (!surf.checkConsistency())
|
|
||||||
{
|
{
|
||||||
nlwarning("Before smooth of border '%d', surface '%d' not consistent", border, lsurf);
|
CComputableSurface& surf = Surfaces[lsurf];
|
||||||
|
if (!surf.checkConsistency())
|
||||||
|
{
|
||||||
|
nlwarning("Before smooth of border '%d', surface '%d' not consistent", border, lsurf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if (rsurf >= 0)
|
||||||
|
|
||||||
if (rsurf >= 0)
|
|
||||||
{
|
|
||||||
CComputableSurface& surf = Surfaces[rsurf];
|
|
||||||
if (!surf.checkConsistency())
|
|
||||||
{
|
{
|
||||||
nlwarning("Before smooth of border '%d', surface '%d' not consistent", border, rsurf);
|
CComputableSurface& surf = Surfaces[rsurf];
|
||||||
|
if (!surf.checkConsistency())
|
||||||
|
{
|
||||||
|
nlwarning("Before smooth of border '%d', surface '%d' not consistent", border, rsurf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1642,22 +1644,24 @@ void NLPACS::CZoneTessellation::generateBorders(float smooth)
|
||||||
uint after = (uint)Borders[border].Vertices.size();
|
uint after = (uint)Borders[border].Vertices.size();
|
||||||
totalBefore += before;
|
totalBefore += before;
|
||||||
totalAfter += after;
|
totalAfter += after;
|
||||||
|
|
||||||
if (lsurf >= 0)
|
if (CheckConsistency)
|
||||||
{
|
{
|
||||||
CComputableSurface& surf = Surfaces[lsurf];
|
if (lsurf >= 0)
|
||||||
if (!surf.checkConsistency())
|
|
||||||
{
|
{
|
||||||
nlwarning("After smooth of border '%d', surface '%d' not consistent", border, lsurf);
|
CComputableSurface& surf = Surfaces[lsurf];
|
||||||
|
if (!surf.checkConsistency())
|
||||||
|
{
|
||||||
|
nlwarning("After smooth of border '%d', surface '%d' not consistent", border, lsurf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if (rsurf >= 0)
|
||||||
|
|
||||||
if (rsurf >= 0)
|
|
||||||
{
|
|
||||||
CComputableSurface& surf = Surfaces[rsurf];
|
|
||||||
if (!surf.checkConsistency())
|
|
||||||
{
|
{
|
||||||
nlwarning("After smooth of border '%d', surface '%d' not consistent", border, rsurf);
|
CComputableSurface& surf = Surfaces[rsurf];
|
||||||
|
if (!surf.checkConsistency())
|
||||||
|
{
|
||||||
|
nlwarning("After smooth of border '%d', surface '%d' not consistent", border, rsurf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,7 +393,8 @@ 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)
|
||||||
{
|
{
|
||||||
nldebug("flood fill surface %d", surfId);
|
if (Verbose)
|
||||||
|
nldebug("flood fill surface %d", surfId);
|
||||||
|
|
||||||
std::vector<CSurfElement *> stack;
|
std::vector<CSurfElement *> stack;
|
||||||
sint i;
|
sint i;
|
||||||
|
@ -433,7 +435,8 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nldebug("%d elements added", Elements.size());
|
if (Verbose)
|
||||||
|
nldebug("%d elements added", Elements.size());
|
||||||
|
|
||||||
Center = NLMISC::CVector::Null;
|
Center = NLMISC::CVector::Null;
|
||||||
for (i=0; i<(sint)Elements.size(); ++i)
|
for (i=0; i<(sint)Elements.size(); ++i)
|
||||||
|
|
|
@ -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