...
 
Commits (158)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

...@@ -2,4 +2,7 @@ ...@@ -2,4 +2,7 @@
CMakeLists.txt.user CMakeLists.txt.user
bin/ bin/
ThirdParty/bin/ ThirdParty/bin/
SCHNApps/bin SCHNApps/bin
\ No newline at end of file build
ThirdParty/include/TinyXml2
...@@ -2,26 +2,6 @@ cmake_minimum_required(VERSION 2.8) ...@@ -2,26 +2,6 @@ cmake_minimum_required(VERSION 2.8)
project(benches) project(benches)
#SET(CMAKE_BUILD_TYPE Release)
#SET(CMAKE_BUILD_TYPE Debug)
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
# define includes path
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CGoGN_ROOT_DIR}/include
${CGoGN_EXT_INCLUDES}
)
# define libs path
#IF(WIN32)
# link_directories( ${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) ${Boost_LIBRARY_DIRS} )
#ELSE(WIN32)
# link_directories( ${CGoGN_ROOT_DIR}/lib/Release )
#ENDIF(WIN32)
add_executable(bench_trav bench_trav.cpp ) add_executable(bench_trav bench_trav.cpp )
target_link_libraries( bench_trav ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( bench_trav ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
......
...@@ -70,8 +70,8 @@ int main(int argc, char **argv) ...@@ -70,8 +70,8 @@ int main(int argc, char **argv)
std::cout << " NB Faces "<< Algo::Topo::getNbOrbits<FACE>(myMap) << std::endl; std::cout << " NB Faces "<< Algo::Topo::getNbOrbits<FACE>(myMap) << std::endl;
std::cout << " NB Vertices "<< nbVertices << std::endl; std::cout << " NB Vertices "<< nbVertices << std::endl;
std::vector<VertexAttribute<typename PFP::VEC3, MAP> *> attr; std::vector<VertexAttribute<typename PFP::VEC3, MAP> > attr;
attr.push_back(&position); attr.push_back(position);
Algo::Surface::Decimation::decimate<PFP>(myMap, Algo::Surface::Decimation::S_QEM, Algo::Surface::Decimation::A_QEM, attr, nbVertices * 0.05) ; Algo::Surface::Decimation::decimate<PFP>(myMap, Algo::Surface::Decimation::S_QEM, Algo::Surface::Decimation::A_QEM, attr, nbVertices * 0.05) ;
VertexAttribute<PFP::VEC3, MAP> normal = myMap.addAttribute<PFP::VEC3,VERTEX,MAP>( "normal") ; VertexAttribute<PFP::VEC3, MAP> normal = myMap.addAttribute<PFP::VEC3,VERTEX,MAP>( "normal") ;
......
...@@ -52,8 +52,8 @@ int main(int argc, char **argv) ...@@ -52,8 +52,8 @@ int main(int argc, char **argv)
Algo::Surface::Modelisation::LoopSubdivision<PFP>(myMap, position) ; Algo::Surface::Modelisation::LoopSubdivision<PFP>(myMap, position) ;
unsigned int nbVertices = Algo::Topo::getNbOrbits<VERTEX>(myMap) ; unsigned int nbVertices = Algo::Topo::getNbOrbits<VERTEX>(myMap) ;
std::vector<VertexAttribute<typename PFP::VEC3, MAP> *> attr; std::vector<VertexAttribute<typename PFP::VEC3, MAP> > attr;
attr.push_back(&position); attr.push_back(position);
Algo::Surface::Decimation::decimate<PFP>(myMap, Algo::Surface::Decimation::S_QEM, Algo::Surface::Decimation::A_QEM, attr, nbVertices * 0.1) ; Algo::Surface::Decimation::decimate<PFP>(myMap, Algo::Surface::Decimation::S_QEM, Algo::Surface::Decimation::A_QEM, attr, nbVertices * 0.1) ;
Algo::Surface::Modelisation::LoopSubdivision<PFP>(myMap, position) ; Algo::Surface::Modelisation::LoopSubdivision<PFP>(myMap, position) ;
......
IF (ONELIB) project(Apps)
IF (CGoGN_ONELIB)
SET(CGoGN_LIBS cgogn) SET(CGoGN_LIBS cgogn)
ELSE (ONELIB) ELSE ()
SET(CGoGN_LIBS algo topology container utils) SET(CGoGN_LIBS algo) # topology container utils include by dependencies
ENDIF (ONELIB) ENDIF ()
IF (WIN32) IF (WIN32)
link_directories( ${CGoGN_ROOT_DIR}/lib/${ConfigurationName} ${Boost_LIBRARY_DIRS}) link_directories( ${CGoGN_ROOT_DIR}/windows_dependencies/lib/)
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/) # Release/Debug added automatically by visual IF((CGoGN_WITH_QTCREATOR))
link_directories( ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE})
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE}) # Release/Debug added automatically by visual
ELSE()
link_directories( ${CGoGN_ROOT_DIR}/bin/${ConfigurationName})
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/) # Release/Debug added automatically by visual
ENDIF()
ELSE() ELSE()
link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} ) link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE} ) SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE} )
ENDIF() ENDIF()
include_directories( #include_directories(
${CGoGN_ROOT_DIR}/include # ${CGoGN_ROOT_DIR}/include
${CGoGN_EXT_INCLUDES}) # ${CGoGN_EXT_INCLUDES})
IF (COMPILE_SANDBOX) IF (CGoGN_COMPILE_SANDBOX)
add_subdirectory(SandBox) add_subdirectory(SandBox)
ENDIF() ENDIF()
IF (COMPILE_EXAMPLES AND WITH_QT) IF (CGoGN_COMPILE_EXAMPLES AND CGoGN_WITH_QT)
add_subdirectory(Examples) add_subdirectory(Examples)
ENDIF() ENDIF()
IF (COMPILE_TUTOS) IF (CGoGN_COMPILE_TUTOS)
add_subdirectory(Tuto) add_subdirectory(Tuto)
ENDIF() ENDIF()
IF (COMPILE_BENCHES) IF (CGoGN_COMPILE_BENCHES)
add_subdirectory(Benches) add_subdirectory(Benches)
ENDIF() ENDIF()
IF (COMPILE_TESTS) IF (CGoGN_COMPILE_TESTS)
add_subdirectory(Tests) add_subdirectory(Tests)
ENDIF() ENDIF()
#IF (WITH_QT)
# add_subdirectory(Tuto)
# add_subdirectory(Examples)
# IF (NOT DONOT_COMPILE_SANDBOX)
# add_subdirectory(SandBox)
# ENDIF (NOT DONOT_COMPILE_SANDBOX)
#ENDIF (WITH_QT)
#add_subdirectory(Tests)
#add_subdirectory(Benches)
#add_subdirectory(Tuto/Traversals)
#add_subdirectory(Tuto/Attributes)
#add_subdirectory(Tuto/Markers)
#add_subdirectory(Tuto/Boundary)
#add_subdirectory(Tuto/Modelling)
...@@ -2,71 +2,63 @@ cmake_minimum_required(VERSION 2.8) ...@@ -2,71 +2,63 @@ cmake_minimum_required(VERSION 2.8)
project(examples) project(examples)
#SET(CMAKE_BUILD_TYPE Release)
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
# define includes path # define includes path
include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR})
# define libs path
#IF(WIN32)
# link_directories( ${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) ${Boost_LIBRARY_DIRS} )
#ELSE(WIN32)
# link_directories( ${CGoGN_ROOT_DIR}/lib/Release )
#ENDIF(WIN32)
#define exec to compile #define exec to compile
QT4_WRAP_CPP( frame_manip_moc frame_manip.h ) qt_wrap_cpp( frame_manip_moc frame_manip.h )
add_executable( frame_manip frame_manip.cpp ${frame_manip_moc} ) add_executable( frame_manip frame_manip.cpp ${frame_manip_moc} )
target_link_libraries( frame_manip ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( frame_manip ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
#need to define that we use Qt (only once per cmake directory!)
qt_use_cgogn_modules(frame_manip)
QT4_WRAP_CPP( texturesExample_moc texturesExample.h ) qt_wrap_cpp( texturesExample_moc texturesExample.h )
add_executable( texturesExample texturesExample.cpp ${texturesExample_moc} ) add_executable( texturesExample texturesExample.cpp ${texturesExample_moc} )
target_link_libraries( texturesExample ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( texturesExample ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(simpleMap3_moc simpleMap3.h) qt_wrap_cpp(simpleMap3_moc simpleMap3.h)
add_executable( simpleMap3 simpleMap3.cpp ${simpleMap3_moc} ) add_executable( simpleMap3 simpleMap3.cpp ${simpleMap3_moc} )
target_link_libraries( simpleMap3 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( simpleMap3 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( simpleGMap2_moc simpleGMap2.h ) qt_wrap_cpp( simpleGMap2_moc simpleGMap2.h )
add_executable( simpleGMap2 simpleGMap2.cpp ${simpleGMap2_moc} ) add_executable( simpleGMap2 simpleGMap2.cpp ${simpleGMap2_moc} )
target_link_libraries( simpleGMap2 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( simpleGMap2 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( simpleGMap3_moc simpleGMap3.h ) qt_wrap_cpp( simpleGMap3_moc simpleGMap3.h )
add_executable( simpleGMap3 simpleGMap3.cpp ${simpleGMap3_moc} ) add_executable( simpleGMap3 simpleGMap3.cpp ${simpleGMap3_moc} )
target_link_libraries( simpleGMap3 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( simpleGMap3 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( extrusionView_moc extrusionView.h ) qt_wrap_cpp( extrusionView_moc extrusionView.h )
add_executable( extrusionView extrusionView.cpp ${extrusionView_moc} ) add_executable( extrusionView extrusionView.cpp ${extrusionView_moc} )
target_link_libraries( extrusionView ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( extrusionView ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( viewer_ui viewer.ui ) qt_wrap_ui( viewer_ui viewer.ui )
QT4_WRAP_CPP( viewer_moc viewer.h ) qt_wrap_cpp( viewer_moc viewer.h )
add_executable( viewer viewer.cpp ${viewer_moc} ${viewer_ui} ) add_executable( viewer viewer.cpp ${viewer_moc} ${viewer_ui} )
target_link_libraries( viewer ${CGoGN_LIBS} ${NUMERICAL_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( viewer ${CGoGN_LIBS} ${NUMERICAL_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( clipping_ui clipping.ui ) qt_wrap_ui( clipping_ui clipping.ui )
QT4_WRAP_CPP( clipping_moc clipping.h ) qt_wrap_cpp( clipping_moc clipping.h )
add_executable( clipping clipping.cpp ${clipping_ui} ${clipping_moc} ) add_executable( clipping clipping.cpp ${clipping_ui} ${clipping_moc} )
target_link_libraries( clipping ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( clipping ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( volumeExplorer_ui volumeExplorer.ui ) qt_wrap_ui( volumeExplorer_ui volumeExplorer.ui )
QT4_WRAP_CPP( volumeExplorer_moc volumeExplorer.h ) qt_wrap_cpp( volumeExplorer_moc volumeExplorer.h )
add_executable( volumeExplorer volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc} ) add_executable( volumeExplorer volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc} )
target_link_libraries( volumeExplorer ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( volumeExplorer ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( mcmesh_ui mcmesh.ui ) qt_wrap_ui( mcmesh_ui mcmesh.ui )
QT4_WRAP_CPP( mcmesh_moc mcmesh.h ) qt_wrap_cpp( mcmesh_moc mcmesh.h )
add_executable( mcmesh mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} ) add_executable( mcmesh mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} )
target_link_libraries( mcmesh ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( mcmesh ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( concave_rendering_moc concave_rendering.h ) qt_wrap_cpp( concave_rendering_moc concave_rendering.h )
add_executable( concave_rendering concave_rendering.cpp ${concave_rendering_moc} ${concave_rendering_ui} ) add_executable( concave_rendering concave_rendering.cpp ${concave_rendering_moc} ${concave_rendering_ui} )
target_link_libraries( concave_rendering ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( concave_rendering ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( viewerOBJ_moc viewerOBJ.h ) qt_wrap_cpp( viewerOBJ_moc viewerOBJ.h )
add_executable( viewerOBJ viewerOBJ.cpp ${viewerOBJ_moc} ) add_executable( viewerOBJ viewerOBJ.cpp ${viewerOBJ_moc} )
target_link_libraries( viewerOBJ ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( viewerOBJ ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
#include "Utils/vbo.h" #include "Utils/vbo.h"
#include "Utils/static_assert.h" #include "Utils/static_assert.h"
#include <QColorDialog>
#include <QTimer>
/******************************************************************************* /*******************************************************************************
* MISCELLANOUS * MISCELLANOUS
*******************************************************************************/ *******************************************************************************/
...@@ -692,7 +696,7 @@ Clipping::Clipping(): ...@@ -692,7 +696,7 @@ Clipping::Clipping():
m_timer(NULL), m_timer(NULL),
m_lastAnimatedClippingPreset(NULL) m_lastAnimatedClippingPreset(NULL)
{ {
m_coeffTopoExplod = Geom::Vec3f(0.9,0.9,0.9); m_coeffTopoExplod = Geom::Vec3f(0.9f,0.9f,0.9f);
} }
void Clipping::initGUI() void Clipping::initGUI()
...@@ -856,10 +860,10 @@ void Clipping::cb_initGL() ...@@ -856,10 +860,10 @@ void Clipping::cb_initGL()
// setup clipping shapes // setup clipping shapes
m_planeDrawable = new Utils::Grid; m_planeDrawable = new Utils::Grid;
m_planeDrawable->setColor(Geom::Vec4f(1.0, 0.0, 0.0, 1.0)); m_planeDrawable->setColor(Geom::Vec4f(1.0f, 0.0f, 0.0f, 1.0f));
m_planeDrawable->updatePrecisionDrawing(5); m_planeDrawable->updatePrecisionDrawing(5);
m_sphereDrawable = new Utils::IcoSphere; m_sphereDrawable = new Utils::IcoSphere;
m_sphereDrawable->setColor(Geom::Vec4f(0.0, 0.4, 1.0, 1.0)); m_sphereDrawable->setColor(Geom::Vec4f(0.0f, 0.4f, 1.0f, 1.0f));
m_sphereDrawable->updatePrecisionDrawing(1); m_sphereDrawable->updatePrecisionDrawing(1);
// setup clipping picking frame // setup clipping picking frame
......
...@@ -35,26 +35,26 @@ SimpleGMap3::SimpleGMap3() ...@@ -35,26 +35,26 @@ SimpleGMap3::SimpleGMap3()
// CellMarker<EDGE> mE(myMap); // CellMarker<EDGE> mE(myMap);
Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, 1, 1, 1); // Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, 1, 1, 1);
cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f); // cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
myMap.check(); // myMap.check();
// Dart dp = Algo::Surface::Modelisation::createQuadrangularPyramid<PFP>(myMap); Dart dp = Algo::Surface::Modelisation::createQuadrangularPyramid<PFP>(myMap);
// position[dp] = typename PFP::VEC3(0.5,0.5,-0.5); position[dp] = typename PFP::VEC3(0.5,0.5,-0.5);
// position[myMap.phi1(dp)] = typename PFP::VEC3(0.5,0.5,0.5); position[myMap.phi1(dp)] = typename PFP::VEC3(0.5,0.5,0.5);
// position[myMap.phi1(myMap.phi1(dp))] = typename PFP::VEC3(0.5,-0.5,0.5); position[myMap.phi1(myMap.phi1(dp))] = typename PFP::VEC3(0.5,-0.5,0.5);
// position[myMap.phi_1(dp)] = typename PFP::VEC3(0.5,-0.5,-0.5); position[myMap.phi_1(dp)] = typename PFP::VEC3(0.5,-0.5,-0.5);
// position[myMap.phi_1(myMap.phi2(dp))] = typename PFP::VEC3(1.5f, 0.0f, 0.0f); position[myMap.phi_1(myMap.phi2(dp))] = typename PFP::VEC3(1.5f, 0.0f, 0.0f);
// Dart dtemp = myMap.beta1(myMap.beta0(myMap.beta1(myMap.beta2(myMap.beta1(myMap.beta0(myMap.beta1(myMap.beta2(d)))))))); // Dart dtemp = myMap.beta1(myMap.beta0(myMap.beta1(myMap.beta2(myMap.beta1(myMap.beta0(myMap.beta1(myMap.beta2(dp))))))));
// myMap.sewVolumes(dtemp,dp); // myMap.sewVolumes(dtemp,dp);
// Geom::Plane3D<PFP::REAL> pl(VEC3(-1,-0.5,-0.5),VEC3(-1,-0.5,0.5),VEC3(1,0.5,0.5)); // Geom::Plane3D<PFP::REAL> pl(VEC3(-1,-0.5,-0.5),VEC3(-1,-0.5,0.5),VEC3(1,0.5,0.5));
// Algo::Volume::Modelisation::sliceConvexVolume<PFP>(myMap, position, d, pl); // Algo::Volume::Modelisation::sliceConvexVolume<PFP>(myMap, position, myMap.begin(), pl);
// myMap.check(); // myMap.check();
// for(unsigned int i = position.begin() ; i != position.end() ; position.next(i)) // for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
// position[i] += VEC3(2,0,0); // position[i] += VEC3(2,0,0);
......
...@@ -542,7 +542,7 @@ void Viewer::importMesh(std::string& filename) ...@@ -542,7 +542,7 @@ void Viewer::importMesh(std::string& filename)
else else
{ {
std::vector<std::string> attrNames ; std::vector<std::string> attrNames ;
if(!Algo::Surface::Import::importMesh<PFP>(myMap, filename.c_str(), attrNames)) if(!Algo::Surface::Import::importMesh<PFP>(myMap, filename, attrNames))
{ {
CGoGNerr << "could not import " << filename << CGoGNendl ; CGoGNerr << "could not import " << filename << CGoGNendl ;
return;