21 auto centroid()
const {
return axis.center(); }
23 bool contains(glm::tvec2<T> pt)
const
25 return axis.distance(pt) <= radius;
30 return axis.length() * 2 + glm::pi<T>() * 2 * radius;
33 glm::tvec2<T> edge_point_alpha(T t)
const;
35 T calculate_area()
const {
return axis.length() * 2 * radius + glm::pi<T>() * radius * radius; }
36 glm::tvec2<T> edge_point(T t)
const {
return edge_point_alpha(t / edge_length()); }
37 trec2<T> bounding_box()
const {
return axis.bounding_box().grown(radius); }
39 glm::tvec2<T> closest_point_to(glm::tvec2<T> pt)
const
42 throw "unimplemented";