1.2
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...

Public Types

using DimType = Dim
 Helper to reference the dimension type. More...
 

Public Member Functions

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

Protected Attributes

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

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

using DimType = Dim

Helper to reference the dimension type.

Constructor & Destructor Documentation

◆ LineType()

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]

constexpr EGT_NODISCARD PointType<Dim> end ( ) const
inlineconstexprnoexcept

Get the end point of the line.

◆ end() [2/2]

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

Set the end point of the line.

◆ rect()

constexpr EGT_NODISCARD RectType<Dim> rect ( ) const
inlineconstexprnoexcept

Returns a rectangle containing the line.

◆ start() [1/2]

constexpr EGT_NODISCARD PointType<Dim> start ( ) const
inlineconstexprnoexcept

Get the start point of the line.

◆ start() [2/2]

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

Set the start point of the line.

Member Data Documentation

◆ m_end

PointType<Dim> m_end
protected

End point of the line.

◆ m_start

PointType<Dim> m_start
protected

Start point of the line.