diff --git a/apps/nexus/decimate.h b/apps/nexus/decimate.h index 78ce7e2b..b100bd59 100644 --- a/apps/nexus/decimate.h +++ b/apps/nexus/decimate.h @@ -3,6 +3,7 @@ #include #include "border.h" +#include "fragment.h" #include namespace nxs { diff --git a/apps/nexus/fragment.cpp b/apps/nexus/fragment.cpp index 1efdd29e..cda71209 100644 --- a/apps/nexus/fragment.cpp +++ b/apps/nexus/fragment.cpp @@ -432,7 +432,7 @@ void nxs::Split(Fragment &out, } unsigned int Fragment::Locate(const Point3f &p) { - float max_dist = 1e20; + float max_dist = 1e20f; unsigned int id = 0xffffffff; for(unsigned int i = 0; i < seeds.size(); i++) { float dist = Distance(seeds[i], p); diff --git a/apps/nexus/nexusmt.cpp b/apps/nexus/nexusmt.cpp index c0517717..4685c5a9 100644 --- a/apps/nexus/nexusmt.cpp +++ b/apps/nexus/nexusmt.cpp @@ -51,7 +51,7 @@ float FrustumMetric::GetError(unsigned int cell) { Nexus::PatchInfo &entry = (*index)[cell]; Sphere3f &sphere = entry.sphere; float dist = Distance(sphere, frustum.ViewPoint()); - if(dist < 0) return 1e40; + if(dist < 0) return 1e20f; float error = entry.error/frustum.Resolution(dist); if(frustum.IsOutside(sphere.Center(), sphere.Radius())) error /= 4; diff --git a/apps/nexus/nexusview.cpp b/apps/nexus/nexusview.cpp index fbb25957..ba9b6d6c 100644 --- a/apps/nexus/nexusview.cpp +++ b/apps/nexus/nexusview.cpp @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.21 2004/11/28 01:23:26 ponchio +Fixing borders... let's hope. + Revision 1.20 2004/11/18 18:30:14 ponchio Using baricenters... lotsa changes. @@ -399,7 +402,7 @@ int main(int argc, char *argv[]) { glPointSize(4); glColor3f(1.0f, 1.0f, 1.0f); glBegin(GL_POINTS); - for(int b = 0; b < border.Size(); b++) { + for(unsigned int b = 0; b < border.Size(); b++) { Link &link = border[b]; Point3f &p = patch.Vert(link.start_vert); glVertex3f(p[0], p[1], p[2]); diff --git a/apps/nexus/nxsdispatcher.cpp b/apps/nexus/nxsdispatcher.cpp index 07a8bfe0..9615f2cf 100644 --- a/apps/nexus/nxsdispatcher.cpp +++ b/apps/nexus/nxsdispatcher.cpp @@ -27,7 +27,7 @@ void Opener::execute() { break; } catch(...) { } - sleep(4); + psleep(4000); } server->reading.unlock(); server->writing.unlock(); diff --git a/apps/nexus/nxsdispatcher.h b/apps/nexus/nxsdispatcher.h index e09763bb..47a06aa2 100644 --- a/apps/nexus/nxsdispatcher.h +++ b/apps/nexus/nxsdispatcher.h @@ -1,3 +1,6 @@ +#ifndef NXS_DISPATCHER_H +#define NXS_DISPATCHER_H + #include #include #include @@ -80,3 +83,5 @@ namespace nxs { } + +#endif \ No newline at end of file diff --git a/apps/nexus/voronoichain.cpp b/apps/nexus/voronoichain.cpp index 10bb30d8..8bf2dbe2 100644 --- a/apps/nexus/voronoichain.cpp +++ b/apps/nexus/voronoichain.cpp @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.21 2004/11/28 01:23:26 ponchio +Fixing borders... let's hope. + Revision 1.20 2004/11/18 18:30:14 ponchio Using baricenters... lotsa changes. @@ -123,7 +126,7 @@ float getClosest(const Point3f &seed, VoronoiPartition &part) { } count++; } - return sqrt(dist); + return (float)sqrt(dist); } int getBest(const Point3f &seed, VoronoiPartition &part,