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

Requirements for Minimum Enclosing Quadrilateral Traits Classes

Definition

A class Minq_traits has to provide the following types and operations in order to qualify as a traits class for minimum_enclosing_rectangle_2, minimum_enclosing_parallelogram_2 and minimum_enclosing_strip_2.

Types

Minq_traits::Point_2
class used for representing the input points.


Minq_traits::Direction_2
class used for representing directions.


Minq_traits::Line_2
class used for representing lines.


Minq_traits::Rectangle_2
class used for representing (not necessarily axis-parallel) rectangles.


Minq_traits::Parallelogram_2
class used for representing (not necessarily axis-parallel) parallelograms.


Minq_traits::Strip_2
class used for representing strips, that is the range between (including) two parallel lines.


Minq_traits::Equal_2
AdaptableBinaryFunction class
op: Point_2 × Point_2 bool.
Returns true, iff the two points are equal.


Minq_traits::Less_x_2
AdaptableBinaryFunction class
op: Point_2 × Point_2 bool.
op(p,q) returns true, iff the x-coordinate of p is smaller than the x-coordinate of q.


Minq_traits::Less_y_2
AdaptableBinaryFunction class
op: Point_2 × Point_2 bool.
op(p,q) returns true, iff the y-coordinate of p is smaller than the y-coordinate of q.


Minq_traits::Greater_x_2
AdaptableBinaryFunction class
op: Point_2 × Point_2 bool.
op(p,q) returns true, iff the x-coordinate of p is greater than the x-coordinate of q.


Minq_traits::Greater_y_2
AdaptableBinaryFunction class
op: Point_2 × Point_2 bool.
op(p,q) returns true, iff the y-coordinate of p is greater than the y-coordinate of q.


Minq_traits::Right_of_implicit_line_2
Function class
op: Point_2 × Point_2 × Direction_2 bool.
op(p1,p2,d) returns true, iff the p1 is strictly to the right of the oriented line through p2 with direction d.


Minq_traits::Less_rotate_ccw_2
AdaptableBinaryFunction class
op: Direction_2 × Direction_2 bool.
op(d1,d2) returns true, iff the slope of d1 is less than the slope of d2.


Minq_traits::Area_less_rectangle_2
AdaptableBinaryFunction class
op: Rectangle_2 × Rectangle_2 bool.
op(r1,r2) returns true, iff the area of r1 is strictly less than the area of r2.


Minq_traits::Area_less_parallelogram_2
AdaptableBinaryFunction class
op: Parallelogram_2 × Parallelogram_2 bool.
op(p1,p2) returns true, iff the area of p1 is strictly less than the area of p2.


Minq_traits::Width_less_strip_2
AdaptableBinaryFunction class
op: Strip_2 × Strip_2 bool.
op(s1,s2) returns true, iff the width of s1 is strictly less than the width of s2.


Minq_traits::Rotate_direction_by_multiple_of_pi_2
AdaptableBinaryFunction class
op: Direction_2 × int Direction_2.
For a direction d and i, 0 i < 4 op(d,i) returns the direction that results from clockwise rotating d by i · .


Minq_traits::Construct_direction_2
AdaptableBinaryFunction class
op: Point_2 × Point_2 Direction_2.
op(p,q) returns the direction of the vector from p to q.


Minq_traits::Construct_rectangle_2
Function class
op: Point_2 × Direction_2 × Point_2 × Point_2 × Point_2 Rectangle_2.
If the points p1,p2,p3,p4 form the boundary of a convex polygon (oriented counterclockwise), op(p1,d,p2,p3,p4) returns the rectangle with one of the points on each side and one sides parallel to d.


Minq_traits::Construct_parallelogram_2
Function class
op: Point_2 × Direction_2 × Point_2 × Direction_2 × Point_2 × Point_2 Rectangle_2.
If the points p1,p2,p3,p4 form the boundary of a convex polygon (oriented counterclockwise), op(p1,d1,p2,d2,p3,p4) returns the parallelogram with one of the points on each side and one side parallel to each of d1 and d2.


Minq_traits::Construct_strip_2
Function class
op: Point_2 × Direction_2 × Point_2 Strip_2.
op(p1,d,p2) returns the strip bounded by the lines through p1 resp. p2 with direction d.

Operations

template < class OutputIterator >
OutputIterator
t.copy_rectangle_vertices_2 ( const Rectangle_2& r,
OutputIterator o)
const
copies the four vertices of r in counterclockwise order to o.

template < class OutputIterator >
OutputIterator
t.copy_parallelogram_vertices_2 ( const Parallelogram_2& p,
OutputIterator o)
const
copies the four vertices of p in counterclockwise order to o.

template < class OutputIterator >
OutputIterator
t.copy_strip_lines_2 ( const Strip_2& s,
OutputIterator o)
const
copies the two lines bounding s to o.

The following functions just return the corresponding function object.

Equal_2 t.equal_2_object ()
Less_x_2 t.less_x_2_object ()
Less_y_2 t.less_y_2_object ()
Greater_x_2 t.greater_x_2_object ()
Greater_y_2 t.greater_y_2_object ()
Right_of_implicit_line_2
t.right_of_implicit_line_2_object () const
Less_rotate_ccw_2 t.less_rotate_ccw_2_object ()
Area_less_rectangle_2
t.area_less_rectangle_2_object ()
Area_less_parallelogram_2
t.area_less_parallelogram_2_object ()
Width_less_strip_2 t.width_less_strip_2_object ()
Construct_direction_2
t.construct_direction_2_object ()
Construct_rectangle_2
t.construct_rectangle_2_object () const
Construct_parallelogram_2
t.construct_parallelogram_2_object () const
Construct_strip_2 t.construct_strip_2_object () const
Rotate_direction_by_multiple_of_pi_2
t.rotate_direction_by_multiple_of_pi_2_object ()

See Also

#include <CGAL/Minimum_enclosing_quadrilateral_traits_2.h>

The class Minimum_enclosing_quadrilateral_default_traits_2<R> (templatized with a CGAL representation class) fulfills these requirements.


Next: Function Declaration of maximum_area_inscribed_k_gon
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.