Antkeeper  0.0.1
Public Types | Public Member Functions | Public Attributes | List of all members
geom::primitive::line_segment< T, N > Struct Template Reference

n-dimensional line segment. More...

#include <line-segment.hpp>

Public Types

using vector_type = math::vector< T, N >
 Vector type. More...
 

Public Member Functions

length () const noexcept
 Calculates the length of the line segment. More...
 

Public Attributes

vector_type a
 First endpoint. More...
 
vector_type b
 Second endpoint. More...
 

Detailed Description

template<class T, std::size_t N>
struct geom::primitive::line_segment< T, N >

n-dimensional line segment.

Template Parameters
TReal type.
NNumber of dimensions.

Definition at line 35 of file line-segment.hpp.

Member Typedef Documentation

◆ vector_type

template<class T , std::size_t N>
using geom::primitive::line_segment< T, N >::vector_type = math::vector<T, N>

Vector type.

Definition at line 38 of file line-segment.hpp.

Member Function Documentation

◆ length()

template<class T , std::size_t N>
T geom::primitive::line_segment< T, N >::length ( ) const
inlinenoexcept

Calculates the length of the line segment.

Returns
Length of the line segment.

Definition at line 51 of file line-segment.hpp.

Member Data Documentation

◆ a

template<class T , std::size_t N>
vector_type geom::primitive::line_segment< T, N >::a

First endpoint.

Definition at line 41 of file line-segment.hpp.

◆ b

template<class T , std::size_t N>
vector_type geom::primitive::line_segment< T, N >::b

Second endpoint.

Definition at line 44 of file line-segment.hpp.


The documentation for this struct was generated from the following file: