Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Delaunay_index:findContainingTriangle(p)
- local fh = self.mesh.face_hierarchy
- local curr_face = 1
- local face = fh[curr_face]
- local contains, true_on
- while face.children do
- for _, ci in ipairs(face.children) do
- local polygon = self:polygonizeFace(ci)
- contained, true_on = vornmath.inside_polygon(polygon, p)
- if contained then
- curr_face = ci
- face = fh[ci]
- break
- end
- end
- end
- return curr_face, true_on
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement