Rewrote the OpenGL object rendering to indexed triangle / quad sets

for lower memory consumption.
Rewrote the print path 3D preview to generate these indexed triangle / quad
sets, possibly with at least as possible duplication of vertices,
with a crease angle of 45 degrees, leading to maximum 8% overshoots
at the corners.
This commit is contained in:
bubnikv 2017-03-15 16:33:25 +01:00
parent e7a920fe16
commit d18e10c7c9
6 changed files with 414 additions and 566 deletions

View file

@ -210,6 +210,8 @@ inline Pointf operator*(const Pointf& point2, double scalar) { return Pointf(sca
inline coordf_t cross(const Pointf &v1, const Pointf &v2) { return v1.x * v2.y - v1.y * v2.x; }
inline coordf_t dot(const Pointf &v1, const Pointf &v2) { return v1.x * v2.x + v1.y * v2.y; }
inline coordf_t dot(const Pointf &v) { return v.x * v.x + v.y * v.y; }
inline double length(const Vectorf &v) { return sqrt(dot(v)); }
inline double l2(const Vectorf &v) { return dot(v); }
class Pointf3 : public Pointf
{