type vec = float * float * floattype box = {x0 : float;y0 : float;z0 : float;x1 : float;y1 : float;z1 : float;
}type segment = {box : box;rgb : int * int * int;light : float;
}type side = {axis : int;positive : bool;
}type quad = {corners : vec list;normal : vec;side : side;
}type opening = {into : int;quad : quad;
}type level = {segments : segment array;walls : quad list array;openings : opening list array;start : vec;exit : int;
}val segment_at : level -> vec -> int optionval inside : level -> radius:float -> vec -> bool