mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 21:58:03 -06:00
Further implementation of FillRectilinear3.
This commit is contained in:
parent
137aab9631
commit
812a2c7cbd
5 changed files with 237 additions and 213 deletions
|
@ -286,7 +286,7 @@ public:
|
|||
if (std::abs(det) > err)
|
||||
return ((det > 0) ? 1 : -1) * invert;
|
||||
}
|
||||
return sign_determinant_2x2(p1, q1, p2, q2);
|
||||
return sign_determinant_2x2(p1, q1, p2, q2) * invert;
|
||||
}
|
||||
|
||||
// Exact orientation predicate,
|
||||
|
@ -297,4 +297,11 @@ public:
|
|||
Slic3r::Vector v2(p3 - p1);
|
||||
return sign_determinant_2x2_filtered(v1.x, v1.y, v2.x, v2.y);
|
||||
}
|
||||
|
||||
// Exact orientation predicate,
|
||||
// returns +1: CCW, 0: collinear, -1: CW.
|
||||
static int cross(const Slic3r::Point &v1, const Slic3r::Point &v2)
|
||||
{
|
||||
return sign_determinant_2x2_filtered(v1.x, v1.y, v2.x, v2.y);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue