OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::math::basic_triangle< T, N, V > Class Template Reference

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.
 

Detailed Description

template<typename T, int N, bool V>
class eagine::math::basic_triangle< T, N, V >

Basic template for triangles in N-dimensional space.

Member Function Documentation

◆ vertex()

template<typename T , int N, bool V>
constexpr auto eagine::math::basic_triangle< T, N, V >::vertex ( span_size_t  index) const -> vector<T, N, V>
inlineconstexprnoexcept

Returns the point at the specified index.

Precondition
index < 3

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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).