Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CGAL/include/CGAL/SimpleCartesian/simple_cartesian_rep.h
Go to the documentation of this file.
1 // ======================================================================
2 //
3 // Copyright (c) 1999 The CGAL Consortium
4 
5 // This software and related documentation is part of the Computational
6 // Geometry Algorithms Library (CGAL).
7 // This software and documentation is provided "as-is" and without warranty
8 // of any kind. In no event shall the CGAL Consortium be liable for any
9 // damage of any kind.
10 //
11 // Every use of CGAL requires a license.
12 //
13 // Academic research and teaching license
14 // - For academic research and teaching purposes, permission to use and copy
15 // the software and its documentation is hereby granted free of charge,
16 // provided that it is not a component of a commercial product, and this
17 // notice appears in all copies of the software and related documentation.
18 //
19 // Commercial licenses
20 // - A commercial license is available through Algorithmic Solutions, who also
21 // markets LEDA (http://www.algorithmic-solutions.de).
22 // - Commercial users may apply for an evaluation license by writing to
23 // Algorithmic Solutions (contact@algorithmic-solutions.com).
24 //
25 // The CGAL Consortium consists of Utrecht University (The Netherlands),
26 // ETH Zurich (Switzerland), Free University of Berlin (Germany),
27 // INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
28 // (Germany), Max-Planck-Institute Saarbrucken (Germany), RISC Linz (Austria),
29 // and Tel-Aviv University (Israel).
30 //
31 // ----------------------------------------------------------------------
32 // release : CGAL-2.2
33 // release_date : 2000, September 30
34 //
35 // source : Simple_cartesian.lw
36 // file : include/CGAL/SimpleCartesian/simple_cartesian_rep.h
37 // package : S2 (1.7)
38 // revision : 1.7
39 // revision_date : 11 Aug 2000
40 // author(s) : Stefan Schirra
41 //
42 // coordinator : MPI, Saarbruecken
43 // email : contact@cgal.org
44 // www : http://www.cgal.org
45 //
46 // ======================================================================
47 
48 #ifndef CGAL_SIMPLE_CARTESIAN_REP_H
49 #define CGAL_SIMPLE_CARTESIAN_REP_H
50 
51 #define CGAL_REP_CLASS_DEFINED
52 
56 
58 template < class FT_ >
60 {
61 public:
62  typedef FT_ FT;
63  typedef PointS2<FT> Point;
64 
65  FT get_x( Point const& p) const { return( p.x()); }
66  FT get_y( Point const& p) const { return( p.y()); }
67 
68  void
69  get( Point const& p, FT& x, FT& y) const
70  {
71  x = get_x( p);
72  y = get_y( p);
73  }
74 
75  void
76  set( Point& p, FT const& x, FT const& y) const
77  {
78  p = Point( x, y);
79  }
80 };
81 template <class R_, class FT_>
83 {
84  public:
85  typedef FT_ RT;
86  typedef FT_ FT;
88  // we have: template <class R> CGAL::Point_2 : public R::Point_2_base
89  typedef CGAL::Point_2< R_ > Point_2;
90  typedef CGAL::Vector_2< R_ > Vector_2;
91  typedef CGAL::Direction_2< R_ > Direction_2;
92  typedef CGAL::Segment_2< R_ > Segment_2;
93  typedef CGAL::Line_2< R_ > Line_2;
94  typedef CGAL::Ray_2< R_ > Ray_2;
95  typedef CGAL::Circle_2< R_ > Circle_2;
96  typedef CGAL::Triangle_2< R_ > Triangle_2;
97  typedef CGAL::Iso_rectangle_2< R_ > Iso_rectangle_2;
98  typedef CGAL::Aff_transformation_2< R_ > Aff_transformation_2;
100  typedef CGAL::Point_3< R_ > Point_3;
101  typedef CGAL::Vector_3< R_ > Vector_3;
102  typedef CGAL::Direction_3< R_ > Direction_3;
103  typedef CGAL::Segment_3< R_ > Segment_3;
104  typedef CGAL::Plane_3< R_ > Plane_3;
105  typedef CGAL::Line_3< R_ > Line_3;
106  typedef CGAL::Ray_3< R_ > Ray_3;
107  typedef CGAL::Triangle_3< R_ > Triangle_3;
108  typedef CGAL::Tetrahedron_3< R_ > Tetrahedron_3;
109  typedef CGAL::Iso_cuboid_3< R_ > Iso_cuboid_3;
110  typedef CGAL::Sphere_3< R_ > Sphere_3;
111  typedef CGAL::Aff_transformation_3< R_ > Aff_transformation_3;
112  // we have: template <class R> CGAL::Point_d : public R::Point_d_base
113  typedef CGAL::Point_d< R_ > Point_d;
114 
115 };
116 template <class FT_>
118  : public Simple_cartesian_base< Simple_cartesian<FT_>, FT_ >
119 {
120  public:
121  typedef FT_ RT;
122  typedef FT_ FT;
133 
135 
136  typedef typename KernelBase::Point_2 Point_2;
137  typedef typename KernelBase::Vector_2 Vector_2;
139  typedef typename KernelBase::Line_2 Line_2;
141  typedef typename KernelBase::Ray_2 Ray_2;
142  typedef typename KernelBase::Circle_2 Circle_2;
146 
156 
159  { return Construct_point_2(); }
160 
163  { return Construct_vector_2(); }
164 
167  { return Construct_direction_2(); }
168 
171  { return Construct_segment_2(); }
172 
175  { return Construct_line_2(); }
176 
179  { return Construct_ray_2(); }
180 
183  { return Construct_circle_2(); }
184 
187  { return Construct_triangle_2(); }
188 
191  { return Construct_aff_transformation_2(); }
192 
193 
197  { return Construct_point_on_2(); }
198 
202  { return Construct_second_point_on_2(); }
203 
207  { return Construct_source_point_2(); }
208 
212  { return Construct_target_point_2(); }
213 
217  { return Construct_min_point_2(); }
218 
222  { return Construct_max_point_2(); }
223 
227  { return Construct_direction_of_line_2(); }
228 
232  { return Construct_direction_of_ray_2(); }
233 
237  { return Construct_supporting_line_2(); }
238 
243 
248 
252  { return Construct_perpendicular_line_2(); }
253 
257  { return Construct_midpoint(); }
258 
262  { return Construct_circumcenter_2(); }
263 
267  { return Construct_bisector_2(); }
268 
272  { return Construct_opposite_segment_2(); }
273 
277  { return Construct_opposite_ray_2(); }
278 
282  { return Construct_opposite_line_2(); }
283 
287  { return Construct_opposite_triangle_2(); }
288 
292  { return Construct_opposite_circle_2(); }
293 
297  { return Transform_2(); }
298 
299 
301  Assign_2
303  { return Assign_2(); }
304 
308  { return Intersect_2(); }
309 
313  { return Compute_y_at_x_2(); }
314 
318  { return Compute_squared_length_2(); }
320  Equal_2
321  equal_2_object() const
322  { return Equal_2(); }
323 
325  Equal_x_2
327  { return Equal_x_2(); }
328 
330  Equal_y_2
332  { return Equal_y_2(); }
333 
335  Equal_xy_2
337  { return Equal_xy_2(); }
338 
340  Less_x_2
342  { return Less_x_2(); }
343 
345  Less_y_2
347  { return Less_y_2(); }
348 
349  typedef CGAL::p_Less_xy<Point_2> Less_xy_2;
350  Less_xy_2
352  { return Less_xy_2(); }
353 
354  typedef CGAL::p_Less_yx<Point_2> Less_yx_2;
355  Less_yx_2
357  { return Less_yx_2(); }
358 
362  { return Compare_x_2(); }
363 
367  { return Compare_y_2(); }
368 
372  { return Compare_xy_2(); }
373 
377  { return Compare_y_at_x_2(); }
378 
379  typedef CGAL ::p_Less_dist_to_point<Point_2> Less_distance_to_point_2;
382  { return Less_distance_to_point_2(p); }
383 
384  typedef CGAL ::p_Less_dist_to_line_2p<Point_2> Less_signed_distance_to_line_2;
387  { return Less_signed_distance_to_line_2(p,q); }
388 
389  typedef CGAL ::p_Less_rotate_ccw<Point_2> Less_rotate_ccw_2;
392  { return Less_rotate_ccw_2(p); }
393 
397  { return Counterclockwise_in_between_2(); }
398 
399  typedef CGAL ::p_Leftturn<Point_2> Leftturn_2;
400  Leftturn_2
402  { return Leftturn_2(); }
403 
404  typedef CGAL ::p_Left_of_line_2p<Point_2> Left_of_line_2;
406  left_of_line_2_object(const Point_2& p, const Point_2& q) const
407  { return Left_of_line_2(p,q); }
408 
412  { return Collinear_2(); }
413 
414  typedef CGAL ::p_Orientation<Point_2> Orientation_2;
417  { return Orientation_2(); }
418 
422  { return Side_of_oriented_circle_2(); }
423 
427  { return Side_of_bounded_circle_2(); }
428 
432  { return Is_horizontal_2(); }
433 
437  { return Is_vertical_2(); }
438 
442  { return Is_degenerate_2(); }
443 
445  Has_on_2
447  { return Has_on_2(); }
448 
452  { return Collinear_has_on_2(); }
453 
457  { return Has_on_bounded_side_2(); }
458 
462  { return Has_on_unbounded_side_2(); }
463 
467  { return Has_on_boundary_2(); }
468 
472  { return Has_on_positive_side_2(); }
473 
477  { return Has_on_negative_side_2(); }
478 
482  { return Oriented_side_2(); }
483 
487  { return Are_ordered_along_line_2(); }
488 
493 
498 
503 
516  typedef typename KernelBase::Point_3 Point_3;
517  typedef typename KernelBase::Vector_3 Vector_3;
519  typedef typename KernelBase::Plane_3 Plane_3;
520  typedef typename KernelBase::Line_3 Line_3;
522  typedef typename KernelBase::Ray_3 Ray_3;
526 
537 
540  { return Construct_point_3(); }
541 
544  { return Construct_vector_3(); }
545 
548  { return Construct_direction_3(); }
549 
552  { return Construct_segment_3(); }
553 
556  { return Construct_plane_3(); }
557 
560  { return Construct_line_3(); }
561 
564  { return Construct_ray_3(); }
565 
568  { return Construct_triangle_3(); }
569 
572  { return Construct_tetrahedron_3(); }
573 
576  { return Construct_aff_transformation_3(); }
577 
581  { return Construct_point_on_3(); }
582 
586  { return Construct_second_point_on_3(); }
587 
591  { return Construct_perpendicular_plane_3(); }
592 
596  { return Construct_midpoint_3(); }
597 
601  { return Construct_circumcenter_3(); }
602 
606  { return Construct_opposite_segment_3(); }
607 
611  { return Construct_opposite_ray_3(); }
612 
616  { return Construct_opposite_line_3(); }
617 
621  { return Construct_supporting_plane_3(); }
622 
626  { return Transform_2(); }
627 
628 
630  Assign_3
632  { return Assign_3(); }
633 
637  { return Intersect_3(); }
638 
642  { return Compute_squared_length_3(); }
643 
645  Equal_3
646  equal_3_object() const
647  { return Equal_3(); }
648 
650  Equal_x_3
652  { return Equal_x_3(); }
653 
655  Equal_y_3
657  { return Equal_y_3(); }
658 
660  Equal_z_3
662  { return Equal_z_3(); }
663 
665  Equal_xy_3
667  { return Equal_xy_3(); }
668 
672  { return Equal_xyz_3(); }
673 
675  Less_x_3
677  { return Less_x_3(); }
678 
680  Less_y_3
682  { return Less_y_3(); }
683 
685  Less_z_3
687  { return Less_z_3(); }
688 
689  typedef CGAL::p_Less_xy<Point_3> Less_xy_3;
690  Less_xy_3
692  { return Less_xy_3(); }
693 
695  Less_xyz_3
697  { return Less_xyz_3(); }
698 
702  { return Compare_x_3(); }
703 
707  { return Compare_y_3(); }
708 
712  { return Compare_z_3(); }
713 
717  { return Compare_xy_3(); }
718 
722  { return Compare_xyz_3(); }
723 
724  typedef CGAL ::p_Less_dist_to_point<Point_3> Less_distance_to_point_3;
727  { return Less_distance_to_point_3(p); }
728 
732  { return Collinear_3(); }
733 
735  Coplanar_3
737  { return Coplanar_3(); }
738 
739  typedef CGAL ::p_Orientation<Point_3> Orientation_3;
742  { return Orientation_3(); }
743 
747  { return Is_degenerate_3(); }
748 
750  Has_on_3
752  { return Has_on_3(); }
753 
757  { return Has_on_bounded_side_3(); }
758 
762  { return Has_on_unbounded_side_3(); }
763 
767  { return Has_on_boundary_3(); }
768 
772  { return Has_on_positive_side_3(); }
773 
777  { return Has_on_negative_side_3(); }
778 
782  { return Oriented_side_3(); }
783 
787  { return Are_ordered_along_line_3(); }
788 
793 
798 
803 
807  { return Side_of_oriented_sphere_3(); }
808 
812  { return Side_of_bounded_sphere_3(); }
813 
815 
816  typedef typename KernelBase::Point_d Point_d;
817 
819 
822  { return Construct_point_d(); }
823 
826  static FT make_FT(const RT & num, const RT& denom) { return num/denom;}
827  static FT make_FT(const RT & num) { return num;}
828  static RT FT_numerator(const FT &r) { return r;}
829  static RT FT_denominator(const FT &) { return RT(1);}
830 };
832 
833 #endif // CGAL_SIMPLE_CARTESIAN_REP_H
Construct_circumcenter_2 construct_circumcenter_2_object() const
CGALi::Collinear_are_strictly_ordered_along_line Collinear_are_strictly_ordered_along_line_2
CGALi::Call_perpendicular_to_get< Direction_2 > Construct_perpendicular_direction_2
Construct_perpendicular_direction_2 construct_perpendicular_direction_2_object() const
Construct_opposite_ray_3 construct_opposite_ray_3_object() const
CGALi::Call_perpendicular_to_get< Line_2 > Construct_perpendicular_line_2
Construct_perpendicular_line_2 construct_perpendicular_line_2_object() const
Construct_perpendicular_vector_2 construct_perpendicular_vector_2_object() const
Counterclockwise_in_between_2 counterclockwise_in_between_2_object() const
CGALi::Call_has_on_positive_side Has_on_positive_side_3
Less_signed_distance_to_line_2 less_signed_distance_to_line_2_object(const Point_2 &p, const Point_2 &q) const
Left_of_line_2 left_of_line_2_object(const Point_2 &p, const Point_2 &q) const
void int int REAL REAL * y
Definition: read.cpp:74
CGALi::Call_source_to_get< Point_2 > Construct_source_point_2
Construct_direction_of_ray_2 construct_direction_of_ray_2_object() const
Collinear_are_ordered_along_line_3 collinear_are_ordered_along_line_3_object() const
Has_on_positive_side_3 has_on_positive_side_3_object() const
Collinear_are_strictly_ordered_along_line_2 collinear_are_strictly_ordered_along_line_2_object() const
Construct_min_point_2 construct_min_point_2_object() const
Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line_2_object() const
CGALi::Call_has_on_negative_side Has_on_negative_side_3
Construct_direction_2 construct_direction_2_object() const
Construct_supporting_plane_3 construct_supporting_plane_3_object() const
Construct_aff_transformation_3 construct_aff_transformation_3_object() const
CGALi::Call_opposite_to_get< Ray_3 > Construct_opposite_ray_3
CGALi::Call_perpendicular_plane_to_get< Plane_3 > Construct_perpendicular_plane_3
CGALi::Call_squared_length_to_get< FT > Compute_squared_length_2
CGALi::Call_opposite_to_get< Line_3 > Construct_opposite_line_3
CGALi::Are_strictly_ordered_along_line Are_strictly_ordered_along_line_3
Less_distance_to_point_3 less_distance_to_point_3_object(const Point_3 &p) const
CGALi::Call_opposite_to_get< Segment_3 > Construct_opposite_segment_3
void set(Point &p, FT const &x, FT const &y) const
CGALi::Call_squared_length_to_get< FT > Compute_squared_length_3
static FT make_FT(const RT &num, const RT &denom)
Has_on_unbounded_side_2 has_on_unbounded_side_2_object() const
Construct_opposite_triangle_2 construct_opposite_triangle_2_object() const
Construct_opposite_line_2 construct_opposite_line_2_object() const
CGALi::Counterclockwise_in_between Counterclockwise_in_between_2
Construct_source_point_2 construct_source_point_2_object() const
Construct_direction_of_line_2 construct_direction_of_line_2_object() const
Construct_second_point_on_2 construct_second_point_on_2_object() const
CGALi::Call_has_on_positive_side Has_on_positive_side_2
CGALi::Call_opposite_to_get< Circle_2 > Construct_opposite_circle_2
CGALi::Call_perpendicular_to_get< Vector_2 > Construct_perpendicular_vector_2
Construct_supporting_line_2 construct_supporting_line_2_object() const
CGALi::Call_point_to_get< Point_3 > Construct_point_on_3
Definition: RayS2.h:60
CGALi::Call_has_on_unbounded_side Has_on_unbounded_side_3
Compute_squared_length_2 Compute_squared_length_2_object() const
Construct_direction_3 construct_direction_3_object() const
Construct_opposite_circle_2 construct_opposite_circle_2_object() const
Construct_circumcenter_3 construct_circumcenter_3_object() const
Are_ordered_along_line_3 are_ordered_along_line_3_object() const
Has_on_negative_side_3 has_on_negative_side_3_object() const
Are_strictly_ordered_along_line_2 are_strictly_ordered_along_line_2_object() const
Are_strictly_ordered_along_line_3 are_strictly_ordered_along_line_3_object() const
Construct_max_point_2 construct_max_point_2_object() const
CGALi::pl_Bisector< Point_2, Line_2 > Construct_bisector_2
CGALi::Call_max_to_get< Point_2 > Construct_max_point_2
CGALi::Construct< Aff_transformation_3 > Construct_aff_transformation_3
CGALi::Call_direction_to_get< Direction_2 > Construct_direction_of_ray_2
CGALi::Call_min_to_get< Point_2 > Construct_min_point_2
CGALi::Call_second_point_to_get< Point_2 > Construct_second_point_on_2
CGALi::Call_supporting_line_to_get< Line_2 > Construct_supporting_line_2
Construct_opposite_segment_2 construct_opposite_segment_2_object() const
void int int REAL * x
Definition: read.cpp:74
CGALi::Call_direction_to_get< Direction_2 > Construct_direction_of_line_2
CGALi::Call_opposite_to_get< Segment_2 > Construct_opposite_segment_2
CGALi::p_Circumcenter< Point_3 > Construct_circumcenter_3
Construct_target_point_2 construct_target_point_2_object() const
Less_distance_to_point_2 less_distance_to_point_2_object(const Point_2 &p) const
CGALi::Construct< Tetrahedron_3 > Construct_tetrahedron_3
CGALi::Collinear_are_ordered_along_line Collinear_are_ordered_along_line_3
CGAL::p_Less_dist_to_line_2p< Point_2 > Less_signed_distance_to_line_2
CGALi::Call_opposite_to_get< Triangle_2 > Construct_opposite_triangle_2
Construct_opposite_ray_2 construct_opposite_ray_2_object() const
CGALi::Construct< Aff_transformation_2 > Construct_aff_transformation_2
CGALi::Are_strictly_ordered_along_line Are_strictly_ordered_along_line_2
CGALi::Call_opposite_to_get< Ray_2 > Construct_opposite_ray_2
CGALi::Collinear_are_strictly_ordered_along_line Collinear_are_strictly_ordered_along_line_3
CGALi::Call_has_on_negative_side Has_on_negative_side_2
CGALi::Call_target_to_get< Point_2 > Construct_target_point_2
CGALi::Call_supporting_plane_to_get< Plane_3 > Construct_supporting_plane_3
CGALi::p_Circumcenter< Point_2 > Construct_circumcenter_2
Definition: LineS2.h:62
Has_on_positive_side_2 has_on_positive_side_2_object() const
CGALi::Call_point_to_get< Point_2 > Construct_point_on_2
Construct_tetrahedron_3 construct_tetrahedron_object() const
Construct_opposite_segment_3 construct_opposite_segment_3_object() const
Construct_second_point_on_3 construct_second_point_on_3_object() const
Construct_aff_transformation_2 construct_aff_transformation_2_object() const
NT q
Are_ordered_along_line_2 are_ordered_along_line_2_object() const
Side_of_bounded_circle_2 side_of_bounded_circle_2_object() const
CGALi::Call_has_on_unbounded_side Has_on_unbounded_side_2
Collinear_are_strictly_ordered_along_line_3 collinear_are_strictly_ordered_along_line_3_object() const
CGALi::Collinear_are_ordered_along_line Collinear_are_ordered_along_line_2
Definition: RayS3.h:59
#define CGAL_BEGIN_NAMESPACE
Definition: kdtree_d.h:86
ConicCPA2< Point_2, Data_accessor_2 > Conic_2
CGALi::Call_second_point_to_get< Point_3 > Construct_second_point_on_3
CGAL::p_Less_dist_to_point< Point_3 > Less_distance_to_point_3
Side_of_oriented_sphere_3 side_of_oriented_sphere_3_object() const
CGAL::p_Less_dist_to_point< Point_2 > Less_distance_to_point_2
CGAL::p_Less_rotate_ccw< Point_2 > Less_rotate_ccw_2
Compute_squared_length_3 compute_squared_length_3_object() const
Less_rotate_ccw_2 less_rotate_ccw_2_object(const Point_2 &p) const
Side_of_oriented_circle_2 side_of_oriented_circle_2_object() const
Has_on_bounded_side_2 has_on_bounded_side_2_object() const
Has_on_unbounded_side_3 has_on_unbounded_side_3_object() const
Construct_perpendicular_plane_3 construct_perpendicular_plane_3() const
CGAL_BEGIN_NAMESPACE void const NT NT NT NT & denom
#define CGAL_END_NAMESPACE
Definition: kdtree_d.h:87
Construct_opposite_line_3 construct_opposite_line_3_object() const
Has_on_bounded_side_3 has_on_bounded_side_3_object() const
Side_of_bounded_sphere_3 side_of_bounded_sphere_3_object() const
Definition: LineS3.h:59
Has_on_negative_side_2 has_on_negative_side_2_object() const
CGALi::Call_opposite_to_get< Line_2 > Construct_opposite_line_2
Simple_cartesian_base< Simple_cartesian< FT_ >, FT_ > KernelBase