mirror of https://github.com/CGAL/cgal
rename enum
This commit is contained in:
parent
fb37f69c93
commit
9b19c5faff
|
|
@ -36,10 +36,10 @@ namespace internal {
|
|||
template <class K>
|
||||
class Line_2_Line_2_pair {
|
||||
public:
|
||||
enum Intersection_results {NOT_COMPUTED_YET, NO_INTERSECTION, POINT, LINE};
|
||||
enum Intersection_results {NO_INTERSECTION, POINT, LINE, UNKNOWN};
|
||||
Line_2_Line_2_pair(typename K::Line_2 const *line1,
|
||||
typename K::Line_2 const *line2)
|
||||
: _line1(line1), _line2(line2), _result(NOT_COMPUTED_YET) {}
|
||||
: _line1(line1), _line2(line2) {}
|
||||
|
||||
Intersection_results intersection_type() const;
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ public:
|
|||
protected:
|
||||
typename K::Line_2 const* _line1;
|
||||
typename K::Line_2 const * _line2;
|
||||
mutable Intersection_results _result;
|
||||
mutable Intersection_results _result = UNKNOWN;
|
||||
mutable typename K::Point_2 _intersection_point;
|
||||
};
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ typename Line_2_Line_2_pair<K>::Intersection_results
|
|||
Line_2_Line_2_pair<K>::intersection_type() const
|
||||
{
|
||||
typedef typename K::RT RT;
|
||||
if (_result != NOT_COMPUTED_YET)
|
||||
if (_result != UNKNOWN)
|
||||
return _result;
|
||||
RT nom1, nom2, denom;
|
||||
// The non const this pointer is used to cast away const.
|
||||
|
|
@ -178,7 +178,7 @@ template <class K>
|
|||
typename K::Point_2
|
||||
Line_2_Line_2_pair<K>::intersection_point() const
|
||||
{
|
||||
if (_result == NOT_COMPUTED_YET)
|
||||
if (_result == UNKNOWN)
|
||||
intersection_type();
|
||||
CGAL_kernel_assertion(_result == POINT);
|
||||
return _intersection_point;
|
||||
|
|
@ -188,7 +188,7 @@ template <class K>
|
|||
typename K::Line_2
|
||||
Line_2_Line_2_pair<K>::intersection_line() const
|
||||
{
|
||||
if (_result == NOT_COMPUTED_YET)
|
||||
if (_result == UNKNOWN)
|
||||
intersection_type();
|
||||
CGAL_kernel_assertion(_result == LINE);
|
||||
return *_line1;
|
||||
|
|
|
|||
|
|
@ -35,11 +35,11 @@ namespace internal {
|
|||
template <class K>
|
||||
class Ray_2_Line_2_pair {
|
||||
public:
|
||||
enum Intersection_results {NOT_COMPUTED_YET, NO_INTERSECTION, POINT, RAY};
|
||||
enum Intersection_results {NO_INTERSECTION, POINT, RAY, UNKNOWN};
|
||||
typedef typename K::FT FT;
|
||||
Ray_2_Line_2_pair(typename K::Ray_2 const *ray,
|
||||
typename K::Line_2 const *line)
|
||||
: _ray(ray), _line(line), _result(NOT_COMPUTED_YET),
|
||||
: _ray(ray), _line(line),
|
||||
_intersection_point(K().construct_point_2_object()(ORIGIN))
|
||||
{}
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ public:
|
|||
protected:
|
||||
typename K::Ray_2 const * _ray;
|
||||
typename K::Line_2 const * _line;
|
||||
mutable Intersection_results _result;
|
||||
mutable Intersection_results _result = UNKNOWN;
|
||||
mutable typename K::Point_2 _intersection_point;
|
||||
};
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ template <class K>
|
|||
typename Ray_2_Line_2_pair<K>::Intersection_results
|
||||
Ray_2_Line_2_pair<K>::intersection_type() const
|
||||
{
|
||||
if (_result != NOT_COMPUTED_YET)
|
||||
if (_result != UNKNOWN)
|
||||
return _result;
|
||||
// The non const this pointer is used to cast away const.
|
||||
const typename K::Line_2 &l1 = _ray->supporting_line();
|
||||
|
|
@ -144,7 +144,7 @@ template <class K>
|
|||
typename K::Point_2
|
||||
Ray_2_Line_2_pair<K>::intersection_point() const
|
||||
{
|
||||
if (_result == NOT_COMPUTED_YET)
|
||||
if (_result == UNKNOWN)
|
||||
intersection_type();
|
||||
CGAL_kernel_assertion(_result == POINT);
|
||||
return _intersection_point;
|
||||
|
|
@ -154,7 +154,7 @@ template <class K>
|
|||
typename K::Ray_2
|
||||
Ray_2_Line_2_pair<K>::intersection_ray() const
|
||||
{
|
||||
if (_result == NOT_COMPUTED_YET)
|
||||
if (_result == UNKNOWN)
|
||||
intersection_type();
|
||||
CGAL_kernel_assertion(_result == RAY);
|
||||
return *_ray;
|
||||
|
|
|
|||
Loading…
Reference in New Issue