codac 1.5.6
Loading...
Searching...
No Matches
codac2_ConvexPolygon.h File Reference
#include "codac2_Polygon.h"
Include dependency graph for codac2_ConvexPolygon.h:

Go to the source code of this file.

Classes

class  codac2::ConvexPolygon
 Represents a convex polygon defined by vertices enclosed in IntervalVectors. More...
 

Functions

ConvexPolygon codac2::operator& (const ConvexPolygon &p1, const ConvexPolygon &p2)
 Computes the intersection of two convex polygons.
 

Detailed Description

Date
2025
Author
Simon Rohou
License: GNU Lesser General Public License (LGPL)

Function Documentation

◆ operator&()

ConvexPolygon codac2::operator& ( const ConvexPolygon & p1,
const ConvexPolygon & p2 )

Computes the intersection of two convex polygons.

The result is a new ConvexPolygon enclosing the intersection area. If the polygons do not intersect, the result is an empty convex polygon.

Parameters
p1The first convex polygon.
p2The second convex polygon.
Returns
A ConvexPolygon enclosing the intersection area.