def not_line_intersect(triangles, line, verbose=False): """Determine if a polyline and triangle overlap """ line = ensure_numeric(line) triangles = ensure_numeric(triangles) M = triangles.shape[0]/3 # Number of triangles indices = num.zeros(M, num.int) count = _line_intersect(line, triangles, indices) if verbose: log.critical('Found %d triangles (out of %d) that intersect the line' % (count, M)) return indices[count:]
def line_intersect(triangles, line, verbose=False): """Determine which of a list of trianglee intersect a line """ line = ensure_numeric(line) triangles = ensure_numeric(triangles) M = triangles.shape[0]/3 # Number of triangles indices = num.zeros(M, num.int) count = _line_intersect(line, triangles, indices) if verbose: log.critical('Found %d triangles (out of %d) that intersect line' % (count, M)) return indices[:count]
def not_line_intersect(triangles, line, verbose=False): """Determine if a polyline and triangle overlap """ line = ensure_numeric(line) triangles = ensure_numeric(triangles) M = triangles.shape[0] / 3 # Number of triangles indices = num.zeros(M, num.int) count = _line_intersect(line, triangles, indices) if verbose: log.critical('Found %d triangles (out of %d) that intersect the line' % (count, M)) return indices[count:]
def line_intersect(triangles, line, verbose=False): """Determine which of a list of trianglee intersect a line """ line = ensure_numeric(line) triangles = ensure_numeric(triangles) M = triangles.shape[0] / 3 # Number of triangles indices = num.zeros(M, num.int) count = _line_intersect(line, triangles, indices) if verbose: log.critical('Found %d triangles (out of %d) that intersect line' % (count, M)) return indices[:count]