Coupure prévue mardi 3 Août au matin pour maintenance du serveur. Nous faisons au mieux pour que celle-ci soit la plus brève possible.

Commit 51b5ef93 authored by Thomas's avatar Thomas
Browse files

correction intersection bis

parents b5395a85 84fe346d
...@@ -2,13 +2,14 @@ SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin) ...@@ -2,13 +2,14 @@ SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin)
SET (COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} gzstream AntTweakBar openctm assimp) SET (COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} gzstream AntTweakBar openctm assimp)
SET(CGoGN_LIBS_D topologyD algoD containerD utilsD) SET(CGoGN_LIBS_R topology algo container utils)
SET(CGoGN_LIBS_R topology algo container utils)
IF(WIN32) IF(WIN32)
SET(CGoGN_LIBS_D topology algo container utils) # libs have same name but in different place in Visual
add_subdirectory(Examples/Release) add_subdirectory(Examples/Release)
add_subdirectory(Tuto) add_subdirectory(Tuto)
ELSE(WIN32) ELSE(WIN32)
SET(CGoGN_LIBS_D topologyD algoD containerD utilsD)
add_subdirectory(Examples/Release) add_subdirectory(Examples/Release)
add_subdirectory(Examples/Debug) add_subdirectory(Examples/Debug)
add_subdirectory(Examples/Tests) add_subdirectory(Examples/Tests)
......
...@@ -28,9 +28,12 @@ include_directories( ...@@ -28,9 +28,12 @@ include_directories(
) )
# define libs path # define libs path
link_directories( IF(WIN32)
${CGoGN_ROOT_DIR}/lib/Release link_directories( ${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) )
) ELSE(WIN32)
link_directories( ${CGoGN_ROOT_DIR}/lib/Release )
ENDIF(WIN32)
#define exec to compile #define exec to compile
......
...@@ -2,12 +2,8 @@ cmake_minimum_required(VERSION 2.6) ...@@ -2,12 +2,8 @@ cmake_minimum_required(VERSION 2.6)
project(Tutos) project(Tutos)
#SET (COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} gzstream AntTweakBar openctm)
SET (CMAKE_BUILD_TYPE Debug) SET (CMAKE_BUILD_TYPE Debug)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
# FOR Qt4 # FOR Qt4
...@@ -28,9 +24,14 @@ include_directories( ...@@ -28,9 +24,14 @@ include_directories(
${CGoGN_ROOT_DIR}/include ${CGoGN_ROOT_DIR}/include
) )
# define libs path # define libs path
link_directories(${CGoGN_ROOT_DIR}/lib/Release ${CGoGN_ROOT_DIR}/lib/Debug) IF(WIN32)
link_directories(${CGoGN_ROOT_DIR}/lib/$(ConfigurationName))
ELSE(WIN32)
link_directories(${CGoGN_ROOT_DIR}/lib/Release ${CGoGN_ROOT_DIR}/lib/Debug)
ENDIF(WIN32)
#define exec to compile #define exec to compile
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
* * * *
*******************************************************************************/ *******************************************************************************/
//#define GL3_PROTOTYPES
#include "tuto1.h" #include "tuto1.h"
#include <iostream> #include <iostream>
...@@ -41,6 +39,9 @@ ...@@ -41,6 +39,9 @@
#include <glm/gtc/type_ptr.hpp> #include <glm/gtc/type_ptr.hpp>
#include "Algo/Render/SVG/mapSVGRender.h"
using namespace CGoGN ; using namespace CGoGN ;
/** /**
...@@ -53,6 +54,11 @@ struct PFP: public PFP_STANDARD ...@@ -53,6 +54,11 @@ struct PFP: public PFP_STANDARD
typedef EmbeddedMap2<Map2> MAP; typedef EmbeddedMap2<Map2> MAP;
}; };
// declaration of the map
PFP::MAP myMap;
// and attribute of position
AttributeHandler<PFP::VEC3> position;
void MyQT::cb_initGL() void MyQT::cb_initGL()
{ {
// choose to use GL version 2 // choose to use GL version 2
...@@ -99,12 +105,21 @@ void MyQT::cb_keyPress(int code) ...@@ -99,12 +105,21 @@ void MyQT::cb_keyPress(int code)
if ((code >'0') && (code<='9')) if ((code >'0') && (code<='9'))
CGoGNout << " key num " << code-'0' << "pressed"<< CGoGNendl; CGoGNout << " key num " << code-'0' << "pressed"<< CGoGNendl;
if (code == 's')
{
std::string filename = selectFileSave("Export SVG file ");
CGoGNout << "Exporting "<<filename<<CGoGNendl;
Algo::Render::SVG::SVGOut svg(filename,modelViewMatrix(),projectionMatrix());
svg.renderLinesToSVG<PFP>(myMap,position);
svg.setColor(Geom::Vec3f(0.7f,0.0f,0.4f));
svg.renderFacesToSVG<PFP>(myMap,position,0.8f);
//svg destruction close the file
}
} }
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
// declaration of the map
PFP::MAP myMap;
// creation of 2 new faces: 1 triangle and 1 square // creation of 2 new faces: 1 triangle and 1 square
Dart d1 = myMap.newFace(3); Dart d1 = myMap.newFace(3);
...@@ -115,7 +130,7 @@ int main(int argc, char **argv) ...@@ -115,7 +130,7 @@ int main(int argc, char **argv)
// creation of a new attribute on vertices of type 3D vector // creation of a new attribute on vertices of type 3D vector
// a handler to this attribute is returned // a handler to this attribute is returned
AttributeHandler<PFP::VEC3> position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position"); position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
// affect a position to the vertices of the mesh // affect a position to the vertices of the mesh
position[d1] = PFP::VEC3(0, 0, 0); position[d1] = PFP::VEC3(0, 0, 0);
......
...@@ -47,7 +47,6 @@ using namespace CGoGN ; ...@@ -47,7 +47,6 @@ using namespace CGoGN ;
* Ajouter les widgets necessaires, mettre des noms clairs pour * Ajouter les widgets necessaires, mettre des noms clairs pour
* les utiliser dans le .cpp (pour les call back principalement) * les utiliser dans le .cpp (pour les call back principalement)
*/ */
class MyQT: public Utils::QT::SimpleQT class MyQT: public Utils::QT::SimpleQT
{ {
Q_OBJECT Q_OBJECT
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include "Utils/shaderVectorPerVertex.h" #include "Utils/shaderVectorPerVertex.h"
#include "Utils/cgognStream.h" #include "Utils/cgognStream.h"
#include "Algo/Render/SVG/mapSVGRender.h"
using namespace CGoGN ; using namespace CGoGN ;
...@@ -68,24 +69,29 @@ void MyQT::balls_onoff(bool x) ...@@ -68,24 +69,29 @@ void MyQT::balls_onoff(bool x)
{ {
render_balls = !render_balls; render_balls = !render_balls;
updateGL(); updateGL();
CGoGNerr << " balls_onoff "<< CGoGNendl;
} }
void MyQT::vectors_onoff(bool x) void MyQT::vectors_onoff(bool x)
{ {
render_vectors = !render_vectors; render_vectors = !render_vectors;
updateGL(); updateGL();
CGoGNerr << " vectors_onoff "<< CGoGNflush;
} }
void MyQT::text_onoff(bool x) void MyQT::text_onoff(bool x)
{ {
render_text = !render_text; render_text = !render_text;
updateGL(); updateGL();
CGoGNerr << " text_onoff " << CGoGNflush;
} }
void MyQT::topo_onoff(bool x) void MyQT::topo_onoff(bool x)
{ {
render_topo = !render_topo; render_topo = !render_topo;
updateGL(); updateGL();
CGoGNerr << " topo_onoff " << CGoGNflush;
} }
void MyQT::slider_balls(int x) void MyQT::slider_balls(int x)
...@@ -227,10 +233,6 @@ void MyQT::cb_mousePress(int button, int x, int y) ...@@ -227,10 +233,6 @@ void MyQT::cb_mousePress(int button, int x, int y)
Dart d = m_render_topo->picking<PFP>(myMap, allDarts, x, getHeight() - y); Dart d = m_render_topo->picking<PFP>(myMap, allDarts, x, getHeight() - y);
if (d != Dart::nil()) if (d != Dart::nil())
{ {
// std::stringstream ss;
// ss << "Dart "<< d << " clicked"<< CGoGNendl;
// statusMsg(ss.str().c_str());
CGoGNout << "Dart "<< d << " clicked" << CGoGNendl; CGoGNout << "Dart "<< d << " clicked" << CGoGNendl;
} }
else else
...@@ -240,6 +242,21 @@ void MyQT::cb_mousePress(int button, int x, int y) ...@@ -240,6 +242,21 @@ void MyQT::cb_mousePress(int button, int x, int y)
} }
} }
void MyQT::cb_keyPress(int code)
{
if (code == 's')
{
std::string filename = selectFileSave("Export SVG file ");
CGoGNout << "Exporting "<<filename<<CGoGNendl;
Algo::Render::SVG::SVGOut svg(filename,modelViewMatrix(),projectionMatrix());
svg.renderLinesToSVG<PFP>(myMap,position);
svg.setColor(Geom::Vec3f(1.,0.,0.));
svg.renderFacesToSVG<PFP>(myMap,position,0.8f);
//svg destruction close the file
}
}
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position"); position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position");
...@@ -305,7 +322,8 @@ int main(int argc, char **argv) ...@@ -305,7 +322,8 @@ int main(int argc, char **argv)
CGoGNdbg2.toConsole(&sqt); CGoGNdbg2.toConsole(&sqt);
CGoGNerr.toConsole(&sqt); CGoGNerr.toConsole(&sqt);
CGoGNdbg2 << " TextureSize " << texSize << CGoGNendl; CGoGNdbg2 << " TextureSize " << texSize << CGoGNendl;
CGoGNerr << " ERROR " << 5*7 << CGoGNendl; CGoGNerr << " ERROR " << 5*7 << CGoGNflush;
// et on attend la fin. // et on attend la fin.
return app.exec(); return app.exec();
......
...@@ -97,8 +97,7 @@ protected: ...@@ -97,8 +97,7 @@ protected:
void cb_mousePress(int button, int x, int y); void cb_mousePress(int button, int x, int y);
void cb_keyPress(int code) void cb_keyPress(int code);
{}
// slots locaux // slots locaux
public slots: public slots:
......
...@@ -379,7 +379,7 @@ int main(int argc, char **argv) ...@@ -379,7 +379,7 @@ int main(int argc, char **argv)
{ {
using namespace CGoGN::Utils::QT; using namespace CGoGN::Utils::QT;
inputValues( VarInt(0,20,xx, "Entier", inputValues( VarInteger(0,20,xx, "Entier",
VarBool(zz, "Bool", VarBool(zz, "Bool",
VarDbl(0.314,3.14,yy,"Double", VarDbl(0.314,3.14,yy,"Double",
VarSlider(10,100,kk,"Slider", VarSlider(10,100,kk,"Slider",
......
Dépendences Linux: Dépendences Linux:
installer les paquets suivants: installer les paquets suivants:
cmake libXi-dev libXmu-dev freeglut3-dev libdevil-dev libglew-dev libgmp3-dev libxml2-dev libboost-dev lizip-dev libqt4-help qt4-designer qt4-dev-tools cmake libXi-dev libXmu-dev freeglut3-dev libdevil-dev libglew-dev libgmp3-dev libxml2-dev libboost-dev lizip-dev libqt4-dev qt4-designer qt4-dev-tools
Pour compiler CGoGN: Pour compiler CGoGN:
......
...@@ -8,6 +8,7 @@ SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/..) ...@@ -8,6 +8,7 @@ SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/..)
find_package(OpenGL) find_package(OpenGL)
find_package(GLUT) find_package(GLUT)
IF (APPLE) IF (APPLE)
SET(CMAKE_OSX_ARCHITECTURES x86_64) SET(CMAKE_OSX_ARCHITECTURES x86_64)
ENDIF(APPLE) ENDIF(APPLE)
...@@ -19,10 +20,10 @@ IF(WIN32) ...@@ -19,10 +20,10 @@ IF(WIN32)
add_subdirectory(gzstream/Build) add_subdirectory(gzstream/Build)
add_subdirectory(Numerical) add_subdirectory(Numerical)
add_subdirectory(Assimp/code) add_subdirectory(Assimp/code)
if(CMAKE_CONFIGURATION_TYPES) # if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES Release) # set(CMAKE_CONFIGURATION_TYPES Release)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Use only Release configuration for ThirdParty" FORCE) # set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Use only Release configuration for ThirdParty" FORCE)
endif() # endif()
ELSE(WIN32) ELSE(WIN32)
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Release) SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Release)
add_custom_target( FakeTargetOpenCTM ALL "make" add_custom_target( FakeTargetOpenCTM ALL "make"
......
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
#include <stdio.h> #include <stdio.h>
#include <limits> #include <limits>
#include <cmath> #include <cmath>
#ifndef PI_DEFINED //#ifndef PI_DEFINED
#define PI_DEFINED //#define PI_DEFINED
const double M_PI = 3.14159265359; //double M_PI = 3.14159265359;
#endif //#endif
#endif #endif
......
...@@ -9,7 +9,8 @@ SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/..) ...@@ -9,7 +9,8 @@ SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/..)
SET(CMAKE_MODULE_PATH " ${CMAKE_MODULE_PATH} ${CGoGN_ROOT_DIR}/cmake_modules/") SET(CMAKE_MODULE_PATH " ${CMAKE_MODULE_PATH} ${CGoGN_ROOT_DIR}/cmake_modules/")
find_package(OpenGL) find_package(OpenGL REQUIRED)
find_package(Qt4 REQUIRED)
find_package(GLUT) find_package(GLUT)
# qq definition specifiques pour mac # qq definition specifiques pour mac
...@@ -28,7 +29,6 @@ IF(WIN32) ...@@ -28,7 +29,6 @@ IF(WIN32)
SET(LIBXML2_LIBRARIES xml2) SET(LIBXML2_LIBRARIES xml2)
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/) INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/)
LINK_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/lib/) LINK_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/lib/)
# add_subdirectory(${CGoGN_ROOT_DIR}/ThirdParty ThirdParty)
add_subdirectory(Release) add_subdirectory(Release)
add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps) add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps)
if (EXISTS "${CGoGN_ROOT_DIR}/Perso") if (EXISTS "${CGoGN_ROOT_DIR}/Perso")
...@@ -37,7 +37,7 @@ IF(WIN32) ...@@ -37,7 +37,7 @@ IF(WIN32)
if(CMAKE_CONFIGURATION_TYPES) if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES Release Debug) set(CMAKE_CONFIGURATION_TYPES Release Debug)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Use only Release configuration for ThirdParty" FORCE) set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Only Release or Debug" FORCE)
endif() endif()
ELSE(WIN32) ELSE(WIN32)
...@@ -51,7 +51,7 @@ ELSE(WIN32) ...@@ -51,7 +51,7 @@ ELSE(WIN32)
ELSE(IL_LIBRARIES) ELSE(IL_LIBRARIES)
SET(DEVIL_LIBRARIES ${IL_LIBRARY} ${ILU_LIBRARY} ${ILUT_LIBRARY}) SET(DEVIL_LIBRARIES ${IL_LIBRARY} ${ILU_LIBRARY} ${ILUT_LIBRARY})
ENDIF(IL_LIBRARIES) ENDIF(IL_LIBRARIES)
# add_subdirectory(${CGoGN_ROOT_DIR}/ThirdParty ThirdParty)
add_subdirectory(Release) add_subdirectory(Release)
add_subdirectory(Debug) add_subdirectory(Debug)
add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps) add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps)
......
...@@ -2,15 +2,17 @@ cmake_minimum_required(VERSION 2.6) ...@@ -2,15 +2,17 @@ cmake_minimum_required(VERSION 2.6)
project(CGoGNDebug) project(CGoGNDebug)
set(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Debug)
#SET(BUILD_SHARED_LIBS,FALSE)
SET(CMAKE_BUILD_TYPE Debug) SET(CMAKE_BUILD_TYPE Debug)
IF(WIN32)
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib)
ELSE(WIN32)
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Debug)
ENDIF(WIN32)
#SET(BUILD_SHARED_LIBS,FALSE)
# FOR Qt4 # FOR Qt4
FIND_PACKAGE(Qt4 REQUIRED)
SET(QT_USE_QTOPENGL TRUE) SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE}) INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})
......
...@@ -2,15 +2,19 @@ cmake_minimum_required(VERSION 2.6) ...@@ -2,15 +2,19 @@ cmake_minimum_required(VERSION 2.6)
project(CGoGNRelease) project(CGoGNRelease)
set(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Release) SET(CMAKE_BUILD_TYPE Release)
IF(WIN32)
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib)
ELSE(WIN32)
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Release)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
ENDIF(WIN32)
#SET(BUILD_SHARED_LIBS,FALSE) #SET(BUILD_SHARED_LIBS,FALSE)
SET(CMAKE_BUILD_TYPE Release)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
# FOR Qt4 # FOR Qt4
FIND_PACKAGE(Qt4 REQUIRED)
SET(QT_USE_QTOPENGL TRUE) SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE}) INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})
......
...@@ -149,7 +149,7 @@ void decimate( ...@@ -149,7 +149,7 @@ void decimate(
while(!finished) while(!finished)
{ {
CGoGNout << "Countdown : " ; CGoGNout << "Countdown : " ;
CGoGNout << std::setprecision(8) << (nbVertices - nbWantedVertices) << "\r" << std::flush; CGoGNout << std::setprecision(8) << (nbVertices - nbWantedVertices) << "\r" << /* flush */ CGoGNendl ;
if(!selector->nextEdge(d)) { if(!selector->nextEdge(d)) {
CGoGNout << CGoGNendl << "out" << CGoGNendl ; CGoGNout << CGoGNendl << "out" << CGoGNendl ;
......
...@@ -86,28 +86,28 @@ bool exportPLY(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons ...@@ -86,28 +86,28 @@ bool exportPLY(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
} }
} }
out << "ply" << CGoGNendl ; out << "ply" << std::endl ;
out << "format ascii 1.0" << CGoGNendl ; out << "format ascii 1.0" << std::endl ;
out << "comment no comment" << CGoGNendl ; out << "comment no comment" << std::endl ;
out << "element vertex " << vertices.size() << CGoGNendl ; out << "element vertex " << vertices.size() << std::endl ;
out << "property float x" << CGoGNendl ; out << "property float x" << std::endl ;
out << "property float y" << CGoGNendl ; out << "property float y" << std::endl ;
out << "property float z" << CGoGNendl ; out << "property float z" << std::endl ;
out << "element face " << facesSize.size() << CGoGNendl ; out << "element face " << facesSize.size() << std::endl ;
out << "property list uchar int vertex_indices" << CGoGNendl ; out << "property list uchar int vertex_indices" << std::endl ;
out << "end_header" << CGoGNendl ; out << "end_header" << std::endl ;
for(unsigned int i = 0; i < vertices.size(); ++i) for(unsigned int i = 0; i < vertices.size(); ++i)
{ {
const VEC3& v = position[vertices[i]] ; const VEC3& v = position[vertices[i]] ;
out << v[0] << " " << v[1] << " " << v[2] << CGoGNendl ; out << v[0] << " " << v[1] << " " << v[2] << std::endl ;
} }
for(unsigned int i = 0; i < facesSize.size(); ++i) for(unsigned int i = 0; i < facesSize.size(); ++i)
{ {
out << facesSize[i] ; out << facesSize[i] ;
for(unsigned int j = 0; j < facesIdx[i].size(); ++j) for(unsigned int j = 0; j < facesIdx[i].size(); ++j)
out << " " << facesIdx[i][j] ; out << " " << facesIdx[i][j] ;
out << CGoGNendl ; out << std::endl ;
} }
out.close() ; out.close() ;
...@@ -164,20 +164,20 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons ...@@ -164,20 +164,20 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
} }
} }
out << "OFF" << CGoGNendl ; out << "OFF" << std::endl ;
out << vertices.size() << " " << facesSize.size() << " " << 0 << CGoGNendl ; out << vertices.size() << " " << facesSize.size() << " " << 0 << std::endl ;
for(unsigned int i = 0; i < vertices.size(); ++i) for(unsigned int i = 0; i < vertices.size(); ++i)
{ {
const VEC3& v = position[vertices[i]] ; const VEC3& v = position[vertices[i]] ;
out << v[0] << " " << v[1] << " " << v[2] << CGoGNendl ; out << v[0] << " " << v[1] << " " << v[2] << std::endl ;
} }
for(unsigned int i = 0; i < facesSize.size(); ++i)