inpolygon in 3D



I would like to have a code for determining if a point is inside or
outside from the 3D polygon constructed from a given set of points in
3D.

There is a function called inpolygon.m, but this is only for 2D. So
I would like to have a 3D version of that function.

Your help will be deeply appreciated.

Many thanks,

Hong.
.