CGAL::Qt::Converter<K>

Definition

An object of type Qt::Converter<K> converts 2D CGAL kernel objects to their equivalent objects in Qt, and the other way round. Note that some objects have no equivalent. For example the CGAL::Circle_2<K> cannot be converted to something in Qt, and the unbounded objects CGAL::Ray_2<K> and CGAL::Line_2<K> are clipped. Note also that CGAL and Qt sometimes also use the same word for different things. For example line denotes an unbounded line in CGAL, wheras it denotes a bounded segment in Qt.

#include <CGAL/Qt/Converter.h>

Creation

Qt::Converter<K> c ( QRectF clippingRect);
The clipping rect is used for unbounded CGAL objects.

From CGAL to Qt

QRectF c ( Bbox_2 ) Converts a bounding box.

QPointF c ( K::Point_2 ) Converts a point.

QLineF c ( K::Segment_2 ) Converts a segment.

QLineF c ( K::Ray_2 ) Clips the ray and converts the resulting segment.

QLineF c ( K::Line_2 ) Clips the line and converts the resulting segment.

QPolygonF c ( K::Triangle_2 ) Converts a triangle.

QRectF c ( K::Iso_rectangle_2 ) Converts an iso rectangle.

QPolygonF c ( std::list<K::Point_2> ) Converts a list of points to a polygon.

From Qt to CGAL

K::Point_2 c ( QPointF ) Converts a point.

K::Segment_2 c ( QLineF ) Converts a segment.

K::Iso_rectangle_2 c ( QRectF ) Converts an iso rectangle.

std::list<K::Point_2> c ( QPolygonF ) Converts a polygon to a list of points.