AMCAX Kernel 1.0.0.0
AMCAX::Triangle Class Reference

Class of triangle, used in TriangularMesh. More...

#include <math/Triangle.hpp>

Public Member Functions

 Triangle ()=default
 Default constructor.
 
AMCAX_API Triangle (int n1, int n2, int n3)
 Construct from the indices. More...
 
AMCAX_API void Set (int n1, int n2, int n3)
 Set the vertex indices. More...
 
AMCAX_API auto Get () const -> std::tuple< int, int, int >
 Get the indices of three vertices. More...
 
AMCAX_API const int & operator[] (int i) const
 Get the index of the i-th vertex. More...
 
AMCAX_API int & operator[] (int i)
 Get the index of the i-th vertex. More...
 

Protected Attributes

int vid [3] = {-1, -1, -1}
 The indices of three vertices.
 

Detailed Description

Class of triangle, used in TriangularMesh.

Constructor & Destructor Documentation

◆ Triangle()

AMCAX_API AMCAX::Triangle::Triangle ( int  n1,
int  n2,
int  n3 
)

Construct from the indices.

Parameters
n1,n2,n3The three vertex indices

Member Function Documentation

◆ Get()

AMCAX_API auto AMCAX::Triangle::Get ( ) const -> std::tuple< int, int, int >

Get the indices of three vertices.

Returns
The tuple of the three vertices

◆ operator[]() [1/2]

AMCAX_API int & AMCAX::Triangle::operator[] ( int  i)

Get the index of the i-th vertex.

Parameters
iThe index of vertex
Returns
The index of the i-th vertex

◆ operator[]() [2/2]

AMCAX_API const int & AMCAX::Triangle::operator[] ( int  i) const

Get the index of the i-th vertex.

Parameters
iThe index of vertex
Returns
The index of the i-th vertex

◆ Set()

AMCAX_API void AMCAX::Triangle::Set ( int  n1,
int  n2,
int  n3 
)

Set the vertex indices.

Parameters
n1,n2,n3The three vertex indices

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