#include #include #ifdef CGAL_USE_QT #include #include #endif #include /*! \file coin_check.cc A simple example using the qt GUI. */ int main(int argc, char*argv[]) { #ifdef CGAL_USE_QT CGAL_KINETIC_SET_LOG_LEVEL(CGAL::Kinetic::LOG_LOTS); typedef CGAL::Kinetic::Exact_simulation_traits_2 Traits; typedef CGAL::Kinetic::Qt_widget_2 Gui; typedef CGAL::Kinetic::Qt_moving_points_2 Qt_moving_points; typedef CGAL::Kinetic::Insert_event Insert_event; typedef Traits::Kinetic_kernel::Point_2 Moving_point; typedef CGAL::Kinetic::Enclosing_box_2 Box; Traits tr; Gui::Handle qtsim=new Gui(argc, argv, tr.simulator_handle()); Qt_moving_points::Handle qtmptp= new Qt_moving_points(qtsim, tr); Box::Handle box= new Box(tr); Traits::Kinetic_kernel::Function_kernel::Construct_function cf= tr.kinetic_kernel_object().function_kernel_object().construct_function_object(); tr.simulator_handle()->new_event(Traits::Simulator::Time(0), Insert_event( Moving_point(cf(0,2,4), cf(2,-3,4)), tr.active_points_2_table_handle())); tr.simulator_handle()->new_event(Traits::Simulator::Time(.1), Insert_event( Moving_point(cf(3,2,4), cf(1,-3,4)), tr.active_points_2_table_handle())); return qtsim->begin_event_loop(); #else bool warning_qt_is_not_available_no_2d_visualization; return 0; #endif }