gyroid & 3Dhoneycomb: now 'connected lines' follow the perimeters

This commit is contained in:
supermerill 2019-01-23 10:08:42 +01:00 committed by Yuri D'Elia
parent 8e4f777bd3
commit 86fbb9a095
5 changed files with 377 additions and 77 deletions

View file

@ -124,6 +124,13 @@ public:
double ccw_angle(const Point &p1, const Point &p2) const;
Point projection_onto(const MultiPoint &poly) const;
Point projection_onto(const Line &line) const;
double distance_to(const Point &point) const { return (point - *this).cast<double>().norm(); }
double distance_to_square(const Point &point) const {
double dx = (point.x() - this->x());
double dy = (point.y() - this->y());
return dx*dx + dy*dy;
}
};
namespace int128 {