// ====================================================================== // // Copyright (c) 1999 The CGAL Consortium // // This software and related documentation is part of an INTERNAL release // of the Computational Geometry Algorithms Library (CGAL). It is not // intended for general use. // // ---------------------------------------------------------------------- // release : // release_date : 2000, August 16 // // source : webS2/S2.lw // file : include/CGAL/SimpleCartesian/basic_constructionsS2.h // package : S2 (1.7) // maintainer : Stefan Schirra // revision : 1.6 // revision_date : 27 Jun 2000 // author(s) : Stefan Schirra // based on code by // Andreas Fabri and // Herve Brönnimann // // coordinator : MPI, Saarbrücken // ====================================================================== #ifndef CGAL_BASIC_CONSTRUCTIONSS2_H #define CGAL_BASIC_CONSTRUCTIONSS2_H 1 #include #include CGAL_BEGIN_NAMESPACE template < class FT > PointS2 midpoint( PointS2 const& p, PointS2 const& q ) { FT x,y; midpointC2(p.x(),p.y(),q.x(),q.y(),x,y); return PointS2(x,y); } template < class FT > LineS2 bisector( PointS2 const& p, PointS2 const& q ) { FT a,b,c; bisector_of_pointsC2(p.x(),p.y(),q.x(),q.y(),a,b,c); return LineS2(a,b,c); } template < class FT > PointS2 circumcenter( PointS2 const& p, PointS2 const& q, PointS2 const& r) { FT x,y; circumcenterC2(p.x(),p.y(),q.x(),q.y(),r.x(),r.y(),x,y); return PointS2(x,y); } template < class FT > FT squared_circumradius( PointS2 const& p, PointS2 const& q, PointS2 const& r) { return squared_circumradius(p.x(),p.y(),q.x(),q.y(),r.x(),r.y()); } template < class FT > PointS2 squared_circumcircle( PointS2 const& p, PointS2 const& q, PointS2 const& r, FT &radius) { FT x,y; radius = squared_circumradius(p.x(),p.y(),q.x(),q.y(),r.x(),r.y(),x,y); return PointS2(x,y); } template < class FT > FT squared_distance( PointS2 const& p, PointS2 const& q) { return squared_distanceC2(p.x(),p.y(),q.x(),q.y()); } template < class FT > FT scaled_distance_to_line( LineS2 const& l, PointS2 const& p) { return squared_distance_to_lineC2(l.a(),l.b(),l.c(),p.x(),p.y()); } template < class FT > FT scaled_distance_to_line( PointS2 const& p, PointS2 const& q, PointS2 const& r) { return squared_distance_to_lineC2(p.x(),p.y(),q.x(),q.y(),r.x(),r.y()); } CGAL_END_NAMESPACE #endif // CGAL_BASIC_CONSTRUCTIONS_2_H