header_utils
Loading...
Searching...
No Matches
ghassanpl::geometry::area_shape Concept Reference

A shape for which the concept of an "area" has a finite interpretation. More...

#include <shape_concepts.h>

Concept definition

template<typename T, typename SHAPE>
concept area_shape = shape<T, SHAPE> && requires (SHAPE const& shape, glm::tvec2<T> pt, T t) {
{ shape.contains(pt) } -> std::convertible_to<bool>;
{ shape.calculate_area() } -> std::convertible_to<T>;
{ shape.centroid() } -> std::convertible_to<glm::tvec2<T>>;
/*
{ shape.moment_of_inertia() } -> std::convertible_to<T>;
{ shape.moment_of_inertia(shape.centroid()) } -> std::convertible_to<T>;
{ shape.moment_of_inertia(shape.centroid(), shape.centroid()) } -> std::convertible_to<T>;
*/
}
A shape for which the concept of an "area" has a finite interpretation.
Any contiguous non-empty set of 2D points.

Detailed Description

A shape for which the concept of an "area" has a finite interpretation.

Definition at line 58 of file shape_concepts.h.