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

eagine::shapes::mesh_triangle Class Reference

Class storing information about a mesh tirangular face. More...

#include <eagine/shapes/topology.hpp>

Public Member Functions

auto index () const noexcept -> span_size_t
 Returns the index of this triangle within the mesh.
 
auto vertex_index (span_size_t v) const noexcept
 Returns the v-th vertex index. More...
 
auto adjacent_triangle (span_size_t v) const noexcept -> const mesh_triangle *
 Returns the triangle adjacent through the v-th edge. More...
 
auto opposite_vertex (span_size_t v) const noexcept -> unsigned
 Returns opposite vertex index (0,1 or 2) in the v-th adjacent triangle. More...
 
auto opposite_index (span_size_t v) const noexcept -> unsigned
 Returns the in-mesh index of the v-th adjacent vertex. More...
 

Detailed Description

Class storing information about a mesh tirangular face.

See also
mesh_edge
topology

Member Function Documentation

◆ adjacent_triangle()

auto eagine::shapes::mesh_triangle::adjacent_triangle ( span_size_t  v) const -> const mesh_triangle*
inlinenoexcept

Returns the triangle adjacent through the v-th edge.

Precondition
v >= 0 && v < 3
See also
opposite_vertex

Referenced by opposite_index().

◆ opposite_index()

auto eagine::shapes::mesh_triangle::opposite_index ( span_size_t  v) const -> unsigned
inlinenoexcept

Returns the in-mesh index of the v-th adjacent vertex.

Precondition
v >= 0 && v < 3
See also
opposite_vertex
adjacent_triangle

◆ opposite_vertex()

auto eagine::shapes::mesh_triangle::opposite_vertex ( span_size_t  v) const -> unsigned
inlinenoexcept

Returns opposite vertex index (0,1 or 2) in the v-th adjacent triangle.

Precondition
v >= 0 && v < 3
See also
adjacent_triangle
opposite_index

Referenced by opposite_index().

◆ vertex_index()

auto eagine::shapes::mesh_triangle::vertex_index ( span_size_t  v) const
inlinenoexcept

Returns the v-th vertex index.

Precondition
v >= 0 && v < 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).