Taking a set of points defining a hexahedron in the conventional order, this function tests of the point is inside this hexahedron by:
Parameters : | p : numpy.ndarray \((N,3)\)
hexapoints : numpy.ndarray \((8,3)\)
|
---|---|
Returns : | 1 :
0 :
|
Examples
>>> hexapoints = np.array([[0,0,0],
... [0,1,0],
... [0,1,1],
... [0,0,1],
... [1,0,0],
... [1,1,0],
... [1,1,1],
... [1,0,1]])
>>> p = np.array([[ 0, 0, 0],
... [0.5,0.5,0.5],
... [ 2, 0, 0]])
>>> pointInHexa(p, hexapoints)
array([ 0., 1., 0.])