header_utils
Loading...
Searching...
No Matches
ghassanpl::geometry::triangulated_polygon< T, IDX > Struct Template Reference

Contains both a tpolygon<T> as well as its triangulation. More...

#include <polygon.h>

Public Types

using tvec
using value_type

Public Member Functions

T edge_length () const
tvec edge_point_alpha (T t) const
tvec edge_point (T t) const
trec2< T > bounding_box () const
tvec closest_point_to (glm::tvec2< T > pt) const
bool contains (glm::tvec2< T > pt) const
 area_shape concept
T calculate_area () const
tvec centroid () const

Public Attributes

tpolygon< T > poly
std::vector< tindexed_triangle< IDX > > triangles

Detailed Description

template<std::floating_point T, std::integral IDX = size_t>
struct ghassanpl::geometry::triangulated_polygon< T, IDX >

Contains both a tpolygon<T> as well as its triangulation.

See also
polygon_triangulation

Definition at line 336 of file polygon.h.

Member Typedef Documentation

◆ tvec

template<std::floating_point T, std::integral IDX = size_t>
using ghassanpl::geometry::triangulated_polygon< T, IDX >::tvec

Definition at line 338 of file polygon.h.

◆ value_type

template<std::floating_point T, std::integral IDX = size_t>
using ghassanpl::geometry::triangulated_polygon< T, IDX >::value_type

Definition at line 339 of file polygon.h.

Member Function Documentation

◆ bounding_box()

template<std::floating_point T, std::integral IDX = size_t>
trec2< T > ghassanpl::geometry::triangulated_polygon< T, IDX >::bounding_box ( ) const
inline

Definition at line 347 of file polygon.h.

◆ closest_point_to()

template<std::floating_point T, std::integral IDX = size_t>
tvec ghassanpl::geometry::triangulated_polygon< T, IDX >::closest_point_to ( glm::tvec2< T > pt) const
inline

Definition at line 348 of file polygon.h.

◆ edge_length()

template<std::floating_point T, std::integral IDX = size_t>
T ghassanpl::geometry::triangulated_polygon< T, IDX >::edge_length ( ) const
inline

Definition at line 344 of file polygon.h.

◆ edge_point()

template<std::floating_point T, std::integral IDX = size_t>
tvec ghassanpl::geometry::triangulated_polygon< T, IDX >::edge_point ( T t) const
inline

Definition at line 346 of file polygon.h.

◆ edge_point_alpha()

template<std::floating_point T, std::integral IDX = size_t>
tvec ghassanpl::geometry::triangulated_polygon< T, IDX >::edge_point_alpha ( T t) const
inline

Definition at line 345 of file polygon.h.

Member Data Documentation

◆ poly

template<std::floating_point T, std::integral IDX = size_t>
tpolygon<T> ghassanpl::geometry::triangulated_polygon< T, IDX >::poly

Definition at line 341 of file polygon.h.

◆ triangles

template<std::floating_point T, std::integral IDX = size_t>
std::vector<tindexed_triangle<IDX> > ghassanpl::geometry::triangulated_polygon< T, IDX >::triangles

Definition at line 342 of file polygon.h.