mirror of https://github.com/CGAL/cgal
- Moved ctors in class body.
This commit is contained in:
parent
a713e51279
commit
6e7be09d65
|
|
@ -63,8 +63,11 @@ public:
|
|||
typedef typename R::Circle_2_base Circle_2;
|
||||
#endif
|
||||
|
||||
SegmentC2();
|
||||
SegmentC2(const Point_2 &sp, const Point_2 &ep);
|
||||
SegmentC2()
|
||||
: Segment_handle_2(Segment_ref_2()) {}
|
||||
|
||||
SegmentC2(const Point_2 &sp, const Point_2 &ep)
|
||||
: Segment_handle_2(Segment_ref_2(sp, ep)) {}
|
||||
|
||||
bool is_horizontal() const;
|
||||
bool is_vertical() const;
|
||||
|
|
@ -97,30 +100,22 @@ public:
|
|||
Direction_2 direction() const;
|
||||
Line_2 supporting_line() const;
|
||||
Self opposite() const;
|
||||
Self transform(const Aff_transformation_2 &t) const;
|
||||
Self transform(const Aff_transformation_2 &t) const
|
||||
{
|
||||
return SegmentC2(t.transform(source()), t.transform(target()));
|
||||
}
|
||||
|
||||
bool is_degenerate() const;
|
||||
Bbox_2 bbox() const;
|
||||
};
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_CTOR_INLINE
|
||||
SegmentC2<R CGAL_CTAG>::SegmentC2()
|
||||
: Segment_handle_2(Segment_ref_2() ) {}
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_CTOR_INLINE
|
||||
SegmentC2<R CGAL_CTAG>::
|
||||
SegmentC2(const typename SegmentC2<R CGAL_CTAG>::Point_2 &sp,
|
||||
const typename SegmentC2<R CGAL_CTAG>::Point_2 &ep)
|
||||
: Segment_handle_2(Segment_ref_2(sp, ep) ) {}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
bool
|
||||
SegmentC2<R CGAL_CTAG>::operator==(const SegmentC2<R CGAL_CTAG> &s) const
|
||||
{
|
||||
if ( identical(s) ) return true;
|
||||
if (identical(s))
|
||||
return true;
|
||||
return source() == s.source() && target() == s.target();
|
||||
}
|
||||
|
||||
|
|
@ -220,15 +215,6 @@ SegmentC2<R CGAL_CTAG>::opposite() const
|
|||
return SegmentC2<R CGAL_CTAG>(target(), source());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
SegmentC2<R CGAL_CTAG>
|
||||
SegmentC2<R CGAL_CTAG>::
|
||||
transform(const typename SegmentC2<R CGAL_CTAG>::Aff_transformation_2 &t) const
|
||||
{
|
||||
return SegmentC2<R CGAL_CTAG>(t.transform(source()), t.transform(target()));
|
||||
}
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
Bbox_2
|
||||
|
|
|
|||
|
|
@ -52,8 +52,11 @@ public:
|
|||
typedef typename R::Aff_transformation_3_base Aff_transformation_3;
|
||||
#endif
|
||||
|
||||
SegmentC3();
|
||||
SegmentC3(const Point_3 &sp, const Point_3 &ep);
|
||||
SegmentC3()
|
||||
: Segment_handle_3(Segment_ref_3()) {}
|
||||
|
||||
SegmentC3(const Point_3 &sp, const Point_3 &ep)
|
||||
: Segment_handle_3(Segment_ref_3(sp, ep)) {}
|
||||
|
||||
bool has_on(const Point_3 &p) const;
|
||||
bool collinear_has_on(const Point_3 &p) const;
|
||||
|
|
@ -84,24 +87,15 @@ public:
|
|||
Direction_3 direction() const;
|
||||
Line_3 supporting_line() const;
|
||||
Self opposite() const;
|
||||
Self transform(const Aff_transformation_3 &t) const;
|
||||
Self transform(const Aff_transformation_3 &t) const
|
||||
{
|
||||
return SegmentC3(t.transform(source()), t.transform(target()));
|
||||
}
|
||||
|
||||
bool is_degenerate() const;
|
||||
Bbox_3 bbox() const;
|
||||
};
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_CTOR_INLINE
|
||||
SegmentC3<R CGAL_CTAG>::SegmentC3()
|
||||
: Segment_handle_3(Segment_ref_3()) {}
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_CTOR_INLINE
|
||||
SegmentC3<R CGAL_CTAG>::
|
||||
SegmentC3(const typename SegmentC3<R CGAL_CTAG>::Point_3 &sp,
|
||||
const typename SegmentC3<R CGAL_CTAG>::Point_3 &ep)
|
||||
: Segment_handle_3(Segment_ref_3(sp, ep)) {}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
bool
|
||||
|
|
@ -207,15 +201,6 @@ SegmentC3<R CGAL_CTAG>::opposite() const
|
|||
return SegmentC3<R CGAL_CTAG>(target(), source());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
SegmentC3<R CGAL_CTAG>
|
||||
SegmentC3<R CGAL_CTAG>::
|
||||
transform(const typename SegmentC3<R CGAL_CTAG>::Aff_transformation_3 &t) const
|
||||
{
|
||||
return SegmentC3<R CGAL_CTAG>(t.transform(source()), t.transform(target()));
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -63,8 +63,11 @@ public:
|
|||
typedef typename R::Circle_2_base Circle_2;
|
||||
#endif
|
||||
|
||||
TriangleC2();
|
||||
TriangleC2(const Point_2 &p, const Point_2 &q, const Point_2 &r);
|
||||
TriangleC2()
|
||||
: Triangle_handle_2(Triangle_ref_2()) {}
|
||||
|
||||
TriangleC2(const Point_2 &p, const Point_2 &q, const Point_2 &r)
|
||||
: Triangle_handle_2(Triangle_ref_2(p, q, r)) {}
|
||||
|
||||
bool operator==(const Self &s) const;
|
||||
bool operator!=(const Self &s) const;
|
||||
|
|
@ -72,8 +75,13 @@ public:
|
|||
Point_2 vertex(int i) const;
|
||||
Point_2 operator[](int i) const;
|
||||
|
||||
Self transform(const Aff_transformation_2 &t) const;
|
||||
Self opposite() const;
|
||||
Self transform(const Aff_transformation_2 &t) const
|
||||
{
|
||||
return TriangleC2(t.transform(vertex(0)),
|
||||
t.transform(vertex(1)),
|
||||
t.transform(vertex(2)));
|
||||
}
|
||||
|
||||
Orientation orientation() const;
|
||||
Oriented_side oriented_side(const Point_2 &p) const;
|
||||
|
|
@ -92,25 +100,14 @@ public:
|
|||
Bbox_2 bbox() const;
|
||||
};
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_CTOR_INLINE
|
||||
TriangleC2<R CGAL_CTAG>::TriangleC2()
|
||||
: Triangle_handle_2(Triangle_ref_2()) {}
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_CTOR_INLINE
|
||||
TriangleC2<R CGAL_CTAG>::
|
||||
TriangleC2(const typename TriangleC2<R CGAL_CTAG>::Point_2 &p,
|
||||
const typename TriangleC2<R CGAL_CTAG>::Point_2 &q,
|
||||
const typename TriangleC2<R CGAL_CTAG>::Point_2 &r)
|
||||
: Triangle_handle_2(Triangle_ref_2(p, q, r)) {}
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_MEDIUM_INLINE
|
||||
bool
|
||||
TriangleC2<R CGAL_CTAG>::operator==(const TriangleC2<R CGAL_CTAG> &t) const
|
||||
{
|
||||
if ( identical(t) ) return true;
|
||||
if (identical(t))
|
||||
return true;
|
||||
|
||||
int i;
|
||||
for(i=0; i<3; i++)
|
||||
if ( vertex(0) == t.vertex(i) )
|
||||
|
|
@ -264,18 +261,6 @@ TriangleC2<R CGAL_CTAG>::bbox() const
|
|||
return vertex(0).bbox() + vertex(1).bbox() + vertex(2).bbox();
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
TriangleC2<R CGAL_CTAG>
|
||||
TriangleC2<R CGAL_CTAG>::
|
||||
transform(const
|
||||
typename TriangleC2<R CGAL_CTAG>::Aff_transformation_2 &t) const
|
||||
{
|
||||
return TriangleC2<R CGAL_CTAG>(t.transform(vertex(0)),
|
||||
t.transform(vertex(1)),
|
||||
t.transform(vertex(2)));
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
TriangleC2<R CGAL_CTAG>
|
||||
|
|
|
|||
|
|
@ -52,15 +52,23 @@ public:
|
|||
typedef typename R::Aff_transformation_3_base Aff_transformation_3;
|
||||
#endif
|
||||
|
||||
TriangleC3();
|
||||
TriangleC3(const Point_3 &p, const Point_3 &q, const Point_3 &r);
|
||||
TriangleC3()
|
||||
: Triangle_handle_3(Triangle_ref_3()) {}
|
||||
|
||||
TriangleC3(const Point_3 &p, const Point_3 &q, const Point_3 &r)
|
||||
: Triangle_handle_3(Triangle_ref_3(p, q, r)) {}
|
||||
|
||||
bool operator==(const Self &t) const;
|
||||
bool operator!=(const Self &t) const;
|
||||
|
||||
Plane_3 supporting_plane() const;
|
||||
|
||||
Self transform(const Aff_transformation_3 &t) const;
|
||||
Self transform(const Aff_transformation_3 &t) const
|
||||
{
|
||||
return TriangleC3(t.transform(vertex(0)),
|
||||
t.transform(vertex(1)),
|
||||
t.transform(vertex(2)));
|
||||
}
|
||||
|
||||
bool has_on(const Point_3 &p) const;
|
||||
bool is_degenerate() const;
|
||||
|
|
@ -71,25 +79,13 @@ public:
|
|||
Bbox_3 bbox() const;
|
||||
};
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_CTOR_INLINE
|
||||
TriangleC3<R CGAL_CTAG>::TriangleC3()
|
||||
: Triangle_handle_3(Triangle_ref_3()) {}
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_CTOR_INLINE
|
||||
TriangleC3<R CGAL_CTAG>::
|
||||
TriangleC3(const typename TriangleC3<R CGAL_CTAG>::Point_3 &p,
|
||||
const typename TriangleC3<R CGAL_CTAG>::Point_3 &q,
|
||||
const typename TriangleC3<R CGAL_CTAG>::Point_3 &r)
|
||||
: Triangle_handle_3(Triangle_ref_3(p, q, r)) {}
|
||||
|
||||
|
||||
template < class R >
|
||||
bool
|
||||
TriangleC3<R CGAL_CTAG>::operator==(const TriangleC3<R CGAL_CTAG> &t) const
|
||||
{
|
||||
if ( identical(t) ) return true;
|
||||
if (identical(t))
|
||||
return true;
|
||||
|
||||
int i;
|
||||
for(i=0; i<3; i++)
|
||||
if ( vertex(0) == t.vertex(i) )
|
||||
|
|
@ -140,18 +136,6 @@ TriangleC3<R CGAL_CTAG>::bbox() const
|
|||
return vertex(0).bbox() + vertex(1).bbox() + vertex(2).bbox();
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
TriangleC3<R CGAL_CTAG>
|
||||
TriangleC3<R CGAL_CTAG>::
|
||||
transform
|
||||
(const typename TriangleC3<R CGAL_CTAG>::Aff_transformation_3 &t) const
|
||||
{
|
||||
return TriangleC3<R CGAL_CTAG>(t.transform(vertex(0)),
|
||||
t.transform(vertex(1)),
|
||||
t.transform(vertex(2)));
|
||||
}
|
||||
|
||||
template < class R >
|
||||
bool
|
||||
TriangleC3<R CGAL_CTAG>::
|
||||
|
|
|
|||
Loading…
Reference in New Issue