1.10
Public Types | Public Member Functions | Protected Attributes | List of all members
LineType< Dim > Class Template Reference

A line, with a starting and ending point. More...

#include <geometry.h>

Public Types

using DimType = Dim
 Helper to reference the dimension type.
 

Public Member Functions

constexpr LineType (const PointType< Dim > &start, const PointType< Dim > &end) noexcept
 
EGT_NODISCARD constexpr PointType< Dim > end () const noexcept
 Get the end point of the line.
 
constexpr void end (const PointType< Dim > &end) noexcept
 Set the end point of the line.
 
EGT_NODISCARD constexpr RectType< Dim > rect () const noexcept
 Returns a rectangle containing the line.
 
EGT_NODISCARD constexpr PointType< Dim > start () const noexcept
 Get the start point of the line.
 
constexpr void start (const PointType< Dim > &start) noexcept
 Set the start point of the line.
 

Protected Attributes

PointType< Dim > m_end
 End point of the line.
 
PointType< Dim > m_start
 Start point of the line.
 

Detailed Description

template<class Dim>
class egt::v1::LineType< Dim >

A line, with a starting and ending point.

Typically Line, LineF are used as aliases.

Member Typedef Documentation

◆ DimType

template<class Dim >
using DimType = Dim

Helper to reference the dimension type.

Constructor & Destructor Documentation

◆ LineType()

template<class Dim >
constexpr LineType ( const PointType< Dim > &  start,
const PointType< Dim > &  end 
)
inlineexplicitconstexprnoexcept
Parameters
[in]startStart point of the line.
[in]endEnd point of the line.

Member Function Documentation

◆ end() [1/2]

template<class Dim >
EGT_NODISCARD constexpr PointType< Dim > end ( ) const
inlineconstexprnoexcept

Get the end point of the line.

◆ end() [2/2]

template<class Dim >
constexpr void end ( const PointType< Dim > &  end)
inlineconstexprnoexcept

Set the end point of the line.

◆ rect()

template<class Dim >
EGT_NODISCARD constexpr RectType< Dim > rect ( ) const
inlineconstexprnoexcept

Returns a rectangle containing the line.

◆ start() [1/2]

template<class Dim >
EGT_NODISCARD constexpr PointType< Dim > start ( ) const
inlineconstexprnoexcept

Get the start point of the line.

◆ start() [2/2]

template<class Dim >
constexpr void start ( const PointType< Dim > &  start)
inlineconstexprnoexcept

Set the start point of the line.

Member Data Documentation

◆ m_end

template<class Dim >
PointType<Dim> m_end
protected

End point of the line.

◆ m_start

template<class Dim >
PointType<Dim> m_start
protected

Start point of the line.