File: test.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 (62 lines) | stat: -rw-r--r-- 1,827 bytes parent folder | download
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright (c) 2011  GeometryFactory Sarl (France)
// 
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 3 of the License,
// or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/next/Installation/auxiliary/gdb/test.cpp $
// $Id: test.cpp 67159 2012-01-16 14:19:14Z lrineau $
//
//
// Author(s)     : Laurent Rineau


#include <CGAL/Simple_cartesian.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
#include <CGAL/Circular_kernel_2.h>
#include <CGAL/Filtered_kernel.h>

typedef CGAL::Simple_cartesian<double> K;
typedef CGAL::Cartesian<double> K2;
typedef CGAL::Simple_cartesian<CGAL::Gmpq> K3;
typedef K3::RT FT3;

typedef CGAL::Algebraic_kernel_for_circles_2_2<double>          AK;
typedef CGAL::Circular_kernel_2<K, AK> CK;

typedef CGAL::Filtered_kernel<K> FK;

int main() {
  K::Point_2 default_p;
  K::Point_2 p(-1./3, 2.);
  K::Vector_2 v = p - CGAL::ORIGIN;
  K::Circle_2 c(p, 10);

  K2::Point_2 p2(-1./3, 2.);
  K2::Vector_2 v2 = p2 - CGAL::ORIGIN;
  K2::Circle_2 c2(p2, 10);

  // no correct pretty-printer for CGAL::Gmpq
  K3::Point_2 p3(-3, 10);
  K3::Vector_2 v3 = p3 - CGAL::ORIGIN; 

  CK::Point_2 p4;
  CK::Vector_2 v4;

  FK::Point_2 default_p5;
  FK::Vector_2 default_v5;

  FK::Point_2 p5(1, 2);
  FK::Vector_2 v5(3, 4);

  return 0;
}