menajev
Member
|
Bool Cuts(C Vec &point, C Tri &tri) strange behaviour
Code:
Tri tri;
tri.p[0] = Vec(3.42183304, 0.00000000, 9.04267216);
tri.p[1] = Vec(-7.13797712, 0.00000000, 9.04266930);
tri.p[2] = Vec(3.49913740, 0.00000000, -1.78532219);
Bool cuts0 = Cuts(tri.p[0], tri); // true
Bool cuts1 = Cuts(tri.p[1], tri); // true
Bool cuts2 = Cuts(tri.p[2], tri); // false
Is this normal that using Tri's own point in Cuts gives more or less random answers?
For p[1] = Vec(-7.16797712, 0.00000000, 9.14266930) all cuts are true
I checked source but such math is beyond my level.
|
|
04-17-2022 09:53 PM |
|
Esenthel
Administrator
|
RE: Bool Cuts(C Vec &point, C Tri &tri) strange behaviour
Yes that can happen for points near the border.
If you need some tolerance to make sure these points will be included then try using CutsEps function
|
|
04-18-2022 03:08 AM |
|