소스 검색

Use is_equal_approx() instead of vertex_snap when checking if ray is
colliding with equiplanar CSG faces.

Marcel Admiraal 5 년 전
부모
커밋
22ff17793c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules/csg/csg.cpp

+ 1 - 1
modules/csg/csg.cpp

@@ -524,7 +524,7 @@ void CSGBrushOperation::MeshMerge::_add_distance(List<real_t> &r_intersectionsA,
 
 
 	// Check if distance exists.
 	// Check if distance exists.
 	for (const List<real_t>::Element *E = intersections.front(); E; E = E->next())
 	for (const List<real_t>::Element *E = intersections.front(); E; E = E->next())
-		if (Math::abs(**E - p_distance) < vertex_snap) return;
+		if (Math::is_equal_approx(**E, p_distance)) return;
 
 
 	intersections.push_back(p_distance);
 	intersections.push_back(p_distance);
 }
 }