------------------------------------------------------------------------------
| 681 | |
| 682 | //------------------------------------------------------------------------------ |
| 683 | void vtkHyperTreeGridGeometry3DImpl::ComputeEdge(const HTG3DPoint& firstPoint, |
| 684 | const HTG3DPoint& secondPoint, std::vector<std::pair<HTG3DPoint, HTG3DPoint>>& edgePoints, |
| 685 | unsigned int edgeAxis, unsigned int edgeId, |
| 686 | std::map<unsigned int, std::pair<HTG3DPoint*, unsigned int>>& internalFaceA, |
| 687 | std::map<unsigned int, std::pair<HTG3DPoint*, unsigned int>>& internalFaceB, |
| 688 | unsigned int& currentEdgePointA, unsigned int& currentEdgePointB) |
| 689 | { |
| 690 | HTG3DPoint pointA, pointB; |
| 691 | unsigned int iEdgePointA = edgeId, iEdgePointB = edgeId; |
| 692 | |
| 693 | // Compute the intersection point for the first interface, if any. |
| 694 | if (firstPoint.HasInterfaceA && |
| 695 | this->ComputeEdgeInterface(firstPoint, secondPoint, edgePoints, edgeAxis, edgeId, internalFaceA, |
| 696 | pointA, iEdgePointA, true)) |
| 697 | { |
| 698 | return; |
| 699 | } |
| 700 | |
| 701 | // Compute the intersection point for the second interface, if any. |
| 702 | if (firstPoint.HasInterfaceB && |
| 703 | this->ComputeEdgeInterface(firstPoint, secondPoint, edgePoints, edgeAxis, edgeId, internalFaceB, |
| 704 | pointB, iEdgePointB, false)) |
| 705 | { |
| 706 | return; |
| 707 | } |
| 708 | |
| 709 | // If intersection points are computed, add them to the construction (linkage) |
| 710 | // of the interface faces |
| 711 | if (pointA.IsValid) |
| 712 | { |
| 713 | if (pointB.IsValid) |
| 714 | { |
| 715 | if (pointA.Coords[edgeAxis] < pointB.Coords[edgeAxis]) |
| 716 | { |
| 717 | if (edgeId == iEdgePointA && edgeId == iEdgePointB) |
| 718 | { |
| 719 | edgePoints[edgeId].first = pointA; |
| 720 | this->SetInterfaceFace(edgeId, internalFaceA, &edgePoints[edgeId].first); |
| 721 | |
| 722 | this->CompleteLinkage(internalFaceA, currentEdgePointA, edgeId); |
| 723 | currentEdgePointA = edgeId; |
| 724 | |
| 725 | edgePoints[edgeId].second = pointB; |
| 726 | this->SetInterfaceFace(edgeId, internalFaceB, &edgePoints[edgeId].second); |
| 727 | |
| 728 | this->CompleteLinkage(internalFaceB, currentEdgePointB, edgeId); |
| 729 | currentEdgePointB = edgeId; |
| 730 | } |
| 731 | else |
| 732 | { |
| 733 | edgePoints[iEdgePointA].first = pointA; |
| 734 | this->SetInterfaceFace(iEdgePointA, internalFaceA, &edgePoints[iEdgePointA].first); |
| 735 | |
| 736 | this->CompleteLinkage(internalFaceA, currentEdgePointA, iEdgePointA); |
| 737 | currentEdgePointA = iEdgePointA; |
| 738 | |
| 739 | edgePoints[iEdgePointB].second = pointB; |
| 740 | this->SetInterfaceFace(iEdgePointB, internalFaceB, &edgePoints[iEdgePointB].second); |
no test coverage detected