mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
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:
parent
e7a920fe16
commit
d18e10c7c9
6 changed files with 414 additions and 566 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue