File: Kinetic_Delaunay_triangulation_2.cpp

package info (click to toggle)
cgal 4.0-5
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 65,068 kB
  • sloc: cpp: 500,870; ansic: 102,544; sh: 321; python: 92; makefile: 75; xml: 2
file content (32 lines) | stat: -rw-r--r-- 953 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <CGAL/Kinetic/Exact_simulation_traits.h>
#include <CGAL/Kinetic/Delaunay_triangulation_2.h>

int main()
{

    typedef CGAL::Kinetic::Exact_simulation_traits Simulation_traits;
    typedef Simulation_traits::Kinetic_kernel::Point_2 Moving_point_2;

    typedef CGAL::Kinetic::Delaunay_triangulation_2<Simulation_traits> KDel;

    Simulation_traits tr(0,10000);
    Simulation_traits::Simulator::Handle sp= tr.simulator_handle();

    KDel kdel(tr);

    kdel.set_has_certificates(false);
    std::ifstream in("data/points_2");
    in >> *tr.active_points_2_table_handle();
    kdel.set_has_certificates(true);


    std::cout << "Starting to run" << std::endl;
    while (sp->next_event_time()
    < sp->end_time()) {
        sp->set_current_event_number(sp->current_event_number()+10);
        std::cout << "At time " << sp->current_time() << ":\n";
        std::cout << kdel.triangulation_data_structure();
    }

    return EXIT_SUCCESS;
}