CLASS v1.8.0

Polygon

kn::Polygon

Declared in kraken/geometry/Polygon.hpp

Reference

C++ API

points

variable
std::vector< Vec2 > points

No description in the source header.

Polygon

function3 overloads
Polygon()=default
Polygon(const std::vector< Vec2 > &points)
Polygon(uint32_t n, double radius, const Vec2 &centroid=Vec2::ZERO)

No description in the source header.

~Polygon

function
~Polygon()=default

No description in the source header.

copy

function
Polygon copy() const

No description in the source header.

getPerimeter

function
double getPerimeter() const

No description in the source header.

getArea

function
double getArea() const

No description in the source header.

getCentroid

function
Vec2 getCentroid() const

No description in the source header.

setCentroid

function
void setCentroid(const Vec2 &centroid)

No description in the source header.

getRect

function
class Rect getRect() const

No description in the source header.

isConvex

function
bool isConvex() const

No description in the source header.

isConcave

function
bool isConcave() const

No description in the source header.

rotate

function
void rotate(double angle)

No description in the source header.

rotated

function
Polygon rotated(double angle) const

No description in the source header.

move

function
void move(const Vec2 &offset)

No description in the source header.

moved

function
Polygon moved(const Vec2 &offset) const

No description in the source header.

scaleBy

function2 overloads
void scaleBy(double factor)
void scaleBy(const Vec2 &factor)

No description in the source header.

scaledBy

function2 overloads
Polygon scaledBy(double factor) const
Polygon scaledBy(const Vec2 &factor) const

No description in the source header.

Find your next step

Start typing to search the manual.