mirror of https://github.com/CGAL/cgal
changes to demo files to reflect function renaming in base triangulation, face and vertex classes
This commit is contained in:
parent
df7bd4a5de
commit
1c64d1a849
|
|
@ -261,7 +261,7 @@ MainWindow::processInput(CGAL::Object o)
|
||||||
fi->tds_data().clear();
|
fi->tds_data().clear();
|
||||||
}
|
}
|
||||||
for (Triangulation::Vertex_iterator vi = dt.vertices_begin(); vi != dt.vertices_end(); vi++) {
|
for (Triangulation::Vertex_iterator vi = dt.vertices_begin(); vi != dt.vertices_end(); vi++) {
|
||||||
vi->remove_translation();
|
vi->clear_translation();
|
||||||
}
|
}
|
||||||
|
|
||||||
Vertex_handle v = dt.insert(p);
|
Vertex_handle v = dt.insert(p);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ public:
|
||||||
typedef typename DT::Face_handle Face_handle;
|
typedef typename DT::Face_handle Face_handle;
|
||||||
typedef typename DT::Point Point;
|
typedef typename DT::Point Point;
|
||||||
typedef typename DT::Hyperbolic_translation Hyperbolic_translation;
|
typedef typename DT::Hyperbolic_translation Hyperbolic_translation;
|
||||||
typedef typename DT::Triangle_2 Triangle;
|
typedef typename DT::Triangle Triangle;
|
||||||
|
|
||||||
TriangulationConflictZone(QGraphicsScene* s, DT * dt_, QObject* parent);
|
TriangulationConflictZone(QGraphicsScene* s, DT * dt_, QObject* parent);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ TriangulationGraphicsItem<T>::operator()(typename T::Face_handle fh)
|
||||||
for (int i=0; i<3; i++) {
|
for (int i=0; i<3; i++) {
|
||||||
if (fh < fh->neighbor(i)) {
|
if (fh < fh->neighbor(i)) {
|
||||||
m_painter->setPen(this->edgesPen());
|
m_painter->setPen(this->edgesPen());
|
||||||
painterostream << t->segment(fh, i);
|
painterostream << t->construct_segment(fh, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -290,14 +290,14 @@ TriangulationGraphicsItem<T>::drawAll(QPainter *painter)
|
||||||
Point_2 v6(-em*p34/FT(4), -ep*p34/FT(4));
|
Point_2 v6(-em*p34/FT(4), -ep*p34/FT(4));
|
||||||
Point_2 v7(p14*(ep - em)/FT(4), -p14*(ep + em)/FT(4));
|
Point_2 v7(p14*(ep - em)/FT(4), -p14*(ep + em)/FT(4));
|
||||||
|
|
||||||
painterostream << t->segment(v0, v1);
|
painterostream << t->construct_segment(v0, v1);
|
||||||
painterostream << t->segment(v1, v2);
|
painterostream << t->construct_segment(v1, v2);
|
||||||
painterostream << t->segment(v2, v3);
|
painterostream << t->construct_segment(v2, v3);
|
||||||
painterostream << t->segment(v3, v4);
|
painterostream << t->construct_segment(v3, v4);
|
||||||
painterostream << t->segment(v4, v5);
|
painterostream << t->construct_segment(v4, v5);
|
||||||
painterostream << t->segment(v5, v6);
|
painterostream << t->construct_segment(v5, v6);
|
||||||
painterostream << t->segment(v6, v7);
|
painterostream << t->construct_segment(v6, v7);
|
||||||
painterostream << t->segment(v7, v0);
|
painterostream << t->construct_segment(v7, v0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -330,18 +330,18 @@ TriangulationGraphicsItem<T>::drawAll(QPainter *painter)
|
||||||
CP2()(fit->vertex(1)->point(), fit->translation(1)),
|
CP2()(fit->vertex(1)->point(), fit->translation(1)),
|
||||||
CP2()(fit->vertex(2)->point(), fit->translation(2)) } ;
|
CP2()(fit->vertex(2)->point(), fit->translation(2)) } ;
|
||||||
|
|
||||||
painterostream << t->segment(pts[0], pts[1]);
|
painterostream << t->construct_segment(pts[0], pts[1]);
|
||||||
painterostream << t->segment(pts[1], pts[2]);
|
painterostream << t->construct_segment(pts[1], pts[2]);
|
||||||
painterostream << t->segment(pts[2], pts[0]);
|
painterostream << t->construct_segment(pts[2], pts[0]);
|
||||||
//cout << " original painted" << endl;
|
//cout << " original painted" << endl;
|
||||||
if (visible_copies) {
|
if (visible_copies) {
|
||||||
// cout << "painting copies" << endl;
|
// cout << "painting copies" << endl;
|
||||||
// typename Geom_traits::Point_2 pts[] = {fit->translation(Triangulation_cw_ccw_2::ccw(0)).apply(fit->vertex(Triangulation_cw_ccw_2::ccw(k))->point());
|
// typename Geom_traits::Point_2 pts[] = {fit->translation(Triangulation_cw_ccw_2::ccw(0)).apply(fit->vertex(Triangulation_cw_ccw_2::ccw(k))->point());
|
||||||
// typename Geom_traits::Point_2 tgt = fit->translation(Triangulation_cw_ccw_2::cw(k)).apply(fit->vertex(Triangulation_cw_ccw_2::cw(k))->point());
|
// typename Geom_traits::Point_2 tgt = fit->translation(Triangulation_cw_ccw_2::cw(k)).apply(fit->vertex(Triangulation_cw_ccw_2::cw(k))->point());
|
||||||
for (int j = 0; j < trans.size(); j++) {
|
for (int j = 0; j < trans.size(); j++) {
|
||||||
painterostream << t->segment( CP2()(pts[0], trans[j]), CP2()(pts[1], trans[j]) );
|
painterostream << t->construct_segment( CP2()(pts[0], trans[j]), CP2()(pts[1], trans[j]) );
|
||||||
painterostream << t->segment( CP2()(pts[1], trans[j]), CP2()(pts[2], trans[j]) );
|
painterostream << t->construct_segment( CP2()(pts[1], trans[j]), CP2()(pts[2], trans[j]) );
|
||||||
painterostream << t->segment( CP2()(pts[2], trans[j]), CP2()(pts[0], trans[j]) );
|
painterostream << t->construct_segment( CP2()(pts[2], trans[j]), CP2()(pts[0], trans[j]) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//cout << " copies painted" << endl;
|
//cout << " copies painted" << endl;
|
||||||
|
|
@ -351,7 +351,7 @@ TriangulationGraphicsItem<T>::drawAll(QPainter *painter)
|
||||||
temp.setColor(::Qt::red);
|
temp.setColor(::Qt::red);
|
||||||
painter->setPen(temp);
|
painter->setPen(temp);
|
||||||
painterostream = PainterOstream<Geom_traits>(painter);
|
painterostream = PainterOstream<Geom_traits>(painter);
|
||||||
painterostream << t->segment(source, target);
|
painterostream << t->construct_segment(source, target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,11 @@ MainWindow::initialize_animation_parameters() {
|
||||||
}
|
}
|
||||||
|
|
||||||
time = updateTime();
|
time = updateTime();
|
||||||
last_location = dt.periodic_locate(get_image(source, target, time), last_loc_translation);
|
std::cout << "time = " << time << std::endl;
|
||||||
|
Point img = get_image(source, target, time);
|
||||||
|
std::cout << "img = " << img << std::endl;
|
||||||
|
std::cout << "last_loc_translation = " << last_loc_translation << std::endl;
|
||||||
|
last_location = dt.periodic_locate(img, last_loc_translation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue