#include <inside.h>
Static Public Member Functions | |
static bool | Is_Inside (TriMeshType &m, FaceSpatialIndexing &_g_mesh, const CoordType &test) |
Return true if the point is inside the mesh. | |
Private Types | |
typedef FaceSpatialIndexing::CoordType | CoordType |
typedef FaceSpatialIndexing::ScalarType | ScalarType |
Definition at line 59 of file inside.h.
typedef FaceSpatialIndexing::CoordType vcg::tri::Inside< FaceSpatialIndexing, TriMeshType >::CoordType [private] |
typedef FaceSpatialIndexing::ScalarType vcg::tri::Inside< FaceSpatialIndexing, TriMeshType >::ScalarType [private] |
static bool vcg::tri::Inside< FaceSpatialIndexing, TriMeshType >::Is_Inside | ( | TriMeshType & | m, | |
FaceSpatialIndexing & | _g_mesh, | |||
const CoordType & | test | |||
) | [inline, static] |
Return true if the point is inside the mesh.
First test if the element is inside the bounding box of the mesh.
Check if there is any face in the mesh
If the point is on the face is considered inside.
Check if the closest point is inside a face
Check if the test point is inside the mesh using the normal direction
In this case we are not sure because hit an edge or a vertex. So we use a ray that go until the barycenter of found face, then see normal value again
Set ray : origin and direction
In this case normal direction is enough.