for (LineSegmentXZ l : segmentSet) {
TriangulationPoint tp1, tp2;
if (!pointSet.containsKey(l.p1)){
tp1 = new TPoint(l.p1.x, l.p1.z);
pointSet.put(l.p1, tp1);
points.add(tp1);
} else {
tp1 = pointSet.get(l.p1);
}
if (!pointSet.containsKey(l.p2)){
tp2 = new TPoint(l.p2.x, l.p2.z);
pointSet.put(l.p2, tp2);
points.add(tp2);
} else {
tp2 = pointSet.get(l.p2);
}