|
xmsgrid
1.0
|
Two integer values representing an edge of an XmUGrid. By default has a direction. Can be sorted to have minimum index first. More...
Public Member Functions | |
| XmEdge () | |
| Default constructor. | |
| XmEdge (int a_pt1, int a_pt2, bool a_sorted=false) | |
| Constructor. More... | |
| XmEdge (const std::pair< int, int > &a_edge) | |
| Constructor. More... | |
| bool | operator< (const XmEdge &a_rhs) const |
| Less than operator by first index then second. More... | |
| bool | operator== (const XmEdge &a_rhs) const |
| Equals operator. More... | |
| int | GetFirst () const |
| Get the first index. More... | |
| void | SetFirst (int a_pt1) |
| Set the first index. More... | |
| int | GetSecond () const |
| Get the second index. More... | |
| void | SetSecond (int a_pt2) |
| Set the second index. More... | |
| bool | IsEquivalent (const XmEdge &a_edge) const |
| Test if edge is the same ignoring direction. More... | |
| void | SortIndexes () |
| Sort the indexes so minimum index is first. | |
Private Attributes | |
| int | m_pt1 |
| First point on the edge. | |
| int | m_pt2 |
| Second point on the edge. | |
Two integer values representing an edge of an XmUGrid. By default has a direction. Can be sorted to have minimum index first.
| xms::XmEdge::XmEdge | ( | int | a_pt1, |
| int | a_pt2, | ||
| bool | a_sorted = false |
||
| ) |
Constructor.
| [in] | a_pt1 | The first index. |
| [in] | a_pt2 | The second index. |
| [in] | a_sorted | If true set the first index to be the minimum index. |
Definition at line 58 of file XmEdge.cpp.
References SortIndexes().
|
explicit |
Constructor.
| [in] | a_edge | The edge as an int pair. |
Definition at line 69 of file XmEdge.cpp.
| int xms::XmEdge::GetFirst | ( | ) | const |
Get the first index.
Definition at line 103 of file XmEdge.cpp.
References m_pt1.
Referenced by xms::XmUGrid::Impl::GetCell2dEdgeAdjacentCell(), xms::XmUGrid::Impl::GetCellEdge(), xms::XmUGrid::Impl::GetEdgeAdjacentCells(), xms::XmUGrid::Impl::GetPointAdjacentPoints(), and GmMultiPolyIntersector2IntermediateTests::testBug12586().
| int xms::XmEdge::GetSecond | ( | ) | const |
Get the second index.
Definition at line 119 of file XmEdge.cpp.
References m_pt2.
Referenced by xms::XmUGrid::Impl::GetCellEdge(), xms::XmUGrid::Impl::GetEdgeAdjacentCells(), and xms::XmUGrid::Impl::GetPointAdjacentPoints().
| bool xms::XmEdge::IsEquivalent | ( | const XmEdge & | a_edge | ) | const |
Test if edge is the same ignoring direction.
| a_edge | The edge to compare against. |
Definition at line 136 of file XmEdge.cpp.
Referenced by xms::XmUGrid::Impl::GetCell2dEdgeAdjacentCell(), xms::XmUGrid::Impl::GetCellEdgeAdjacentCells(), XmEdgeUnitTests::testIsEquivalent(), and xms::XmEdgesEquivalent().
| bool xms::XmEdge::operator< | ( | const XmEdge & | a_rhs | ) | const |
Less than operator by first index then second.
| [in] | a_rhs | The edge to compare against. |
Definition at line 79 of file XmEdge.cpp.
| bool xms::XmEdge::operator== | ( | const XmEdge & | a_rhs | ) | const |
Equals operator.
| [in] | a_rhs | The edge to compare against. |
Definition at line 95 of file XmEdge.cpp.
| void xms::XmEdge::SetFirst | ( | int | a_pt1 | ) |
Set the first index.
| [in] | a_pt1 | The first index. |
Definition at line 111 of file XmEdge.cpp.
References m_pt1.
| void xms::XmEdge::SetSecond | ( | int | a_pt2 | ) |
Set the second index.
| [in] | a_pt2 | The second index. |
Definition at line 127 of file XmEdge.cpp.
References m_pt2.