diff --git a/apps/metro/mesh_type.h b/apps/metro/mesh_type.h index 8544d850..1ed58bdd 100644 --- a/apps/metro/mesh_type.h +++ b/apps/metro/mesh_type.h @@ -24,6 +24,10 @@ History $Log: not supported by cvs2svn $ +Revision 1.6 2005/01/26 22:45:34 cignoni +Release 4.04 +final updates for gcc compiling issues + Revision 1.5 2004/05/14 00:32:36 ganovelli just color and quality on the vertex @@ -36,16 +40,29 @@ just color and quality on the vertex #pragma warning(disable:4786 4804 4666) #include -#include -#include #include #include // Vertex, Face, Mesh and Grid definitions. +#ifdef _PLUS_TYPES_ +#include +#include +#include +#include +#include +class MyEdge; +class CFace; +class CVertex : public vcg::VertexSimp2 {}; +class CFace : public vcg::FaceSimp2< CVertex,MyEdge,CFace,vcg::face::VertexRef, vcg::face::Normal3d, vcg::face::EdgePlane,vcg::face::Color4b,vcg::face::Mark,vcg::face::BitFlags> {}; +class CMesh : public vcg::tri::TriMesh< std::vector, std::vector > {}; +#else +#include +#include class MyEdge; class CFace; class CVertex : public vcg::VertexVCVQ< double,MyEdge,CFace > {}; class CFace : public vcg::FaceRTFCFMFN< CVertex,MyEdge,CFace > {}; class CMesh : public vcg::tri::TriMesh< std::vector, std::vector > {}; +#endif #endif diff --git a/apps/metro/metro.cpp b/apps/metro/metro.cpp index eefdf85e..3a43a29e 100644 --- a/apps/metro/metro.cpp +++ b/apps/metro/metro.cpp @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.22 2006/10/25 12:40:19 fiorin +Added possibility to use Octree as search structure: + Revision 1.21 2006/05/03 21:22:39 cignoni added missing Include @@ -259,7 +262,7 @@ int main(int argc, char**argv) tri::UpdateBounding::Box(S2); // set Bounding Box. - Box3d bbox, tmp_bbox_M1=S1.bbox, tmp_bbox_M2=S2.bbox; + Box3 bbox, tmp_bbox_M1=S1.bbox, tmp_bbox_M2=S2.bbox; bbox.Add(S1.bbox); bbox.Add(S2.bbox); bbox.Offset(bbox.Diag()*0.02); diff --git a/apps/metro/sampling.h b/apps/metro/sampling.h index 9cea0089..a99491ea 100644 --- a/apps/metro/sampling.h +++ b/apps/metro/sampling.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.23 2006/10/25 12:40:19 fiorin +Added possibility to use Octree as search structure: + Revision 1.22 2006/04/20 08:30:24 cignoni small GCC compiling issues @@ -286,7 +289,7 @@ inline double Sampling::ComputeMeshArea(MetroMesh & mesh) for(face=mesh.face.begin(); face != mesh.face.end(); face++) if(!(*face).IsD()) - area += face->DoubleArea(); + area += DoubleArea(*face); return area/2.0; } @@ -469,7 +472,7 @@ void Sampling::MontecarloFaceSampling() if(!(*fi).IsD()) { // compute # samples in the current face. - n_samples_decimal += 0.5*fi->DoubleArea() * n_samples_per_area_unit; + n_samples_decimal += 0.5*DoubleArea(*fi) * n_samples_per_area_unit; n_samples = (int) n_samples_decimal; // for every sample p_i in T... @@ -543,7 +546,7 @@ void Sampling::SubdivFaceSampling() for(fi=S1.face.begin(); fi != S1.face.end(); fi++) { // compute # samples in the current face. - n_samples_decimal += 0.5*fi->DoubleArea() * n_samples_per_area_unit; + n_samples_decimal += 0.5*DoubleArea(*fi) * n_samples_per_area_unit; n_samples = (int) n_samples_decimal; if(n_samples) { @@ -592,7 +595,7 @@ void Sampling::SimilarFaceSampling() for(fi=S1.face.begin(); fi != S1.face.end(); fi++) { // compute # samples in the current face. - n_samples_decimal += 0.5*fi->DoubleArea() * n_samples_per_area_unit; + n_samples_decimal += 0.5*DoubleArea(*fi) * n_samples_per_area_unit; n_samples = (int) n_samples_decimal; if(n_samples) {