MeshLib Documentation
Loading...
Searching...
No Matches
MR::UnorientedTriangle Struct Reference

#include <MRUnorientedTriangle.h>

Public Member Functions

 UnorientedTriangle (const ThreeVertIds &inVs, bool *outFlipped=nullptr)
 
ThreeVertIds getFlipped () const
 returns this triangle with the opposite orientation
 
 operator ThreeVertIds & ()
 
 operator const ThreeVertIds & () const
 
VertId & operator[] (std::size_t i)
 
const VertId & operator[] (std::size_t i) const
 

Public Attributes

ThreeVertIds verts {}
 

Friends

bool operator== (const UnorientedTriangle &a, const UnorientedTriangle &b)=default
 

Detailed Description

describes a triangle as three vertex IDs sorted in a way to quickly find same triangles irrespective of vertex order (clockwise or counterclockwise)

Constructor & Destructor Documentation

◆ UnorientedTriangle()

MR::UnorientedTriangle::UnorientedTriangle ( const ThreeVertIds & inVs,
bool * outFlipped = nullptr )
inline
Parameters
outFlippedoptional output: true if the orientation of the triangle has flipped

Member Function Documentation

◆ getFlipped()

ThreeVertIds MR::UnorientedTriangle::getFlipped ( ) const
inline

returns this triangle with the opposite orientation

◆ operator const ThreeVertIds &()

MR::UnorientedTriangle::operator const ThreeVertIds & ( ) const
inline

◆ operator ThreeVertIds &()

MR::UnorientedTriangle::operator ThreeVertIds & ( )
inline

◆ operator[]() [1/2]

VertId & MR::UnorientedTriangle::operator[] ( std::size_t i)
inline

◆ operator[]() [2/2]

const VertId & MR::UnorientedTriangle::operator[] ( std::size_t i) const
inline

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const UnorientedTriangle & a,
const UnorientedTriangle & b )
friend

Member Data Documentation

◆ verts

ThreeVertIds MR::UnorientedTriangle::verts {}

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