Get neighbors of 'trg' triangle, which was achieved from 'from' triangle. @param[out] nb neighbors indexes of 'trg' if 0->1 is common edge with'from': - nb[0] - by 1->2 edge; - nb[1] - by 2->0 edge;
| 137 | /// - nb[0] - by 1->2 edge; |
| 138 | /// - nb[1] - by 2->0 edge; |
| 139 | void TrianglesInfo::ListInfo::GetNeighbors(Triangle const & trg, Triangle const & from, int * nb) const |
| 140 | { |
| 141 | int i = math::NextModN(CommonEdge(trg, from).first, 3); |
| 142 | int j = math::NextModN(i, 3); |
| 143 | |
| 144 | int ind = 0; |
| 145 | TIterator it = m_neighbors.find(std::make_pair(trg.m_p[j], trg.m_p[i])); |
| 146 | nb[ind++] = (it != m_neighbors.end()) ? it->second : empty_key; |
| 147 | |
| 148 | it = m_neighbors.find(std::make_pair(trg.m_p[math::NextModN(j, 3)], trg.m_p[j])); |
| 149 | nb[ind++] = (it != m_neighbors.end()) ? it->second : empty_key; |
| 150 | } |
| 151 | |
| 152 | /// Calc delta of 'from'->'to' graph edge. |
| 153 | uint64_t TrianglesInfo::ListInfo::CalcDelta(PointsInfo const & points, Triangle const & from, Triangle const & to) const |
nothing calls this directly
no test coverage detected