Commit 408d0c80 authored by untereiner's avatar untereiner
Browse files

Merge cgogn:~thery/CGoGN

parents 20fc0d65 2d8f863c
...@@ -79,8 +79,6 @@ void Viewer::cb_initGL() ...@@ -79,8 +79,6 @@ void Viewer::cb_initGL()
{ {
Utils::GLSLShader::setCurrentOGLVersion(2) ; Utils::GLSLShader::setCurrentOGLVersion(2) ;
setFocal(5.0f) ;
m_render = new Algo::Render::GL2::MapRender() ; m_render = new Algo::Render::GL2::MapRender() ;
m_topoRender = new Algo::Render::GL2::TopoRender() ; m_topoRender = new Algo::Render::GL2::TopoRender() ;
...@@ -110,7 +108,7 @@ void Viewer::cb_initGL() ...@@ -110,7 +108,7 @@ void Viewer::cb_initGL()
m_simpleColorShader = new Utils::ShaderSimpleColor() ; m_simpleColorShader = new Utils::ShaderSimpleColor() ;
m_simpleColorShader->setAttributePosition(m_positionVBO) ; m_simpleColorShader->setAttributePosition(m_positionVBO) ;
Geom::Vec4f c(0.1f, 0.1f, 0.1f, 1.0f) ; Geom::Vec4f c(0.0f, 0.0f, 0.0f, 1.0f) ;
m_simpleColorShader->setColor(c) ; m_simpleColorShader->setColor(c) ;
m_pointSprite = new Utils::PointSprite() ; m_pointSprite = new Utils::PointSprite() ;
...@@ -295,6 +293,17 @@ void Viewer::slot_drawEdges(bool b) ...@@ -295,6 +293,17 @@ void Viewer::slot_drawEdges(bool b)
void Viewer::slot_drawFaces(bool b) void Viewer::slot_drawFaces(bool b)
{ {
m_drawFaces = b ; m_drawFaces = b ;
if (b)
{
Geom::Vec4f c(0.0f, 0.0f, 0.0f, 1.0f) ;
m_simpleColorShader->setColor(c) ;
}
else
{
Geom::Vec4f c(0.9f, 0.9f, 0.1f, 1.0f) ;
m_simpleColorShader->setColor(c) ;
}
updateGL() ; updateGL() ;
} }
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
#include <iostream> #include <iostream>
#include "Utils/Qt/qtSimple.h" //#include "Utils/Qt/qtSimple.h"
#include "Utils/Qt/qtQGLV.h"
#include "ui_viewer.h" #include "ui_viewer.h"
#include "Utils/Qt/qtui.h" #include "Utils/Qt/qtui.h"
...@@ -65,7 +66,8 @@ struct PFP: public PFP_STANDARD ...@@ -65,7 +66,8 @@ struct PFP: public PFP_STANDARD
typedef PFP::MAP MAP ; typedef PFP::MAP MAP ;
typedef PFP::VEC3 VEC3 ; typedef PFP::VEC3 VEC3 ;
class Viewer : public Utils::QT::SimpleQT //class Viewer : public Utils::QT::SimpleQT
class Viewer : public Utils::QT::SimpleQGLV
{ {
Q_OBJECT Q_OBJECT
......
...@@ -111,11 +111,15 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts) ...@@ -111,11 +111,15 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
if (good_dart != NIL) if (good_dart != NIL)
{ {
if ((d != map.phi2(d)) && (good_dart != map.phi2(good_dart)) ) if (good_dart == map.phi2(good_dart))
{ {
map.sewFaces(d, good_dart, false); map.sewFaces(d, good_dart, false);
m.unmarkOrbit<EDGE>(d); m.unmarkOrbit<EDGE>(d);
} }
else
{
++nbBoundaryEdges;
}
} }
else else
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment