mirror of https://github.com/CGAL/cgal
A beginning.
This commit is contained in:
parent
ddbfbe8398
commit
1cd3febf83
|
|
@ -0,0 +1,13 @@
|
|||
all: normal cxx0x
|
||||
|
||||
CGAL_INC = -I/home/glisse/repos/cgal/trunk/Algebraic_foundations/include -I/home/glisse/repos/cgal/trunk/STL_Extension/include -I/data/repos/cgal/trunk/Algebraic_foundations/include -I/data/repos/cgal/trunk/STL_Extension/include
|
||||
|
||||
normal:
|
||||
g++ test.cpp -O2 -g -lCGAL -frounding-math -Wall -I. -lgmp -I../../include -I/usr/include/eigen2 -DCGAL_USE_EIGEN ${CGAL_INC}
|
||||
./a.out
|
||||
|
||||
cxx0x:
|
||||
/usr/lib/gcc-snapshot/bin/g++ -std=c++0x -O2 -g test.cpp -lCGAL -frounding-math -Wall -I. -lgmp -DCGAL_CXX0X -I../../include -I/usr/include/eigen2 -DCGAL_USE_EIGEN ${CGAL_INC}
|
||||
./a.out
|
||||
|
||||
#-DBOOST_RESULT_OF_USE_DECLTYPE
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
#include <typeinfo>
|
||||
#include <CGAL/myeigen.h>
|
||||
#include <CGAL/Kernel_d/Cartesian_base.h>
|
||||
#include <CGAL/Kernel_d/Cartesian_filter_NT.h>
|
||||
#include <CGAL/Gmpq.h>
|
||||
#include <CGAL/Interval_nt.h>
|
||||
#include <iostream>
|
||||
typedef CGAL::Cartesian_base_d<double,CGAL::Dimension_tag<2> > K0;
|
||||
typedef CGAL::Cartesian_filter_NT<K0> K1;
|
||||
//typedef CGAL::Cartesian_change_FT<K0,double> K1;
|
||||
typedef K1::Point P;
|
||||
typedef K1::Vector V;
|
||||
typedef K1::Segment S;
|
||||
//typedef K1::Construct_point CP;
|
||||
typedef K1::Construct<CGAL::Construct_point_tag>::type CP;
|
||||
typedef K1::Construct_vector CV;
|
||||
typedef K1::Construct_cartesian_const_iterator CCI;
|
||||
typedef K1::Predicate<CGAL::Orientation_tag>::type PO;
|
||||
typedef K1::Cartesian_const_iterator CI;
|
||||
typedef K1::Compute_cartesian_coordinate CC;
|
||||
|
||||
int main(){
|
||||
CP cp; CCI ci; CC cc; PO po;
|
||||
P a=cp(3,4);
|
||||
P b=cp(5,6,7);
|
||||
int rr[]={3,5,2};
|
||||
int* r=rr;
|
||||
P c=cp(r,r+2);
|
||||
P d=cp(r,r+3,CGAL::Homogeneous_tag());
|
||||
S s(c,d);
|
||||
std::cout << cc(a,1) << std::endl;
|
||||
std::cout << cc(b,1) << std::endl;
|
||||
std::cout << cc(s[0],1) << std::endl;
|
||||
std::cout << cc(s[1],1) << std::endl;
|
||||
for(CI i=ci.begin(a);i!=ci.end(a);++i)
|
||||
std::cout << *i << ' ';
|
||||
std::cout << '\n';
|
||||
P tab[]={a,b,c};
|
||||
std::cout << po(&tab[0],tab+3) << std::endl;
|
||||
}
|
||||
Loading…
Reference in New Issue