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

n-dimensional plane. More...

#include <hyperplane.hpp>

Public Types

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

Public Member Functions

constexpr hyperplane () noexcept=default
 Constructs a hyperplane. More...
 
constexpr hyperplane (const vector_type &normal, float constant) noexcept
 Constructs a hyperplane given a normal and constant. More...
 
constexpr hyperplane (const vector_type &normal, const vector_type &offset) noexcept
 Constructs a hyperplane given a normal and an offset point. More...
 
constexpr T distance (const vector_type &point) const noexcept
 Calculates the signed distance from the hyperplane to a point. More...
 

Public Attributes

vector_type normal
 Hyperplane normal. More...
 
constant
 Hyperplane constant. More...
 

Detailed Description

template<class T, std::size_t N>
struct geom::primitives::hyperplane< T, N >

n-dimensional plane.

Template Parameters
TReal type.
NNumber of dimensions.

Definition at line 35 of file hyperplane.hpp.

Member Typedef Documentation

◆ vector_type

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

Vector type.

Definition at line 38 of file hyperplane.hpp.

Constructor & Destructor Documentation

◆ hyperplane() [1/3]

template<class T , std::size_t N>
constexpr geom::primitives::hyperplane< T, N >::hyperplane ( )
constexprdefaultnoexcept

Constructs a hyperplane.

◆ hyperplane() [2/3]

template<class T , std::size_t N>
constexpr geom::primitives::hyperplane< T, N >::hyperplane ( const vector_type normal,
float  constant 
)
inlineconstexprnoexcept

Constructs a hyperplane given a normal and constant.

Parameters
normalPlane normal.
constantPlane constant.

Definition at line 55 of file hyperplane.hpp.

◆ hyperplane() [3/3]

template<class T , std::size_t N>
constexpr geom::primitives::hyperplane< T, N >::hyperplane ( const vector_type normal,
const vector_type offset 
)
inlineconstexprnoexcept

Constructs a hyperplane given a normal and an offset point.

Parameters
normalPlane normal.
offsetOffset from the origin.

Definition at line 66 of file hyperplane.hpp.

Member Function Documentation

◆ distance()

template<class T , std::size_t N>
constexpr T geom::primitives::hyperplane< T, N >::distance ( const vector_type point) const
inlineconstexprnoexcept

Calculates the signed distance from the hyperplane to a point.

Parameters
pointInput point.
Returns
Signed distance from the hyperplane to point.

Definition at line 78 of file hyperplane.hpp.

Member Data Documentation

◆ constant

template<class T , std::size_t N>
T geom::primitives::hyperplane< T, N >::constant

Hyperplane constant.

Definition at line 44 of file hyperplane.hpp.

◆ normal

template<class T , std::size_t N>
vector_type geom::primitives::hyperplane< T, N >::normal

Hyperplane normal.

Definition at line 41 of file hyperplane.hpp.


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