|
header_utils
|
Represents a 2D segment (technically a polygon_shape). More...
#include <segment.h>
Public Types | |
| using | tvec |
| using | value_type |
Public Member Functions | |
| constexpr | tsegment (tvec const &start, tvec const &end) noexcept |
| constexpr | tsegment (std::pair< tvec, tvec > const &p) noexcept |
| constexpr tvec | vec () const noexcept |
| tvec | dir () const noexcept |
| auto | length () const noexcept |
| constexpr auto | center () const noexcept |
| basic_line_t< T > | line () const noexcept |
| tsegment & | set_position (tvec const &pos) noexcept |
| tsegment & | operator+= (tvec const &offs) noexcept |
| tsegment & | operator-= (tvec const &offs) noexcept |
| tsegment & | translate (tvec const &offs) noexcept |
| tsegment & | set_length (T len) noexcept |
| tsegment & | set_length_around_center (T len) noexcept |
| tsegment & | grow (T len) noexcept |
| tsegment & | shrink (T len) noexcept |
| constexpr std::optional< tvec > | intersection (tsegment const &other) const noexcept |
| T | edge_length () const |
| Shape interface. | |
| tvec | edge_point_alpha (T t) const |
| tvec | edge_point (T t) const |
| trec2< T > | bounding_box () const |
| tvec | closest_point_to (tvec pt) const |
| interval< T > | projected_on_axis (tvec const &axis) const |
| template<typename FUNC> | |
| void | for_each_edge (FUNC &&func) const |
| Polygon shape interface. | |
| template<typename FUNC> | |
| void | for_each_vertex (FUNC &&func) const |
| size_t | vertex_count () const |
| size_t | edge_count () const |
| auto | edge (size_t index) const -> std::optional< std::pair< glm::tvec2< T >, glm::tvec2< T > > > |
| auto | vertex (size_t index) const -> std::optional< tvec > |
Static Public Member Functions | |
| static constexpr tsegment | from_offset (tvec const &start, tvec const &offset) noexcept |
| static constexpr tsegment | from_dir (tvec const &start, tvec const &dir, T len) noexcept |
| static constexpr tsegment | from_pair (std::pair< tvec, tvec > const &p) noexcept |
Public Attributes | |
| tvec | start |
| tvec | end |
Represents a 2D segment (technically a polygon_shape).
| using ghassanpl::geometry::tsegment< T >::tvec |
| using ghassanpl::geometry::tsegment< T >::value_type |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inline |
|
inlineconstexprnoexcept |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inline |
|
inline |
| tvec ghassanpl::geometry::tsegment< T >::end |
| tvec ghassanpl::geometry::tsegment< T >::start |