Skip to content

Commit

Permalink
was using wrong box.
Browse files Browse the repository at this point in the history
  • Loading branch information
rms80 committed Nov 23, 2017
1 parent e9e525e commit 37cd13c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion comp_geom/GraphSplitter2d.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ protected virtual void do_split(Line2d line, bool insert_edges, int insert_gid)
hit.hit_vid = ev.a;
hit.line_t = line.Project(a);
hits.Add(hit);
edge_hit hit2 = hit;
hit.hit_vid = ev.b;
hit.line_t = line.Project(b);
hits.Add(hit);
Expand Down
4 changes: 2 additions & 2 deletions spatial/DMeshAABBTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ protected bool find_any_intersection(int iBox, DMeshAABBTree3 otherTree, Func<Ve
if ( oChild1 < 0 ) { // 1 child, descend if nearer than cur min-dist
oChild1 = (-oChild1) - 1;
AxisAlignedBox3d oChild1Box = otherTree.get_boxd(oChild1, TransformF);
if ( box_box_intersect(oChild1, ref bounds) )
if (oChild1Box.Intersects(bounds) )
return find_any_intersection(iBox, otherTree, TransformF, oBox, depth + 1);

} else { // 2 children
Expand Down Expand Up @@ -666,7 +666,7 @@ protected void find_intersections(int iBox, DMeshAABBTree3 otherTree, Func<Vecto
if ( oChild1 < 0 ) { // 1 child, descend if nearer than cur min-dist
oChild1 = (-oChild1) - 1;
AxisAlignedBox3d oChild1Box = otherTree.get_boxd(oChild1, TransformF);
if ( box_box_intersect(oChild1, ref bounds) )
if (oChild1Box.Intersects(bounds) )
find_intersections(iBox, otherTree, TransformF, oChild1, depth + 1, result);

} else { // 2 children
Expand Down

0 comments on commit 37cd13c

Please sign in to comment.