type surface_result = { color: Point.t; kd: float; ks: float; phong: float } type surface_function = SurfFun of (int -> float -> float -> surface_result) | SurfConst of surface_result | SurfArray of surface_result array type base_object_kind = Cone | Cube | Cylinder | Plane | Sphere type base_object = { kind: base_object_kind; surf: surface_function; world2obj: Matrix.t; obj2world: Matrix.t; max_scale_applied : float; } type obj_desc = Base of base_object | Union of t * t | Intersection of t * t | Difference of t * t | Null and t = { desc : obj_desc; center : Point.t; radius : float; } val print_base_object : base_object -> unit val not_computed : Point.t val obj_template : t val cone: surface_function -> t val cube: surface_function -> t val cylinder: surface_function -> t val plane: surface_function -> t val sphere: surface_function -> t val rotatex: t -> float -> t val rotatey: t -> float -> t val rotatez: t -> float -> t val scale: t -> float -> float -> float -> t val uscale: t -> float -> t val translate: t -> float -> float -> float -> t val difference: t -> t -> t val intersect: t -> t -> t val union: t -> t -> t (* Return a normal unit vector at the given point on the given object. The point and the normal vector are in world coordinates. *) val normal_vector: base_object -> Point.t -> int -> Vector.t