added comments

This commit is contained in:
zzzzrrr 2009-08-05 16:55:27 -04:00
parent 19e6c4208f
commit 552b5a76b8
2 changed files with 7 additions and 9 deletions

View File

@ -209,7 +209,8 @@ class CDT(val points: List[Point], val segments: List[Segment], iTriangle: Trian
while(triangles.last != null && !triangles.last.contains(edge.p))
triangles += triangles.last.findNeighbor(edge.p - edge.q)
// TODO: triangles.last == null bug!
// TODO: fix triangles.last == null bug!
// This happens in the bird demo...
if(triangles.last == null)
triangles -= triangles.last
@ -228,10 +229,12 @@ class CDT(val points: List[Point], val segments: List[Segment], iTriangle: Trian
t.points.foreach(p => {
if(p != edge.q && p != edge.p) {
if(t.orient(point1, point2, p) >= 0 ) {
// Keep duplicate points out
if(!lPoints.contains(p)) {
lPoints += p
}
} else {
// Keep duplicate points out
if(!rPoints.contains(p))
rPoints += p
}
@ -267,6 +270,8 @@ class CDT(val points: List[Point], val segments: List[Segment], iTriangle: Trian
// STEP 3: Triangulate empty areas.
triangulateEmpty(point1, point2, points)
// TODO: Update AFront before pushing changes!!!!!
// TODO: Update Delauney Edge Pointers
} else if(firstTriangle.contains(edge)) {

View File

@ -38,14 +38,7 @@ class Mesh(initialTriangle: Triangle) {
// Triangles that constitute the mesh
val map = HashSet(initialTriangle)
// Debug triangles
val debug = HashSet.empty[Triangle]
def addEdge(point:Point, triangle: Triangle) {
/*
val p = point.eEvent.p
if(!triangle.contains(p)) {
}
*/
}
}