mirror of https://github.com/CGAL/cgal
locally tested :<
This commit is contained in:
parent
bfebf2cd6f
commit
9a50014cc3
|
|
@ -177,7 +177,7 @@ void split_halfcircle(Sphere_segment<R>& s1,
|
||||||
/*{\Mop splits a halfcircle into two equally sized segments.
|
/*{\Mop splits a halfcircle into two equally sized segments.
|
||||||
\precond |\Mvar| is a halfcircle.}*/
|
\precond |\Mvar| is a halfcircle.}*/
|
||||||
{ CGAL_assertion( is_halfcircle() );
|
{ CGAL_assertion( is_halfcircle() );
|
||||||
Plane_3 h(Point_3(CGAL::ORIGIN),(target()-CGAL::ORIGIN));
|
Plane_3 h(CGAL::ORIGIN,(target()-CGAL::ORIGIN));
|
||||||
Sphere_point<R> p =
|
Sphere_point<R> p =
|
||||||
CGAL::intersection(sphere_circle(),Sphere_circle<R>(h));
|
CGAL::intersection(sphere_circle(),Sphere_circle<R>(h));
|
||||||
if ( !has_on_after_intersection(p) ) p = p.antipode();
|
if ( !has_on_after_intersection(p) ) p = p.antipode();
|
||||||
|
|
@ -189,16 +189,16 @@ bool is_short() const
|
||||||
/*{\Mop a segment is short iff it is shorter than a halfcircle.}*/
|
/*{\Mop a segment is short iff it is shorter than a halfcircle.}*/
|
||||||
{
|
{
|
||||||
return R().orientation_3_object()(CGAL::ORIGIN,
|
return R().orientation_3_object()(CGAL::ORIGIN,
|
||||||
Point_3(source()),
|
source(),
|
||||||
Point_3(target()),
|
target(),
|
||||||
orthogonal_pole())
|
orthogonal_pole())
|
||||||
== CGAL::POSITIVE; }
|
== CGAL::POSITIVE; }
|
||||||
|
|
||||||
bool is_long() const
|
bool is_long() const
|
||||||
/*{\Mop a segment is long iff it is longer than a halfcircle.}*/
|
/*{\Mop a segment is long iff it is longer than a halfcircle.}*/
|
||||||
{ return R().orientation_3_object()(CGAL::ORIGIN,
|
{ return R().orientation_3_object()(CGAL::ORIGIN,
|
||||||
Point_3(source()),
|
source(),
|
||||||
Point_3(target()),
|
target(),
|
||||||
orthogonal_pole())
|
orthogonal_pole())
|
||||||
== CGAL::NEGATIVE; }
|
== CGAL::NEGATIVE; }
|
||||||
|
|
||||||
|
|
@ -230,17 +230,17 @@ Point_3 orthogonal_pole() const
|
||||||
{ return CGAL::ORIGIN + sphere_circle().orthogonal_vector(); }
|
{ return CGAL::ORIGIN + sphere_circle().orthogonal_vector(); }
|
||||||
|
|
||||||
CGAL::Orientation source_orientation(const CGAL::Sphere_point<R>& p) const
|
CGAL::Orientation source_orientation(const CGAL::Sphere_point<R>& p) const
|
||||||
{ return orientation(CGAL::ORIGIN,
|
{ return R().orientation_3_object()(CGAL::ORIGIN,
|
||||||
orthogonal_pole(),
|
orthogonal_pole(),
|
||||||
source(),
|
source(),
|
||||||
p);
|
p);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGAL::Orientation target_orientation(const CGAL::Sphere_point<R>& p) const
|
CGAL::Orientation target_orientation(const CGAL::Sphere_point<R>& p) const
|
||||||
{ return orientation(CGAL::ORIGIN,
|
{ return R().orientation_3_object()(CGAL::ORIGIN,
|
||||||
target(),
|
target(),
|
||||||
orthogonal_pole(),
|
orthogonal_pole(),
|
||||||
p);
|
p);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue