ability to check if point is in mesh?

edited August 27 in Library Questions

hello - is there a way to check if a point is located inside of a mesh? or a workaround for the older function public boolean contains(final WB_Point3d p, final boolean isConvex)?

note: this question comes from @amnon's generative typography w/ processing example on sphere packing

Answers

  • or a workaround for the older function public boolean contains(final WB_Point3d p, final boolean isConvex)?

    A working example works better in this case. Check MCVE for more info.

    Link to the example could be also helpful.

    Kf

  • Answer ✓

    sorry about that. i'll remember to check that out going forward.

    i made a new issue at github.com/wblut/HE_Mesh and wblut/frederik vanhoutte responded to/closed the issue. copying their response here:

    yes,

    HET_MeshOp.isInside(mesh, p);

    But if you want to check many points and the mesh doesn't change, this is a lot better:

    WB_AABBTree tree=new WB_AABBTree(mesh,4); HET_MeshOp.isInside(tree,p);

Sign In or Register to comment.