Guest User

Untitled

a guest
Dec 11th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1.  
  2. /*!
  3. \ingroup PkgTriangulation2Concepts
  4. \cgalconcept
  5.  
  6. The concept `TriangulationTraits_2` describes the set of requirements
  7. to be fulfilled by any class used to instantiate the first template
  8. parameter of the class `Triangulation_2<Traits,Tds>`. This concept
  9. provides the types of the geometric primitives used in the
  10. triangulation and some function object types for the required
  11. predicates on those primitives.
  12.  
  13. \hasModel All the \cgal Kernels
  14. \hasModel `CGAL::Triangulation_euclidean_traits_2<K>`
  15. \hasModel `CGAL::Projection_traits_xy_3<K>`
  16. \hasModel `CGAL::Projection_traits_yz_3<K>`
  17. \hasModel `CGAL::Projection_traits_zx_3<K>`
  18.  
  19. \sa `CGAL::Triangulation_2<Traits,Tds>`
  20.  
  21. */
  22.  
  23. class TriangulationTraits_2 {
  24. public:
  25.  
  26. /// \name Types
  27. /// @{
  28.  
  29. /*!
  30. The point type.
  31. */
  32. typedef Hidden_type Point_2;
  33.  
  34. /*!
  35. The segment type.
  36. */
  37. typedef Hidden_type Segment_2;
  38.  
  39. /*!
  40. The triangle type.
  41. */
  42. typedef Hidden_type Triangle_2;
  43.  
  44. /*!
  45. A constructor object for
  46. `Segment_2`. Provides :
  47.  
  48. `Segment_2 operator()(Point_2 p,Point_2 q)`,
  49.  
  50. which constructs a segment from two points.
  51. */
  52. typedef Hidden_type Construct_segment_2;
  53.  
  54. /*!
  55. A constructor object for
  56. `Triangle_2`. Provides :
  57.  
  58. `Triangle_2 operator()(Point_2 p,Point_2 q,Point_2 r )`,
  59.  
  60. which constructs a triangle from three points.
  61. */
  62. typedef Hidden_type Construct_triangle_2;
  63.  
  64. /*!
  65. Predicate object. Provides
  66. the operator :
  67.  
  68. `bool operator()(Point p, Point q)`
  69.  
  70. which returns `true` if `p` is before `q`
  71. according to the \f$ x\f$-ordering of points.
  72. */
  73. typedef Hidden_type Less_x_2;
  74.  
  75. /*!
  76. Predicate object. Provides
  77. the operator :
  78.  
  79. `bool operator()(Point p, Point q)`
  80.  
  81. which returns `true` if `p` is before `q`
  82. according to the \f$ y\f$-ordering of points.
  83. */
  84. typedef Hidden_type Less_y_2;
  85.  
  86. /*!
  87. Predicate object. Provides
  88. the operator :
  89.  
  90. `Comparison_result operator()(Point p, Point q)`
  91.  
  92. which returns
  93. `SMALLER, EQUAL` or `LARGER`
  94. according to the
  95. \f$ x\f$-ordering of points `p` and `q`.
  96. */
  97. typedef Hidden_type Compare_x_2;
  98.  
  99. /*!
  100. Predicate object. Provides
  101. the operator :
  102.  
  103. `Comparison_result operator()(Point p, Point q)`
  104.  
  105. which returns
  106. (`SMALLER, EQUAL` or `LARGER`)
  107. according to the
  108. \f$ y\f$-ordering of points `p` and `q`.
  109. */
  110. typedef Hidden_type Compare_y_2;
  111.  
  112. /*!
  113. Predicate object. Provides
  114. the operator :
  115.  
  116. `Orientation operator()(Point p, Point q, Point r)`
  117.  
  118. which returns `LEFT_TURN`, `RIGHT_TURN` or `COLLINEAR`
  119. depending on \f$ r\f$ being, with respect to
  120. the oriented line `pq`,
  121. on the left side , on the right side or on the line.
  122. */
  123. typedef Hidden_type Orientation_2;
  124.  
  125. /*!
  126. Predicate object. Must
  127. provide the operator
  128. `Oriented_side operator()(Point p, Point q, Point r, Point s)`
  129. which takes four points \f$ p, q, r, s\f$ as arguments and returns
  130. `ON_POSITIVE_SIDE`, `ON_NEGATIVE_SIDE` or,
  131. `ON_ORIENTED_BOUNDARY` according to the position of points `s`
  132. with respect to the oriented circle through through \f$ p,q\f$
  133. and \f$ r\f$.
  134. This type is required only if the function
  135. `side_of_oriented_circle(Face_handle f, Point p)` is
  136. called.
  137. */
  138. typedef Hidden_type Side_of_oriented_circle_2;
  139.  
  140. /*!
  141. Constructor object. Provides
  142. the operator :
  143.  
  144. `Point operator()(Point p, Point q, Point r)`
  145.  
  146. which returns
  147. the circumcenter of the three points `p, q` and `r`.
  148. This type is required only if the function
  149. `Point circumcenter(Face_handle f)`is called.
  150. */
  151. typedef Hidden_type Construct_circumcenter_2;
  152.  
  153. /// @}
  154.  
  155. /// \name Creation
  156. /// Only a default constructor, copy constructor and an assignment
  157. /// operator are required. Note that further constructors can be
  158. /// provided.
  159. /// @{
  160.  
  161. /*!
  162. default constructor.
  163. */
  164. TriangulationTraits_2();
  165.  
  166. /*!
  167. Copy constructor
  168. */
  169. TriangulationTraits_2(TriangulationTraits_2 gtr);
  170.  
  171. /*!
  172. Assignment operator.
  173. */
  174. TriangulationTraits_2 operator=(TriangulationTraits_2 gtr);
  175.  
  176. /// @}
  177.  
  178. /// \name Predicate functions
  179. /// The following functions give access to the predicate and
  180. /// constructor objects.
  181. /// @{
  182.  
  183. /*!
  184.  
  185. */
  186. Construct_segment_2 construct_segment_2_object();
  187.  
  188. /*!
  189.  
  190. */
  191. Construct_triangle_2 construct_triangle_2_object();
  192.  
  193. /*!
  194.  
  195. */
  196. Comparison_x_2 compare_x_2_object();
  197.  
  198. /*!
  199.  
  200. */
  201. Comparison_y_2 compare_y_2_object();
  202.  
  203. /*!
  204.  
  205. */
  206. Orientation_2 orientation_2_object();
  207.  
  208. /*!
  209. Required only
  210. if `side_of_oriented_circle` is called
  211. called.
  212. */
  213. Side_of_oriented_circle_2
  214. side_of_oriented_circle_2_object();
  215.  
  216. /*!
  217. Required only if `circumcenter` is called.
  218. */
  219. Construct_circumcenter_2 construct_circumcenter_2_object();
  220.  
  221. /// @}
  222.  
  223. }; /* end TriangulationTraits_2 */
Add Comment
Please, Sign In to add comment