Basic template for triangles in N-dimensional space. More...
#include <eagine/math/primitives.hpp>
Public Member Functions | |
| constexpr | basic_triangle () noexcept=default |
| Default constructor. | |
| constexpr | basic_triangle (tvec< T, N, V > a, tvec< T, N, V > b, tvec< T, N, V > c) noexcept |
| Construction from three points making up the triangle. | |
| constexpr auto | vertex (span_size_t index) const noexcept -> vector< T, N, V > |
| Returns the point at the specified index. More... | |
| constexpr auto | a () const noexcept -> vector< T, N, V > |
| Returns the first point of the triangle. | |
| constexpr auto | b () const noexcept -> vector< T, N, V > |
| Returns the second point of the triangle. | |
| constexpr auto | c () const noexcept -> vector< T, N, V > |
| Returns the third point of the triangle. | |
| constexpr auto | ab () const noexcept -> vector< T, N, V > |
| Returns the ab edge vector of the triangle. | |
| constexpr auto | ac () const noexcept -> vector< T, N, V > |
| Returns the ac edge vector of the triangle. | |
| constexpr auto | center () const noexcept -> vector< T, N, V > |
| Returns the center of the triangle. | |
| constexpr auto | normal (bool cw) const noexcept -> vector< T, N, V > |
| Returns the normal vector of the triangle, in specified direction. | |
Basic template for triangles in N-dimensional space.
|
inlineconstexprnoexcept |
Returns the point at the specified index.