#include <Primitives.h>
◆ Polygon()
| Polygon::Polygon |
( |
const std::vector< Point > & |
points = {} | ) |
|
|
inline |
◆ center()
Translates points such that the centroid becomes (0, 0).
◆ centroid()
| Point Polygon::centroid |
( |
| ) |
const |
|
inline |
◆ convexHull()
| Polygon Polygon::convexHull |
( |
| ) |
const |
◆ isConvex()
| bool Polygon::isConvex |
( |
| ) |
const |
◆ loadFromSvgPathStr()
| static Polygon Polygon::loadFromSvgPathStr |
( |
std::string |
path_str | ) |
|
|
inlinestatic |
Loads polygon from a path tag inside an SVG file.
◆ max()
| Point Polygon::max |
( |
| ) |
const |
|
inline |
Maximum x/y coordinates of all points.
◆ min()
| Point Polygon::min |
( |
| ) |
const |
|
inline |
Minimum x/y coordinates of all points.
◆ operator const std::vector< Point > &()
| Polygon::operator const std::vector< Point > & |
( |
| ) |
const |
|
inline |
◆ operator std::vector< Eigen::Matrix< double, 2, 1 > >()
| Polygon::operator std::vector< Eigen::Matrix< double, 2, 1 > > |
( |
| ) |
const |
|
inline |
Cast to the polygon format compatible with the collision2d library.
◆ operator std::vector< Point > &()
| Polygon::operator std::vector< Point > & |
( |
| ) |
|
|
inline |
◆ rotate()
| void Polygon::rotate |
( |
double |
angle | ) |
|
|
inline |
Rotates polygon counterclockwise about the origin.
◆ scale()
| void Polygon::scale |
( |
double |
scaling | ) |
|
|
inline |
◆ scaled()
| Polygon Polygon::scaled |
( |
double |
scaling | ) |
|
|
inline |
◆ transformed()
◆ translate()
| void Polygon::translate |
( |
const Point & |
t | ) |
|
|
inline |
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & |
stream, |
|
|
const Polygon & |
p |
|
) |
| |
|
friend |
◆ points
| std::vector<Point> Polygon::points |
The documentation for this struct was generated from the following files: