mirror of https://github.com/CGAL/cgal
Fix for P2_T2
This commit is contained in:
parent
8cee2ef1dd
commit
e9e7ca0cf5
|
|
@ -126,7 +126,6 @@ MainWindow::MainWindow()
|
||||||
// and the input they generate is passed to the triangulation with
|
// and the input they generate is passed to the triangulation with
|
||||||
// the signal/slot mechanism
|
// the signal/slot mechanism
|
||||||
pt_pi = new CGAL::Qt::TriangulationPointInputAndConflictZone<Periodic_DT>(&scene, &triang, this );
|
pt_pi = new CGAL::Qt::TriangulationPointInputAndConflictZone<Periodic_DT>(&scene, &triang, this );
|
||||||
|
|
||||||
QObject::connect(pt_pi, SIGNAL(generate(CGAL::Object)),
|
QObject::connect(pt_pi, SIGNAL(generate(CGAL::Object)),
|
||||||
this, SLOT(processInput(CGAL::Object)));
|
this, SLOT(processInput(CGAL::Object)));
|
||||||
|
|
||||||
|
|
@ -146,6 +145,7 @@ MainWindow::MainWindow()
|
||||||
this, SIGNAL(changed()));
|
this, SIGNAL(changed()));
|
||||||
|
|
||||||
pt_cc = new CGAL::Qt::TriangulationCircumcircle<Periodic_DT>(&scene, &triang, this);
|
pt_cc = new CGAL::Qt::TriangulationCircumcircle<Periodic_DT>(&scene, &triang, this);
|
||||||
|
pt_cc ->setPen(QPen(::Qt::black, .01));
|
||||||
QObject::connect(pt_cc, SIGNAL(modelChanged()),
|
QObject::connect(pt_cc, SIGNAL(modelChanged()),
|
||||||
this, SIGNAL(changed()));
|
this, SIGNAL(changed()));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <CGAL/Qt/GraphicsViewInput.h>
|
#include <CGAL/Qt/GraphicsViewInput.h>
|
||||||
#include <CGAL/Qt/Converter.h>
|
#include <CGAL/Qt/Converter.h>
|
||||||
|
#include <QGraphicsPolygonItem>
|
||||||
#include <QGraphicsSceneMouseEvent>
|
#include <QGraphicsSceneMouseEvent>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
@ -81,9 +82,10 @@ TriangulationConflictZone<T>::localize_and_insert_point(QPointF qt_point)
|
||||||
++it){
|
++it){
|
||||||
if(! m_tr->is_infinite(*it)){
|
if(! m_tr->is_infinite(*it)){
|
||||||
QGraphicsPolygonItem *item = new QGraphicsPolygonItem(m_convert(m_tr->triangle(*it)));
|
QGraphicsPolygonItem *item = new QGraphicsPolygonItem(m_convert(m_tr->triangle(*it)));
|
||||||
QColor color(::Qt::blue);
|
QColor color = ::Qt::blue;
|
||||||
color.setAlpha(150);
|
color.setAlpha(150);
|
||||||
item->setBrush(color);
|
item->setBrush(QBrush(color));
|
||||||
|
item->setPen(QPen(::Qt::black, .01));
|
||||||
m_scene->addItem(item);
|
m_scene->addItem(item);
|
||||||
qfaces.push_back(item);
|
qfaces.push_back(item);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include <CGAL/Qt/GraphicsViewInput.h>
|
#include <CGAL/Qt/GraphicsViewInput.h>
|
||||||
#include <CGAL/Qt/Converter.h>
|
#include <CGAL/Qt/Converter.h>
|
||||||
#include <QGraphicsSceneMouseEvent>
|
#include <QGraphicsSceneMouseEvent>
|
||||||
|
#include <QGraphicsPolygonItem>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
|
|
@ -71,9 +72,10 @@ TriangulationPointInputAndConflictZone<T>::mousePressEvent(QGraphicsSceneMouseEv
|
||||||
it != faces.end();
|
it != faces.end();
|
||||||
++it) {
|
++it) {
|
||||||
QGraphicsPolygonItem *item = new QGraphicsPolygonItem(convert(dt->triangle(*it)));
|
QGraphicsPolygonItem *item = new QGraphicsPolygonItem(convert(dt->triangle(*it)));
|
||||||
QColor color(::Qt::blue);
|
QColor color = ::Qt::blue;
|
||||||
color.setAlpha(150);
|
color.setAlpha(150);
|
||||||
item->setBrush(color);
|
item->setBrush(QBrush(color));
|
||||||
|
item->setPen(QPen(::Qt::black, .01));
|
||||||
scene_->addItem(item);
|
scene_->addItem(item);
|
||||||
qfaces.push_back(item);
|
qfaces.push_back(item);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -154,9 +154,10 @@ namespace CGAL {
|
||||||
visible_edges(true), visible_vertices(true),
|
visible_edges(true), visible_vertices(true),
|
||||||
type(NONE)
|
type(NONE)
|
||||||
{
|
{
|
||||||
setVerticesPen(QPen(::Qt::red, 1.));
|
setVerticesPen(QPen(::Qt::red, 1.));
|
||||||
setFacesPen(QPen(QColor(100,100,100)));
|
setFacesPen(QPen(QColor(100,100,100)));
|
||||||
setDomainPen(QPen(::Qt::blue, .01));
|
setDomainPen(QPen(::Qt::blue, .01));
|
||||||
|
setEdgesPen(QPen(::Qt::black, .01));
|
||||||
if(t->number_of_vertices() == 0){
|
if(t->number_of_vertices() == 0){
|
||||||
this->hide();
|
this->hide();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue