CGAL 5.5 - 2D Triangulations
Triangulation_2/colored_face.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/IO/Color.h>
#include <CGAL/Triangulation_2.h>
#include <CGAL/Triangulation_face_base_with_info_2.h>
typedef CGAL::Triangulation_2<K,Tds> Triangulation;
typedef Triangulation::Face_handle Face_handle;
typedef Triangulation::Point Point;
int main() {
Triangulation t;
t.insert(Point(0,1));
t.insert(Point(0,0));
t.insert(Point(2,0));
t.insert(Point(2,2));
for(Face_handle f : t.finite_face_handles())
f->info() = CGAL::IO::blue();
Point p(0.5,0.5);
Face_handle fh = t.locate(p);
fh->info() = CGAL::IO::red();
return 0;
}
CGAL 5.5 - 2D Triangulations
Triangulation_2/colored_face.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/IO/Color.h>
#include <CGAL/Triangulation_2.h>
#include <CGAL/Triangulation_face_base_with_info_2.h>
typedef CGAL::Triangulation_2<K,Tds> Triangulation;
typedef Triangulation::Face_handle Face_handle;
typedef Triangulation::Point Point;
int main() {
Triangulation t;
t.insert(Point(0,1));
t.insert(Point(0,0));
t.insert(Point(2,0));
t.insert(Point(2,2));
for(Face_handle f : t.finite_face_handles())
f->info() = CGAL::IO::blue();
Point p(0.5,0.5);
Face_handle fh = t.locate(p);
fh->info() = CGAL::IO::red();
return 0;
}