1 // Boost.Geometry 2 3 // Copyright (c) 2018-2019 Barend Gehrels, Amsterdam, the Netherlands. 4 5 // Use, modification and distribution is subject to the Boost Software License, 6 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 7 // http://www.boost.org/LICENSE_1_0.txt) 8 9 #ifndef BOOST_GEOMETRY_GEOMETRIES_INFINITE_LINE_HPP 10 #define BOOST_GEOMETRY_GEOMETRIES_INFINITE_LINE_HPP 11 12 13 namespace boost { namespace geometry 14 { 15 16 namespace model 17 { 18 19 //-------------------------------------------------------------------------- 20 // Structure containing an infinite line. 21 // It is written using "General Form", a*x + b*y + c == 0 22 // Might be conceptized later. Therefore operations are implemented outside 23 // the structure itself. 24 template <typename Type = double> 25 struct infinite_line 26 { infinite_lineboost::geometry::model::infinite_line27 infinite_line() 28 : a(0) 29 , b(0) 30 , c(0) 31 , normalized(false) 32 {} 33 34 // Horizontal: a == 0, for example y-3=0, y==3 35 // Vertical: b == 0, for example x-2=0, x==2 36 // Through origin: c == 0 37 Type a; 38 Type b; 39 Type c; 40 bool normalized; 41 }; 42 43 44 } // namespace model 45 46 47 }} // namespace boost::geometry 48 49 50 #endif // BOOST_GEOMETRY_GEOMETRIES_INFINITE_LINE_HPP 51