mirror of https://github.com/CGAL/cgal
- Classes and funtion return type only refer to R::...
This commit is contained in:
parent
699e15f83e
commit
ee892f7ea8
|
|
@ -1,3 +1,6 @@
|
|||
Version 6.51 (22 January 2002)
|
||||
- Classes and funtion return type only refer to R::...
|
||||
|
||||
Version 6.50 (9 January 2002)
|
||||
- Update compare_y_at_x.
|
||||
|
||||
|
|
|
|||
|
|
@ -231,14 +231,11 @@ struct Cartesian
|
|||
typedef CGAL::Handle_for<CGAL::Twotuple<FT> > Vector_handle_2;
|
||||
typedef CGAL::Handle_for<CGAL::Twotuple<FT> > Direction_handle_2;
|
||||
typedef CGAL::Handle_for<CGAL::Threetuple<FT> > Line_handle_2;
|
||||
typedef CGAL::Handle_for<CGAL::Twotuple<CGAL_TYPENAME_MSVC_NULL
|
||||
Kernel_base::Point_2> > Ray_handle_2;
|
||||
typedef CGAL::Handle_for<CGAL::Twotuple<CGAL_TYPENAME_MSVC_NULL
|
||||
Kernel_base::Point_2> > Segment_handle_2;
|
||||
typedef CGAL::Handle_for<triple<Point_2_base, FT, Orientation> >
|
||||
typedef CGAL::Handle_for<CGAL::Twotuple<Point_2> > Ray_handle_2;
|
||||
typedef CGAL::Handle_for<CGAL::Twotuple<Point_2> > Segment_handle_2;
|
||||
typedef CGAL::Handle_for<triple<Point_2, FT, Orientation> >
|
||||
Circle_handle_2;
|
||||
typedef CGAL::Handle_for<CGAL::Threetuple<CGAL_TYPENAME_MSVC_NULL
|
||||
Kernel_base::Point_2> > Triangle_handle_2;
|
||||
typedef CGAL::Handle_for<CGAL::Threetuple<Point_2> > Triangle_handle_2;
|
||||
typedef CGAL::Handle_for<CGAL::Twotuple<Point_2> > Iso_rectangle_handle_2;
|
||||
typedef CGAL::Handle_for_virtual< Aff_transformation_rep_baseC2<Self> >
|
||||
Aff_transformation_handle_2;
|
||||
|
|
@ -246,21 +243,15 @@ struct Cartesian
|
|||
typedef CGAL::Handle_for<CGAL::Threetuple<FT> > Point_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Threetuple<FT> > Vector_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Threetuple<FT> > Direction_handle_3;
|
||||
typedef CGAL::Handle_for<std::pair<Point_3_base, Direction_3_base> >
|
||||
typedef CGAL::Handle_for<std::pair<Point_3, Direction_3> >
|
||||
Line_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Fourtuple<FT> > Plane_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Twotuple<CGAL_TYPENAME_MSVC_NULL
|
||||
Kernel_base::Point_3> > Ray_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Twotuple<CGAL_TYPENAME_MSVC_NULL
|
||||
Kernel_base::Point_3> > Segment_handle_3;
|
||||
typedef CGAL::Handle_for<triple<Point_3_base, FT, Orientation> >
|
||||
Sphere_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Threetuple<CGAL_TYPENAME_MSVC_NULL
|
||||
Kernel_base::Point_3> > Triangle_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Fourtuple<CGAL_TYPENAME_MSVC_NULL
|
||||
Kernel_base::Point_3> > Tetrahedron_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Twotuple<CGAL_TYPENAME_MSVC_NULL
|
||||
Kernel_base::Point_3> > Iso_cuboid_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Twotuple<Point_3> > Ray_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Twotuple<Point_3> > Segment_handle_3;
|
||||
typedef CGAL::Handle_for<triple<Point_3, FT,Orientation> > Sphere_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Threetuple<Point_3> > Triangle_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Fourtuple<Point_3> > Tetrahedron_handle_3;
|
||||
typedef CGAL::Handle_for<CGAL::Twotuple<Point_3> > Iso_cuboid_handle_3;
|
||||
typedef CGAL::Handle_for_virtual< Aff_transformation_rep_baseC3<Self> >
|
||||
Aff_transformation_handle_3;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,10 +49,11 @@ class Aff_transformationC2 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
|||
typedef typename R_::FT FT;
|
||||
typedef Aff_transformation_rep_baseC2<R_> Aff_t_base;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R_::Kernel_base::Line_2 Line_2;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Vector_2 Vector_2;
|
||||
typedef typename R_::Direction_2 Direction_2;
|
||||
typedef typename R_::Line_2 Line_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
|
@ -153,7 +154,7 @@ public:
|
|||
operator()(const Line_2 &l) const
|
||||
{ return transform(l); }
|
||||
|
||||
Aff_transformationC2 inverse() const { return Ptr()->inverse(); }
|
||||
Aff_transformation_2 inverse() const { return Ptr()->inverse(); }
|
||||
|
||||
bool is_even() const { return Ptr()->is_even(); }
|
||||
bool is_odd() const { return ! (Ptr()->is_even()); }
|
||||
|
|
@ -163,7 +164,7 @@ public:
|
|||
FT m(int i, int j) const { return cartesian(i,j); }
|
||||
FT hm(int i, int j) const { return cartesian(i,j); }
|
||||
|
||||
Aff_transformationC2 operator*(const Aff_transformationC2 &t) const
|
||||
Aff_transformation_2 operator*(const Aff_transformationC2 &t) const
|
||||
{
|
||||
return (*Ptr()) * (*t.Ptr());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,15 +48,16 @@ class Aff_transformationC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
|||
friend class PlaneC3<R_ CGAL_CTAG>; // FIXME: why ?
|
||||
#endif
|
||||
|
||||
typedef typename R_::FT FT;
|
||||
typedef Aff_transformation_rep_baseC3<R_> Aff_t_base;
|
||||
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Plane_3 Plane_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
public:
|
||||
typedef R_ R;
|
||||
typedef typename R::FT FT;
|
||||
typedef Aff_transformation_rep_baseC3<R> Aff_t_base;
|
||||
|
||||
typedef typename R::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R::Kernel_base::Plane_3 Plane_3;
|
||||
|
||||
Aff_transformationC3()
|
||||
{
|
||||
|
|
@ -152,7 +153,7 @@ public:
|
|||
operator()(const Plane_3& p) const
|
||||
{ return transform(p); } // FIXME : not compiled by the test-suite !
|
||||
|
||||
Aff_transformationC3 inverse() const { return Ptr()->inverse(); }
|
||||
Aff_transformation_3 inverse() const { return Ptr()->inverse(); }
|
||||
|
||||
bool is_even() const { return Ptr()->is_even(); }
|
||||
bool is_odd() const { return ! (Ptr()->is_even()); }
|
||||
|
|
@ -162,11 +163,11 @@ public:
|
|||
FT m(int i, int j) const { return cartesian(i,j); }
|
||||
FT hm(int i, int j) const { return cartesian(i,j); }
|
||||
|
||||
Aff_transformationC3 operator*(const Aff_transformationC3 &t) const
|
||||
Aff_transformation_3 operator*(const Aff_transformationC3 &t) const
|
||||
{ return (*Ptr()) * (*t.Ptr()); }
|
||||
|
||||
protected:
|
||||
Aff_transformationC3 transpose() const { return Ptr()->transpose(); }
|
||||
Aff_transformation_3 transpose() const { return Ptr()->transpose(); }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -31,12 +31,11 @@ class Aff_transformation_rep_baseC2
|
|||
: public Ref_counted_virtual
|
||||
{
|
||||
public:
|
||||
typedef typename R::FT FT;
|
||||
|
||||
typedef typename R::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
typedef typename R::FT FT;
|
||||
typedef typename R::Point_2 Point_2;
|
||||
typedef typename R::Vector_2 Vector_2;
|
||||
typedef typename R::Direction_2 Direction_2;
|
||||
typedef typename R::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
virtual ~Aff_transformation_rep_baseC2() {}
|
||||
|
||||
|
|
@ -166,7 +165,7 @@ friend class Scaling_repC2<R>;
|
|||
}
|
||||
|
||||
private:
|
||||
FT t11, t12, t13; // FIXME : use an array instead ?
|
||||
FT t11, t12, t13;
|
||||
FT t21, t22, t23;
|
||||
};
|
||||
|
||||
|
|
@ -178,7 +177,7 @@ template < class R >
|
|||
CGAL_KERNEL_LARGE_INLINE
|
||||
typename Aff_transformation_repC2<R>::Aff_transformation_2
|
||||
Aff_transformation_repC2<R>::
|
||||
inverse() const // FIXME : construction
|
||||
inverse() const
|
||||
{
|
||||
FT det = FT(1) / (t11 * t22 - t12 * t21);
|
||||
return Aff_transformation_2(
|
||||
|
|
@ -199,7 +198,7 @@ template < class R >
|
|||
CGAL_KERNEL_LARGE_INLINE
|
||||
typename Aff_transformation_repC2<R>::Aff_transformation_2
|
||||
Aff_transformation_repC2<R>::
|
||||
compose(const Aff_transformation_repC2<R> &t) const // FIXME : construction
|
||||
compose(const Aff_transformation_repC2<R> &t) const
|
||||
{
|
||||
return Aff_transformation_2(t.t11*t11 + t.t12*t21,
|
||||
t.t11*t12 + t.t12*t22,
|
||||
|
|
@ -213,7 +212,7 @@ template < class R >
|
|||
CGAL_KERNEL_LARGE_INLINE
|
||||
typename Aff_transformation_repC2<R>::Aff_transformation_2
|
||||
Aff_transformation_repC2<R>::
|
||||
compose(const Translation_repC2<R> &t) const // FIXME : construction
|
||||
compose(const Translation_repC2<R> &t) const
|
||||
{
|
||||
return Aff_transformation_2(t11,
|
||||
t12,
|
||||
|
|
@ -227,7 +226,7 @@ template < class R >
|
|||
CGAL_KERNEL_LARGE_INLINE
|
||||
typename Aff_transformation_repC2<R>::Aff_transformation_2
|
||||
Aff_transformation_repC2<R>::
|
||||
compose(const Rotation_repC2<R> &t) const // FIXME : construction
|
||||
compose(const Rotation_repC2<R> &t) const
|
||||
{
|
||||
return Aff_transformation_2(t.cosinus_*t11 - t.sinus_*t21,
|
||||
t.cosinus_*t12 - t.sinus_*t22,
|
||||
|
|
@ -241,7 +240,7 @@ template < class R >
|
|||
CGAL_KERNEL_LARGE_INLINE
|
||||
typename Aff_transformation_repC2<R>::Aff_transformation_2
|
||||
Aff_transformation_repC2<R>::
|
||||
compose(const Scaling_repC2<R> &t) const // FIXME : construction
|
||||
compose(const Scaling_repC2<R> &t) const
|
||||
{
|
||||
return Aff_transformation_2(t.scalefactor_ * t11,
|
||||
t.scalefactor_ * t12,
|
||||
|
|
|
|||
|
|
@ -31,12 +31,11 @@ class Aff_transformation_rep_baseC3
|
|||
: public Ref_counted_virtual
|
||||
{
|
||||
public:
|
||||
typedef typename R::FT FT;
|
||||
|
||||
typedef typename R::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R::FT FT;
|
||||
typedef typename R::Point_3 Point_3;
|
||||
typedef typename R::Vector_3 Vector_3;
|
||||
typedef typename R::Direction_3 Direction_3;
|
||||
typedef typename R::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
virtual ~Aff_transformation_rep_baseC3(){}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,15 +30,14 @@ template <class R_ >
|
|||
class CircleC2 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Circle_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Circle_2 Circle_2;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Circle_handle_2 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -68,9 +67,7 @@ public:
|
|||
|
||||
if (p != q) {
|
||||
Point_2 center = midpoint(p, q);
|
||||
FT squared_radius = squared_distance(p, center);
|
||||
|
||||
initialize_with(rep(center, squared_radius, orient));
|
||||
initialize_with(rep(center, squared_distance(p, center), orient));
|
||||
} else
|
||||
initialize_with(rep(p, FT(0), orient));
|
||||
}
|
||||
|
|
@ -81,9 +78,7 @@ public:
|
|||
CGAL_kernel_precondition( orient != COLLINEAR);
|
||||
|
||||
Point_2 center = circumcenter(p, q, r);
|
||||
FT squared_radius = squared_distance(p, center);
|
||||
|
||||
initialize_with(rep(center, squared_radius, orient));
|
||||
initialize_with(rep(center, squared_distance(p, center), orient));
|
||||
}
|
||||
|
||||
bool operator==(const CircleC2 &s) const;
|
||||
|
|
@ -104,9 +99,9 @@ public:
|
|||
return Ptr()->third;
|
||||
}
|
||||
|
||||
CircleC2 opposite() const;
|
||||
Circle_2 opposite() const;
|
||||
|
||||
CircleC2 orthogonal_transform(const Aff_transformation_2 &t) const;
|
||||
Circle_2 orthogonal_transform(const Aff_transformation_2 &t) const;
|
||||
|
||||
Oriented_side oriented_side(const Point_2 &p) const;
|
||||
Bounded_side bounded_side(const Point_2 &p) const;
|
||||
|
|
@ -161,7 +156,7 @@ CGAL_KERNEL_INLINE
|
|||
Bounded_side
|
||||
CircleC2<R CGAL_CTAG>::
|
||||
bounded_side(const typename CircleC2<R CGAL_CTAG>::Point_2 &p) const
|
||||
{ // FIXME : predicate
|
||||
{
|
||||
return Bounded_side(CGAL_NTS compare(squared_radius(),
|
||||
squared_distance(center(),p)));
|
||||
}
|
||||
|
|
@ -171,8 +166,7 @@ inline
|
|||
bool
|
||||
CircleC2<R CGAL_CTAG>::
|
||||
has_on_boundary(const typename CircleC2<R CGAL_CTAG>::Point_2 &p) const
|
||||
{ // FIXME: predicate
|
||||
// return squared_distance(center(), p) == squared_radius();
|
||||
{
|
||||
return bounded_side(p) == ON_BOUNDARY;
|
||||
}
|
||||
|
||||
|
|
@ -182,8 +176,6 @@ bool
|
|||
CircleC2<R CGAL_CTAG>::
|
||||
has_on_bounded_side(const typename CircleC2<R CGAL_CTAG>::Point_2 &p) const
|
||||
{
|
||||
// FIXME: predicate
|
||||
// return squared_distance(center(),p) < squared_radius();
|
||||
return bounded_side(p) == ON_BOUNDED_SIDE;
|
||||
}
|
||||
|
||||
|
|
@ -193,8 +185,6 @@ bool
|
|||
CircleC2<R CGAL_CTAG>::
|
||||
has_on_unbounded_side(const typename CircleC2<R CGAL_CTAG>::Point_2 &p) const
|
||||
{
|
||||
// FIXME: predicate
|
||||
// return squared_distance(center(),p) > squared_radius();
|
||||
return bounded_side(p) == ON_UNBOUNDED_SIDE;
|
||||
}
|
||||
|
||||
|
|
@ -225,13 +215,12 @@ inline
|
|||
bool
|
||||
CircleC2<R CGAL_CTAG>::is_degenerate() const
|
||||
{
|
||||
// FIXME: predicate
|
||||
return CGAL_NTS is_zero(squared_radius());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
CircleC2<R CGAL_CTAG>
|
||||
typename CircleC2<R CGAL_CTAG>::Circle_2
|
||||
CircleC2<R CGAL_CTAG>::opposite() const
|
||||
{
|
||||
return CircleC2<R CGAL_CTAG>(center(),
|
||||
|
|
@ -254,11 +243,11 @@ CircleC2<R CGAL_CTAG>::bbox() const // FIXME : to_interval()
|
|||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
CircleC2<R CGAL_CTAG>
|
||||
typename CircleC2<R CGAL_CTAG>::Circle_2
|
||||
CircleC2<R CGAL_CTAG>::orthogonal_transform
|
||||
(const typename CircleC2<R CGAL_CTAG>::Aff_transformation_2 &t) const
|
||||
{ // FIXME : construction
|
||||
Vector_2 vec(FT(1), FT(0) ); // unit vector
|
||||
{
|
||||
typename R::Vector_2 vec(FT(1), FT(0) ); // unit vector
|
||||
vec = vec.transform(t); // transformed
|
||||
FT sq_scale = vec.squared_length(); // squared scaling factor
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class Data_accessorC2 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
|||
public:
|
||||
// Min_ellipse_2 wants FT public...
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Point_2 Point;
|
||||
typedef typename R_::Point_2 Point;
|
||||
|
||||
typedef R_ R;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,18 +28,18 @@ template < class R_ >
|
|||
class DirectionC2 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Direction_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Vector_2 Vector_2;
|
||||
typedef typename R_::Line_2 Line_2;
|
||||
typedef typename R_::Ray_2 Ray_2;
|
||||
typedef typename R_::Segment_2 Segment_2;
|
||||
typedef typename R_::Direction_2 Direction_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Direction_handle_2 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Line_2 Line_2;
|
||||
typedef typename R_::Kernel_base::Ray_2 Ray_2;
|
||||
typedef typename R_::Kernel_base::Segment_2 Segment_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -71,14 +71,15 @@ public:
|
|||
const DirectionC2 &d2) const;
|
||||
|
||||
Vector_2 to_vector() const;
|
||||
Vector_2 vector() const { return to_vector(); }
|
||||
|
||||
DirectionC2 perpendicular(const Orientation &o) const;
|
||||
DirectionC2 transform(const Aff_transformation_2 &t) const
|
||||
Direction_2 perpendicular(const Orientation &o) const;
|
||||
Direction_2 transform(const Aff_transformation_2 &t) const
|
||||
{
|
||||
return t.transform(*this);
|
||||
}
|
||||
|
||||
DirectionC2 operator-() const;
|
||||
Direction_2 operator-() const;
|
||||
|
||||
const FT & delta(int i) const;
|
||||
const FT & dx() const
|
||||
|
|
@ -168,14 +169,14 @@ inline
|
|||
typename DirectionC2<R CGAL_CTAG>::Vector_2
|
||||
DirectionC2<R CGAL_CTAG>::to_vector() const
|
||||
{
|
||||
return Vector_2(*this);
|
||||
return Vector_2(dx(), dy());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_MEDIUM_INLINE
|
||||
DirectionC2<R CGAL_CTAG>
|
||||
typename DirectionC2<R CGAL_CTAG>::Direction_2
|
||||
DirectionC2<R CGAL_CTAG>::perpendicular(const Orientation &o) const
|
||||
{ // FIXME : construction
|
||||
{
|
||||
CGAL_kernel_precondition(o != COLLINEAR);
|
||||
if (o == COUNTERCLOCKWISE)
|
||||
return DirectionC2<R CGAL_CTAG>(-dy(), dx());
|
||||
|
|
@ -185,9 +186,9 @@ DirectionC2<R CGAL_CTAG>::perpendicular(const Orientation &o) const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
DirectionC2<R CGAL_CTAG>
|
||||
typename DirectionC2<R CGAL_CTAG>::Direction_2
|
||||
DirectionC2<R CGAL_CTAG>::operator-() const
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return DirectionC2<R CGAL_CTAG>(-dx(), -dy());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,16 +29,16 @@ class DirectionC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
|||
: public R_::Direction_handle_3
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Line_3 Line_3;
|
||||
typedef typename R_::Ray_3 Ray_3;
|
||||
typedef typename R_::Segment_3 Segment_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Direction_handle_3 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Line_3 Line_3;
|
||||
typedef typename R_::Kernel_base::Ray_3 Ray_3;
|
||||
typedef typename R_::Kernel_base::Segment_3 Segment_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -64,12 +64,14 @@ public:
|
|||
bool operator!=(const DirectionC3 &d) const;
|
||||
|
||||
Vector_3 to_vector() const;
|
||||
DirectionC3 transform(const Aff_transformation_3 &t) const
|
||||
Vector_3 vector() const { return to_vector(); }
|
||||
|
||||
Direction_3 transform(const Aff_transformation_3 &t) const
|
||||
{
|
||||
return t.transform(*this);
|
||||
}
|
||||
|
||||
DirectionC3 operator-() const;
|
||||
Direction_3 operator-() const;
|
||||
|
||||
const FT & delta(int i) const;
|
||||
const FT & dx() const
|
||||
|
|
@ -130,14 +132,14 @@ inline
|
|||
typename DirectionC3<R CGAL_CTAG>::Vector_3
|
||||
DirectionC3<R CGAL_CTAG>::to_vector() const
|
||||
{
|
||||
return Vector_3(*this);
|
||||
return Vector_3(dx(), dy(), dz());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
DirectionC3<R CGAL_CTAG>
|
||||
typename DirectionC3<R CGAL_CTAG>::Direction_3
|
||||
DirectionC3<R CGAL_CTAG>::operator-() const
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return DirectionC3<R>(-dx(), -dy(), -dz());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,13 +31,13 @@ class Iso_cuboidC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
|||
: public R_::Iso_cuboid_handle_3
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Iso_cuboid_3 Iso_cuboid_3;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Iso_cuboid_handle_3 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ public:
|
|||
: base(rep()) {}
|
||||
|
||||
Iso_cuboidC3(const Point_3 &p, const Point_3 &q)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
FT minx, maxx, miny, maxy, minz, maxz;
|
||||
if (p.x() < q.x()) { minx = p.x(); maxx = q.x(); }
|
||||
else { minx = q.x(); maxx = p.x(); }
|
||||
|
|
@ -92,7 +92,7 @@ public:
|
|||
Point_3 vertex(int i) const;
|
||||
Point_3 operator[](int i) const;
|
||||
|
||||
Iso_cuboidC3 transform(const Aff_transformation_3 &t) const
|
||||
Iso_cuboid_3 transform(const Aff_transformation_3 &t) const
|
||||
{
|
||||
return Iso_cuboidC3(t.transform(min()), t.transform(max()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@ template <class R_>
|
|||
class Iso_rectangleC2 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Iso_rectangle_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Iso_rectangle_2 Iso_rectangle_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Iso_rectangle_handle_2 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ public:
|
|||
: base(rep()) {}
|
||||
|
||||
Iso_rectangleC2(const Point_2 &p, const Point_2 &q)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
FT minx, maxx, miny, maxy;
|
||||
if (p.x() < q.x()) { minx = p.x(); maxx = q.x(); }
|
||||
else { minx = q.x(); maxx = p.x(); }
|
||||
|
|
@ -85,7 +85,7 @@ public:
|
|||
Point_2 vertex(int i) const;
|
||||
Point_2 operator[](int i) const;
|
||||
|
||||
Iso_rectangleC2 transform(const Aff_transformation_2 &t) const
|
||||
Iso_rectangle_2 transform(const Aff_transformation_2 &t) const
|
||||
{
|
||||
// FIXME : We need a precondition like this!!!
|
||||
// CGAL_kernel_precondition(t.is_axis_preserving());
|
||||
|
|
|
|||
|
|
@ -28,17 +28,17 @@ template < class R_ >
|
|||
class LineC2 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Line_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Direction_2 Direction_2;
|
||||
typedef typename R_::Ray_2 Ray_2;
|
||||
typedef typename R_::Segment_2 Segment_2;
|
||||
typedef typename R_::Line_2 Line_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Line_handle_2 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R_::Kernel_base::Ray_2 Ray_2;
|
||||
typedef typename R_::Kernel_base::Segment_2 Segment_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -79,8 +79,8 @@ public:
|
|||
FT x_at_y(const FT &y) const;
|
||||
FT y_at_x(const FT &x) const;
|
||||
|
||||
LineC2 perpendicular(const Point_2 &p) const;
|
||||
LineC2 opposite() const;
|
||||
Line_2 perpendicular(const Point_2 &p) const;
|
||||
Line_2 opposite() const;
|
||||
Point_2 point(int i) const;
|
||||
|
||||
Point_2 point() const;
|
||||
|
|
@ -98,7 +98,7 @@ public:
|
|||
bool is_vertical() const;
|
||||
bool is_degenerate() const;
|
||||
|
||||
LineC2 transform(const Aff_transformation_2 &t) const
|
||||
Line_2 transform(const Aff_transformation_2 &t) const
|
||||
{
|
||||
return LineC2<R CGAL_CTAG>(t.transform(point(0)),
|
||||
t.transform(direction()));
|
||||
|
|
@ -165,7 +165,7 @@ LineC2<R CGAL_CTAG>::y_at_x(const typename LineC2<R CGAL_CTAG>::FT &x) const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
LineC2<R CGAL_CTAG>
|
||||
typename LineC2<R CGAL_CTAG>::Line_2
|
||||
LineC2<R CGAL_CTAG>::
|
||||
perpendicular(const typename LineC2<R CGAL_CTAG>::Point_2 &p) const
|
||||
{
|
||||
|
|
@ -174,9 +174,9 @@ perpendicular(const typename LineC2<R CGAL_CTAG>::Point_2 &p) const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
LineC2<R CGAL_CTAG>
|
||||
typename LineC2<R CGAL_CTAG>::Line_2
|
||||
LineC2<R CGAL_CTAG>::opposite() const
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return LineC2<R CGAL_CTAG>( -a(), -b(), -c() );
|
||||
}
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ template < class R >
|
|||
inline
|
||||
typename LineC2<R CGAL_CTAG>::Direction_2
|
||||
LineC2<R CGAL_CTAG>::direction() const
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return Direction_2( b(), -a() );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,32 +28,32 @@ template < class R_ >
|
|||
class LineC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Line_handle_3
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Plane_3 Plane_3;
|
||||
typedef typename R_::Ray_3 Ray_3;
|
||||
typedef typename R_::Line_3 Line_3;
|
||||
typedef typename R_::Segment_3 Segment_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Line_handle_3 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Plane_3 Plane_3;
|
||||
typedef typename R_::Kernel_base::Ray_3 Ray_3;
|
||||
typedef typename R_::Kernel_base::Segment_3 Segment_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
LineC3()
|
||||
: base(rep()) {}
|
||||
|
||||
LineC3(const Point_3 &p, const Point_3 &q) // FIXME : construction
|
||||
LineC3(const Point_3 &p, const Point_3 &q)
|
||||
: base(rep(p, (q-p).direction())) {}
|
||||
|
||||
LineC3(const Segment_3 &s) // FIXME : construction
|
||||
LineC3(const Segment_3 &s)
|
||||
: base(rep(s.start(), (s.end() - s.start()).direction())) {}
|
||||
|
||||
LineC3(const Ray_3 &r) // FIXME : construction
|
||||
LineC3(const Ray_3 &r)
|
||||
: base(rep(r.start(), (r.point(1) - r.start()).direction())) {}
|
||||
|
||||
LineC3(const Point_3 &p, const Direction_3 &d)
|
||||
|
|
@ -63,7 +63,7 @@ public:
|
|||
bool operator!=(const LineC3 &l) const;
|
||||
|
||||
Plane_3 perpendicular_plane(const Point_3 &p) const;
|
||||
LineC3 opposite() const;
|
||||
Line_3 opposite() const;
|
||||
|
||||
const Point_3 & point() const
|
||||
{
|
||||
|
|
@ -81,7 +81,7 @@ public:
|
|||
bool has_on(const Point_3 &p) const;
|
||||
bool is_degenerate() const;
|
||||
|
||||
LineC3 transform(const Aff_transformation_3 &t) const
|
||||
Line_3 transform(const Aff_transformation_3 &t) const
|
||||
{
|
||||
return LineC3<R>(t.transform(point()), t.transform(direction()));
|
||||
}
|
||||
|
|
@ -128,7 +128,7 @@ perpendicular_plane(const typename LineC3<R CGAL_CTAG>::Point_3 &p) const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
LineC3<R CGAL_CTAG>
|
||||
typename LineC3<R CGAL_CTAG>::Line_3
|
||||
LineC3<R CGAL_CTAG>::opposite() const
|
||||
{
|
||||
return LineC3<R CGAL_CTAG>(point(), -direction());
|
||||
|
|
|
|||
|
|
@ -28,20 +28,20 @@ template <class R_>
|
|||
class PlaneC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Plane_handle_3
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Line_3 Line_3;
|
||||
typedef typename R_::Ray_3 Ray_3;
|
||||
typedef typename R_::Segment_3 Segment_3;
|
||||
typedef typename R_::Plane_3 Plane_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Plane_handle_3 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Line_3 Line_3;
|
||||
typedef typename R_::Kernel_base::Ray_3 Ray_3;
|
||||
typedef typename R_::Kernel_base::Segment_3 Segment_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ public:
|
|||
}
|
||||
|
||||
Line_3 perpendicular_line(const Point_3 &p) const;
|
||||
PlaneC3 opposite() const;
|
||||
Plane_3 opposite() const;
|
||||
|
||||
Point_3 point() const;
|
||||
Point_3 projection(const Point_3 &p) const;
|
||||
|
|
@ -106,7 +106,7 @@ public:
|
|||
Point_2 to_2d(const Point_3 &p) const;
|
||||
Point_3 to_3d(const Point_2 &p) const;
|
||||
|
||||
PlaneC3 transform(const Aff_transformation_3 &t) const
|
||||
Plane_3 transform(const Aff_transformation_3 &t) const
|
||||
{
|
||||
if (t.is_even())
|
||||
return PlaneC3<R>(t.transform(point()),
|
||||
|
|
@ -200,7 +200,7 @@ PlaneC3<R CGAL_CTAG>::orthogonal_direction() const
|
|||
template < class R >
|
||||
typename PlaneC3<R CGAL_CTAG>::Vector_3
|
||||
PlaneC3<R CGAL_CTAG>::base1() const
|
||||
{ // FIXME : construction
|
||||
{
|
||||
if ( CGAL_NTS is_zero(a()) ) // parallel to x-axis
|
||||
return Vector_3(FT(1), FT(0), FT(0));
|
||||
|
||||
|
|
@ -216,7 +216,7 @@ PlaneC3<R CGAL_CTAG>::base1() const
|
|||
template < class R >
|
||||
typename PlaneC3<R CGAL_CTAG>::Vector_3
|
||||
PlaneC3<R CGAL_CTAG>::base2() const
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return cross_product(orthogonal_vector(), base1());
|
||||
}
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ template < class R >
|
|||
typename PlaneC3<R CGAL_CTAG>::Point_3
|
||||
PlaneC3<R CGAL_CTAG>::
|
||||
to_plane_basis(const typename PlaneC3<R CGAL_CTAG>::Point_3 &p) const
|
||||
{ // FIXME : construction
|
||||
{
|
||||
FT alpha, beta, gamma;
|
||||
|
||||
solve(base1(), base2(), orthogonal_vector(), p - point(),
|
||||
|
|
@ -237,7 +237,7 @@ template < class R >
|
|||
typename PlaneC3<R CGAL_CTAG>::Point_2
|
||||
PlaneC3<R CGAL_CTAG>::
|
||||
to_2d(const typename PlaneC3<R CGAL_CTAG>::Point_3 &p) const
|
||||
{ // FIXME : construction
|
||||
{
|
||||
FT alpha, beta, gamma;
|
||||
|
||||
solve(base1(), base2(), orthogonal_vector(), p - point(),
|
||||
|
|
@ -251,7 +251,7 @@ inline
|
|||
typename PlaneC3<R CGAL_CTAG>::Point_3
|
||||
PlaneC3<R CGAL_CTAG>::
|
||||
to_3d(const typename PlaneC3<R CGAL_CTAG>::Point_2 &p) const
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return point() + p.x() * base1() + p.y() * base2();
|
||||
}
|
||||
|
||||
|
|
@ -266,9 +266,9 @@ perpendicular_line(const typename PlaneC3<R CGAL_CTAG>::Point_3 &p) const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
PlaneC3<R CGAL_CTAG>
|
||||
typename PlaneC3<R CGAL_CTAG>::Plane_3
|
||||
PlaneC3<R CGAL_CTAG>::opposite() const
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return PlaneC3<R CGAL_CTAG>(-a(), -b(), -c(), -d());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,14 +31,14 @@ template < class R_ >
|
|||
class PointC2 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Point_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Vector_2 Vector_2;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Point_handle_2 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ public:
|
|||
|
||||
Bbox_2 bbox() const;
|
||||
|
||||
PointC2 transform(const Aff_transformation_2 &t) const
|
||||
Point_2 transform(const Aff_transformation_2 &t) const
|
||||
{
|
||||
return t.transform(*this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,13 +32,12 @@ class PointC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
|||
: public R_::Point_handle_3
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Point_handle_3 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,16 +28,16 @@ template < class R_ >
|
|||
class RayC2 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Ray_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Direction_2 Direction_2;
|
||||
typedef typename R_::Line_2 Line_2;
|
||||
typedef typename R_::Ray_2 Ray_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Ray_handle_2 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R_::Kernel_base::Line_2 Line_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -66,9 +66,9 @@ public:
|
|||
|
||||
Direction_2 direction() const;
|
||||
Line_2 supporting_line() const;
|
||||
RayC2 opposite() const;
|
||||
Ray_2 opposite() const;
|
||||
|
||||
RayC2 transform(const Aff_transformation_2 &t) const
|
||||
Ray_2 transform(const Aff_transformation_2 &t) const
|
||||
{
|
||||
return RayC2<R>(t.transform(source()), t.transform(second_point()));
|
||||
}
|
||||
|
|
@ -139,7 +139,7 @@ RayC2<R CGAL_CTAG>::supporting_line() const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
RayC2<R CGAL_CTAG>
|
||||
typename RayC2<R CGAL_CTAG>::Ray_2
|
||||
RayC2<R CGAL_CTAG>::opposite() const
|
||||
{
|
||||
return RayC2<R CGAL_CTAG>( source(), - direction() );
|
||||
|
|
|
|||
|
|
@ -28,16 +28,16 @@ template < class R_ >
|
|||
class RayC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Ray_handle_3
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Line_3 Line_3;
|
||||
typedef typename R_::Ray_3 Ray_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Ray_handle_3 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Line_3 Line_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -66,9 +66,9 @@ public:
|
|||
|
||||
Direction_3 direction() const;
|
||||
Line_3 supporting_line() const;
|
||||
RayC3 opposite() const;
|
||||
Ray_3 opposite() const;
|
||||
|
||||
RayC3 transform(const Aff_transformation_3 &t) const
|
||||
Ray_3 transform(const Aff_transformation_3 &t) const
|
||||
{
|
||||
return RayC3<R>(t.transform(source()), t.transform(second_point()));
|
||||
}
|
||||
|
|
@ -137,7 +137,7 @@ RayC3<R CGAL_CTAG>::supporting_line() const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
RayC3<R CGAL_CTAG>
|
||||
typename RayC3<R CGAL_CTAG>::Ray_3
|
||||
RayC3<R CGAL_CTAG>::opposite() const
|
||||
{
|
||||
return RayC3<R CGAL_CTAG>( source(), - direction() );
|
||||
|
|
|
|||
|
|
@ -30,17 +30,16 @@ template < class R_ >
|
|||
class SegmentC2 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Segment_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Direction_2 Direction_2;
|
||||
typedef typename R_::Line_2 Line_2;
|
||||
typedef typename R_::Segment_2 Segment_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Segment_handle_2 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R_::Kernel_base::Line_2 Line_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -80,8 +79,8 @@ public:
|
|||
|
||||
Direction_2 direction() const;
|
||||
Line_2 supporting_line() const;
|
||||
SegmentC2 opposite() const;
|
||||
SegmentC2 transform(const Aff_transformation_2 &t) const
|
||||
Segment_2 opposite() const;
|
||||
Segment_2 transform(const Aff_transformation_2 &t) const
|
||||
{
|
||||
return SegmentC2<R>(t.transform(source()), t.transform(target()));
|
||||
}
|
||||
|
|
@ -194,7 +193,7 @@ SegmentC2<R CGAL_CTAG>::supporting_line() const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
SegmentC2<R CGAL_CTAG>
|
||||
typename SegmentC2<R CGAL_CTAG>::Segment_2
|
||||
SegmentC2<R CGAL_CTAG>::opposite() const
|
||||
{
|
||||
return SegmentC2<R CGAL_CTAG>(target(), source());
|
||||
|
|
|
|||
|
|
@ -28,16 +28,16 @@ template < class R_ >
|
|||
class SegmentC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Segment_handle_3
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Line_3 Line_3;
|
||||
typedef typename R_::Segment_3 Segment_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Segment_handle_3 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Line_3 Line_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -75,8 +75,8 @@ public:
|
|||
|
||||
Direction_3 direction() const;
|
||||
Line_3 supporting_line() const;
|
||||
SegmentC3 opposite() const;
|
||||
SegmentC3 transform(const Aff_transformation_3 &t) const
|
||||
Segment_3 opposite() const;
|
||||
Segment_3 transform(const Aff_transformation_3 &t) const
|
||||
{
|
||||
return SegmentC3<R>(t.transform(source()), t.transform(target()));
|
||||
}
|
||||
|
|
@ -189,7 +189,7 @@ SegmentC3<R CGAL_CTAG>::supporting_line() const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
SegmentC3<R CGAL_CTAG>
|
||||
typename SegmentC3<R CGAL_CTAG>::Segment_3
|
||||
SegmentC3<R CGAL_CTAG>::opposite() const
|
||||
{
|
||||
return SegmentC3<R CGAL_CTAG>(target(), source());
|
||||
|
|
|
|||
|
|
@ -28,15 +28,15 @@ template <class R_>
|
|||
class SphereC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Sphere_handle_3
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Sphere_3 Sphere_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Sphere_handle_3 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ public:
|
|||
return Ptr()->third;
|
||||
}
|
||||
|
||||
SphereC3 orthogonal_transform(const Aff_transformation_3 &t) const
|
||||
Sphere_3 orthogonal_transform(const Aff_transformation_3 &t) const
|
||||
{
|
||||
// FIXME: precond: t.is_orthogonal() (*UNDEFINED*)
|
||||
Vector_3 vec(FT(1), FT(0)); // unit vector
|
||||
|
|
@ -130,7 +130,7 @@ public:
|
|||
bool is_degenerate() const;
|
||||
|
||||
// Returns a circle with opposite orientation
|
||||
SphereC3 opposite() const;
|
||||
Sphere_3 opposite() const;
|
||||
|
||||
Oriented_side oriented_side(const Point_3 &p) const;
|
||||
//! precond: ! x.is_degenerate() (when available)
|
||||
|
|
@ -268,8 +268,8 @@ is_degenerate() const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
SphereC3<R CGAL_CTAG> SphereC3<R CGAL_CTAG>::
|
||||
opposite() const
|
||||
typename SphereC3<R CGAL_CTAG>::Sphere_3
|
||||
SphereC3<R CGAL_CTAG>::opposite() const
|
||||
{
|
||||
return SphereC3<R CGAL_CTAG>(center(), squared_radius(),
|
||||
CGAL::opposite(orientation()) );
|
||||
|
|
|
|||
|
|
@ -32,15 +32,15 @@ template <class R_>
|
|||
class TetrahedronC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Tetrahedron_handle_3
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Plane_3 Plane_3;
|
||||
typedef typename R_::Tetrahedron_3 Tetrahedron_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Tetrahedron_handle_3 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Plane_3 Plane_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ public:
|
|||
|
||||
Bbox_3 bbox() const;
|
||||
|
||||
TetrahedronC3 transform(const Aff_transformation_3 &t) const
|
||||
Tetrahedron_3 transform(const Aff_transformation_3 &t) const
|
||||
{
|
||||
return TetrahedronC3<R>(t.transform(vertex(0)),
|
||||
t.transform(vertex(1)),
|
||||
|
|
|
|||
|
|
@ -30,15 +30,15 @@ template <class R_>
|
|||
class TriangleC2 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Triangle_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Vector_2 Vector_2;
|
||||
typedef typename R_::Triangle_2 Triangle_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Triangle_handle_2 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -54,8 +54,8 @@ public:
|
|||
const Point_2 & vertex(int i) const;
|
||||
const Point_2 & operator[](int i) const;
|
||||
|
||||
TriangleC2 opposite() const;
|
||||
TriangleC2 transform(const Aff_transformation_2 &t) const
|
||||
Triangle_2 opposite() const;
|
||||
Triangle_2 transform(const Aff_transformation_2 &t) const
|
||||
{
|
||||
return TriangleC2<R>(t.transform(vertex(0)),
|
||||
t.transform(vertex(1)),
|
||||
|
|
@ -258,9 +258,8 @@ TriangleC2<R CGAL_CTAG>::bbox() const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
TriangleC2<R CGAL_CTAG>
|
||||
TriangleC2<R CGAL_CTAG>::
|
||||
opposite() const
|
||||
typename TriangleC2<R CGAL_CTAG>::Triangle_2
|
||||
TriangleC2<R CGAL_CTAG>::opposite() const
|
||||
{
|
||||
return TriangleC2<R CGAL_CTAG>(vertex(0), vertex(2), vertex(1));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,16 +28,16 @@ template <class R_>
|
|||
class TriangleC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Triangle_handle_3
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Plane_3 Plane_3;
|
||||
typedef typename R_::Triangle_3 Triangle_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Triangle_handle_3 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Plane_3 Plane_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ public:
|
|||
|
||||
Plane_3 supporting_plane() const;
|
||||
|
||||
TriangleC3 transform(const Aff_transformation_3 &t) const
|
||||
Triangle_3 transform(const Aff_transformation_3 &t) const
|
||||
{
|
||||
return TriangleC3<R>(t.transform(vertex(0)),
|
||||
t.transform(vertex(1)),
|
||||
|
|
|
|||
|
|
@ -28,15 +28,15 @@ template < class R_ >
|
|||
class VectorC2 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Vector_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Direction_2 Direction_2;
|
||||
typedef typename R_::Vector_2 Vector_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Vector_handle_2 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -102,16 +102,16 @@ public:
|
|||
return 2;
|
||||
}
|
||||
|
||||
VectorC2 operator+(const VectorC2 &w) const;
|
||||
VectorC2 operator-(const VectorC2 &w) const;
|
||||
VectorC2 operator-() const;
|
||||
Vector_2 operator+(const VectorC2 &w) const;
|
||||
Vector_2 operator-(const VectorC2 &w) const;
|
||||
Vector_2 operator-() const;
|
||||
FT operator*(const VectorC2 &w) const;
|
||||
FT squared_length() const;
|
||||
VectorC2 operator/(const FT &c) const;
|
||||
Vector_2 operator/(const FT &c) const;
|
||||
Direction_2 direction() const;
|
||||
|
||||
VectorC2 perpendicular(const Orientation &o) const;
|
||||
VectorC2 transform(const Aff_transformation_2 &t) const
|
||||
Vector_2 perpendicular(const Orientation &o) const;
|
||||
Vector_2 transform(const Aff_transformation_2 &t) const
|
||||
{
|
||||
return t.transform(*this);
|
||||
}
|
||||
|
|
@ -182,7 +182,7 @@ VectorC2<R CGAL_CTAG>::homogeneous(int i) const
|
|||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorC2<R CGAL_CTAG>
|
||||
typename VectorC2<R CGAL_CTAG>::Vector_2
|
||||
VectorC2<R CGAL_CTAG>::operator+(const VectorC2<R CGAL_CTAG> &w) const
|
||||
{
|
||||
return VectorC2<R CGAL_CTAG>(x() + w.x(), y() + w.y());
|
||||
|
|
@ -190,7 +190,7 @@ VectorC2<R CGAL_CTAG>::operator+(const VectorC2<R CGAL_CTAG> &w) const
|
|||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorC2<R CGAL_CTAG>
|
||||
typename VectorC2<R CGAL_CTAG>::Vector_2
|
||||
VectorC2<R CGAL_CTAG>::operator-(const VectorC2<R CGAL_CTAG> &w) const
|
||||
{
|
||||
return VectorC2<R CGAL_CTAG>(x() - w.x(), y() - w.y());
|
||||
|
|
@ -198,7 +198,7 @@ VectorC2<R CGAL_CTAG>::operator-(const VectorC2<R CGAL_CTAG> &w) const
|
|||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorC2<R CGAL_CTAG>
|
||||
typename VectorC2<R CGAL_CTAG>::Vector_2
|
||||
VectorC2<R CGAL_CTAG>::operator-() const
|
||||
{
|
||||
return VectorC2<R CGAL_CTAG>(-x(), -y());
|
||||
|
|
@ -222,7 +222,7 @@ VectorC2<R CGAL_CTAG>::squared_length() const
|
|||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorC2<R CGAL_CTAG>
|
||||
typename VectorC2<R CGAL_CTAG>::Vector_2
|
||||
VectorC2<R CGAL_CTAG>::
|
||||
operator/(const typename VectorC2<R CGAL_CTAG>::FT &c) const
|
||||
{
|
||||
|
|
@ -239,7 +239,7 @@ VectorC2<R CGAL_CTAG>::direction() const
|
|||
|
||||
template < class R >
|
||||
CGAL_KERNEL_MEDIUM_INLINE
|
||||
VectorC2<R CGAL_CTAG>
|
||||
typename VectorC2<R CGAL_CTAG>::Vector_2
|
||||
VectorC2<R CGAL_CTAG>::perpendicular(const Orientation &o) const
|
||||
{
|
||||
CGAL_kernel_precondition( o != COLLINEAR );
|
||||
|
|
|
|||
|
|
@ -28,15 +28,15 @@ template < class R_ >
|
|||
class VectorC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC
|
||||
: public R_::Vector_handle_3
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Vector_handle_3 base;
|
||||
typedef typename base::element_type rep;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
||||
|
|
@ -111,14 +111,14 @@ public:
|
|||
return 3;
|
||||
}
|
||||
|
||||
VectorC3 operator+(const VectorC3 &w) const;
|
||||
VectorC3 operator-(const VectorC3 &w) const;
|
||||
VectorC3 operator-() const;
|
||||
VectorC3 operator/(const FT &c) const;
|
||||
Vector_3 operator+(const VectorC3 &w) const;
|
||||
Vector_3 operator-(const VectorC3 &w) const;
|
||||
Vector_3 operator-() const;
|
||||
Vector_3 operator/(const FT &c) const;
|
||||
FT operator*(const VectorC3 &w) const;
|
||||
FT squared_length() const;
|
||||
Direction_3 direction() const;
|
||||
VectorC3 transform(const Aff_transformation_3 &t) const
|
||||
Vector_3 transform(const Aff_transformation_3 &t) const
|
||||
{
|
||||
return t.transform(*this);
|
||||
}
|
||||
|
|
@ -192,7 +192,7 @@ VectorC3<R CGAL_CTAG>::homogeneous(int i) const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
VectorC3<R CGAL_CTAG>
|
||||
typename VectorC3<R CGAL_CTAG>::Vector_3
|
||||
VectorC3<R CGAL_CTAG>::
|
||||
operator+(const VectorC3<R CGAL_CTAG> &w) const
|
||||
{
|
||||
|
|
@ -201,7 +201,7 @@ operator+(const VectorC3<R CGAL_CTAG> &w) const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
VectorC3<R CGAL_CTAG>
|
||||
typename VectorC3<R CGAL_CTAG>::Vector_3
|
||||
VectorC3<R CGAL_CTAG>::operator-(const VectorC3<R CGAL_CTAG> &w) const
|
||||
{
|
||||
return VectorC3<R CGAL_CTAG>(x() - w.x(), y() - w.y(), z() - w.z());
|
||||
|
|
@ -209,10 +209,10 @@ VectorC3<R CGAL_CTAG>::operator-(const VectorC3<R CGAL_CTAG> &w) const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
VectorC3<R CGAL_CTAG>
|
||||
typename VectorC3<R CGAL_CTAG>::Vector_3
|
||||
VectorC3<R CGAL_CTAG>::operator-() const
|
||||
{
|
||||
return VectorC3<R CGAL_CTAG>(-x(), -y(), -z());
|
||||
return Vector_3(-x(), -y(), -z());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
|
|
@ -233,7 +233,7 @@ VectorC3<R CGAL_CTAG>::squared_length() const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
VectorC3<R CGAL_CTAG>
|
||||
typename VectorC3<R CGAL_CTAG>::Vector_3
|
||||
VectorC3<R CGAL_CTAG>::
|
||||
operator/(const typename VectorC3<R CGAL_CTAG>::FT &c) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,23 +26,23 @@ CGAL_BEGIN_NAMESPACE
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
PointC2<R CGAL_CTAG>
|
||||
typename R::Point_2
|
||||
operator+(const PointC2<R CGAL_CTAG> &p, const VectorC2<R CGAL_CTAG> &v)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return PointC2<R CGAL_CTAG>(p.x() + v.x(), p.y() + v.y());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
PointC2<R CGAL_CTAG>
|
||||
typename R::Point_2
|
||||
operator-(const PointC2<R CGAL_CTAG> &p, const VectorC2<R CGAL_CTAG> &v)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return PointC2<R CGAL_CTAG>(p.x() - v.x(), p.y() - v.y());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
PointC2<R CGAL_CTAG>
|
||||
typename R::Point_2
|
||||
operator+(const Origin &, const VectorC2<R CGAL_CTAG> &v)
|
||||
{
|
||||
return PointC2<R CGAL_CTAG>(v);
|
||||
|
|
@ -50,23 +50,23 @@ operator+(const Origin &, const VectorC2<R CGAL_CTAG> &v)
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
PointC2<R CGAL_CTAG>
|
||||
typename R::Point_2
|
||||
operator-(const Origin &, const VectorC2<R CGAL_CTAG> &v)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return PointC2<R CGAL_CTAG>(-v);
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
VectorC2<R CGAL_CTAG>
|
||||
typename R::Vector_2
|
||||
operator-(const PointC2<R CGAL_CTAG> &p, const PointC2<R CGAL_CTAG> &q)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return VectorC2<R CGAL_CTAG>(p.x() - q.x(), p.y() - q.y());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
VectorC2<R CGAL_CTAG>
|
||||
typename R::Vector_2
|
||||
operator-(const PointC2<R CGAL_CTAG> &p, const Origin &)
|
||||
{
|
||||
return VectorC2<R CGAL_CTAG>(p);
|
||||
|
|
@ -74,32 +74,25 @@ operator-(const PointC2<R CGAL_CTAG> &p, const Origin &)
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
VectorC2<R CGAL_CTAG>
|
||||
typename R::Vector_2
|
||||
operator-(const Origin &, const PointC2<R CGAL_CTAG> &p)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return VectorC2<R CGAL_CTAG>(-p.x(), -p.y());
|
||||
}
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
template < class FT, class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorC2<R CGAL_CTAG>
|
||||
operator*(const FT &c, const VectorC2<R CGAL_CTAG> &w)
|
||||
#else
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorC2<R CGAL_CTAG>
|
||||
typename R::Vector_2
|
||||
operator*(const typename R::FT &c, const VectorC2<R CGAL_CTAG> &w)
|
||||
#endif
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return VectorC2<R CGAL_CTAG>(c * w.x(), c * w.y());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorC2<R CGAL_CTAG>
|
||||
typename R::Vector_2
|
||||
operator*(const VectorC2<R CGAL_CTAG> &w, const typename R::FT &c)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return VectorC2<R CGAL_CTAG>(c * w.x(), c * w.y());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,23 +26,23 @@ CGAL_BEGIN_NAMESPACE
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
PointC3<R CGAL_CTAG>
|
||||
typename R::Point_3
|
||||
operator+(const PointC3<R CGAL_CTAG> &p, const VectorC3<R CGAL_CTAG> &v)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return PointC3<R CGAL_CTAG>(p.x() + v.x(), p.y() + v.y(), p.z() + v.z());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
PointC3<R CGAL_CTAG>
|
||||
typename R::Point_3
|
||||
operator-(const PointC3<R CGAL_CTAG> &p, const VectorC3<R CGAL_CTAG> &v)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return PointC3<R CGAL_CTAG>(p.x() - v.x(), p.y() - v.y(), p.z() - v.z());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
PointC3<R CGAL_CTAG>
|
||||
typename R::Point_3
|
||||
operator+(const Origin &, const VectorC3<R CGAL_CTAG> &v)
|
||||
{
|
||||
return PointC3<R CGAL_CTAG>(v);
|
||||
|
|
@ -50,7 +50,7 @@ operator+(const Origin &, const VectorC3<R CGAL_CTAG> &v)
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
PointC3<R CGAL_CTAG>
|
||||
typename R::Point_3
|
||||
operator-(const Origin &, const VectorC3<R CGAL_CTAG> &v)
|
||||
{
|
||||
return PointC3<R CGAL_CTAG>(-v);
|
||||
|
|
@ -58,15 +58,15 @@ operator-(const Origin &, const VectorC3<R CGAL_CTAG> &v)
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
VectorC3<R CGAL_CTAG>
|
||||
typename R::Vector_3
|
||||
operator-(const PointC3<R CGAL_CTAG> &p, const PointC3<R CGAL_CTAG> &q)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return VectorC3<R CGAL_CTAG>(p.x() - q.x(), p.y() - q.y(), p.z() - q.z());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
VectorC3<R CGAL_CTAG>
|
||||
typename R::Vector_3
|
||||
operator-(const PointC3<R CGAL_CTAG> &p, const Origin &)
|
||||
{
|
||||
return VectorC3<R CGAL_CTAG>(p);
|
||||
|
|
@ -74,32 +74,25 @@ operator-(const PointC3<R CGAL_CTAG> &p, const Origin &)
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
VectorC3<R CGAL_CTAG>
|
||||
typename R::Vector_3
|
||||
operator-(const Origin &, const PointC3<R CGAL_CTAG> &p)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return VectorC3<R CGAL_CTAG>(-p.x(), -p.y(), -p.z());
|
||||
}
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
template < class FT, class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorC3<R CGAL_CTAG>
|
||||
operator*(const FT &c, const VectorC3<R CGAL_CTAG> &w)
|
||||
#else
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorC3<R CGAL_CTAG>
|
||||
typename R::Vector_3
|
||||
operator*(const typename R::FT &c, const VectorC3<R CGAL_CTAG> &w)
|
||||
#endif
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return VectorC3<R CGAL_CTAG>(c * w.x(), c * w.y(), c * w.z());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorC3<R CGAL_CTAG>
|
||||
typename R::Vector_3
|
||||
operator*(const VectorC3<R CGAL_CTAG> &w, const typename R::FT &c)
|
||||
{ // FIXME : construction
|
||||
{
|
||||
return VectorC3<R CGAL_CTAG>(c * w.x(), c * w.y(), c * w.z());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
CGAL_BEGIN_NAMESPACE
|
||||
|
||||
template < class R >
|
||||
VectorC3<R CGAL_CTAG>
|
||||
typename VectorC3<R CGAL_CTAG>::Vector_3
|
||||
cross_product(const VectorC3<R CGAL_CTAG> &v,
|
||||
const VectorC3<R CGAL_CTAG> &w)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -241,16 +241,13 @@ struct Simple_cartesian
|
|||
Direction_handle_2;
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Threetuple<FT> >
|
||||
Line_handle_2;
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Twotuple<
|
||||
CGAL_TYPENAME_MSVC_NULL Kernel_base::Point_2> >
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Twotuple<Point_2> >
|
||||
Ray_handle_2;
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Twotuple<
|
||||
CGAL_TYPENAME_MSVC_NULL Kernel_base::Point_2> >
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Twotuple<Point_2> >
|
||||
Segment_handle_2;
|
||||
typedef CGAL::Simple_Handle_for<triple<Point_2_base, FT, Orientation> >
|
||||
typedef CGAL::Simple_Handle_for<triple<Point_2, FT, Orientation> >
|
||||
Circle_handle_2;
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Threetuple<
|
||||
CGAL_TYPENAME_MSVC_NULL Kernel_base::Point_2> >
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Threetuple<Point_2> >
|
||||
Triangle_handle_2;
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Twotuple<Point_2> >
|
||||
Iso_rectangle_handle_2;
|
||||
|
|
@ -263,26 +260,21 @@ struct Simple_cartesian
|
|||
Vector_handle_3;
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Threetuple<FT> >
|
||||
Direction_handle_3;
|
||||
typedef CGAL::Simple_Handle_for<std::pair<Point_3_base, Direction_3_base> >
|
||||
typedef CGAL::Simple_Handle_for<std::pair<Point_3, Direction_3> >
|
||||
Line_handle_3;
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Fourtuple<FT> >
|
||||
Plane_handle_3;
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Twotuple<
|
||||
CGAL_TYPENAME_MSVC_NULL Kernel_base::Point_3> >
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Twotuple<Point_3> >
|
||||
Ray_handle_3;
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Twotuple<
|
||||
CGAL_TYPENAME_MSVC_NULL Kernel_base::Point_3> >
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Twotuple<Point_3> >
|
||||
Segment_handle_3;
|
||||
typedef CGAL::Simple_Handle_for<triple<Point_3_base, FT, Orientation> >
|
||||
typedef CGAL::Simple_Handle_for<triple<Point_3, FT, Orientation> >
|
||||
Sphere_handle_3;
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Threetuple<
|
||||
CGAL_TYPENAME_MSVC_NULL Kernel_base::Point_3> >
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Threetuple<Point_3> >
|
||||
Triangle_handle_3;
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Fourtuple<
|
||||
CGAL_TYPENAME_MSVC_NULL Kernel_base::Point_3> >
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Fourtuple<Point_3> >
|
||||
Tetrahedron_handle_3;
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Twotuple<
|
||||
CGAL_TYPENAME_MSVC_NULL Kernel_base::Point_3> >
|
||||
typedef CGAL::Simple_Handle_for<CGAL::Twotuple<Point_3> >
|
||||
Iso_cuboid_handle_3;
|
||||
typedef CGAL::Handle_for_virtual< Aff_transformation_rep_baseC3<Self> >
|
||||
Aff_transformation_handle_3;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
2.59 (22 January 2002)
|
||||
- Classes and funtion return type only refer to R::...
|
||||
|
||||
2.58 (9 January 2002)
|
||||
- just resubmit...
|
||||
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ class Aff_transformation_rep_baseH2 : public Ref_counted_virtual
|
|||
public:
|
||||
typedef typename R::RT RT;
|
||||
typedef typename R::FT FT;
|
||||
typedef typename R::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R::Point_2 Point_2;
|
||||
typedef typename R::Vector_2 Vector_2;
|
||||
typedef typename R::Direction_2 Direction_2;
|
||||
|
||||
virtual ~Aff_transformation_rep_baseH2(){}
|
||||
|
||||
|
|
@ -73,9 +73,9 @@ class Aff_transformation_repH2 : public Aff_transformation_rep_baseH2<R>
|
|||
public:
|
||||
typedef typename R::RT RT;
|
||||
typedef typename R::FT FT;
|
||||
typedef typename R::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R::Point_2 Point_2;
|
||||
typedef typename R::Vector_2 Vector_2;
|
||||
typedef typename R::Direction_2 Direction_2;
|
||||
|
||||
Aff_transformation_repH2()
|
||||
{}
|
||||
|
|
@ -109,20 +109,12 @@ class Aff_transformation_repH2 : public Aff_transformation_rep_baseH2<R>
|
|||
virtual Direction_2
|
||||
transform(const Direction_2& dir) const
|
||||
{
|
||||
const RT RT0(0);
|
||||
if ( g > RT0 )
|
||||
{
|
||||
if ( g > RT(0) )
|
||||
return Direction_2( a * dir.x() + b * dir.y(),
|
||||
d * dir.x() + e * dir.y() );
|
||||
}
|
||||
else if ( g < RT0 )
|
||||
{
|
||||
else
|
||||
return - Direction_2(a * dir.x() + b * dir.y(),
|
||||
d * dir.x() + e * dir.y() );
|
||||
}
|
||||
return Direction_2( a * dir.x() + b * dir.y(),
|
||||
d * dir.x() + e * dir.y(),
|
||||
g );
|
||||
}
|
||||
|
||||
virtual Aff_transformationH2<R>
|
||||
|
|
@ -173,9 +165,9 @@ class Identity_repH2 : public Aff_transformation_rep_baseH2<R>
|
|||
public:
|
||||
typedef typename R::RT RT;
|
||||
typedef typename R::FT FT;
|
||||
typedef typename R::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R::Point_2 Point_2;
|
||||
typedef typename R::Vector_2 Vector_2;
|
||||
typedef typename R::Direction_2 Direction_2;
|
||||
|
||||
Identity_repH2()
|
||||
{}
|
||||
|
|
@ -228,9 +220,9 @@ class Translation_repH2 : public Aff_transformation_rep_baseH2<R>
|
|||
public:
|
||||
typedef typename R::RT RT;
|
||||
typedef typename R::FT FT;
|
||||
typedef typename R::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R::Point_2 Point_2;
|
||||
typedef typename R::Vector_2 Vector_2;
|
||||
typedef typename R::Direction_2 Direction_2;
|
||||
|
||||
Translation_repH2()
|
||||
{}
|
||||
|
|
@ -283,9 +275,9 @@ class Rotation_repH2 : public Aff_transformation_rep_baseH2<R>
|
|||
public:
|
||||
typedef typename R::RT RT;
|
||||
typedef typename R::FT FT;
|
||||
typedef typename R::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R::Point_2 Point_2;
|
||||
typedef typename R::Vector_2 Vector_2;
|
||||
typedef typename R::Direction_2 Direction_2;
|
||||
|
||||
Rotation_repH2()
|
||||
{
|
||||
|
|
@ -359,9 +351,9 @@ class Scaling_repH2 : public Aff_transformation_rep_baseH2<R>
|
|||
public:
|
||||
typedef typename R::RT RT;
|
||||
typedef typename R::FT FT;
|
||||
typedef typename R::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R::Point_2 Point_2;
|
||||
typedef typename R::Vector_2 Vector_2;
|
||||
typedef typename R::Direction_2 Direction_2;
|
||||
|
||||
Scaling_repH2()
|
||||
{}
|
||||
|
|
@ -430,10 +422,10 @@ class Reflection_repH2 : public Aff_transformation_rep_baseH2<R>
|
|||
public:
|
||||
typedef typename R::RT RT;
|
||||
typedef typename R::FT FT;
|
||||
typedef typename R::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R::Kernel_base::Line_2 Line_2;
|
||||
typedef typename R::Point_2 Point_2;
|
||||
typedef typename R::Vector_2 Vector_2;
|
||||
typedef typename R::Direction_2 Direction_2;
|
||||
typedef typename R::Line_2 Line_2;
|
||||
|
||||
Reflection_repH2(const Line_2& l_) : l(l_) {}
|
||||
|
||||
|
|
@ -506,10 +498,10 @@ class Aff_transformationH2
|
|||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R_::Kernel_base::Line_2 Line_2;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Vector_2 Vector_2;
|
||||
typedef typename R_::Direction_2 Direction_2;
|
||||
typedef typename R_::Line_2 Line_2;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
|
|
|||
|
|
@ -31,12 +31,10 @@ template <class R_>
|
|||
class CircleH2
|
||||
: public R_::Circle_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2
|
||||
Aff_transformation_2;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Circle_handle_2 Circle_handle_2_;
|
||||
typedef typename Circle_handle_2_::element_type Circle_ref_2;
|
||||
|
|
@ -290,7 +288,7 @@ CircleH2<R>
|
|||
CircleH2<R>::
|
||||
orthogonal_transform(const typename CircleH2<R>::Aff_transformation_2& t) const
|
||||
{
|
||||
Vector_2 vec( RT(1), RT(0) ); // unit vector
|
||||
typename R::Vector_2 vec( RT(1), RT(0) ); // unit vector
|
||||
vec = vec.transform(t); // transformed
|
||||
FT sq_scale = FT( vec*vec ); // squared scaling factor
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Data_accessorH2
|
|||
public:
|
||||
typedef typename R::FT FT;
|
||||
typedef typename R::RT RT;
|
||||
typedef typename R::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R::Point_2 Point_2;
|
||||
|
||||
RT get_hx( const Point_2 & p) const { return( p.hx()); }
|
||||
RT get_hy( const Point_2 & p) const { return( p.hy()); }
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ template < class R_ >
|
|||
class DirectionH2
|
||||
: public R_::Direction_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Line_2 Line_2;
|
||||
typedef typename R_::Kernel_base::Ray_2 Ray_2;
|
||||
typedef typename R_::Kernel_base::Segment_2 Segment_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Vector_2 Vector_2;
|
||||
typedef typename R_::Line_2 Line_2;
|
||||
typedef typename R_::Ray_2 Ray_2;
|
||||
typedef typename R_::Segment_2 Segment_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Direction_handle_2 Direction_handle_2_;
|
||||
typedef typename Direction_handle_2_::element_type Direction_ref_2;
|
||||
|
|
@ -68,6 +68,8 @@ public:
|
|||
DirectionH2(const RT& x, const RT& y)
|
||||
: Direction_handle_2_ ( Direction_ref_2( x, y, RT(1) )) {}
|
||||
|
||||
// TODO Not documented : should not exist , not used.
|
||||
// we should also change Threetuple<RT> -> Twotuple<RT>
|
||||
DirectionH2(const RT& x, const RT& y, const RT& w )
|
||||
{
|
||||
if (w > RT(0) )
|
||||
|
|
@ -88,6 +90,7 @@ public:
|
|||
DirectionH2<R> operator-() const;
|
||||
|
||||
Vector_2 to_vector() const;
|
||||
Vector_2 vector() const { return to_vector(); }
|
||||
|
||||
const RT & x() const { return Ptr()->e0; };
|
||||
const RT & y() const { return Ptr()->e1; };
|
||||
|
|
@ -215,7 +218,7 @@ template <class R >
|
|||
CGAL_KERNEL_INLINE
|
||||
typename DirectionH2<R>::Vector_2
|
||||
DirectionH2<R>::to_vector() const
|
||||
{ return Vector_2(*this); }
|
||||
{ return Vector_2(dx(), dy(), typename R::RT(1)); }
|
||||
|
||||
|
||||
#ifndef CGAL_NO_OSTREAM_INSERT_DIRECTIONH2
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ template <class R_>
|
|||
class Iso_rectangleH2
|
||||
: public R_::Iso_rectangle_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Iso_rectangle_handle_2 Iso_rectangle_handle_2_;
|
||||
typedef typename Iso_rectangle_handle_2_::element_type Iso_rectangle_ref_2;
|
||||
|
|
|
|||
|
|
@ -30,15 +30,14 @@ template < class R_ >
|
|||
class LineH2
|
||||
: public R_::Line_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R_::Kernel_base::Segment_2 Segment_2;
|
||||
typedef typename R_::Kernel_base::Ray_2 Ray_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2
|
||||
Aff_transformation_2;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Vector_2 Vector_2;
|
||||
typedef typename R_::Direction_2 Direction_2;
|
||||
typedef typename R_::Segment_2 Segment_2;
|
||||
typedef typename R_::Ray_2 Ray_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Line_handle_2 Line_handle_2_;
|
||||
typedef typename Line_handle_2_::element_type Line_ref_2;
|
||||
|
|
@ -141,7 +140,7 @@ CGAL_KERNEL_INLINE
|
|||
LineH2<R>::LineH2(const typename LineH2<R>::Point_2& p,
|
||||
const typename LineH2<R>::Direction_2& d)
|
||||
{
|
||||
Point_2 q = p + Vector_2(d);
|
||||
Point_2 q = p + d.to_vector();
|
||||
initialize_with( Line_ref_2 (
|
||||
p.hy()*q.hw() - p.hw()*q.hy(),
|
||||
p.hw()*q.hx() - p.hx()*q.hw(),
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ template < class R_ >
|
|||
class PointH2
|
||||
: public R_::Point_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Vector_2 Vector_2;
|
||||
typedef typename R_::Direction_2 Direction_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Point_handle_2 Point_handle_2_;
|
||||
typedef typename Point_handle_2_::element_type Point_ref_2;
|
||||
|
|
|
|||
|
|
@ -30,14 +30,13 @@ template < class R_ >
|
|||
class RayH2
|
||||
: public R_::Ray_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R_::Kernel_base::Line_2 Line_2;
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2
|
||||
Aff_transformation_2;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Direction_2 Direction_2;
|
||||
typedef typename R_::Line_2 Line_2;
|
||||
typedef typename R_::Vector_2 Vector_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Ray_handle_2 Ray_handle_2_;
|
||||
typedef typename Ray_handle_2_::element_type Ray_ref_2;
|
||||
|
|
|
|||
|
|
@ -31,12 +31,12 @@ template < class R_ >
|
|||
class SegmentH2
|
||||
: public R_::Segment_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Line_2 Line_2;
|
||||
typedef typename R_::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Line_2 Line_2;
|
||||
typedef typename R_::Direction_2 Direction_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Segment_handle_2 Segment_handle_2_;
|
||||
typedef typename Segment_handle_2_::element_type Segment_ref_2;
|
||||
|
|
|
|||
|
|
@ -30,12 +30,11 @@ template <class R_>
|
|||
class TriangleH2
|
||||
: public R_::Triangle_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Vector_2 Vector_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2
|
||||
Aff_transformation_2;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Vector_2 Vector_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Triangle_handle_2 Triangle_handle_2_;
|
||||
typedef typename Triangle_handle_2_::element_type Triangle_ref_2;
|
||||
|
|
|
|||
|
|
@ -32,11 +32,12 @@ template < class R_ >
|
|||
class VectorH2
|
||||
: public R_::Vector_handle_2
|
||||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Direction_2 Direction_2;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_2 Aff_transformation_2;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Direction_2 Direction_2;
|
||||
typedef typename R_::Vector_2 Vector_2;
|
||||
typedef typename R_::Aff_transformation_2 Aff_transformation_2;
|
||||
|
||||
typedef typename R_::Vector_handle_2 Vector_handle_2_;
|
||||
typedef typename Vector_handle_2_::element_type Vector_ref_2;
|
||||
|
|
@ -47,9 +48,6 @@ public:
|
|||
VectorH2()
|
||||
: Vector_handle_2_ ( Vector_ref_2()) {}
|
||||
|
||||
VectorH2(const VectorH2<R>& v)
|
||||
: Vector_handle_2_ (v) {}
|
||||
|
||||
VectorH2(const Point_2& a, const Point_2& b)
|
||||
: Vector_handle_2_ (b-a) {}
|
||||
|
||||
|
|
@ -85,18 +83,17 @@ public:
|
|||
|
||||
int dimension() const;
|
||||
Direction_2 direction() const;
|
||||
VectorH2<R> transform(const Aff_transformation_2& t ) const;
|
||||
VectorH2<R> perpendicular(const Orientation& o ) const;
|
||||
Vector_2 transform(const Aff_transformation_2& t ) const;
|
||||
Vector_2 perpendicular(const Orientation& o ) const;
|
||||
|
||||
FT operator*( const VectorH2<R>& v) const;
|
||||
VectorH2<R> operator-() const;
|
||||
VectorH2<R> opposite() const;
|
||||
Vector_2 operator-() const;
|
||||
Vector_2 opposite() const;
|
||||
|
||||
// undocumented:
|
||||
VectorH2(const Direction_2 & dir)
|
||||
: Vector_handle_2_ ( dir) {}
|
||||
|
||||
protected:
|
||||
VectorH2(const Point_2 & p)
|
||||
: Vector_handle_2_ ( p) {}
|
||||
};
|
||||
|
|
@ -176,19 +173,19 @@ VectorH2<R>::direction() const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
VectorH2<R>::operator-() const
|
||||
{ return VectorH2<R>(- hx(), - hy(), hw() ); }
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
VectorH2<R>::opposite() const
|
||||
{ return VectorH2<R>(- hx(), - hy(), hw() ); }
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
operator+(const VectorH2<R>& u, const VectorH2<R>& v)
|
||||
{
|
||||
return VectorH2<R>( u.hx()*v.hw() + v.hx()*u.hw(),
|
||||
|
|
@ -198,7 +195,7 @@ operator+(const VectorH2<R>& u, const VectorH2<R>& v)
|
|||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
operator-(const VectorH2<R>& u, const VectorH2<R>& v)
|
||||
{
|
||||
return VectorH2<R>( u.hx()*v.hw() - v.hx()*u.hw(),
|
||||
|
|
@ -218,27 +215,34 @@ VectorH2<R>::operator*(const VectorH2<R>& v) const
|
|||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH2<R>
|
||||
typename R::Vector_2
|
||||
operator/(const VectorH2<R>& v, const typename R::RT& f)
|
||||
{ return VectorH2<R>( v.hx(), v.hy(), v.hw()*f ); }
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
operator/(const VectorH2<R>& v, const typename R::FT& f)
|
||||
{ return VectorH2<R>( v.hx()*f.denominator(), v.hy()*f.denominator(),
|
||||
v.hw()*f.numerator() ); }
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
typename R::Vector_2
|
||||
operator*(const VectorH2<R>& v, const typename R::RT& f)
|
||||
{ return VectorH2<R>( v.hx()*f, v.hy()*f, v.hw() ); }
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
template <class RT, class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH2<R>
|
||||
operator*(const RT& f, const VectorH2<R>& v)
|
||||
#else
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
operator*(const VectorH2<R>& v, const typename R::FT& f)
|
||||
{ return VectorH2<R>( v.hx()*f.numerator(), v.hy()*f.numerator(),
|
||||
v.hw()*f.denominator() ); }
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
typename VectorH2<R>::Vector_2
|
||||
operator*(const typename R::RT& f, const VectorH2<R>& v)
|
||||
#endif
|
||||
{ return VectorH2<R>( v.hx()*f, v.hy()*f, v.hw() ); }
|
||||
|
||||
template <class R>
|
||||
|
|
@ -249,50 +253,49 @@ origin_plus_vector(const VectorH2<R>& v)
|
|||
|
||||
template <class R>
|
||||
inline
|
||||
PointH2<R>
|
||||
typename R::Point_2
|
||||
operator+(const Origin&, const VectorH2<R>& v)
|
||||
{ return origin_plus_vector( v ); }
|
||||
|
||||
template <class R>
|
||||
inline
|
||||
PointH2<R>
|
||||
typename R::Point_2
|
||||
origin_minus_vector(const VectorH2<R>& v)
|
||||
{ return PointH2<R>( v.opposite() ); }
|
||||
|
||||
template <class R>
|
||||
inline
|
||||
PointH2<R>
|
||||
typename R::Point_2
|
||||
operator-(const Origin&, const VectorH2<R>& v)
|
||||
{ return origin_minus_vector( v ); }
|
||||
|
||||
template <class R>
|
||||
inline
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
point_minus_origin(const PointH2<R>& p)
|
||||
{ return VectorH2<R>( p ); }
|
||||
|
||||
template <class R>
|
||||
inline
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
operator-(const PointH2<R>& p, const Origin&)
|
||||
{ return point_minus_origin( p ); }
|
||||
|
||||
template <class R>
|
||||
inline
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
origin_minus_point(const PointH2<R>& p)
|
||||
{ return VectorH2<R>( p ).opposite(); }
|
||||
|
||||
template <class R>
|
||||
inline
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
operator-(const Origin&, const PointH2<R>& p)
|
||||
{ return origin_minus_point( p ); }
|
||||
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
PointH2<R>
|
||||
typename R::Point_2
|
||||
operator+(const PointH2<R>& p, const VectorH2<R>& v)
|
||||
{
|
||||
return PointH2<R>( p.hx()*v.hw() + v.hx()*p.hw(),
|
||||
|
|
@ -302,7 +305,7 @@ operator+(const PointH2<R>& p, const VectorH2<R>& v)
|
|||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
PointH2<R>
|
||||
typename R::Point_2
|
||||
operator-(const PointH2<R>& p, const VectorH2<R>& v)
|
||||
{
|
||||
return PointH2<R>( p.hx()*v.hw() - v.hx()*p.hw(),
|
||||
|
|
@ -312,7 +315,7 @@ operator-(const PointH2<R>& p, const VectorH2<R>& v)
|
|||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
operator-(const PointH2<R>& p, const PointH2<R>& q)
|
||||
{
|
||||
return VectorH2<R>( p.hx()*q.hw() - q.hx()*p.hw(),
|
||||
|
|
@ -326,7 +329,7 @@ operator-(const PointH2<R>& p, const PointH2<R>& q)
|
|||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
VectorH2<R>::perpendicular(const Orientation& o) const
|
||||
{
|
||||
CGAL_kernel_precondition(o != COLLINEAR);
|
||||
|
|
@ -342,7 +345,7 @@ VectorH2<R>::perpendicular(const Orientation& o) const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
VectorH2<R>
|
||||
typename VectorH2<R>::Vector_2
|
||||
VectorH2<R>::
|
||||
transform(const typename VectorH2<R>::Aff_transformation_2& t) const
|
||||
{ return t.transform(*this); }
|
||||
|
|
|
|||
|
|
@ -157,14 +157,14 @@ class Homogeneous
|
|||
typedef CGAL::Handle_for< Threetuple<RT> > Point_handle_2;
|
||||
typedef CGAL::Handle_for< Threetuple<RT> > Vector_handle_2;
|
||||
typedef CGAL::Handle_for< Threetuple<RT> > Direction_handle_2;
|
||||
typedef CGAL::Handle_for< Twotuple<Point_2_base> > Ray_handle_2;
|
||||
typedef CGAL::Handle_for< Threetuple<Point_2_base> > Triangle_handle_2;
|
||||
typedef CGAL::Handle_for< triple<Point_2_base, FT, Orientation> >
|
||||
typedef CGAL::Handle_for< Twotuple<Point_2> > Ray_handle_2;
|
||||
typedef CGAL::Handle_for< Threetuple<Point_2> > Triangle_handle_2;
|
||||
typedef CGAL::Handle_for< triple<Point_2, FT, Orientation> >
|
||||
Circle_handle_2;
|
||||
typedef CGAL::Handle_for< Twotuple<Point_2> >
|
||||
Iso_rectangle_handle_2;
|
||||
typedef CGAL::Handle_for< Threetuple<RT> > Line_handle_2;
|
||||
typedef CGAL::Handle_for< Twotuple<Point_2_base> > Segment_handle_2;
|
||||
typedef CGAL::Handle_for< Twotuple<Point_2> > Segment_handle_2;
|
||||
typedef CGAL::Handle_for_virtual< Aff_transformation_rep_baseH2<R> >
|
||||
Aff_transformation_handle_2;
|
||||
|
||||
|
|
@ -172,16 +172,14 @@ class Homogeneous
|
|||
typedef CGAL::Handle_for< Fourtuple<RT> > Vector_handle_3;
|
||||
typedef CGAL::Handle_for< Fourtuple<RT> > Direction_handle_3;
|
||||
typedef CGAL::Handle_for< Fourtuple<RT> > Plane_handle_3;
|
||||
typedef CGAL::Handle_for< std::pair<Point_3_base, Direction_3_base> >
|
||||
Ray_handle_3;
|
||||
typedef CGAL::Handle_for< std::pair<Point_3_base, Direction_3_base> >
|
||||
Line_handle_3;
|
||||
typedef CGAL::Handle_for< triple<Point_3_base, FT, Orientation> >
|
||||
typedef CGAL::Handle_for< std::pair<Point_3, Direction_3> > Ray_handle_3;
|
||||
typedef CGAL::Handle_for< std::pair<Point_3, Direction_3> > Line_handle_3;
|
||||
typedef CGAL::Handle_for< triple<Point_3, FT, Orientation> >
|
||||
Sphere_handle_3;
|
||||
typedef CGAL::Handle_for< Fourtuple<Point_3_base> > Tetrahedron_handle_3;
|
||||
typedef CGAL::Handle_for< Twotuple<Point_3_base> > Segment_handle_3;
|
||||
typedef CGAL::Handle_for< Threetuple<Point_3_base> > Triangle_handle_3;
|
||||
typedef CGAL::Handle_for< Twotuple<Point_3_base> > Iso_cuboid_handle_3;
|
||||
typedef CGAL::Handle_for< Fourtuple<Point_3> > Tetrahedron_handle_3;
|
||||
typedef CGAL::Handle_for< Twotuple<Point_3> > Segment_handle_3;
|
||||
typedef CGAL::Handle_for< Threetuple<Point_3> > Triangle_handle_3;
|
||||
typedef CGAL::Handle_for< Twotuple<Point_3> > Iso_cuboid_handle_3;
|
||||
typedef CGAL::Handle_for_virtual< Aff_transformation_rep_baseH3<R> >
|
||||
Aff_transformation_handle_3;
|
||||
|
||||
|
|
|
|||
|
|
@ -157,15 +157,14 @@ class Simple_homogeneous
|
|||
typedef CGAL::Simple_Handle_for< Threetuple<RT> > Point_handle_2;
|
||||
typedef CGAL::Simple_Handle_for< Threetuple<RT> > Vector_handle_2;
|
||||
typedef CGAL::Simple_Handle_for< Threetuple<RT> > Direction_handle_2;
|
||||
typedef CGAL::Simple_Handle_for< Twotuple<Point_2_base> > Ray_handle_2;
|
||||
typedef CGAL::Simple_Handle_for< Threetuple<Point_2_base> >
|
||||
Triangle_handle_2;
|
||||
typedef CGAL::Simple_Handle_for< triple<Point_2_base, FT, Orientation> >
|
||||
typedef CGAL::Simple_Handle_for< Twotuple<Point_2> > Ray_handle_2;
|
||||
typedef CGAL::Simple_Handle_for< Threetuple<Point_2> > Triangle_handle_2;
|
||||
typedef CGAL::Simple_Handle_for< triple<Point_2, FT, Orientation> >
|
||||
Circle_handle_2;
|
||||
typedef CGAL::Simple_Handle_for< Twotuple<Point_2> >
|
||||
Iso_rectangle_handle_2;
|
||||
typedef CGAL::Simple_Handle_for< Threetuple<RT> > Line_handle_2;
|
||||
typedef CGAL::Simple_Handle_for< Twotuple<Point_2_base> > Segment_handle_2;
|
||||
typedef CGAL::Simple_Handle_for< Twotuple<Point_2> > Segment_handle_2;
|
||||
typedef CGAL::Handle_for_virtual< Aff_transformation_rep_baseH2<R> >
|
||||
Aff_transformation_handle_2;
|
||||
|
||||
|
|
@ -173,19 +172,16 @@ class Simple_homogeneous
|
|||
typedef CGAL::Simple_Handle_for< Fourtuple<RT> > Vector_handle_3;
|
||||
typedef CGAL::Simple_Handle_for< Fourtuple<RT> > Direction_handle_3;
|
||||
typedef CGAL::Simple_Handle_for< Fourtuple<RT> > Plane_handle_3;
|
||||
typedef CGAL::Simple_Handle_for<std::pair<Point_3_base, Direction_3_base> >
|
||||
typedef CGAL::Simple_Handle_for<std::pair<Point_3, Direction_3> >
|
||||
Ray_handle_3;
|
||||
typedef CGAL::Simple_Handle_for<std::pair<Point_3_base, Direction_3_base> >
|
||||
typedef CGAL::Simple_Handle_for<std::pair<Point_3, Direction_3> >
|
||||
Line_handle_3;
|
||||
typedef CGAL::Simple_Handle_for< triple<Point_3_base, FT, Orientation> >
|
||||
typedef CGAL::Simple_Handle_for< triple<Point_3, FT, Orientation> >
|
||||
Sphere_handle_3;
|
||||
typedef CGAL::Simple_Handle_for< Fourtuple<Point_3_base> >
|
||||
Tetrahedron_handle_3;
|
||||
typedef CGAL::Simple_Handle_for< Twotuple<Point_3_base> > Segment_handle_3;
|
||||
typedef CGAL::Simple_Handle_for< Threetuple<Point_3_base> >
|
||||
Triangle_handle_3;
|
||||
typedef CGAL::Simple_Handle_for< Twotuple<Point_3_base> >
|
||||
Iso_cuboid_handle_3;
|
||||
typedef CGAL::Simple_Handle_for< Fourtuple<Point_3> > Tetrahedron_handle_3;
|
||||
typedef CGAL::Simple_Handle_for< Twotuple<Point_3> > Segment_handle_3;
|
||||
typedef CGAL::Simple_Handle_for< Threetuple<Point_3> > Triangle_handle_3;
|
||||
typedef CGAL::Simple_Handle_for< Twotuple<Point_3> > Iso_cuboid_handle_3;
|
||||
typedef CGAL::Handle_for_virtual< Aff_transformation_rep_baseH3<R> >
|
||||
Aff_transformation_handle_3;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
2.44 (22 January 2002)
|
||||
- Classes and funtion return type only refer to R::...
|
||||
|
||||
2.43 (4 January 2002)
|
||||
- Replace the small helper *rep classes by std::pair and triple.
|
||||
- Tetrahedron_3.orientation() is not cached anymore.
|
||||
|
|
|
|||
|
|
@ -48,11 +48,11 @@ public:
|
|||
typedef R_ R;
|
||||
typedef typename R::FT FT;
|
||||
typedef typename R::RT RT;
|
||||
typedef typename R::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R::Kernel_base::Plane_3 Plane_3;
|
||||
typedef typename R::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R::Point_3 Point_3;
|
||||
typedef typename R::Vector_3 Vector_3;
|
||||
typedef typename R::Direction_3 Direction_3;
|
||||
typedef typename R::Plane_3 Plane_3;
|
||||
typedef typename R::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
virtual ~Aff_transformation_rep_baseH3(){}
|
||||
|
||||
|
|
@ -68,10 +68,10 @@ public:
|
|||
virtual Plane_3
|
||||
transform(const Plane_3&) const = 0;
|
||||
|
||||
virtual Aff_transformationH3<R>
|
||||
virtual Aff_transformation_3
|
||||
inverse() const = 0;
|
||||
|
||||
virtual Aff_transformationH3<R>
|
||||
virtual Aff_transformation_3
|
||||
transpose() const = 0;
|
||||
|
||||
virtual Aff_transformation_repH3<R>
|
||||
|
|
@ -92,11 +92,11 @@ class Aff_transformation_repH3 : public Aff_transformation_rep_baseH3<R_>
|
|||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Plane_3 Plane_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Plane_3 Plane_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
|
@ -165,11 +165,11 @@ class Identity_repH3 : public Aff_transformation_rep_baseH3<R_>
|
|||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Plane_3 Plane_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Plane_3 Plane_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
|
@ -225,11 +225,11 @@ class Translation_repH3 : public Aff_transformation_rep_baseH3<R_>
|
|||
{
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Plane_3 Plane_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Plane_3 Plane_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
|
@ -278,12 +278,13 @@ private:
|
|||
template < class R_ >
|
||||
class Aff_transformationH3 : public R_::Aff_transformation_handle_3
|
||||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Plane_3 Plane_3;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Plane_3 Plane_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
|
@ -323,7 +324,7 @@ public:
|
|||
Plane_3
|
||||
transform(const Plane_3& pl) const;
|
||||
|
||||
Aff_transformationH3<R>
|
||||
Aff_transformation_3
|
||||
inverse() const;
|
||||
|
||||
Aff_transformationH3<R>
|
||||
|
|
@ -399,17 +400,14 @@ typename Aff_transformation_repH3<R>::Direction_3
|
|||
Aff_transformation_repH3<R>::
|
||||
transform(const typename Aff_transformation_repH3<R>::Direction_3& d) const
|
||||
{
|
||||
Vector_3 v( d.to_vector() );
|
||||
return Direction_3(t00 * v.hx() + t01 * v.hy() + t02 * v.hz(),
|
||||
t10 * v.hx() + t11 * v.hy() + t12 * v.hz(),
|
||||
t20 * v.hx() + t21 * v.hy() + t22 * v.hz(),
|
||||
t33 * v.hw() );
|
||||
|
||||
/*
|
||||
return Direction_3( t00 * d.hx() + t01 * d.hy() + t02 * d.hz(),
|
||||
t10 * d.hx() + t11 * d.hy() + t12 * d.hz(),
|
||||
t20 * d.hx() + t21 * d.hy() + t22 * d.hz() );
|
||||
*/
|
||||
if (t33 > RT(0))
|
||||
return Direction_3(t00 * d.hx() + t01 * d.hy() + t02 * d.hz(),
|
||||
t10 * d.hx() + t11 * d.hy() + t12 * d.hz(),
|
||||
t20 * d.hx() + t21 * d.hy() + t22 * d.hz());
|
||||
else
|
||||
return - Direction_3(t00 * d.hx() + t01 * d.hy() + t02 * d.hz(),
|
||||
t10 * d.hx() + t11 * d.hy() + t12 * d.hz(),
|
||||
t20 * d.hx() + t21 * d.hy() + t22 * d.hz());
|
||||
}
|
||||
|
||||
template < class R >
|
||||
|
|
@ -840,7 +838,7 @@ transform(const typename Aff_transformationH3<R>::Plane_3& pl) const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
Aff_transformationH3<R>
|
||||
typename Aff_transformationH3<R>::Aff_transformation_3
|
||||
Aff_transformationH3<R>::inverse() const
|
||||
{ return Ptr()->inverse(); }
|
||||
|
||||
|
|
|
|||
|
|
@ -29,15 +29,14 @@ template < class R_ >
|
|||
class DirectionH3
|
||||
: public R_::Direction_handle_3
|
||||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Segment_3 Segment_3;
|
||||
typedef typename R_::Kernel_base::Line_3 Line_3;
|
||||
typedef typename R_::Kernel_base::Ray_3 Ray_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Segment_3 Segment_3;
|
||||
typedef typename R_::Line_3 Line_3;
|
||||
typedef typename R_::Ray_3 Ray_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Direction_handle_3 Direction_handle_3_;
|
||||
typedef typename Direction_handle_3_::element_type Direction_ref_3;
|
||||
|
|
@ -63,6 +62,7 @@ class DirectionH3
|
|||
DirectionH3(const Segment_3 & s )
|
||||
: Direction_handle_3_(s.direction()) {}
|
||||
|
||||
// the fourth argument is not documented. Should go away ?
|
||||
DirectionH3(const RT& x, const RT& y,
|
||||
const RT& z, const RT& w = RT(1) )
|
||||
{
|
||||
|
|
@ -83,6 +83,7 @@ class DirectionH3
|
|||
bool operator!=( const DirectionH3<R>& d) const;
|
||||
|
||||
Vector_3 to_vector() const;
|
||||
Vector_3 vector() const { return to_vector(); }
|
||||
|
||||
const RT & dx() const { return Ptr()->e0; }
|
||||
const RT & dy() const { return Ptr()->e1; }
|
||||
|
|
@ -150,7 +151,7 @@ template <class R >
|
|||
inline
|
||||
typename DirectionH3<R>::Vector_3
|
||||
DirectionH3<R>::to_vector() const
|
||||
{ return Vector_3(*this); }
|
||||
{ return Vector_3(dx(), dy(), dz(), RT(1)); }
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@ template <class R_>
|
|||
class Iso_cuboidH3
|
||||
: public R_::Iso_cuboid_handle_3
|
||||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
public:
|
||||
typedef R_ R;
|
||||
|
|
|
|||
|
|
@ -30,15 +30,15 @@ template < class R_ >
|
|||
class LineH3
|
||||
: public R_::Line_handle_3
|
||||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Segment_3 Segment_3;
|
||||
typedef typename R_::Kernel_base::Ray_3 Ray_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Plane_3 Plane_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Segment_3 Segment_3;
|
||||
typedef typename R_::Ray_3 Ray_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Plane_3 Plane_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Line_handle_3 Line_handle_3_;
|
||||
typedef typename Line_handle_3_::element_type Line_ref_3;
|
||||
|
|
|
|||
|
|
@ -30,16 +30,17 @@ template < class R_ >
|
|||
class PlaneH3
|
||||
: public R_::Plane_handle_3
|
||||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Point_2 Point_2;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Line_3 Line_3;
|
||||
typedef typename R_::Kernel_base::Segment_3 Segment_3;
|
||||
typedef typename R_::Kernel_base::Ray_3 Ray_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_2 Point_2;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Line_3 Line_3;
|
||||
typedef typename R_::Segment_3 Segment_3;
|
||||
typedef typename R_::Ray_3 Ray_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Plane_3 Plane_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Plane_handle_3 Plane_handle_3_;
|
||||
typedef typename Plane_handle_3_::element_type Plane_ref_3;
|
||||
|
|
@ -50,9 +51,7 @@ class PlaneH3
|
|||
PlaneH3()
|
||||
: Plane_handle_3_(Plane_ref_3()) {}
|
||||
|
||||
PlaneH3(const Point_3&,
|
||||
const Point_3&,
|
||||
const Point_3& );
|
||||
PlaneH3(const Point_3&, const Point_3&, const Point_3& );
|
||||
PlaneH3(const RT& a, const RT& b,
|
||||
const RT& c, const RT& d );
|
||||
PlaneH3(const Point_3&, const Ray_3& );
|
||||
|
|
@ -74,7 +73,7 @@ class PlaneH3
|
|||
bool operator!=( const PlaneH3<R>& ) const;
|
||||
|
||||
Line_3 perpendicular_line(const Point_3& ) const;
|
||||
PlaneH3<R> opposite() const; // plane with opposite orientation
|
||||
Plane_3 opposite() const; // plane with opposite orientation
|
||||
Point_3 projection(const Point_3& ) const;
|
||||
|
||||
Point_3 point() const; // same point on the plane
|
||||
|
|
@ -95,7 +94,7 @@ class PlaneH3
|
|||
|
||||
bool is_degenerate() const;
|
||||
|
||||
PlaneH3<R> transform(const Aff_transformation_3& ) const;
|
||||
Plane_3 transform(const Aff_transformation_3& ) const;
|
||||
|
||||
Aff_transformation_3 transform_to_2d() const;
|
||||
Point_2 to_2d(const Point_3& ) const;
|
||||
|
|
@ -184,20 +183,20 @@ PlaneH3<R>::operator!=(const PlaneH3<R>& l) const
|
|||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
|
||||
const typename PlaneH3<R>::Point_3& q,
|
||||
const typename PlaneH3<R>::Point_3& r)
|
||||
const typename PlaneH3<R>::Point_3& q,
|
||||
const typename PlaneH3<R>::Point_3& r)
|
||||
{ new_rep(p,q,r); }
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
PlaneH3<R>::PlaneH3(const RT& a, const RT& b,
|
||||
const RT& c, const RT& d)
|
||||
const RT& c, const RT& d)
|
||||
{ new_rep(a,b,c,d); }
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p ,
|
||||
const typename PlaneH3<R>::Line_3& l)
|
||||
const typename PlaneH3<R>::Line_3& l)
|
||||
{ new_rep(p, l.point(0), l.point(1) ); }
|
||||
|
||||
template < class R >
|
||||
|
|
@ -292,7 +291,7 @@ PlaneH3<R>::perpendicular_line(const typename PlaneH3<R>::Point_3& p) const
|
|||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
PlaneH3<R>
|
||||
typename R::Plane_3
|
||||
PlaneH3<R>::opposite() const
|
||||
{ return PlaneH3<R>(-a(), -b(), -c(), -d() ); }
|
||||
|
||||
|
|
@ -388,7 +387,7 @@ PlaneH3<R>::orthogonal_vector() const
|
|||
{ return Vector_3(a(), b(), c() ); }
|
||||
|
||||
template < class R >
|
||||
PlaneH3<R>
|
||||
typename R::Plane_3
|
||||
PlaneH3<R>::transform(const typename PlaneH3<R>::Aff_transformation_3& t) const
|
||||
{
|
||||
return t.transform(*this);
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ template < class R_ >
|
|||
class PointH3
|
||||
: public R_::Point_handle_3
|
||||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Point_handle_3 Point_handle_3_;
|
||||
typedef typename Point_handle_3_::element_type Point_ref_3;
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ template < class R_ >
|
|||
class RayH3
|
||||
: public R_::Ray_handle_3
|
||||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Line_3 Line_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Line_3 Line_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Ray_handle_3 Ray_handle_3_;
|
||||
typedef typename Ray_handle_3_::element_type Ray_ref_3;
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ template < class R_ >
|
|||
class SegmentH3
|
||||
: public R_::Segment_handle_3
|
||||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Line_3 Line_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Line_3 Line_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Segment_handle_3 Segment_handle_3_;
|
||||
typedef typename Segment_handle_3_::element_type Segment_ref_3;
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ template <class R_>
|
|||
class SphereH3
|
||||
: public R_::Sphere_handle_3
|
||||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Sphere_handle_3 Sphere_handle_3_;
|
||||
typedef typename Sphere_handle_3_::element_type Sphere_ref_3;
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ template < class R_ >
|
|||
class TetrahedronH3
|
||||
: public R_::Tetrahedron_handle_3
|
||||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Tetrahedron_handle_3 Tetrahedron_handle_3_;
|
||||
typedef typename Tetrahedron_handle_3_::element_type Tetrahedron_ref_3;
|
||||
|
|
|
|||
|
|
@ -30,14 +30,14 @@ template < class R_ >
|
|||
class TriangleH3
|
||||
: public R_::Triangle_handle_3
|
||||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Plane_3 Plane_3;
|
||||
typedef typename R_::Kernel_base::Vector_3 Vector_3;
|
||||
typedef typename R_::Kernel_base::Segment_3 Segment_3;
|
||||
typedef typename R_::Kernel_base::Tetrahedron_3 Tetrahedron_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Plane_3 Plane_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Segment_3 Segment_3;
|
||||
typedef typename R_::Tetrahedron_3 Tetrahedron_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Triangle_handle_3 Triangle_handle_3_;
|
||||
typedef typename Triangle_handle_3_::element_type Triangle_ref_3;
|
||||
|
|
|
|||
|
|
@ -31,11 +31,12 @@ template < class R_ >
|
|||
class VectorH3
|
||||
: public R_::Vector_handle_3
|
||||
{
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Kernel_base::Point_3 Point_3;
|
||||
typedef typename R_::Kernel_base::Direction_3 Direction_3;
|
||||
typedef typename R_::Kernel_base::Aff_transformation_3 Aff_transformation_3;
|
||||
typedef typename R_::RT RT;
|
||||
typedef typename R_::FT FT;
|
||||
typedef typename R_::Point_3 Point_3;
|
||||
typedef typename R_::Direction_3 Direction_3;
|
||||
typedef typename R_::Vector_3 Vector_3;
|
||||
typedef typename R_::Aff_transformation_3 Aff_transformation_3;
|
||||
|
||||
typedef typename R_::Vector_handle_3 Vector_handle_3_;
|
||||
typedef typename Vector_handle_3_::element_type Vector_ref_3;
|
||||
|
|
@ -78,13 +79,10 @@ public:
|
|||
|
||||
int dimension() const { return 3; };
|
||||
|
||||
Direction_3
|
||||
direction() const;
|
||||
VectorH3<R>
|
||||
transform(const Aff_transformation_3& t ) const;
|
||||
Direction_3 direction() const;
|
||||
Vector_3 transform(const Aff_transformation_3& t ) const;
|
||||
|
||||
VectorH3<R>
|
||||
operator-() const;
|
||||
Vector_3 operator-() const;
|
||||
|
||||
bool operator==( const VectorH3<R>& v) const;
|
||||
bool operator!=( const VectorH3<R>& v) const;
|
||||
|
|
@ -109,7 +107,7 @@ VectorH3<R>::VectorH3(const RT& x, const RT& y, const RT& z, const RT& w)
|
|||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
typename VectorH3<R>::FT
|
||||
typename R::FT
|
||||
VectorH3<R>::cartesian(int i) const
|
||||
{
|
||||
CGAL_kernel_precondition(i == 0 || i == 1 || i == 2);
|
||||
|
|
@ -123,7 +121,7 @@ VectorH3<R>::cartesian(int i) const
|
|||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
const typename VectorH3<R>::RT &
|
||||
const typename R::RT &
|
||||
VectorH3<R>::homogeneous(int i) const
|
||||
{
|
||||
CGAL_kernel_precondition(i == 0 || i == 1 || i == 2 || i == 3);
|
||||
|
|
@ -138,7 +136,7 @@ VectorH3<R>::homogeneous(int i) const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
typename VectorH3<R>::Direction_3
|
||||
typename R::Direction_3
|
||||
VectorH3<R>::direction() const
|
||||
{ return Direction_3(*this); }
|
||||
|
||||
|
|
@ -160,19 +158,19 @@ VectorH3<R>::operator!=( const VectorH3<R>& v) const
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
typename VectorH3<R>::FT
|
||||
typename R::FT
|
||||
VectorH3<R>::operator[](int i) const
|
||||
{ return cartesian(i); }
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH3<R>
|
||||
typename R::Vector_3
|
||||
VectorH3<R>::operator-() const
|
||||
{ return VectorH3<R>( - hx(), - hy(), -hz(), hw() ); }
|
||||
{ return Vector_3( - hx(), - hy(), -hz(), hw() ); }
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH3<R>
|
||||
typename R::Vector_3
|
||||
operator+(const VectorH3<R>& u, const VectorH3<R>& v)
|
||||
{
|
||||
return VectorH3<R>(u.hx()*v.hw() + v.hx()*u.hw(),
|
||||
|
|
@ -183,7 +181,7 @@ operator+(const VectorH3<R>& u, const VectorH3<R>& v)
|
|||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH3<R>
|
||||
typename R::Vector_3
|
||||
operator-(const VectorH3<R>& u, const VectorH3<R>& v)
|
||||
{
|
||||
return VectorH3<R>(u.hx()*v.hw() - v.hx()*u.hw(),
|
||||
|
|
@ -194,7 +192,7 @@ operator-(const VectorH3<R>& u, const VectorH3<R>& v)
|
|||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
typename VectorH3<R>::FT
|
||||
typename R::FT
|
||||
VectorH3<R>::operator*(const VectorH3<R>& v) const
|
||||
{
|
||||
typedef typename R::RT RT;
|
||||
|
|
@ -207,32 +205,39 @@ VectorH3<R>::operator*(const VectorH3<R>& v) const
|
|||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH3<R>
|
||||
typename R::Vector_3
|
||||
operator/(const VectorH3<R>& v, const typename R::RT& f)
|
||||
{ return VectorH3<R>( v.hx(), v.hy(), v.hz(), v.hw()*f ); }
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH3<R>
|
||||
typename VectorH3<R>::Vector_3
|
||||
operator/(const VectorH3<R>& v, const typename R::FT& f)
|
||||
{ return VectorH3<R>( v.hx()*f.denominator(), v.hy()*f.denominator(),
|
||||
v.hz()*f.denominator(), v.hw()*f.numerator() ); }
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
typename R::Vector_3
|
||||
operator*(const VectorH3<R>& v, const typename R::RT& f)
|
||||
{ return VectorH3<R>( v.hx()*f, v.hy()*f, v.hz()*f, v.hw() ); }
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
template <class RT, class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH3<R>
|
||||
operator*(const RT& f, const VectorH3<R>& v)
|
||||
#else
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH3<R>
|
||||
typename VectorH3<R>::Vector_3
|
||||
operator*(const VectorH3<R>& v, const typename R::FT& f)
|
||||
{ return VectorH3<R>( v.hx()*f.numerator(), v.hy()*f.numerator(),
|
||||
v.hz()*f.numerator(), v.hw()*f.denominator() ); }
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
typename R::Vector_3
|
||||
operator*(const typename R::RT& f, const VectorH3<R>& v)
|
||||
#endif
|
||||
{ return VectorH3<R>( v.hx()*f, v.hy()*f, v.hz()*f, v.hw() ); }
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH3<R>
|
||||
typename R::Vector_3
|
||||
cross_product(const VectorH3<R>& a, const VectorH3<R>& b)
|
||||
{
|
||||
return VectorH3<R>(a.hy()*b.hz() - a.hz()*b.hy(),
|
||||
|
|
@ -243,31 +248,31 @@ cross_product(const VectorH3<R>& a, const VectorH3<R>& b)
|
|||
|
||||
template <class R>
|
||||
inline
|
||||
PointH3<R>
|
||||
typename R::Point_3
|
||||
operator+(const Origin& , const VectorH3<R>& v)
|
||||
{ return PointH3<R>( v ); }
|
||||
|
||||
template <class R>
|
||||
inline
|
||||
PointH3<R>
|
||||
typename R::Point_3
|
||||
operator-(const Origin& , const VectorH3<R>& v)
|
||||
{ return PointH3<R>(-v ); }
|
||||
|
||||
template <class R>
|
||||
inline
|
||||
VectorH3<R>
|
||||
typename R::Vector_3
|
||||
operator-(const PointH3<R>& p, const Origin& )
|
||||
{ return VectorH3<R>( p ); }
|
||||
|
||||
template <class R>
|
||||
inline
|
||||
VectorH3<R>
|
||||
typename R::Vector_3
|
||||
operator-(const Origin& , const PointH3<R>& p)
|
||||
{ return - VectorH3<R>( p ); }
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
PointH3<R>
|
||||
typename R::Point_3
|
||||
operator+(const PointH3<R>& p, const VectorH3<R>& v)
|
||||
{
|
||||
return PointH3<R>(p.hx()*v.hw() + v.hx()*p.hw(),
|
||||
|
|
@ -278,7 +283,7 @@ operator+(const PointH3<R>& p, const VectorH3<R>& v)
|
|||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
PointH3<R>
|
||||
typename R::Point_3
|
||||
operator-(const PointH3<R>& p, const VectorH3<R>& v)
|
||||
{
|
||||
return PointH3<R>( p.hx()*v.hw() - v.hx()*p.hw(),
|
||||
|
|
@ -289,10 +294,10 @@ operator-(const PointH3<R>& p, const VectorH3<R>& v)
|
|||
|
||||
template <class R>
|
||||
CGAL_KERNEL_INLINE
|
||||
VectorH3<R>
|
||||
typename R::Vector_3
|
||||
operator-(const PointH3<R>& p, const PointH3<R>& q)
|
||||
{
|
||||
return PointH3<R>( p.hx()*q.hw() - q.hx()*p.hw(),
|
||||
return VectorH3<R>(p.hx()*q.hw() - q.hx()*p.hw(),
|
||||
p.hy()*q.hw() - q.hy()*p.hw(),
|
||||
p.hz()*q.hw() - q.hz()*p.hw(),
|
||||
p.hw()*q.hw() );
|
||||
|
|
@ -304,7 +309,7 @@ operator-(const PointH3<R>& p, const PointH3<R>& q)
|
|||
|
||||
template < class R >
|
||||
inline
|
||||
VectorH3<R>
|
||||
typename R::Vector_3
|
||||
VectorH3<R>::
|
||||
transform(const typename VectorH3<R>::Aff_transformation_3&t ) const
|
||||
{ return t.transform(*this); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue