xmsgeom  1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
GmBoostTypes.h
Go to the documentation of this file.
1 #pragma once
2 //------------------------------------------------------------------------------
9 //------------------------------------------------------------------------------
10 
11 //----- Included files ---------------------------------------------------------
12 
13 #include <xmscore/points/ptsfwd.h>
14 #pragma warning(push)
15 #pragma warning(disable : 4512) // Boost code: no assignment operator
16 #include <boost/geometry/core/cs.hpp>
17 #include <boost/geometry/geometry.hpp>
18 #include <boost/geometry/geometries/point_xy.hpp>
19 #include <boost/geometry/geometries/polygon.hpp>
20 #include <boost/geometry/geometries/register/point.hpp>
21 #pragma warning(pop)
22 
23 //----- Constants / Enumerations -----------------------------------------------
24 
25 BOOST_GEOMETRY_REGISTER_POINT_2D(xms::Pt3d, double, cs::cartesian, x, y)
26 // It causes problems if you sprinkle this in different locations in the code.
27 // Especially if you try to use the 3D version of this macro with Pt3d then
28 // it is not clear which version will be used. So we only want this code in
29 // one place.
30 
31 //----- Namespace declaration --------------------------------------------------
32 
33 namespace xms
34 {
36 typedef boost::geometry::model::d2::point_xy<double> GmBstPt2d;
38 typedef boost::geometry::model::polygon<GmBstPt2d> GmBstPoly2d;
40 typedef boost::geometry::model::polygon<Pt3d> GmBstPoly3d;
42 typedef boost::geometry::model::box<Pt3d> GmBstBox3d;
44 typedef boost::geometry::model::linestring<Pt3d> GmBstLine3d;
46 typedef boost::geometry::ring_type<GmBstPoly3d>::type GmBstRing3d;
47 
48 } // namespace xms