|
Fishnet 2.0.1
Framework for Graph-Based Analysis of GIS Vector Data
|
Implementation of a line. More...
#include <Line.hpp>
Public Types | |
| using | numeric_type = T |
Public Member Functions | |
| constexpr | Line (Vec2D< T > _p, Vec2D< T > _q) |
| Constructor for a line formed by two points. | |
| template<fishnet::math::Number U, typename = std::enable_if_t<!std::is_same_v<U,T> && std::is_same_v<T,fishnet::math::DEFAULT_NUMERIC>>> | |
| constexpr | Line (Vec2D< T > _p, Vec2D< U > _q) |
| Constructor for a line with heterogenous numeric types Construct new line by converting to the default numeric type. | |
| template<fishnet::math::Number U, typename = std::enable_if_t<!std::is_same_v<U,T> && std::is_same_v<T,fishnet::math::DEFAULT_NUMERIC>>> | |
| constexpr | Line (Vec2D< U > _p, Vec2D< T > _q) |
| Constructor for a line with heterogenous numeric types Construct new line by converting to the default numeric type. | |
| constexpr | Line (T slope, T yIntercept) |
| Constructor of line using slope and y intercept. | |
| template<fishnet::math::Number U, typename = std::enable_if_t<!std::is_same_v<U,T> && std::is_same_v<T,fishnet::math::DEFAULT_NUMERIC>>> | |
| constexpr | Line (T slope, U yIntercept) |
| Constructor of line using slope and y intercept with heterogenous type. | |
| template<fishnet::math::Number U, typename = std::enable_if_t<!std::is_same_v<U,T> && std::is_same_v<T,fishnet::math::DEFAULT_NUMERIC>>> | |
| constexpr | Line (U slope, T yIntercept) |
| Constructor of line using slope and y intercept with heterogenous type. | |
| constexpr Vec2D< T > | p () const noexcept |
| constexpr Vec2D< T > | q () const noexcept |
| constexpr Line< T > | toLine () const noexcept |
| constexpr Vec2D< T > | direction () const noexcept |
| constexpr bool | isVertical () const noexcept |
| constexpr bool | isHorizontal () const noexcept |
| constexpr fishnet::Option< fishnet::math::DEFAULT_FLOATING_POINT > | yIntercept () const noexcept |
| constexpr fishnet::math::DEFAULT_FLOATING_POINT | slope () const noexcept |
| constexpr bool | contains (IPoint auto const &point) const noexcept |
| constexpr bool | isLeft (IPoint auto const &point) const noexcept |
| constexpr bool | isRight (IPoint auto const &point) const noexcept |
| constexpr bool | isParallel (LinearGeometry auto const &other) const noexcept |
| constexpr bool | intersects (LinearGeometry auto const &other) const noexcept |
| template<fishnet::math::Number U> | |
| constexpr bool | operator== (const Line< U > &other) const noexcept |
| constexpr fishnet::Option< Vec2DReal > | intersection (LinearGeometry auto const &other) const noexcept |
| constexpr size_t | hash () const noexcept |
| constexpr std::string | toString () const |
Static Public Member Functions | |
| static constexpr Line< T > | verticalLine (T x) noexcept |
| Vertical line factory. | |
| static constexpr Line< T > | horizontalLine (T y) noexcept |
| Horizontal line factory. | |
Static Public Attributes | |
| static constexpr GeometryType | type = GeometryType::LINE |
Implementation of a line.
| T | numeric type used for computations |
| using fishnet::geometry::Line< T >::numeric_type = T |
|
inlineconstexpr |
Constructor for a line formed by two points.
|
inlineconstexpr |
Constructor for a line with heterogenous numeric types Construct new line by converting to the default numeric type.
| U | numeric type != T |
| typename | enable_if -> only allow this constructor if T is the numeric type: |
| std::is_same_v<T,fishnet::math::DEFAULT_NUMERIC>> |
|
inlineconstexpr |
Constructor for a line with heterogenous numeric types Construct new line by converting to the default numeric type.
| U | numeric type != T |
| typename | enable_if -> only allow this constructor if T is the numeric type: |
| std::is_same_v<T,fishnet::math::DEFAULT_NUMERIC>> |
|
inlineconstexpr |
Constructor of line using slope and y intercept.
|
inlineconstexpr |
Constructor of line using slope and y intercept with heterogenous type.
| U | numeric type != T |
| typename | enable_if -> only allow this constructor if T is the numeric type: |
| std::is_same_v<T,fishnet::math::DEFAULT_NUMERIC>> |
|
inlineconstexpr |
Constructor of line using slope and y intercept with heterogenous type.
| U | numeric type != T |
| typename | enable_if -> only allow this constructor if T is the numeric type: |
| std::is_same_v<T,fishnet::math::DEFAULT_NUMERIC>> |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
Horizontal line factory.
| y | y-axis intersection of the horizontal line |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
|
inlinestaticconstexprnoexcept |
Vertical line factory.
| x | x-axis intersection of the vertical line |
|
inlineconstexprnoexcept |
|
staticconstexpr |