|
header_utils
|
Represents a 2D polygon polygon_shape. More...
#include <polygon.h>
Public Types | |
| using | tvec |
| using | value_type |
Public Member Functions | |
| tvec & | operator[] (size_t index) |
| tvec const & | operator[] (size_t index) const |
| auto | cbegin () const |
| auto | cend () const |
| auto | begin () |
| auto | end () |
| auto | begin () const |
| auto | end () const |
| auto | size () const |
| bool | is_valid () const noexcept |
| tpolygon< T > | convex_hull () const noexcept |
| size_t | vertex_count () const |
| size_t | edge_count () const |
| std::optional< std::pair< tvec, tvec > > | edge (size_t index) const |
| std::optional< tvec > | vertex (size_t index) const |
| template<typename FUNC> | |
| void | for_each_vertex (FUNC &&func) const |
| template<typename FUNC> | |
| void | for_each_edge (FUNC &&func) const |
| std::vector< tsegment< T > > | edges () const noexcept |
| std::vector< T > | interior_angles () const noexcept |
| T | edge_length () const |
| tvec | edge_point (T t) const |
| tvec | edge_point_alpha (T t) const |
| tvec | closest_point_to (tvec pt) const |
| T | calculate_area () const |
| tvec | centroid () const |
| trec2< T > | bounding_box () const |
| bool | contains (tvec test) const |
| Assumes a simple polygon. | |
Static Public Member Functions | |
| template<typename... ARGS> | |
| static tpolygon | from_vertices (ARGS &&... args) |
| template<typename S> | |
| static tpolygon | from_shape (S const &shape) |
Public Attributes | |
| std::vector< glm::tvec2< T > > | vertices |
Represents a 2D polygon polygon_shape.
| using ghassanpl::geometry::tpolygon< T >::tvec |
| using ghassanpl::geometry::tpolygon< T >::value_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Assumes a simple polygon.
http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| std::vector<glm::tvec2<T> > ghassanpl::geometry::tpolygon< T >::vertices |