(points,
                                    polygon_surfaces,
                                    normal_vec, d,
                                    num_surfaces=None)
return ret
check points is in 3d convex polygons.
    Args:
        points: [num_points, 3] array.
        polygon_surfaces: [num_polygon, max_num_surfaces, 
            max_num_points_of_surface, 3] 
            array. all surfaces' normal vector must direct to internal.
            max_num_points_of_surface must at least 3.
        num_surfaces: [num_polygon] array. indicate how many surfaces 
            a polygon contain
    Returns:
        [num_points, num_polygon] bool array.
check points is in 3d convex polygons.
    Args:
        points: [num_points, 3] array.
        polygon_surfaces: [num_polygon, max_num_surfaces, 
            max_num_points_of_surface, 3] 
            array. all surfaces' normal vector must direct to internal.
            max_num_points_of_surface must at least 3.
        num_surfaces: [num_polygon] array. indicate how many surfaces 
            a polygon contain
    Returns:
        [num_points, num_polygon] bool array.
check points is in 3d convex polygons . Args : points : [ num_points 3 ] array . polygon_surfaces : [ num_polygon max_num_surfaces max_num_points_of_surface 3 ] array . all surfaces normal vector must direct to internal . max_num_points_of_surface must at least 3 . num_surfaces : [ num_polygon ] array . indicate how many surfaces a polygon contain Returns : [ num_points num_polygon ] bool array .
def _points_in_convex_polygon_3d_jit(points,
                                    polygon_surfaces,
                                    normal_vec, d,
                                    num_surfaces=None):
    """check points is in 3d convex polygons.
    Args:
        points: [num_points, 3] array.
        polygon_surfaces: [num_polygon, max_num_surfaces, 
            max_num_points_of_surface, 3] 
            array. all surfaces' normal vector must direct to internal.
            max_num_points_of_surface must at least 3.
        num_surfaces: [num_polygon] array. indicate how many surfaces 
            a polygon contain
    Returns:
        [num_points, num_polygon] bool array.
    """
    max_num_surfaces, max_num_points_of_surface = polygon_surfaces.shape[1:3]
    num_points = points.shape[0]
    num_polygons = polygon_surfaces.shape[0]
    ret = np.ones((num_points, num_polygons), dtype=np.bool_)
    sign = 0.0
    for i in range(num_points):
        for j in range(num_polygons):
            for k in range(max_num_surfaces):
                if k > num_surfaces[j]:
                    break
                sign = points[i, 0] * normal_vec[j, k, 0] \
                     + points[i, 1] * normal_vec[j, k, 1] \
                     + points[i, 2] * normal_vec[j, k, 2] + d[j, k]
                if sign >= 0:
                    ret[i, j] = False
                    break
    return ret
def _points_in_convex_polygon_3d_jit ( points , polygon_surfaces , normal_vec , d , num_surfaces = None ) : max_num_surfaces , max_num_points_of_surface = polygon_surfaces . shape [ 1 : 3 ] num_points = points . shape [ 0 ] num_polygons = polygon_surfaces . shape [ 0 ] ret = np . ones ( ( num_points , num_polygons ) , dtype = np . bool_ ) sign = 0.0 for i in range ( num_points ) : for j in range ( num_polygons ) : for k in range ( max_num_surfaces ) : if k > num_surfaces [ j ] : break sign = points [ i , 0 ] * normal_vec [ j , k , 0 ] + points [ i , 1 ] * normal_vec [ j , k , 1 ] + points [ i , 2 ] * normal_vec [ j , k , 2 ] + d [ j , k ] if sign >= 0 : ret [ i , j ] = False break return ret