Navigation: Up, Table of Contents, Bibliography, Index, Title Page

Traits Class Implementation using the two-dimensional CGAL Kernel (CGAL_bops_traits_2)

Since all geometric objects on which boolean operations act are parameterized with a template for the representation class, also the predefined boolean operations traits class is a template class with a parameter for the representation class \ccTemplateParameters. The predefined boolean operations traits class is called CGAL_bops_traits_2<R>.

#include <CGAL/bops_traits_2.h>

Types

typedef CGAL_Object
Object;
typedef CGAL_Bbox_2
Bbox;
typedef CGAL_Point_2<R>
Point;
typedef CGAL_Segment_2<R>
Segment;
typedef CGAL_Triangle_2<R>
Triangle;
typedef CGAL_Iso_rectangle_2<R>
Iso_rectangle;
typedef list<Object>
Output_object_container;
typedef list<Point>
Container;
typedef Container Input_polygon_container;
typedef list<Point>
Output_polygon_container;
typedef CGAL_Polygon_2<CGAL_Polygon_traits_2<R>,Container>
Polygon;
typedef Polygon Input_polygon;
typedef Polygon::Vertex_const_iterator
Polygon_vertex_const_iterator;
typedef CGAL_Polygon_2<R,Output_polygon_container>
Output_polygon;

For more information about these types see reference arrow.

Creation

CGAL_bops_traits_2<R> Traits;
default constructor

Operations

bool Traits.do_overlap ( Bbox a, Bbox b)
returns CGAL_do_overlap(a,b).
bool Traits.box_is_contained_in_box ( Bbox a, Bbox b)
returns true iff xmin(b) <= xmin(a) and xmax(b) >= xmax(a) and ymin(b) <= ymin(a) and ymax(b) >= ymax(a) .
bool Traits.is_equal ( Point p1, Point p2)
returns p1 == p2.
bool Traits.less_x ( Point p1, Point p2)
returns p1.x() < p2.x();
bool Traits.is_leftturn ( Point p0, Point p1, Point p2)
returns CGAL_leftturn(p0, p1, p2).
Object Traits.Make_object ( Point p)
returns CGAL_make_object(p).
Object Traits.Make_object ( Segment seg)
returns CGAL_make_object(seg).
Object Traits.Make_object ( Output_polygon pgon)
returns CGAL_make_object(pgon).
Object Traits.Make_object ( Iso_rectangle irect)
returns CGAL_make_object(irect).
Object Traits.Make_object ( Triangle triangle)
returns CGAL_make_object(triangle).
Bbox Traits.get_Bbox ( Polygon pgon)
returns pgon.bbox().
bool Traits.has_on_bounded_side ( Polygon pgon, Point pt)
returns pgon.has_on_bounded_side(pt).
void Traits.reverse_orientation ( Polygon& pgon)
performs pgon.reverse_orientation().
Polygon_vertex_const_iterator
Traits.most_left_vertex ( Polygon pgon)
returns pgon.left_vertex().


Next: Class declaration of Traits<R>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The CGAL Project. 22 January, 1999.