Commit 61426fcd authored by Sylvain Thery's avatar Sylvain Thery

Utilisation des CGoGNStream partout !

Utilisation possible (encore) de GL 1
parent 47d0007d
......@@ -30,10 +30,10 @@ using namespace CGoGN;
int main()
{
typedef Geom::Vec3f VEC3;
std::cout << "Check Geometry/inclusion.h" << std::endl;
std::cout << "Check Status : PARTIAL" << std::endl;
CGoGNout << "Check Geometry/inclusion.h" << CGoGNendl;
CGoGNout << "Check Status : PARTIAL" << CGoGNendl;
std::cout << "Check isPointInTriangle : Start" << std::endl;
CGoGNout << "Check isPointInTriangle : Start" << CGoGNendl;
VEC3 ta(0,0,0);
VEC3 tb(5,0,0);
VEC3 tc(0,5,0);
......@@ -45,51 +45,51 @@ int main()
if(Geom::isPointInTriangle<VEC3>(pIn1,ta,tb,tc)!=Geom::FACE_INCLUSION)
{
std::cout << "ERROR : isPointInTriangle : face inclusion" << std::endl;
CGoGNout << "ERROR : isPointInTriangle : face inclusion" << CGoGNendl;
}
if(Geom::isPointInTriangle<VEC3>(pIn2,ta,tb,tc)!=Geom::EDGE_INCLUSION)
{
std::cout << "ERROR : isPointInTriangle : edge inclusion" << std::endl;
CGoGNout << "ERROR : isPointInTriangle : edge inclusion" << CGoGNendl;
}
if(Geom::isPointInTriangle<VEC3>(pIn3,ta,tb,tc)!=Geom::EDGE_INCLUSION)
{
std::cout << "ERROR : isPointInTriangle : edge inclusion" << std::endl;
CGoGNout << "ERROR : isPointInTriangle : edge inclusion" << CGoGNendl;
}
if(Geom::isPointInTriangle<VEC3>(pIn4,ta,tb,tc)!=Geom::EDGE_INCLUSION)
{
std::cout << "ERROR : isPointInTriangle : edge inclusion" << std::endl;
CGoGNout << "ERROR : isPointInTriangle : edge inclusion" << CGoGNendl;
}
if(Geom::isPointInTriangle<VEC3>(ta,ta,tb,tc)!=Geom::VERTEX_INCLUSION)
{
std::cout << "ERROR : isPointInTriangle : vertex inclusion" << std::endl;
CGoGNout << "ERROR : isPointInTriangle : vertex inclusion" << CGoGNendl;
}
if(Geom::isPointInTriangle<VEC3>(pOut,ta,tb,tc)!=Geom::NO_INCLUSION)
{
std::cout << "ERROR : isPointInTriangle : no inclusion" << std::endl;
CGoGNout << "ERROR : isPointInTriangle : no inclusion" << CGoGNendl;
}
std::cout << "Check isPointInTriangle : Done" << std::endl;
CGoGNout << "Check isPointInTriangle : Done" << CGoGNendl;
// Inclusion isSegmentInTriangle(const VEC3& P1, const VEC3& P2, const VEC3& Ta, const VEC3& Tb, const VEC3& Tc, const VEC3& N) ;
// bool isPointInTetrahedron(VEC3 points[4], VEC3& point, bool CCW) ;
// bool isEdgeInOrIntersectingTetrahedron(VEC3 points[4], VEC3& point1, VEC3& point2, bool CCW) ;
std::cout << "Check arePointsEquals : Start" << std::endl;
CGoGNout << "Check arePointsEquals : Start" << CGoGNendl;
VEC3 p1(0,0,0);
VEC3 p2(0.1,0.1,0.1);
if(!Geom::arePointsEquals<VEC3>(p1,p1) || !Geom::arePointsEquals<VEC3>(p2,p2)
|| Geom::arePointsEquals<VEC3>(p1,p2) || Geom::arePointsEquals<VEC3>(p2,p1))
{
std::cout << "ERROR : arePointsEquals" << std::endl;
CGoGNout << "ERROR : arePointsEquals" << CGoGNendl;
}
std::cout << "Check arePointsEquals : Done" << std::endl;
CGoGNout << "Check arePointsEquals : Done" << CGoGNendl;
return 0;
}
......@@ -6,8 +6,8 @@ using namespace CGoGN;
int main()
{
typedef Geom::Vec3f VEC3;
std::cout << "Check Geometry/orientation.h" << std::endl;
std::cout << "Check Status : PARTIAL" << std::endl;
CGoGNout << "Check Geometry/orientation.h" << CGoGNendl;
CGoGNout << "Check Status : PARTIAL" << CGoGNendl;
// OrientationLine testOrientationLines<VEC3>(const VEC3& a, const VEC3& b, const VEC3& c, const VEC3& d);
......@@ -15,17 +15,17 @@ int main()
// Orientation3D testOrientation3D<VEC3>(const VEC3& P, const VEC3& N, const VEC3& PP);
std::cout << "Check testOrientation2D : Start" << std::endl;
CGoGNout << "Check testOrientation2D : Start" << CGoGNendl;
VEC3 p1(0,0,0);
VEC3 p2(5,0,0);
VEC3 p3(5,5,0);
VEC3 p4(5,10,0);
if(Geom::testOrientation2D<VEC3>(p3,p2,p1)!= Geom::RIGHT) {
std::cout << "ERROR : testOrientation2D : testRight" << std::endl;
CGoGNout << "ERROR : testOrientation2D : testRight" << CGoGNendl;
}
if(Geom::testOrientation2D<VEC3>(p1,p2,p3)!= Geom::LEFT) {
std::cout << "ERROR : testOrientation2D : testLeft" << std::endl;
CGoGNout << "ERROR : testOrientation2D : testLeft" << CGoGNendl;
}
if(Geom::testOrientation2D<VEC3>(p4,p2,p3)!= Geom::ALIGNED
......@@ -33,10 +33,10 @@ int main()
|| Geom::testOrientation2D<VEC3>(p3,p2,p3)!= Geom::ALIGNED
|| Geom::testOrientation2D<VEC3>(p2,p2,p2)!= Geom::ALIGNED
) {
std::cout << "ERROR : testOrientation2D : testAligned" << std::endl;
CGoGNout << "ERROR : testOrientation2D : testAligned" << CGoGNendl;
}
std::cout << "Check testOrientation2D : Done" << std::endl;
CGoGNout << "Check testOrientation2D : Done" << CGoGNendl;
// bool isTetrahedronWellOriented<VEC3>(const VEC3 points[4], bool CCW = true) ;
......
......@@ -249,7 +249,7 @@ void myGlutWin::myKeyboard(unsigned char keycode, int, int)
Algo::Modelisation::CatmullClarkSubdivision<PFP>(myMap, position);
GLint t2 = glutGet(GLUT_ELAPSED_TIME);
GLfloat seconds = (t2 - t1) / 1000.0f;
std::cout << "catmull-clark: "<< seconds << "sec" << std::endl;
CGoGNout << "catmull-clark: "<< seconds << "sec" << CGoGNendl;
Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
......@@ -266,7 +266,7 @@ void myGlutWin::myKeyboard(unsigned char keycode, int, int)
Algo::Modelisation::LoopSubdivision<PFP>(myMap, position);
GLint t2 = glutGet(GLUT_ELAPSED_TIME);
GLfloat seconds = (t2 - t1) / 1000.0f;
std::cout << "loop: "<< seconds << "sec" << std::endl;
CGoGNout << "loop: "<< seconds << "sec" << CGoGNendl;
Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal, allDarts) ;
......@@ -279,7 +279,7 @@ void myGlutWin::myKeyboard(unsigned char keycode, int, int)
Algo::Modelisation::Sqrt3Subdivision<PFP>(myMap, position);
GLint t2 = glutGet(GLUT_ELAPSED_TIME);
GLfloat seconds = (t2 - t1) / 1000.0f;
std::cout << "dual: "<< seconds << "sec" << std::endl;
CGoGNout << "dual: "<< seconds << "sec" << CGoGNendl;
Algo::Geometry::computeNormalVertices<PFP>(myMap, position, normal, allDarts) ;
......@@ -334,17 +334,17 @@ int main(int argc, char **argv)
{
position = myMap.addAttribute<Geom::Vec3f>(VERTEX_ORBIT, "position");
std::cout <<"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"<<std::endl;
CGoGNout <<"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"<<CGoGNendl;
// typedef uint8 DATATYPE;
// Algo::MC::Image<DATATYPE> myImg;
// myImg.loadPNG3D("liver.png");
//
// std::cout << "Image chargee"<<std::endl;
// std::cout << myImg.getWidthX() <<"x"<< myImg.getWidthY() <<"x"<< myImg.getWidthZ() << "voxels"<<std::endl;
// CGoGNout << "Image chargee"<<CGoGNendl;
// CGoGNout << myImg.getWidthX() <<"x"<< myImg.getWidthY() <<"x"<< myImg.getWidthZ() << "voxels"<<CGoGNendl;
//
// // ajouté pour vérifier que ça marche sur les images non bool
//// myImg.Blur3();
//// std::cout << "Image lissee"<<std::endl;
//// CGoGNout << "Image lissee"<<CGoGNendl;
//
// // fonction de fenetrage de type superieur à ...
// Algo::MC::WindowingGreater<DATATYPE> myWindFunc;
......@@ -353,13 +353,13 @@ int main(int argc, char **argv)
// myWindFunc.setIsoValue(DATATYPE(127));
//
// // instanciation du mc
// std::cout << "mc init"<<std::endl;
// CGoGNout << "mc init"<<CGoGNendl;
// Algo::MC::MarchingCube<DATATYPE,Algo::MC::WindowingGreater,PFP> mc(&myImg, &myMap, position, myWindFunc, false);
// // MarchingCube<DATATYPE,WindowingDiff> mc(&myImg, &myMap, myWindFunc, false);
//
// // realisation du maillage
// mc.simpleMeshing();
// std::cout << "mc ok"<<std::endl;
// CGoGNout << "mc ok"<<CGoGNendl;
// typedef float DATATYPE;
//
......@@ -371,7 +371,7 @@ int main(int argc, char **argv)
//
// Scal3D myImg(256);
//
// std::cout << "mc init"<<std::endl;
// CGoGNout << "mc init"<<CGoGNendl;
// Algo::MC::MarchingCubeGen<DATATYPE, Scal3D, Algo::MC::WindowingGreater,PFP> mc(&myImg, &myMap, position, myWindFunc, false);
//
// //realisation du maillage
......@@ -431,7 +431,7 @@ int main(int argc, char **argv)
//
// GLint t2 = glutGet(GLUT_ELAPSED_TIME);
// GLfloat seconds = (t2 - t1) / 1000.0f;
// std::cout << "triangulation: "<< seconds << "sec" << std::endl;
// CGoGNout << "triangulation: "<< seconds << "sec" << CGoGNendl;
//
// Marker m = myMap.getNewMarker(VERTEX_ORBIT);
// myMap.markEmbVertex(myMap.begin(),m);
......@@ -439,12 +439,12 @@ int main(int argc, char **argv)
// Dart xd = myMap.alpha1(myMap.begin());
// if (myMap.isMarkedEmbVertex(xd,m))
// {
// std::cout << "Marke"<< std::endl;
// CGoGNout << "Marke"<< CGoGNendl;
// }
// xd = myMap.phi2(xd);
// if (myMap.isMarkedEmbVertex(xd,m))
// {
// std::cout << "Marke aussi"<< std::endl;
// CGoGNout << "Marke aussi"<< CGoGNendl;
// }
//
// myMap.clearEmbMarkers(m,VERTEX_ORBIT);
......@@ -459,7 +459,7 @@ int main(int argc, char **argv)
std::vector<std::string> attrNames ;
if(!Algo::Import::importMesh<PFP>(myMap, std::string(argv[1]), attrNames))
{
std::cerr << "could not import " << std::string(argv[1]) << std::endl ;
CGoGNerr << "could not import " << std::string(argv[1]) << CGoGNendl ;
exit(1);
}
position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
......@@ -487,7 +487,7 @@ int main(int argc, char **argv)
GLint t2 = glutGet(GLUT_ELAPSED_TIME);
GLfloat seconds = (t2 - t1) / 1000.0f;
std::cout << "subdiv: "<< seconds << "sec" << std::endl;
CGoGNout << "subdiv: "<< seconds << "sec" << CGoGNendl;
// myMap.getAttributeContainer(VERTEX_ORBIT).toggleProcess(position);
......@@ -498,22 +498,22 @@ int main(int argc, char **argv)
// Algo::Modelisation::triangleSubdivide<PFP, PFP::EVERTEX, PFP::EVERTEX>(myMap,ec);
// Algo::Modelisation::triangleSubdivide<PFP, PFP::EVERTEX, PFP::EVERTEX>(myMap,ec);
std::cout << "Nombre de sommets plonges "<< myMap.getNbCells(VERTEX_ORBIT)<<std::endl;
std::cout << "Nombre de sommets topo: "<< myMap.getNbOrbits(0)<<std::endl;
std::cout << "Nombre de faces topo: "<< myMap.getNbOrbits(2)<<std::endl;
CGoGNout << "Nombre de sommets plonges "<< myMap.getNbCells(VERTEX_ORBIT)<<CGoGNendl;
CGoGNout << "Nombre de sommets topo: "<< myMap.getNbOrbits(0)<<CGoGNendl;
CGoGNout << "Nombre de faces topo: "<< myMap.getNbOrbits(2)<<CGoGNendl;
// GLint t2 = glutGet(GLUT_ELAPSED_TIME);
// GLfloat seconds = (t2 - t1) / 1000.0f;
// std::cout << "import: "<< seconds << "sec" << std::endl;
// CGoGNout << "import: "<< seconds << "sec" << CGoGNendl;
}
float area = Algo::Geometry::totalArea<PFP>(myMap, position) ;
std::cout << "total area = " << area << std::endl ;
CGoGNout << "total area = " << area << CGoGNendl ;
bool inter = Algo::Geometry::areTrianglesInIntersection<PFP>(myMap,0,10,position) ;
std::cout << "intersection = " << inter << std::endl ;
CGoGNout << "intersection = " << inter << CGoGNendl ;
normal = myMap.addAttribute<Geom::Vec3f>(VERTEX_ORBIT, "normals");
// PFP::NORMAL normal(normal,myMap);
......@@ -526,17 +526,17 @@ int main(int argc, char **argv)
// for (Dart dd=myMap.begin(); dd!= myMap.end(); myMap.next(dd))
// {
// unsigned int a = myMap.getEmbedding(dd, 0);
// std::cout << "dart:"<<dd.index<< " / ";
// std::cout << "emb:"<<a<< " / ";
// std::cout<<position[a]<< " / ";
// std::cout << tm[a]<< std::endl;
// CGoGNout << "dart:"<<dd.index<< " / ";
// CGoGNout << "emb:"<<a<< " / ";
// CGoGNout<<position[a]<< " / ";
// CGoGNout << tm[a]<< CGoGNendl;
// }
Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap,position);
std::cout << "BB: "<< bb.min() << " / "<< bb.max() << std::endl;
CGoGNout << "BB: "<< bb.min() << " / "<< bb.max() << CGoGNendl;
// compute width and position of object for centering
......
......@@ -237,13 +237,13 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
{
int nbVertices = myMap.getNbOrbits(VERTEX_ORBIT) ;
std::cout << "nb darts = " << myMap.getNbOrbits(DART_ORBIT) << std::endl;
CGoGNout << "nb darts = " << myMap.getNbOrbits(DART_ORBIT) << CGoGNendl;
GLint t1 = glutGet(GLUT_ELAPSED_TIME);
Algo::DecimationVolumique::decimate<PFP>(myMap, Algo::DecimationVolumique::S_Random, Algo::DecimationVolumique::A_Centroid, position, nbVertices * 0.75);
GLint t2 = glutGet(GLUT_ELAPSED_TIME);
GLfloat seconds = (t2 - t1) / 1000.0f;
std::cout << "decimation: "<< seconds << "sec" << std::endl;
CGoGNout << "decimation: "<< seconds << "sec" << CGoGNendl;
break;
}
case 'h':
......@@ -253,7 +253,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
}
default :
{
std::cout << "not implemented" << std::endl;
CGoGNout << "not implemented" << CGoGNendl;
break;
}
......@@ -274,21 +274,21 @@ void MyGlutWin::initRender()
m_render->updateData(Algo::Render::GL2::POSITIONS, position );
GLint t2 = glutGet(GLUT_ELAPSED_TIME);
GLfloat seconds = (t2 - t1) / 1000.0f;
std::cout << "updateData: "<< seconds << "sec" << std::endl;
CGoGNout << "updateData: "<< seconds << "sec" << CGoGNendl;
// creation des primitives de rendu a partir de la carte
t1 = glutGet(GLUT_ELAPSED_TIME);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES);
t2 = glutGet(GLUT_ELAPSED_TIME);
seconds = (t2 - t1) / 1000.0f;
std::cout << "initPrimitives: "<< seconds << "sec" << std::endl;
CGoGNout << "initPrimitives: "<< seconds << "sec" << CGoGNendl;
// creation des primitives de rendu de la topologie a partir de la carte
t1 = glutGet(GLUT_ELAPSED_TIME);
//m_render_topo->updateData<PFP>(myMap,allDarts,position,coefTopoExplod[0],coefTopoExplod[1],coefTopoExplod[2]);
t2 = glutGet(GLUT_ELAPSED_TIME);
seconds = (t2 - t1) / 1000.0f;
std::cout << "map update: "<< seconds << "sec" << std::endl;
CGoGNout << "map update: "<< seconds << "sec" << CGoGNendl;
}
void MyGlutWin::initGUI()
......@@ -354,18 +354,18 @@ int main(int argc, char **argv)
std::vector<std::string> attrNames ;
if(argc < 2)
{
std::cerr << "usage : " << argv[0] << " -off" << std::endl;
std::cerr << "or" << std::endl;
std::cerr << "usage : " << argv[0] << " -tet" << std::endl;
std::cerr << "or" << std::endl;
std::cerr << "usage : " << argv[0] << " -ts" << std::endl;
CGoGNerr << "usage : " << argv[0] << " -off" << CGoGNendl;
CGoGNerr << "or" << CGoGNendl;
CGoGNerr << "usage : " << argv[0] << " -tet" << CGoGNendl;
CGoGNerr << "or" << CGoGNendl;
CGoGNerr << "usage : " << argv[0] << " -ts" << CGoGNendl;
return 1;
}
else if(std::string(argv[1]) == "-off")
{
std::cout << argv[1] << std::endl;
CGoGNout << argv[1] << CGoGNendl;
if (argc != 4) {
std::cerr << "usage : " << argv[0] << " -off <filename.off> <filename.ele>" << std::endl;
CGoGNerr << "usage : " << argv[0] << " -off <filename.off> <filename.ele>" << CGoGNendl;
return 1;
}
......@@ -375,7 +375,7 @@ int main(int argc, char **argv)
else if(std::string(argv[1]) == "-tet")
{
if (argc != 3) {
std::cerr << "usage : " << argv[0] << " -tet <filename.tet>" << std::endl;
CGoGNerr << "usage : " << argv[0] << " -tet <filename.tet>" << CGoGNendl;
return 1;
}
......@@ -385,7 +385,7 @@ int main(int argc, char **argv)
else if(std::string(argv[1]) == "-ts")
{
if (argc != 3) {
std::cerr << "usage : " << argv[0] << " -ts <filename.ts>" << std::endl;
CGoGNerr << "usage : " << argv[0] << " -ts <filename.ts>" << CGoGNendl;
return 1;
}
......@@ -399,9 +399,9 @@ int main(int argc, char **argv)
maillageTest();
}
//std::cout << "Nb Tetrahedron = " << myMap.getNbOrbits(VOLUME_ORBIT) << std::endl;
//CGoGNout << "Nb Tetrahedron = " << myMap.getNbOrbits(VOLUME_ORBIT) << CGoGNendl;
// " / Nb Edges = " << myMap.getNbOrbits(EDGE_ORBIT) <<
// " / Nb Vertices = " << myMap.getNbOrbits(VERTEX_ORBIT) << std::endl;
// " / Nb Vertices = " << myMap.getNbOrbits(VERTEX_ORBIT) << CGoGNendl;
// un peu d'interface
MyGlutWin* mgw = new MyGlutWin(&argc,argv,1200,800);
......
......@@ -439,7 +439,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
GLint t2 = glutGet(GLUT_ELAPSED_TIME) ;
GLfloat seconds = (t2 - t1) / 1000.0f ;
std::cout << "loop: "<< seconds << "sec" << std::endl ;
CGoGNout << "loop: "<< seconds << "sec" << CGoGNendl ;
t1 = glutGet(GLUT_ELAPSED_TIME) ;
......@@ -449,7 +449,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
t2 = glutGet(GLUT_ELAPSED_TIME) ;
seconds = (t2 - t1) / 1000.0f ;
std::cout << "display update: "<< seconds << "sec" << std::endl ;
CGoGNout << "display update: "<< seconds << "sec" << CGoGNendl ;
glutPostRedisplay() ;
break ;
......@@ -463,7 +463,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
GLint t2 = glutGet(GLUT_ELAPSED_TIME) ;
GLfloat seconds = (t2 - t1) / 1000.0f ;
std::cout << "catmull-clark: "<< seconds << "sec" << std::endl ;
CGoGNout << "catmull-clark: "<< seconds << "sec" << CGoGNendl ;
t1 = glutGet(GLUT_ELAPSED_TIME) ;
......@@ -473,7 +473,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
t2 = glutGet(GLUT_ELAPSED_TIME) ;
seconds = (t2 - t1) / 1000.0f ;
std::cout << "display update: "<< seconds << "sec" << std::endl ;
CGoGNout << "display update: "<< seconds << "sec" << CGoGNendl ;
glutPostRedisplay() ;
break ;
......@@ -487,7 +487,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
GLint t2 = glutGet(GLUT_ELAPSED_TIME) ;
GLfloat seconds = (t2 - t1) / 1000.0f ;
std::cout << "sqrt3: "<< seconds << "sec" << std::endl ;
CGoGNout << "sqrt3: "<< seconds << "sec" << CGoGNendl ;
normal = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, "normal") ;
if(!normal.isValid())
......@@ -504,7 +504,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
t2 = glutGet(GLUT_ELAPSED_TIME) ;
seconds = (t2 - t1) / 1000.0f ;
std::cout << "display update: "<< seconds << "sec" << std::endl ;
CGoGNout << "display update: "<< seconds << "sec" << CGoGNendl ;
glutPostRedisplay() ;
break ;
......@@ -518,7 +518,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
GLint t2 = glutGet(GLUT_ELAPSED_TIME) ;
GLfloat seconds = (t2 - t1) / 1000.0f ;
std::cout << "triangulation: "<< seconds << "sec" << std::endl ;
CGoGNout << "triangulation: "<< seconds << "sec" << CGoGNendl ;
t1 = glutGet(GLUT_ELAPSED_TIME) ;
......@@ -528,7 +528,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
t2 = glutGet(GLUT_ELAPSED_TIME) ;
seconds = (t2 - t1) / 1000.0f ;
std::cout << "display update: "<< seconds << "sec" << std::endl ;
CGoGNout << "display update: "<< seconds << "sec" << CGoGNendl ;
glutPostRedisplay() ;
break ;
......@@ -542,7 +542,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
GLint t2 = glutGet(GLUT_ELAPSED_TIME) ;
GLfloat seconds = (t2 - t1) / 1000.0f ;
std::cout << "quadrangulation: "<< seconds << "sec" << std::endl ;
CGoGNout << "quadrangulation: "<< seconds << "sec" << CGoGNendl ;
t1 = glutGet(GLUT_ELAPSED_TIME) ;
......@@ -552,7 +552,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
t2 = glutGet(GLUT_ELAPSED_TIME) ;
seconds = (t2 - t1) / 1000.0f ;
std::cout << "display update: "<< seconds << "sec" << std::endl ;
CGoGNout << "display update: "<< seconds << "sec" << CGoGNendl ;
glutPostRedisplay() ;
break ;
......@@ -568,7 +568,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
GLint t2 = glutGet(GLUT_ELAPSED_TIME) ;
GLfloat seconds = (t2 - t1) / 1000.0f ;
std::cout << "decimation: "<< seconds << "sec" << std::endl ;
CGoGNout << "decimation: "<< seconds << "sec" << CGoGNendl ;
t1 = glutGet(GLUT_ELAPSED_TIME) ;
......@@ -578,7 +578,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
t2 = glutGet(GLUT_ELAPSED_TIME) ;
seconds = (t2 - t1) / 1000.0f ;
std::cout << "display update: "<< seconds << "sec" << std::endl ;
CGoGNout << "display update: "<< seconds << "sec" << CGoGNendl ;
glutPostRedisplay() ;
break ;
......@@ -597,7 +597,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
GLint t2 = glutGet(GLUT_ELAPSED_TIME) ;
GLfloat seconds = (t2 - t1) / 1000.0f ;
std::cout << "dual computation: "<< seconds << "sec" << std::endl ;
CGoGNout << "dual computation: "<< seconds << "sec" << CGoGNendl ;
position = positionF ;
......@@ -616,7 +616,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
t2 = glutGet(GLUT_ELAPSED_TIME) ;
seconds = (t2 - t1) / 1000.0f ;
std::cout << "display update: "<< seconds << "sec" << std::endl ;
CGoGNout << "display update: "<< seconds << "sec" << CGoGNendl ;
glutPostRedisplay() ;
break ;
......@@ -631,7 +631,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
GLint t2 = glutGet(GLUT_ELAPSED_TIME) ;
GLfloat seconds = (t2 - t1) / 1000.0f ;
std::cout << "pliant remeshing: "<< seconds << "sec" << std::endl ;
CGoGNout << "pliant remeshing: "<< seconds << "sec" << CGoGNendl ;
t1 = glutGet(GLUT_ELAPSED_TIME) ;
......@@ -641,7 +641,7 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
t2 = glutGet(GLUT_ELAPSED_TIME) ;
seconds = (t2 - t1) / 1000.0f ;
std::cout << "display update: "<< seconds << "sec" << std::endl ;
CGoGNout << "display update: "<< seconds << "sec" << CGoGNendl ;
glutPostRedisplay() ;
break ;
......@@ -802,26 +802,26 @@ int main(int argc, char** argv)
std::vector<std::string> attrNames ;
if(!Algo::Import::importMesh<PFP>(myMap, filename, attrNames))
{
std::cerr << "could not import " << filename << std::endl ;
CGoGNerr << "could not import " << filename << CGoGNendl ;
return 1 ;
}
mgw->position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
GLint t2 = glutGet(GLUT_ELAPSED_TIME) ;
GLfloat seconds = (t2 - t1) / 1000.0f ;
std::cout << "import: " << seconds << " sec" << std::endl ;
CGoGNout << "import: " << seconds << " sec" << CGoGNendl ;
// DartMarker m(myMap) ;
// myMap.closeMap(m) ;
}
std::cout << myMap.getNbOrbits(VERTEX_ORBIT) << std::endl ;
std::cout << myMap.getNbOrbits(EDGE_ORBIT) << std::endl ;
std::cout << myMap.getNbOrbits(FACE_ORBIT) << std::endl ;
CGoGNout << myMap.getNbOrbits(VERTEX_ORBIT) << CGoGNendl ;
CGoGNout << myMap.getNbOrbits(EDGE_ORBIT) << CGoGNendl ;
CGoGNout << myMap.getNbOrbits(FACE_ORBIT) << CGoGNendl ;
// compute width and position of object for centering
Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, mgw->position) ;
std::cout << bb << std::endl ;
CGoGNout << bb << CGoGNendl ;
mgw->gPosObj = bb.center() ;