Commits

bergsoe committed 68d9d89

Input is an enumeration of triangles.

  • Participants
  • Parent commits 9f4e8a5

Comments (0)

Files changed (2)

File src/PaplYaobi.ml

 
 type t
 
+type triangle_t = PaplVector.V3D.triangle_t
+
 external caml_yaobi_build :
   float array -> int -> t = "caml_yaobi_build"
 
   float array -> t ->
   bool = "caml_yaobi_in_collision"
 
-type geom_t = PaplVector.V3D.triangle_geom_t
-
 type transform_t = float array
 
 let build triangles =
-  let buf = Array.make (9 * Array.length triangles) 0. in
+  let buf = Array.make (9 * BatEnum.count triangles) 0. in
   let write_vertex p (x, y, z) =
     buf.(p + 0) <- x;
     buf.(p + 1) <- y;
     write_vertex (p + 6) v2
   in
   let () =
-    Array.iteri
+    BatEnum.iteri
       (fun i t -> write_triangle (9 * i) t)
       triangles
   in

File src/PaplYaobi.mli

 
 type t
 
-type geom_t = PaplVector.V3D.triangle_geom_t
+type triangle_t = PaplVector.V3D.triangle_t
 
 type transform_t
 
-val build : geom_t -> t
+val build : triangle_t BatEnum.t -> t
 
 val to_transform : PaplTransform.SE3.t -> transform_t