Geogram
Version 1.9.1-rc
A programming library of geometric algorithms
|
A triple of three indices. More...
#include <geogram/mesh/index.h>
Public Types | |
enum | KeepOrderType { KEEP_ORDER } |
This type is used to overload basic_trindex constructors with versions that keep the order of the stored indices. More... | |
Public Member Functions | |
basic_trindex () | |
Creates an uninitialized basic_trindex. | |
basic_trindex (IndexType i, IndexType j, IndexType k) | |
Creates a basic_trindex from three integers. More... | |
basic_trindex (IndexType i, IndexType j, IndexType k, KeepOrderType order) | |
Creates a basic_trindex from three integers and keeps their order. More... | |
bool | operator< (const basic_trindex< IndexType > &rhs) const |
Compares two basic_trindex. More... | |
bool | operator== (const basic_trindex< IndexType > &rhs) const |
Compares two basic_trindex. More... | |
bool | operator!= (const basic_trindex< IndexType > &rhs) const |
Compares two basic_trindex. More... | |
basic_trindex (const basic_trindex< IndexType > &rhs)=default | |
Constructs a basic_trindex from another one. More... | |
basic_trindex< IndexType > & | operator= (const basic_trindex< IndexType > &rhs)=default |
Assigns a basic_trindex to this one. More... | |
Static Public Member Functions | |
static bool | same_orientation (const basic_trindex< IndexType > &t, IndexType i, IndexType j, IndexType k) |
Tests whether a basic_trindex has the same orientation as a triple of integers. More... | |
static bool | same_orientation (const basic_trindex< IndexType > &t1, const basic_trindex< IndexType > &t2) |
Tests whether two basic_trindex have the same orientation. More... | |
static basic_trindex | inverse (const basic_trindex< IndexType > &t) |
Computes the inverse of a basic_trindex. More... | |
Public Attributes | |
IndexType | indices [3] |
The array of 3 indices. | |
Related Functions | |
(Note that these are not member functions.) | |
template<class IndexType > | |
std::ostream & | operator<< (std::ostream &out, const basic_trindex< IndexType > &T) |
Writes a basic_trindex to a stream. More... | |
A triple of three indices.
Can be used as a key in associative data structures (std::map, std::set). The indices are defined by IndexType
, generally signed or unsigned integers.
IndexType | type of the indices |
enum GEO::basic_trindex::KeepOrderType |
This type is used to overload basic_trindex constructors with versions that keep the order of the stored indices.
Enumerator | |
---|---|
KEEP_ORDER | Value to pass to basic_trindex ordered constructor |
|
inline |
Creates a basic_trindex from three integers.
The integers are reordered.
[in] | i | first integer |
[in] | j | second integer |
[in] | k | third integer |
|
inline |
Creates a basic_trindex from three integers and keeps their order.
The integers are not sorted.
[in] | i | first integer |
[in] | j | second integer |
[in] | k | third integer |
[in] | order | argument of type KeepOrderType used to select the right constructor. Use basic_trindex: :KEEP_ORDER for this argument. |
|
default |
Constructs a basic_trindex from another one.
[in] | rhs | the basic_trindex this basic_trindex should be copied from |
|
inlinestatic |
Computes the inverse of a basic_trindex.
The inverse of a basic_trindex has the same indices but in reverse order.
[in] | t | the basic_trindex |
t
but in reverse order.
|
inline |
Compares two basic_trindex.
[in] | rhs | the basic_trindex to compare this basic_trindex with. |
rhs
differs from the index in this basic_trindex at the same position, false otherwise.
|
inline |
Compares two basic_trindex.
[in] | rhs | the basic_trindex to compares this basic_trindex with. |
rhs
is smaller than this basic_trindex according to the lexicographic order, false otherwise.
|
default |
Assigns a basic_trindex to this one.
[in] | rhs | the basic_trindex this basic_trindex should be assigned from |
|
inline |
Compares two basic_trindex.
[in] | rhs | the basic_trindex to compare this basic_trindex with. |
rhs
at the same positions, false otherwise.
|
inlinestatic |
Tests whether a basic_trindex has the same orientation as a triple of integers.
Two basic_trindex have the same orientation if one of them is a circular permutation of the other one.
[in] | t | the basic_trindex |
[in] | i | first index |
[in] | j | second index |
[in] | k | third index |
t
are a circular permutation of (i
, j
, k
), false otherwise.
|
inlinestatic |
Tests whether two basic_trindex have the same orientation.
Two basic_trindex have the same orientation if one of them is a circular permutation of the other one.
[in] | t1 | first basic_trindex |
[in] | t2 | second basic_trindex |
t2
are a circular permutation of the indices in t1
, false otherwise.
|
related |
Writes a basic_trindex to a stream.
Displays all the indices of the basic_trindex T
.
[in] | out | the output stream |
[in] | T | the basic_trindex to write |
IndexType | type of the indices |
out