Prepare code for improvements to Kernel functors

This commit is contained in:
Giles Bathgate 2022-03-10 23:51:15 +00:00
parent 5136fea47a
commit ada0800a4f
2 changed files with 9 additions and 7 deletions

View File

@ -63,15 +63,16 @@ $q$ are not antipodal on $S_2$, then this circle is unique and oriented
such that a walk along |\Mvar| meets $p$ just before the shorter segment such that a walk along |\Mvar| meets $p$ just before the shorter segment
between $p$ and $q$. If $p$ and $q$ are antipodal of each other then we between $p$ and $q$. If $p$ and $q$ are antipodal of each other then we
create any great circle that contains $p$ and $q$.}*/ create any great circle that contains $p$ and $q$.}*/
{ Point_3 p1(0,0,0), p4 = CGAL::ORIGIN + Base::orthogonal_vector(); {
if ( p != q.antipode() ) { if ( p != q.antipode() ) {
if (R_().orientation_3_object()(p1,Point_3(p), Point_3 po = CGAL::ORIGIN + Base::orthogonal_vector();
Point_3(q), p4) != CGAL::POSITIVE ) //TODO replace Point_3(CGAL::ORIGIN), with CGAL::ORIGIN below
*this = Self(opposite()); if (R_().orientation_3_object()(Point_3(CGAL::ORIGIN), Point_3(p),
Point_3(q), po) != CGAL::POSITIVE )
*this = opposite();
} else { } else {
/* previous method was: *this = Self(Plane_3(p1,q-p)); /* previous method was: *this = Self(Plane_3((0,0,0),q-p));
but p, q don't belong to he plane ((0,0,0), q-p) */ but p, q don't belong to the plane ((0,0,0), q-p) */
if(!Line_3(p,q).has_on(Point_3(1,0,0))) if(!Line_3(p,q).has_on(Point_3(1,0,0)))
*this = Self(Plane_3(p,q,Point_3(1,0,0))); *this = Self(Plane_3(p,q,Point_3(1,0,0)));
else else

View File

@ -38,6 +38,7 @@ Sphere_segment_rep() { ps_ = pt_ = Point(); c_ = Circle(); }
Sphere_segment_rep(const Point& p1, const Point& p2, Sphere_segment_rep(const Point& p1, const Point& p2,
bool shorter_arc=true) : bool shorter_arc=true) :
ps_(p1), pt_(p2), ps_(p1), pt_(p2),
//TODO replace Point_3(CGAL::ORIGIN), with CGAL::ORIGIN below
c_(CGAL::ORIGIN,R_().construct_orthogonal_vector_3_object()(Point_3(CGAL::ORIGIN),p1,p2)) c_(CGAL::ORIGIN,R_().construct_orthogonal_vector_3_object()(Point_3(CGAL::ORIGIN),p1,p2))
{ // warning stays as reminder that one gets an arbitrary plane equation { // warning stays as reminder that one gets an arbitrary plane equation
// in this degenerate case // in this degenerate case