13 #include <xmsgrid/ugrid/XmEdge.h> 71 , m_pt2(a_edge.second)
140 int rhsIdx1 = std::min(a_edge.
m_pt1, a_edge.
m_pt2);
141 int rhsIdx2 = std::max(a_edge.
m_pt1, a_edge.
m_pt2);
142 return lhsIdx1 == rhsIdx1 && lhsIdx2 == rhsIdx2;
184 TS_ASSERT(edge1 < edge2);
185 TS_ASSERT(edge1 < edge1a);
186 TS_ASSERT(!(edge1a < edge1));
187 TS_ASSERT(!(edge2 < edge1));
195 XmEdge edge1a(1, 0,
false);
196 XmEdge edge1b(1, 0,
true);
198 TS_ASSERT(edge1 == edge1);
199 TS_ASSERT(!(edge1 == edge1a));
200 TS_ASSERT(edge1 == edge1b);
201 TS_ASSERT(!(edge2 == edge1));
212 TS_ASSERT(!(edge1 == edge1a));
void SetFirst(int a_pt1)
Set the first index.
void SetSecond(int a_pt2)
Set the second index.
void testIsEquivalent()
Test XmEdge::IsEquivalent.
int GetSecond() const
Get the second index.
int m_pt1
First point on the edge.
bool IsEquivalent(const XmEdge &a_edge) const
Test if edge is the same ignoring direction.
int m_pt2
Second point on the edge.
void SortIndexes()
Sort the indexes so minimum index is first.
void testEqualsOperator()
Test XmEdge equals operator.
Two integer values representing an edge of an XmUGrid. By default has a direction. Can be sorted to have minimum index first.
bool XmEdgesEquivalent(const XmEdge &a_edge1, const XmEdge &a_edge2)
Test if two edges are the same ignoring direction.
void testLessThanOperator()
Test XmEdge less than operator.
int GetFirst() const
Get the first index.
bool operator==(const XmEdge &a_rhs) const
Equals operator.
XmEdge()
Default constructor.
bool operator<(const XmEdge &a_rhs) const
Less than operator by first index then second.