#ifndef HOMOGENEOUS_D_H #define HOMOGENEOUS_D_H #ifndef NOCGALINCL #include #include #include #include #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include CGAL_BEGIN_NAMESPACE template class Point_d; template class Vector_d; template class Direction_d; template class Hyperplane_d; template class Sphere_d; template class Segment_d; template class Ray_d; template class Line_d; template class Aff_transformation_d; template > class Homogeneous_d { public: typedef Homogeneous_d Self; typedef pRT RT; typedef Quotient FT; typedef pLA LA; typedef Homogeneous_tag Rep_tag; typedef PointHd Point_d_base; typedef VectorHd Vector_d_base; typedef DirectionHd Direction_d_base; typedef HyperplaneHd Hyperplane_d_base; typedef Aff_transformationHd Aff_transformation_d_base; typedef CGAL::Point_d Point_d; typedef CGAL::Vector_d Vector_d; typedef CGAL::Direction_d Direction_d; typedef CGAL::Hyperplane_d Hyperplane_d; typedef CGAL::Aff_transformation_d Aff_transformation_d; // meta types (fit both kernels): typedef CGAL::Sphere_d Sphere_d; typedef CGAL::Segment_d Segment_d; typedef CGAL::Ray_d Ray_d; typedef CGAL::Line_d Line_d; // function objects: typedef Lift_to_paraboloidHd Lift_to_paraboloid_d; typedef Project_along_d_axisHd Project_along_d_axis_d; typedef MidpointHd Midpoint_d; typedef Squared_distanceHd Squared_distance_d; typedef Position_on_lineHd Position_on_line_d; typedef Barycentric_coordinatesHd Barycentric_coordinates_d; typedef OrientationHd Orientation_d; typedef Side_of_oriented_sphereHd Side_of_oriented_sphere_d; typedef Side_of_bounded_sphereHd Side_of_bounded_sphere_d; typedef Contained_in_simplexHd Contained_in_simplex_d; typedef Contained_in_affine_hullHd Contained_in_affine_hull_d; typedef Affine_rankHd Affine_rank_d; typedef Affinely_independentHd Affinely_independent_d; typedef Compare_lexicographicallyHd Compare_lexicographically_d; typedef Center_of_circleHd Center_of_circle_d; typedef Contained_in_linear_hullHd Contained_in_linear_hull_d; typedef Linear_rankHd Linear_rank_d; typedef Linearly_independentHd Linearly_independent_d; typedef Linear_baseHd Linear_base_d; Lift_to_paraboloid_d lift_to_paraboloid_d_object() const { return Lift_to_paraboloid_d(); } Project_along_d_axis_d project_along_d_axis_d_object() const { return Project_along_d_axis_d(); } Midpoint_d midpoint_d_object() const { return Midpoint_d(); } Squared_distance_d squared_distance_d_object() const { return Squared_distance_d(); } Position_on_line_d position_on_line_d_object() const { return Position_on_line_d(); } Barycentric_coordinates_d barycentric_coordinates_d_object() const { return Barycentric_coordinates_d(); } Orientation_d orientation_d_object() const { return Orientation_d(); } Side_of_oriented_sphere_d side_of_oriented_sphere_d_object() const { return Side_of_oriented_sphere_d(); } Side_of_bounded_sphere_d side_of_bounded_sphere_d_object() const { return Side_of_bounded_sphere_d(); } Contained_in_simplex_d contained_in_simplex_d_object() const { return Contained_in_simplex_d(); } Contained_in_affine_hull_d contained_in_affine_hull_d_object() const { return Contained_in_affine_hull_d(); } Affine_rank_d affine_rank_d_object() const { return Affine_rank_d(); } Affinely_independent_d affinely_independent_d_object() const { return Affinely_independent_d(); } Compare_lexicographically_d compare_lexicographically_d_object() const { return Compare_lexicographically_d(); } Center_of_circle_d center_of_circle_d_object() const { return Center_of_circle_d(); } Contained_in_linear_hull_d contained_in_linear_hull_d_object() const { return Contained_in_linear_hull_d(); } Linear_rank_d linear_rank_d_object() const { return Linear_rank_d(); } Linearly_independent_d linearly_independent_d_object() const { return Linearly_independent_d(); } Linear_base_d linear_base_d_object() const { return Linear_base_d(); } // Intersection objects: typedef Line_d_Line_d_pairH Line_d_Line_d_pair; typedef Ray_d_Ray_d_pairH Ray_d_Ray_d_pair; typedef Segment_d_Segment_d_pairH Segment_d_Segment_d_pair; typedef Line_d_Ray_d_pairH Line_d_Ray_d_pair; typedef Line_d_Segment_d_pairH Line_d_Segment_d_pair; typedef Ray_d_Segment_d_pairH Ray_d_Segment_d_pair; typedef Line_d_Hyperplane_d_pairH Line_d_Hyperplane_d_pair; typedef Ray_d_Hyperplane_d_pairH Ray_d_Hyperplane_d_pair; typedef Segment_d_Hyperplane_d_pairH Segment_d_Hyperplane_d_pair; typedef CGALi::Intersect Intersect_d; Intersect_d intersect_d_object() const { return Intersect_d(); } // FT - RT conversion and access : static FT make_FT(const RT & num, const RT& denom) { return FT(num, denom); } static FT make_FT(const RT & num) { return FT(num); } static RT FT_numerator(const FT &r) { return r.numerator(); } static RT FT_denominator(const FT &r) { return r.denominator(); } // special stuff for traits class character : struct Component_accessor_d { template int dimension(const C& c) const { return c.dimension(); } template RT homogeneous(const C& c, int i) { return c.homogeneous(i); } template FT cartesian(const C& c, int i) { return c.cartesian(i); } }; Component_accessor_d component_accessor_d_object() const { return Component_accessor_d(); } typedef CGALi::Construct Construct_point_d; Construct_point_d construct_point_d_object() const { return Construct_point_d(); } typedef CGALi::Construct Construct_vector_d; Construct_vector_d construct_vector_d_object() const { return Construct_vector_d(); } typedef CGALi::Construct Construct_sphere_d; Construct_sphere_d construct_sphere_d_object() const { return Construct_sphere_d(); } typedef CGALi::Construct Construct_hyperplane_d; Construct_hyperplane_d construct_hyperplane_d_object() const { return Construct_hyperplane_d(); } typedef CGALi::Call_has_on_positive_side Has_on_positive_side_d; Has_on_positive_side_d has_on_positive_side_d_object() const { return Has_on_positive_side_d(); } typedef CGALi::Call_oriented_side Oriented_side_d; Oriented_side_d oriented_side_d_object() const { return Oriented_side_d(); } struct Point_to_vector_d { Vector_d operator()(const Point_d& p) const { return p-CGAL::ORIGIN; } }; Point_to_vector_d point_to_vector_d_object() const { return Point_to_vector_d(); } struct Vector_to_point_d { Point_d operator()(const Vector_d& v) const { return CGAL::ORIGIN+v; } }; Vector_to_point_d vector_to_point_d_object() const { return Vector_to_point_d(); } struct Orthogonal_vector_d { Vector_d operator()(const Hyperplane_d& h) const { return h.orthogonal_vector(); } }; Orthogonal_vector_d orthogonal_vector_d_object() const { return Orthogonal_vector_d(); } struct Point_of_sphere_d { Point_d operator()(const Sphere_d& S, int i) { return S.point(i); } }; Point_of_sphere_d point_of_sphere_d_object() const { return Point_of_sphere_d(); } }; // Homogeneous_d CGAL_END_NAMESPACE #include #include #include #include #include #include #include #include #include #include #include #endif // HOMOGENEOUS_D_H