...
 
Commits (158)

Too many changes to show.

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

......@@ -2,4 +2,7 @@
CMakeLists.txt.user
bin/
ThirdParty/bin/
SCHNApps/bin
\ No newline at end of file
SCHNApps/bin
build
ThirdParty/include/TinyXml2
......@@ -2,26 +2,6 @@ cmake_minimum_required(VERSION 2.8)
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 )
target_link_libraries( bench_trav ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
......
......@@ -70,8 +70,8 @@ int main(int argc, char **argv)
std::cout << " NB Faces "<< Algo::Topo::getNbOrbits<FACE>(myMap) << std::endl;
std::cout << " NB Vertices "<< nbVertices << std::endl;
std::vector<VertexAttribute<typename PFP::VEC3, MAP> *> attr;
attr.push_back(&position);
std::vector<VertexAttribute<typename PFP::VEC3, MAP> > attr;
attr.push_back(position);
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") ;
......
......@@ -52,8 +52,8 @@ int main(int argc, char **argv)
Algo::Surface::Modelisation::LoopSubdivision<PFP>(myMap, position) ;
unsigned int nbVertices = Algo::Topo::getNbOrbits<VERTEX>(myMap) ;
std::vector<VertexAttribute<typename PFP::VEC3, MAP> *> attr;
attr.push_back(&position);
std::vector<VertexAttribute<typename PFP::VEC3, MAP> > attr;
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::Modelisation::LoopSubdivision<PFP>(myMap, position) ;
......
IF (ONELIB)
project(Apps)
IF (CGoGN_ONELIB)
SET(CGoGN_LIBS cgogn)
ELSE (ONELIB)
SET(CGoGN_LIBS algo topology container utils)
ENDIF (ONELIB)
ELSE ()
SET(CGoGN_LIBS algo) # topology container utils include by dependencies
ENDIF ()
IF (WIN32)
link_directories( ${CGoGN_ROOT_DIR}/lib/${ConfigurationName} ${Boost_LIBRARY_DIRS})
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/) # Release/Debug added automatically by visual
link_directories( ${CGoGN_ROOT_DIR}/windows_dependencies/lib/)
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()
link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE} )
ENDIF()
include_directories(
${CGoGN_ROOT_DIR}/include
${CGoGN_EXT_INCLUDES})
#include_directories(
# ${CGoGN_ROOT_DIR}/include
# ${CGoGN_EXT_INCLUDES})
IF (COMPILE_SANDBOX)
IF (CGoGN_COMPILE_SANDBOX)
add_subdirectory(SandBox)
ENDIF()
IF (COMPILE_EXAMPLES AND WITH_QT)
add_subdirectory(Examples)
IF (CGoGN_COMPILE_EXAMPLES AND CGoGN_WITH_QT)
add_subdirectory(Examples)
ENDIF()
IF (COMPILE_TUTOS)
IF (CGoGN_COMPILE_TUTOS)
add_subdirectory(Tuto)
ENDIF()
IF (COMPILE_BENCHES)
IF (CGoGN_COMPILE_BENCHES)
add_subdirectory(Benches)
ENDIF()
IF (COMPILE_TESTS)
IF (CGoGN_COMPILE_TESTS)
add_subdirectory(Tests)
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)
project(examples)
#SET(CMAKE_BUILD_TYPE Release)
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
# define includes path
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
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} )
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} )
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} )
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} )
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} )
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} )
target_link_libraries( extrusionView ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( viewer_ui viewer.ui )
QT4_WRAP_CPP( viewer_moc viewer.h )
qt_wrap_ui( viewer_ui viewer.ui )
qt_wrap_cpp( viewer_moc viewer.h )
add_executable( viewer viewer.cpp ${viewer_moc} ${viewer_ui} )
target_link_libraries( viewer ${CGoGN_LIBS} ${NUMERICAL_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( clipping_ui clipping.ui )
QT4_WRAP_CPP( clipping_moc clipping.h )
qt_wrap_ui( clipping_ui clipping.ui )
qt_wrap_cpp( clipping_moc clipping.h )
add_executable( clipping clipping.cpp ${clipping_ui} ${clipping_moc} )
target_link_libraries( clipping ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( volumeExplorer_ui volumeExplorer.ui )
QT4_WRAP_CPP( volumeExplorer_moc volumeExplorer.h )
qt_wrap_ui( volumeExplorer_ui volumeExplorer.ui )
qt_wrap_cpp( volumeExplorer_moc volumeExplorer.h )
add_executable( volumeExplorer volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc} )
target_link_libraries( volumeExplorer ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( mcmesh_ui mcmesh.ui )
QT4_WRAP_CPP( mcmesh_moc mcmesh.h )
qt_wrap_ui( mcmesh_ui mcmesh.ui )
qt_wrap_cpp( mcmesh_moc mcmesh.h )
add_executable( mcmesh mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} )
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} )
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} )
target_link_libraries( viewerOBJ ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
......@@ -26,6 +26,10 @@
#include "Utils/vbo.h"
#include "Utils/static_assert.h"
#include <QColorDialog>
#include <QTimer>
/*******************************************************************************
* MISCELLANOUS
*******************************************************************************/
......@@ -692,7 +696,7 @@ Clipping::Clipping():
m_timer(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()
......@@ -856,10 +860,10 @@ void Clipping::cb_initGL()
// setup clipping shapes
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_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);
// setup clipping picking frame
......
......@@ -35,26 +35,26 @@ SimpleGMap3::SimpleGMap3()
// CellMarker<EDGE> mE(myMap);
Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, 1, 1, 1);
cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
myMap.check();
// Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, 1, 1, 1);
// cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
// 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[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(myMap.phi2(dp))] = typename PFP::VEC3(1.5f, 0.0f, 0.0f);
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(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(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);
// 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);
// 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, myMap.begin(), pl);
// myMap.check();
// myMap.check();
// for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
// position[i] += VEC3(2,0,0);
......
......@@ -542,7 +542,7 @@ void Viewer::importMesh(std::string& filename)
else
{
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 ;
return;
......
......@@ -29,12 +29,8 @@
#include "Algo/Modelisation/polyhedron.h"
#include "Algo/Import/import.h"
#include "Algo/Geometry/volume.h"
#include "Algo/Modelisation/tetrahedralization.h"
#include "Algo/Geometry/area.h"
#include "Utils/chrono.h"
#include "Algo/Export/exportVol.h"
MAP myMap;
......@@ -181,7 +177,7 @@ void MyQT::cb_Open()
// maxV=v;
if(myMap.isVolumeIncidentToBoundary(d))
color[d] = VEC3(1,0.41,0.706);
color[d] = VEC3(1.0f,0.41f,0.706f);
}
// for (unsigned int i = color.begin(); i != color.end(); color.next(i))
// {
......@@ -190,6 +186,9 @@ void MyQT::cb_Open()
// }
// SelectorDartNoBoundary<MAP> nb(myMap);
myMap.check();
m_topo_render->updateData(myMap, position, 0.8f, 0.8f, 0.8f);
m_explode_render->updateData<PFP>(myMap, position, color);
......@@ -275,6 +274,14 @@ void MyQT::cb_redraw()
m_frame->draw();
m_PlanePick->draw();
}
m_nbFrames++;
if (m_nbFrames >=40)
{
std::cout << 40000.0/m_frame_ch.elapsed()<< " fps"<<std::endl;
m_nbFrames = 0;
m_frame_ch.start();
}
}
......@@ -385,23 +392,6 @@ int main(int argc, char **argv)
std::string filename(argv[1]);
size_t pos = filename.rfind("."); // position of "." in filename
std::string extension = filename.substr(pos);
/*
if(extension == std::string(".off"))
{
if(!Algo::Volume::Import::importMeshToExtrude<PFP>(myMap, filename, attrNames))
{
std::cerr << "could not import " << filename << std::endl ;
return 1;
}
else
{
position = myMap.getAttribute<VEC3, VERTEX>(attrNames[0]) ;
myMap.closeMap();
}
}
else
{
*/
if(extension == std::string(".mapbin"))
{
......@@ -421,36 +411,20 @@ int main(int argc, char **argv)
color = myMap.addAttribute<VEC3, VOLUME, MAP>("colorVol");
TraversorCell<MAP, VOLUME> tra(myMap);
float maxV = 0.0f;
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{
// float v = Algo::Geometry::tetrahedronVolume<PFP>(myMap, d, position);
color[d] = PFP::VEC3(1.0,0,0);
// if (v>maxV)
// maxV=v;
if(myMap.isVolumeIncidentToBoundary(d))
color[d] = PFP::VEC3(1,0.41,0.706);
//else
// color[d] = PFP::VEC3(1.0,0,0);
/*
float v = Algo::Geometry::tetrahedronVolume<PFP>(myMap, d, position);
float v = Algo::Geometry::convexPolyhedronVolume<PFP>(myMap, d, position);
color[d] = VEC3(v,0,0);
if (v>maxV)
maxV=v;
// if(myMap.isVolumeIncidentToBoundary(d))
// color[d] = VEC3(0,0,0);
// else
color[d] = VEC3(v,0,0);
}
for (unsigned int i = color.begin(); i != color.end(); color.next(i))
{
color[i][0] /= maxV;
color[i][2] = 1.0f - color[i][0];
*/
}
}
......@@ -458,7 +432,7 @@ int main(int argc, char **argv)
{
position = myMap.addAttribute<VEC3, VERTEX, MAP>("position");
int nb = 32;
int nb = 16;
Algo::Volume::Tilings::Cubic::Grid<PFP> cubic(myMap, nb, nb, nb);
cubic.embedIntoGrid(position, 1.0f, 1.0f, 1.0f);
......@@ -472,9 +446,6 @@ int main(int argc, char **argv)
TraversorW<MAP> tra(myMap);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
color[d] = position[d] + VEC3(0.5,0.5,0.5);
// Algo::Volume::Export::exportMSH<PFP>(myMap,position,"/tmp/test2.msh");
// Algo::Volume::Export::exportNAS<PFP>(myMap,position,"/tmp/test1.nas");
// Algo::Volume::Export::exportVTU<PFP>(myMap,position,"/tmp/test3.vtu");
}
myMap.check();
......@@ -513,37 +484,30 @@ int main(int argc, char **argv)
sqt.show();
dock.slider_explode->setValue(80);
dock.slider_explode_face->setValue(80);
dock.slider_explode_face->setValue(100);
sqt.clipping_onoff(true);
Utils::Chrono ch;
// Vertex v(myMap.begin());
// VEC3 p = Algo::Volume::Geometry::vertexNeighborhoodCentroid<PFP>(myMap,v,position);
// Vol w(myMap.begin());
// VEC3 q = Algo::Surface::Geometry::volumeCentroid<PFP>(myMap,w,position);
ch.start();
float vol = Algo::Geometry::Parallel::totalVolume<PFP>(myMap, position);
vol += Algo::Geometry::Parallel::totalVolume<PFP>(myMap, position);
vol += Algo::Geometry::Parallel::totalVolume<PFP>(myMap, position);
vol += Algo::Geometry::Parallel::totalVolume<PFP>(myMap, position);
std::cout << ch.elapsed()<< " ms // val="<<vol<< std::endl;
std::cout << "Compute Volume ->"<< std::endl;
ch.start();
vol = Algo::Geometry::totalVolume<PFP>(myMap, position);
std::cout << ch.elapsed()<< " ms val="<<vol<< std::endl;
ch.start();
vol += Algo::Geometry::totalVolume<PFP>(myMap, position);
std::cout << ch.elapsed()<< " ms val="<<vol<< std::endl;
ch.start();
vol += Algo::Geometry::totalVolume<PFP>(myMap, position);
std::cout << ch.elapsed()<< " ms val="<<vol<< std::endl;
ch.start();
vol += Algo::Geometry::totalVolume<PFP>(myMap, position);
std::cout << ch.elapsed()<< " ms val="<<vol<< std::endl;
// Utils::Chrono ch;
// ch.start();
// float vol = Algo::Geometry::Parallel::totalVolume<PFP>(myMap, position);
// vol += Algo::Geometry::Parallel::totalVolume<PFP>(myMap, position);
// vol += Algo::Geometry::Parallel::totalVolume<PFP>(myMap, position);
// vol += Algo::Geometry::Parallel::totalVolume<PFP>(myMap, position);
// std::cout << ch.elapsed()<< " ms // val="<<vol<< std::endl;
// std::cout << "Compute Volume ->"<< std::endl;
// ch.start();
// vol = Algo::Geometry::totalVolume<PFP>(myMap, position);
// std::cout << ch.elapsed()<< " ms val="<<vol<< std::endl;
// ch.start();
// vol += Algo::Geometry::totalVolume<PFP>(myMap, position);
// std::cout << ch.elapsed()<< " ms val="<<vol<< std::endl;
// ch.start();
// vol += Algo::Geometry::totalVolume<PFP>(myMap, position);
// std::cout << ch.elapsed()<< " ms val="<<vol<< std::endl;
// ch.start();
// vol += Algo::Geometry::totalVolume<PFP>(myMap, position);
// std::cout << ch.elapsed()<< " ms val="<<vol<< std::endl;
// et on attend la fin.
return app.exec();
......
......@@ -36,14 +36,14 @@
#include "Algo/Render/GL2/explodeVolumeRender.h"
#include "Utils/cgognStream.h"
#include "Utils/Qt/qtSimple.h"
#include "Utils/Qt/qtQGLV.h"
#include "Utils/frameManipulator.h"
#include "ui_volumeExplorer.h"
#include "Utils/Qt/qtui.h"
#include "Algo/Export/exportVol.h"
#include "Utils/chrono.h"
using namespace CGoGN ;
......@@ -66,7 +66,7 @@ using namespace CGoGN ;
* Ajouter les widgets necessaires, mettre des noms clairs pour
* les utiliser dans le .cpp (pour les call back principalement)
*/
class MyQT: public Utils::QT::SimpleQT
class MyQT: public Utils::QT::SimpleQGLV
{
Q_OBJECT
......@@ -95,6 +95,8 @@ class MyQT: public Utils::QT::SimpleQT
// shader of toporender3
Utils::ClippingShader* m_sh1;
Utils::ClippingShader* m_sh2;
Utils::Chrono m_frame_ch;
unsigned int m_nbFrames;
public:
float m_WidthObj;
......@@ -110,7 +112,8 @@ public:
hide_clipping(false),
m_topo_render(NULL),
m_explode_render(NULL),
m_explode_factor(0.8f)
m_explode_factor(0.8f),
m_nbFrames(0)
{}
protected:
......
......@@ -2,48 +2,33 @@ cmake_minimum_required(VERSION 2.8)
project(SandBox)
#SET (CMAKE_BUILD_TYPE Debug)
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
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 ${CGoGN_ROOT_DIR}/lib/Debug)
#ENDIF(WIN32)
#define exec to compile
add_executable(multi_att multi_att.cpp)
target_link_libraries(multi_att ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
add_executable(trav3_test trav3_test.cpp)
target_link_libraries(trav3_test ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
IF (WITH_QT)
QT4_WRAP_CPP(tilings_moc tilings.h)
IF (CGoGN_WITH_QT)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
qt_wrap_cpp(tilings_moc tilings.h)
add_executable(tilings tilings.cpp ${tilings_moc})
target_link_libraries(tilings ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
qt_use_cgogn_modules(tilings)
QT4_WRAP_UI( test_traversor2_ui test_traversor2.ui )
QT4_WRAP_CPP(test_traversor2_moc test_traversor2.h)
qt_wrap_ui( test_traversor2_ui test_traversor2.ui )
qt_wrap_cpp(test_traversor2_moc test_traversor2.h)
add_executable(test_traversor2 test_traversor2.cpp ${test_traversor2_ui} ${test_traversor2_moc})
target_link_libraries(test_traversor2 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
QT4_WRAP_UI( testPlaneCutting_ui testPlaneCutting.ui )
QT4_WRAP_CPP(testPlaneCutting_moc testPlaneCutting.h)
qt_wrap_ui( testPlaneCutting_ui testPlaneCutting.ui )
qt_wrap_cpp(testPlaneCutting_moc testPlaneCutting.h)
add_executable(testPlaneCutting testPlaneCutting.cpp ${testPlaneCutting_ui} ${testPlaneCutting_moc})
target_link_libraries(testPlaneCutting ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
QT4_WRAP_CPP(wallPaper_moc wallPaper.h)
qt_wrap_cpp(wallPaper_moc wallPaper.h)
add_executable(wallPaper wallPaper.cpp ${wallPaper_moc})
target_link_libraries(wallPaper ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
......@@ -51,13 +36,7 @@ ENDIF()
# Example with Qt
#
#QT4_WRAP_CPP(tuto1_moc tuto1.h)
#qt_wrap_cpp(tuto1_moc tuto1.h)
#add_executable( tuto1 tuto1.cpp ${tuto1_moc})
#target_link_libraries( tuto1 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
#QT4_WRAP_CPP(tuto_mt_moc tuto_mt.h)
#add_executable( tuto_mt tuto_mt.cpp ${tuto_mt_moc})
#target_link_libraries( tuto_mt
# ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ${Boost_THREAD_LIBRARY})
......@@ -77,6 +77,8 @@ void MyQT::cb_initGL()
glEnable(GL_TEXTURE_2D);
std::cout << Utils::GLSLShader::MAJOR_OGL_CORE << " / "<< Utils::GLSLShader::MINOR_OGL_CORE << std::endl;
std::cout << glGetString(GL_VERSION)<< std::endl;
}
void MyQT::cb_redraw()
......
......@@ -2,29 +2,14 @@ cmake_minimum_required(VERSION 2.6)
project(testing)
#SET(CMAKE_BUILD_TYPE Debug)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# ${CGoGN_ROOT_DIR}/include
# ${CGoGN_EXT_INCLUDES}
#)
#IF(WIN32)
# link_directories(
# ${CGoGN_ROOT_DIR}/lib/$(ConfigurationName)
# ${Boost_LIBRARY_DIRS} )
#ELSE(WIN32)
# link_directories(
# ${CGoGN_ROOT_DIR}/lib/Debug
# ${CGoGN_ROOT_DIR}/lib/Release )
#ENDIF(WIN32)
#define exec to compile
add_executable( Geom_orientation ./Geom_orientation.cpp)
target_link_libraries( Geom_orientation
${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
qt_use_modules(Geom_orientation Gui OpenGL Xml Svg)
add_executable( Geom_inclusion ./Geom_inclusion.cpp)
target_link_libraries( Geom_inclusion
......
......@@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 2.8)
project(Tuto_Attributes)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable( simple_attribs simple_attribs.cpp)
target_link_libraries( simple_attribs ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
......@@ -12,10 +11,12 @@ add_executable( multi_attribs multi_attribs.cpp)
target_link_libraries( multi_attribs ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
IF(WITH_QT)
IF(CGoGN_WITH_QT)
QT4_WRAP_UI(vbo_attribs_ui vbo_attribs.ui)
QT4_WRAP_CPP(vbo_attribs_moc vbo_attribs.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
qt_wrap_ui(vbo_attribs_ui vbo_attribs.ui)
qt_wrap_cpp(vbo_attribs_moc vbo_attribs.h)
add_executable( vbo_attribs vbo_attribs.cpp ${vbo_attribs_ui} ${vbo_attribs_moc})
target_link_libraries( vbo_attribs ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
......
......@@ -2,81 +2,58 @@ cmake_minimum_required(VERSION 2.8)
project(Tutos)
#SET (CMAKE_BUILD_TYPE Debug)
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-overloaded-virtual")
endif()
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 ${CGoGN_ROOT_DIR}/lib/Debug)
#ENDIF(WIN32)
add_subdirectory(Boundary)
add_subdirectory(Modelling)
add_subdirectory(Markers)
add_subdirectory(Traversals)
add_subdirectory(Attributes)
#define exec to compile
IF (WITH_QT)
IF (CGoGN_WITH_QT)
QT4_WRAP_CPP(tuto1_moc tuto1.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
qt_wrap_cpp(tuto1_moc tuto1.h)
add_executable( tuto1 tuto1.cpp ${tuto1_moc})
target_link_libraries( tuto1
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
qt_use_cgogn_modules(tuto1)
QT4_WRAP_UI( tuto2_ui tuto2.ui )
QT4_WRAP_CPP(tuto2_moc tuto2.h)
qt_wrap_ui( tuto2_ui tuto2.ui )
qt_wrap_cpp(tuto2_moc tuto2.h)
add_executable( tuto2 tuto2.cpp tuto2.h ${tuto2_ui} ${tuto2_moc})
target_link_libraries( tuto2
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(tuto3_moc tuto3.h)
qt_wrap_cpp(tuto3_moc tuto3.h)
add_executable( tuto3 tuto3.cpp ${tuto3_moc})
target_link_libraries( tuto3
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( tuto4_ui tuto4.ui )
QT4_WRAP_CPP(tuto4_moc tuto4.h)
qt_wrap_ui( tuto4_ui tuto4.ui )
qt_wrap_cpp(tuto4_moc tuto4.h)
add_executable( tuto4 tuto4.cpp ${tuto4_ui} ${tuto4_moc})
target_link_libraries( tuto4
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( tuto5_ui tuto5.ui )
QT4_WRAP_CPP(tuto5_moc tuto5.h)
qt_wrap_ui( tuto5_ui tuto5.ui )
qt_wrap_cpp(tuto5_moc tuto5.h)
add_executable( tuto5 tuto5.cpp ${tuto5_ui} ${tuto5_moc})
target_link_libraries( tuto5
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( tuto_orbits_ui tuto_orbits.ui )
QT4_WRAP_CPP(tuto_orbits_moc tuto_orbits.h)
qt_wrap_ui( tuto_orbits_ui tuto_orbits.ui )
qt_wrap_cpp(tuto_orbits_moc tuto_orbits.h)
add_executable( tuto_orbits tuto_orbits.cpp ${tuto_orbits_ui} ${tuto_orbits_moc})
target_link_libraries( tuto_orbits
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(tuto_histo_moc tuto_histo.h)
add_executable( tuto_histo tuto_histo.cpp tuto_histo.h ${tuto_histo_ui} ${tuto_histo_moc})
target_link_libraries( tuto_histo
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
# qt_wrap_cpp(tuto_histo_moc tuto_histo.h)
# add_executable( tuto_histo tuto_histo.cpp tuto_histo.h ${tuto_histo_ui} ${tuto_histo_moc})
# target_link_libraries( tuto_histo
# ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
ENDIF()
#QT4_WRAP_UI( show_traversors_ui show_traversors.ui )
#QT4_WRAP_CPP(show_traversors_moc show_traversors.h)
#add_executable( show_traversors show_traversors.cpp ${show_traversors_ui} ${show_traversors_moc})
#target_link_libraries( show_traversors
# ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
# qt_wrap_cpp(tp_master_moc tp_master.h)
# add_executable( tp_master tp_master.cpp ${tp_master_moc})
# target_link_libraries( tp_master ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
ENDIF()
add_executable( tuto_subdivision tuto_subdivision.cpp)
target_link_libraries( tuto_subdivision
......@@ -90,22 +67,8 @@ add_executable( tuto_dual3 tuto_dual3.cpp)
target_link_libraries( tuto_dual3
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
#QT4_WRAP_CPP(tp_master_moc tp_master.h)
#add_executable( tp_master tp_master.cpp ${tp_master_moc})
#target_link_libraries( tp_master
# ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
#BOOST_LIBS macro: allow using compiled boost in windows (see readme)
# -first argument variable that will contain the libs
# -second argument list of boost libs separated by ; in " "
# exemple: BOOST_LIBS(boost_lib_lists "boost_thread-mt;boost_iostreams-mt")
#BOOST_LIBS(boost_lib_lists "boost_thread-mt")
#QT4_WRAP_CPP(tuto_mt_moc tuto_mt.h)
#add_executable( tuto_mt tuto_mt.cpp ${tuto_mt_moc})
#target_link_libraries( tuto_mt
# ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ${Boost_THREAD_LIBRARY})
add_subdirectory(Boundary)
add_subdirectory(Modelling)
add_subdirectory(Markers)
add_subdirectory(Traversals)
add_subdirectory(Attributes)
\ No newline at end of file
......@@ -2,20 +2,24 @@ cmake_minimum_required(VERSION 2.8)
project(Tuto_Modelling)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable( basics basics.cpp)
target_link_libraries( basics ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( tuto_oper2_ui tuto_oper2.ui )
QT4_WRAP_CPP(tuto_oper2_moc tuto_oper2.h)
add_executable( tuto_oper2 tuto_oper2.cpp ${tuto_oper2_ui} ${tuto_oper2_moc})
target_link_libraries( tuto_oper2
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
IF (CGoGN_WITH_QT)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
QT4_WRAP_UI( tuto_oper3_ui tuto_oper3.ui )
QT4_WRAP_CPP(tuto_oper3_moc tuto_oper3.h)
add_executable( tuto_oper3 tuto_oper3.cpp ${tuto_oper3_ui} ${tuto_oper3_moc})
target_link_libraries( tuto_oper3
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
qt_wrap_ui( tuto_oper2_ui tuto_oper2.ui )
qt_wrap_cpp(tuto_oper2_moc tuto_oper2.h)
add_executable( tuto_oper2 tuto_oper2.cpp ${tuto_oper2_ui} ${tuto_oper2_moc})
target_link_libraries( tuto_oper2
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
qt_wrap_ui( tuto_oper3_ui tuto_oper3.ui )
qt_wrap_cpp(tuto_oper3_moc tuto_oper3.h)
add_executable( tuto_oper3 tuto_oper3.cpp ${tuto_oper3_ui} ${tuto_oper3_moc})
target_link_libraries( tuto_oper3
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
ENDIF()
......@@ -382,7 +382,7 @@ void MyQT::cb_initGL()
m_sh2 = static_cast<Utils::ClippingShader*>(m_render_topo->shader2());
m_sh3 = static_cast<Utils::ClippingShader*>(m_render_topo_boundary->shader1());
m_sh1->insertClippingCode();
/* m_sh1->insertClippingCode();
m_sh2->insertClippingCode();
m_sh3->insertClippingCode();
......@@ -393,7 +393,7 @@ void MyQT::cb_initGL()
m_sh1->setClipPlaneParamsAll(clip_id1, Geom::Vec3f(0,0,1), bb.center());
m_sh2->setClipPlaneParamsAll(clip_id2, Geom::Vec3f(0,0,1), bb.center());
m_sh3->setClipPlaneParamsAll(clip_id3, Geom::Vec3f(0,0,1), bb.center());
*/
}
// redraw GL callback (clear and swap already done)
......
......@@ -2,24 +2,27 @@ cmake_minimum_required(VERSION 2.8)
project(Tuto_Traversals)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable( traverse_cells traverse_cells.cpp)
target_link_libraries( traverse_cells ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
IF (CGoGN_WITH_QT)
add_executable( traverse_neighbours traverse_neighbours.cpp)
target_link_libraries( traverse_neighbours ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable( traverse_attributes traverse_attributes.cpp)
target_link_libraries( traverse_attributes ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
add_executable( traverse_cells traverse_cells.cpp)
target_link_libraries( traverse_cells ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( show_traversors_ui2 show_traversors2.ui )
QT4_WRAP_CPP(show_traversors_moc2 show_traversors2.h)
add_executable( show_traversors2 show_traversors2.cpp ${show_traversors_ui2} ${show_traversors_moc2})
target_link_libraries( show_traversors2 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
add_executable( traverse_neighbours traverse_neighbours.cpp)
target_link_libraries( traverse_neighbours ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( show_traversors_ui3 show_traversors3.ui )
QT4_WRAP_CPP(show_traversors_moc3 show_traversors3.h)
add_executable( show_traversors3 show_traversors3.cpp ${show_traversors_ui3} ${show_traversors_moc3})
target_link_libraries( show_traversors3 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
add_executable( traverse_attributes traverse_attributes.cpp)
target_link_libraries( traverse_attributes ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
qt_wrap_ui( show_traversors_ui2 show_traversors2.ui )
qt_wrap_cpp(show_traversors_moc2 show_traversors2.h)
add_executable( show_traversors2 show_traversors2.cpp ${show_traversors_ui2} ${show_traversors_moc2})
target_link_libraries( show_traversors2 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
qt_wrap_ui( show_traversors_ui3 show_traversors3.ui )
qt_wrap_cpp(show_traversors_moc3 show_traversors3.h)
add_executable( show_traversors3 show_traversors3.cpp ${show_traversors_ui3} ${show_traversors_moc3})
target_link_libraries( show_traversors3 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
ENDIF()
......@@ -83,8 +83,9 @@ void MyQT::cb_explode(int x)
void MyQT::cb_initGL()
{
m_render_topo = new Algo::Render::GL2::TopoRender();
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f);
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f);
m_dm_topo = new DartMarker<MAP>(myMap);
m_drawer = new Utils::Drawer();
}
void MyQT::cb_redraw()
......@@ -104,7 +105,7 @@ void MyQT::cb_redraw()
}
}
m_drawer.callList();
m_drawer->callList();
}
void MyQT::cb_mousePress(int /*button*/, int x, int y)
......@@ -129,7 +130,7 @@ void MyQT::cb_Save()
std::string filename2 = filename + std::string("Topo") + std::string(".svg");
Utils::SVG::SVGOut svg1(filename1, modelViewMatrix(), projectionMatrix());
m_drawer.toSVG(svg1);
m_drawer->toSVG(svg1);
svg1.write();
Utils::SVG::SVGOut svg2(filename2, modelViewMatrix(), projectionMatrix());
......@@ -145,36 +146,36 @@ void MyQT::traverse2()
m_last=2;
// int code = (m_ajd_or_inci2)*100+m_first2*10+m_second2;
m_drawer.newList(GL_COMPILE);
m_drawer.lineWidth(7.0f);
m_drawer.pointSize(9.0f);
m_drawer.color3f(0.0f,0.7f,0.0f);
m_drawer->newList(GL_COMPILE);
m_drawer->lineWidth(7.0f);
m_drawer->pointSize(9.0f);
m_drawer->color3f(0.0f,0.7f,0.0f);
m_affDarts.clear();
if (m_ajd_or_inci2 == 0) // incident
{
Algo::Render::drawerCell<PFP>(VERTEX+m_second2, m_drawer, myMap, m_selected, position, m_expl);
m_drawer.color3f(1.0f,0.0f,0.0f);
Algo::Render::drawerCell<PFP>(VERTEX+m_second2, *m_drawer, myMap, m_selected, position, m_expl);
m_drawer->color3f(1.0f,0.0f,0.0f);
Traversor* tra = TraversorFactory<PFP::MAP>::createIncident(myMap, m_selected, 2, VERTEX+m_second2, VERTEX+m_first2);
for (Dart d=tra->begin(); d != tra->end(); d= tra->next())
m_affDarts.push_back(d);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, *m_drawer, myMap, m_affDarts, position, m_expl);
}
else // adjacent
{
Algo::Render::drawerCell<PFP>(VERTEX+m_first2, m_drawer, myMap, m_selected, position, m_expl);
m_drawer.color3f(1.0f,0.0f,0.0f);
Algo::Render::drawerCell<PFP>(VERTEX+m_first2, *m_drawer, myMap, m_selected, position, m_expl);
m_drawer->color3f(1.0f,0.0f,0.0f);
Traversor* tra = TraversorFactory<PFP::MAP>::createAdjacent(myMap, m_selected, 2, VERTEX+m_first2, VERTEX+m_second2);
for (Dart d = tra->begin(); d != tra->end(); d = tra->next())
m_affDarts.push_back(d);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, *m_drawer, myMap, m_affDarts, position, m_expl);
}
m_drawer.endList();
m_drawer->endList();
// SelectorMarked sm(*m_dm_topo);
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f);
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f);
updateGL();
}
......
......@@ -92,7 +92,7 @@ public:
Dart m_selected;
std::vector<Dart> m_affDarts;
Utils::Drawer m_drawer;
Utils::Drawer* m_drawer;
DartMarker<MAP>* m_dm_topo;
......
......@@ -117,6 +117,7 @@ void MyQT::cb_initGL()
m_render_topo->updateData(myMap, position, 0.95f, 0.9f, 0.8f);
m_dm_topo = new DartMarker<MAP>(myMap);
m_drawer = new Utils::Drawer();
}
void MyQT::cb_redraw()
......@@ -136,7 +137,7 @@ void MyQT::cb_redraw()
}
}
m_drawer.callList();
m_drawer->callList();
}
void MyQT::cb_mousePress(int /*button*/, int x, int y)
......@@ -162,11 +163,11 @@ void MyQT::cb_Save()
// std::string filename = selectFileSave("Export SVG file ",".","(*.svg)");
// Utils::SVG::SVGOut svg(filename,modelViewMatrix(),projectionMatrix());
// m_drawer.toSVG(svg);
// m_drawer->toSVG(svg);
// m_render_topo->toSVG(svg);
Utils::SVG::SVGOut svg1(filename1, modelViewMatrix(), projectionMatrix());
m_drawer.toSVG(svg1);
m_drawer->toSVG(svg1);
svg1.write();
// svg1.addOpacityAnimation(1.0f);
// svg1.addOpacityAnimation(1.0f);
......@@ -200,33 +201,33 @@ void MyQT::traverse2()
m_last=2;
// int code = (m_ajd_or_inci2)*100+m_first2*10+m_second2;
m_drawer.newList(GL_COMPILE);
m_drawer.lineWidth(7.0f);
m_drawer.pointSize(9.0f);
m_drawer.color3f(0.0f,0.7f,0.0f);
m_drawer->newList(GL_COMPILE);
m_drawer->lineWidth(7.0f);
m_drawer->pointSize(9.0f);
m_drawer->color3f(0.0f,0.7f,0.0f);
m_affDarts.clear();
if (m_ajd_or_inci2 == 0) // incident
{
Algo::Render::drawerCell<PFP>(VERTEX+m_second2, m_drawer, myMap, m_selected, position, m_expl);
m_drawer.color3f(1.0f,0.0f,0.0f);
Algo::Render::drawerCell<PFP>(VERTEX+m_second2, *m_drawer, myMap, m_selected, position, m_expl);
m_drawer->color3f(1.0f,0.0f,0.0f);
Traversor* tra = TraversorFactory<PFP::MAP>::createIncident(myMap, m_selected, 2, VERTEX+m_second2, VERTEX+m_first2);
for (Dart d=tra->begin(); d != tra->end(); d= tra->next())
m_affDarts.push_back(d);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, *m_drawer, myMap, m_affDarts, position, m_expl);
}
else // adjacent
{
Algo::Render::drawerCell<PFP>(VERTEX+m_first2, m_drawer, myMap, m_selected, position, m_expl);
m_drawer.color3f(1.0f,0.0f,0.0f);
Algo::Render::drawerCell<PFP>(VERTEX+m_first2, *m_drawer, myMap, m_selected, position, m_expl);
m_drawer->color3f(1.0f,0.0f,0.0f);
Traversor* tra = TraversorFactory<PFP::MAP>::createAdjacent(myMap, m_selected, 2, VERTEX+m_first2, VERTEX+m_second2);
for (Dart d = tra->begin(); d != tra->end(); d = tra->next())
m_affDarts.push_back(d);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, *m_drawer, myMap, m_affDarts, position, m_expl);
}
m_drawer.endList();
m_drawer->endList();
// SelectorMarked sm(*m_dm_topo);
m_render_topo->updateData(myMap, position, 0.95f, 0.9f, 0.8f);
......@@ -264,19 +265,19 @@ void MyQT::traverse3()
m_affDarts.clear();
m_drawer.newList(GL_COMPILE);
m_drawer.lineWidth(7.0f);
m_drawer.pointSize(9.0f);
m_drawer.color3f(0.0f,0.7f,0.0f);
m_drawer->newList(GL_COMPILE);
m_drawer->lineWidth(7.0f);
m_drawer->pointSize(9.0f);
m_drawer->color3f(0.0f,0.7f,0.0f);
m_dm_topo->unmarkAll();
//SelectorMarked sm(*m_dm_topo);
if (m_ajd_or_inci3 == 0) // incident
{
Algo::Render::drawerCell<PFP>(VERTEX+m_second3, m_drawer,myMap,m_selected,position,m_expl);
Algo::Render::drawerCell<PFP>(VERTEX+m_second3, *m_drawer,myMap,m_selected,position,m_expl);
dynamicMarkOrbit(VERTEX+m_second3);
m_drawer.color3f(1.0f,0.0f,0.0f);
m_drawer->color3f(1.0f,0.0f,0.0f);
Traversor* tra = TraversorFactory<PFP::MAP>::createIncident(myMap,m_selected, 3, VERTEX+m_second3, VERTEX+m_first3);
for (Dart d = tra->begin(); d != tra->end(); d = tra->next())
......@@ -285,7 +286,7 @@ void MyQT::traverse3()
dynamicMarkOrbit(VERTEX+m_first3);
}
Algo::Render::drawerCells<PFP>(VERTEX+m_first3, m_drawer, myMap, m_affDarts, position, m_expl);