mirror of https://github.com/CGAL/cgal
Merge pull request #2869 from afabri/CGAL-fallthrough-GF
Intersections_3: Deal with fallthrough warnings
This commit is contained in:
commit
a2bfde2c06
|
|
@ -175,7 +175,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
case NEGATIVE:
|
||||
// c is isolated on the negative side
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(t3l3_intersection_coplanar_aux(a,b,c,l,true,k));
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(c);
|
||||
}
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
// a is isolated on the positive side (here mb b could be use as
|
||||
// an endpoint instead of computing an intersection)
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(t3l3_intersection_coplanar_aux(b,c,a,l,false,k));
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR
|
||||
// b,c,p,q are aligned, [p,q]&[b,c] have the same direction
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>((segment(b,c)));
|
||||
}
|
||||
|
|
@ -229,7 +229,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
// the triangle lies in the negative halfspace
|
||||
// defined by the segment's supporting line.
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>();
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(c);
|
||||
}
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(t3l3_intersection_coplanar_aux(b,c,a,l,true,k));
|
||||
case NEGATIVE:
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(b);
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR
|
||||
// b,c,p,q are aligned, [p,q]&[c,b] have the same direction
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(segment(c,b));
|
||||
}
|
||||
|
|
@ -264,7 +264,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
// b is isolated on the positive side (here mb a could be use as
|
||||
// an endpoint instead of computing an intersection)
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(t3l3_intersection_coplanar_aux(c,a,b,l,false,k));
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR
|
||||
// a,c,p,q are aligned, [p,q]&[c,a] have the same direction
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(segment(c,a));
|
||||
}
|
||||
|
|
@ -277,7 +277,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(t3l3_intersection_coplanar_aux(c,a,b,l,true,k));
|
||||
case NEGATIVE:
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(a);
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR:
|
||||
// a,c,p,q are aligned, [p,q]&[a,c] have the same direction
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(segment(a,c));
|
||||
}
|
||||
|
|
@ -290,7 +290,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
case NEGATIVE:
|
||||
// a,b,p,q are aligned, [p,q]&[b,a] have the same direction
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Line_3>(segment(b,a));
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR
|
||||
// case pqc == COLLINEAR is impossible since the triangle is
|
||||
// assumed to be non flat
|
||||
CGAL_error();
|
||||
|
|
@ -394,12 +394,9 @@ intersection(const typename K::Triangle_3 &t,
|
|||
else
|
||||
return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Triangle_3>();
|
||||
|
||||
case COPLANAR: // pqa or pqb or pqc are collinear
|
||||
default: // COPLANAR: // pqa or pqb or pqc are collinear
|
||||
return t3l3_intersection_aux(t,l,k);
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_error();
|
||||
return intersection_return<typename K::Intersect_3, typename K::Line_3, typename K::Triangle_3>();
|
||||
}
|
||||
|
||||
default: // should not happen.
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
// c is isolated on the negative side
|
||||
return t3r3_intersection_coplanar_aux(a,b,c,r,true,k);
|
||||
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR
|
||||
// p,q,c are collinear
|
||||
if ( collinear_ordered(p,c,q) || collinear_ordered(p,q,c) )
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>(c);
|
||||
|
|
@ -265,7 +265,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
// an endpoint instead of computing an intersection)
|
||||
return t3r3_intersection_coplanar_aux(b,c,a,r,false,k);
|
||||
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR
|
||||
// b,c,p,q are aligned, [p,q]&[b,c] have the same direction
|
||||
if ( collinear_ordered(p,b,c) )
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>(segment(b,c));
|
||||
|
|
@ -303,7 +303,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
// defined by the segment's supporting line.
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>();
|
||||
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR:
|
||||
// p,q,c are collinear
|
||||
if ( collinear_ordered(p,c,q) || collinear_ordered(p,q,c) )
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>(c);
|
||||
|
|
@ -325,7 +325,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
else
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>();
|
||||
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR
|
||||
// b,c,p,q are aligned, [p,q]&[c,b] have the same direction
|
||||
if ( collinear_ordered(p,c,b) )
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>(segment(c,b));
|
||||
|
|
@ -357,7 +357,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
// an endpoint instead of computing an intersection)
|
||||
return t3r3_intersection_coplanar_aux(c,a,b,r,false,k);
|
||||
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR
|
||||
// a,c,p,q are aligned, [p,q]&[c,a] have the same direction
|
||||
if ( collinear_ordered(p,c,a) )
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>(segment(c,a));
|
||||
|
|
@ -379,7 +379,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
else
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>();
|
||||
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR
|
||||
// a,c,p,q are aligned, [p,q]&[a,c] have the same direction
|
||||
if ( collinear_ordered(p,a,c) )
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>(segment(a,c));
|
||||
|
|
@ -403,7 +403,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
else
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>(segment(p,a));
|
||||
|
||||
case COLLINEAR:
|
||||
default: // COLLINEAR
|
||||
// case pqc == COLLINEAR is impossible since the triangle is
|
||||
// assumed to be non flat
|
||||
CGAL_error();
|
||||
|
|
@ -498,13 +498,9 @@ intersection(const typename K::Triangle_3 &t,
|
|||
else
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>();
|
||||
|
||||
case COPLANAR:
|
||||
default: // COPLANAR
|
||||
// The ray lie in a plane parallel to a,b,c support plane
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>();
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_error();
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>();
|
||||
}
|
||||
|
||||
case NEGATIVE:
|
||||
|
|
@ -528,13 +524,10 @@ intersection(const typename K::Triangle_3 &t,
|
|||
// triangle's supporting plane
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>();
|
||||
|
||||
case COPLANAR:
|
||||
default: // COPLANAR
|
||||
// The ray lie in a plane parallel to a,b,c support plane
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>();
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_error();
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>();
|
||||
}
|
||||
|
||||
case COPLANAR: // p belongs to the triangle's supporting plane
|
||||
|
|
@ -565,13 +558,9 @@ intersection(const typename K::Triangle_3 &t,
|
|||
else
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>();
|
||||
|
||||
case COPLANAR:
|
||||
default: // COPLANAR
|
||||
// The ray lies in the triangle supporting plane
|
||||
return intersection_coplanar(t,r,k);
|
||||
|
||||
default: // should not happen.
|
||||
CGAL_error();
|
||||
return intersection_return<typename K::Intersect_3, typename K::Triangle_3, typename K::Ray_3>();
|
||||
}
|
||||
|
||||
default: // should not happen.
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ intersection_coplanar(const typename K::Triangle_3 &t,
|
|||
case NEGATIVE:
|
||||
// c is isolated on the negative side
|
||||
return t3s3_intersection_coplanar_aux(a,b,c,p,q,true,k);
|
||||
default:
|
||||
default: // COLLINEAR
|
||||
if ( collinear_ordered(p,c,q) ) // c is inside [p,q]
|
||||
return intersection_return<typename K::Intersect_3, typename K::Segment_3, typename K::Triangle_3>(c);
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue