Correa 1
C++ library with Python bindings to analyse the shape of simple closed curves in R^2
Loading...
Searching...
No Matches
correa::Polygon Class Reference

#include <Polygon.h>

Public Member Functions

 Polygon (Polygon &polygon)
 
double area ()
 
double originalArea ()
 
double length ()
 
void centerScale (double range, int iscale)
 
void centerScaleArea ()
 
void scaleArea ()
 
void boundaryLength0 ()
 
void boundaryLength ()
 
void distorsion ()
 
void shift (Vector2D center, bool verbose)
 
int size ()
 
void labelPolygon (const double EPSILON)
 
Vector2D calculateCentroid ()
 

Public Attributes

std::vector< Vertexvertices
 
std::vector< double > bdLength0
 
std::vector< double > bdLength
 
double distorsion_
 
double originalArea_
 
std::vector< std::pair< int, int > > edges
 

Detailed Description

Polygon class Stores the polygon and calculates various information about it.

Constructor & Destructor Documentation

◆ Polygon()

correa::Polygon::Polygon ( Polygon & polygon)

Copy constructor.

Member Function Documentation

◆ area()

double correa::Polygon::area ( )

Calculates the area of polygon.

◆ boundaryLength()

void correa::Polygon::boundaryLength ( )

Calculates the length of boundary edges.

◆ boundaryLength0()

void correa::Polygon::boundaryLength0 ( )

Calculates the length of boundary edges.

◆ centerScale()

void correa::Polygon::centerScale ( double range,
int iscale )

Center and rescale the polygon. Automatically recenters to the center of mass of the vertices.

Parameters
range
iscale

◆ centerScaleArea()

void correa::Polygon::centerScaleArea ( )

Center and rescale the polygon. Automatically recenters to the center of mass of the vertices.

◆ distorsion()

void correa::Polygon::distorsion ( )

Calculates the distorsion in edge lengths.

◆ length()

double correa::Polygon::length ( )

Calculates the length of polygon.

◆ scaleArea()

void correa::Polygon::scaleArea ( )

Rescale the polygon. Automatically recenters to the center of mass of the vertices.


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