PCB Environment: PolygonEx Class Reference

PCB Environment 2

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions
PolygonEx Class Reference
Inheritance diagram for PolygonEx:

## Public Member Functions
| PolygonEx (const Polygon_2 &base)
| PolygonEx (Polygon_2 &&base)
AShape * | clone () const override
PolygonEx | grown (Real size, Real epsilon=0.125) const
uint | vertexCount () const override
uint | indexCountWithRestart () const override
bool | canDrawAsTriFan () const override
Real | unsignedArea () const override
Bbox_2 | bbox () const override
void | transform (const CGAL::Aff_transformation_2< Kernel > &) override
void | translate (const ::Vector_2 &) override
bool | contains (const ::Point_2 &) const override
Real | squared_distance (const AShape &S) const override
Real | squared_distance (const ::Point_2 &) const override
Real | squared_distance (const Segment_2 &) const override
Real | squared_distance (const Circle_2 &C) const override
Real | squared_distance (const Iso_rectangle_2 &R) const override
Real | squared_distance (const Triangle_2 &T) const override
Real | squared_distance (const Polygon_2 &) const override
Real | squared_distance (const WideSegment_25 &) const override
bool | intersects (const AShape &S) const override
bool | intersects (const Circle_2 &C) const override
bool | intersects (const Iso_rectangle_2 &R) const override
bool | intersects (const Triangle_2 &T) const override
bool | intersects (const Polygon_2 &) const override
bool | intersects (const WideSegment_25 &) const override
::Point_2 | centroid () const override
std::string | str () const override
PyObject * | getPy () const override
Public Member Functions inherited from AShape
template<typename T>
T * | as ()
template<typename T>
const T * | as () const
virtual bool | isRound () const
Real | boundingRadius () const
virtual bool | transformPreservesType (const CGAL::Aff_transformation_2< Kernel > &) const
virtual void | translate (const Vector_2 &)=0
virtual AShape * | transformType (const CGAL::Aff_transformation_2< Kernel > &)
virtual bool | contains (const Point_2 &) const =0
Real | squared_distance (const Bbox_2 &) const
bool | intersects (const Bbox_2 &) const

## Static Public Member Functions
static Polygon_2 | grow (const Polygon_2 &, Real size, Real epsilon=0.125)

## Member Function Documentation

## ◆ bbox()

Bbox_2 PolygonEx::bbox | ( |  | ) | const
| inlineoverridevirtual

Implements AShape.

## ◆ canDrawAsTriFan()

bool PolygonEx::canDrawAsTriFan | ( |  | ) | const
| inlineoverridevirtual

Reimplemented from AShape.

## ◆ centroid()

::Point_2 PolygonEx::centroid | ( |  | ) | const
| overridevirtual

Implements AShape.

## ◆ clone()

AShape * PolygonEx::clone | ( |  | ) | const
| inlineoverridevirtual

Implements AShape.

## ◆ getPy()

PyObject * PolygonEx::getPy | ( |  | ) | const
| overridevirtual

Return a Python representation of this object. Formats:

- ('circle', radius, x, y)
- ('triangle', v0, v1, v2) where v is (x,y,z)
- ('rect_iso', xmin, ymin, xmax, ymax)
- ('wide_segment', x0, y0, x1, y1, z, width)
- ('polygon', [v0, v1, v2, v3, ...]) where v is (x,y,z)

Implements AShape.

## ◆ grow()

Polygon_2 PolygonEx::grow | ( | const Polygon_2 & | ,
|  | Real | size,
|  | Real | epsilon = 0.125 )
| static

Grow (expand) the given polygon outwards. This is not well-defined so the quality of the result will vary.

Parameters

  size | Absolute size of growth.
  epsilon | Tolerance for CGAL::approximated_offset_2.

## ◆ indexCountWithRestart()

uint PolygonEx::indexCountWithRestart | ( |  | ) | const
| inlineoverridevirtual

Reimplemented from AShape.

## ◆ intersects() [1/6]

bool PolygonEx::intersects | ( | const AShape & | S | ) | const
| inlineoverridevirtual

Implements AShape.

## ◆ intersects() [2/6]

bool PolygonEx::intersects | ( | const Circle_2 & | C | ) | const
| overridevirtual

Implements AShape.

## ◆ intersects() [3/6]

bool PolygonEx::intersects | ( | const Iso_rectangle_2 & | R | ) | const
| overridevirtual

Implements AShape.

## ◆ intersects() [4/6]

bool PolygonEx::intersects | ( | const Polygon_2 & |  | ) | const
| overridevirtual

Implements AShape.

## ◆ intersects() [5/6]

bool PolygonEx::intersects | ( | const Triangle_2 & | T | ) | const
| overridevirtual

Implements AShape.

## ◆ intersects() [6/6]

bool PolygonEx::intersects | ( | const WideSegment_25 & |  | ) | const
| overridevirtual

Implements AShape.

## ◆ squared_distance() [1/8]

Real PolygonEx::squared_distance | ( | const ::Point_2 & |  | ) | const
| overridevirtual

Implements AShape.

## ◆ squared_distance() [2/8]

Real PolygonEx::squared_distance | ( | const AShape & | S | ) | const
| inlineoverridevirtual

Implements AShape.

## ◆ squared_distance() [3/8]

Real PolygonEx::squared_distance | ( | const Circle_2 & | C | ) | const
| overridevirtual

Implements AShape.

## ◆ squared_distance() [4/8]

Real PolygonEx::squared_distance | ( | const Iso_rectangle_2 & | R | ) | const
| overridevirtual

Implements AShape.

## ◆ squared_distance() [5/8]

Real PolygonEx::squared_distance | ( | const Polygon_2 & |  | ) | const
| overridevirtual

Implements AShape.

## ◆ squared_distance() [6/8]

Real PolygonEx::squared_distance | ( | const Segment_2 & |  | ) | const
| overridevirtual

Implements AShape.

## ◆ squared_distance() [7/8]

Real PolygonEx::squared_distance | ( | const Triangle_2 & | T | ) | const
| overridevirtual

Implements AShape.

## ◆ squared_distance() [8/8]

Real PolygonEx::squared_distance | ( | const WideSegment_25 & |  | ) | const
| overridevirtual

Implements AShape.

## ◆ str()

std::string PolygonEx::str | ( |  | ) | const
| overridevirtual

Implements AShape.

## ◆ transform()

void PolygonEx::transform | ( | const CGAL::Aff_transformation_2< Kernel > & |  | ) |
| overridevirtual

Use transformType() if you are not sure whether the transformation preserves the shape type.

Implements AShape.

## ◆ unsignedArea()

Real PolygonEx::unsignedArea | ( |  | ) | const
| inlineoverridevirtual

Implements AShape.

## ◆ vertexCount()

uint PolygonEx::vertexCount | ( |  | ) | const
| inlineoverridevirtual

For rendering:

Implements AShape.

The documentation for this class was generated from the following file:

- /home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/AShape.hpp