所以我想知道在CGAL Delaunay三角會發生什麼,當你調用鄰居功能是不存在的鄰居。在文檔(HERE)就這樣說:CGAL:輸出從鄰居當三角形有沒有
The neighbor with index i is the neighbor which is opposite to the vertex with index i.
Face_handle f.neighbor (int i) const //returns the neighbor i of f.
//Precondition: 0 ≤ i ≤ 2.
但並不是所有的三角形可以有3個鄰居。邊角和三角形只會鄰居2.鑑於它現在必須返回一個Face_handle,那麼對於不存在的鄰居會發生什麼?也許它會是NULL?我該如何檢查?
我期待這樣做是因爲我想,以確定在Delaunay三角所有邊三角形的原因。能夠檢查具有2個或更少鄰居的三角形將非常有用。
任何想法?
既然你說的「邊角三角」,我相信你需要重新讀CGAL的文檔,以瞭解他們所謂的三角測量。 –