1. bergsoe
  2. papl

Commits

bergsoe  committed 53aa746

2D and 3D triangles and triangle soups

  • Participants
  • Parent commits 03961db
  • Branches master

Comments (0)

Files changed (2)

File src/PaplVector.ml

View file
  • Ignore whitespace
   include Base
   include (MakeDot (Base) (V2DOp) : DOT with type t := t)
 
+  type triangle_t = t * t * t
+  type triangle_geom_t = triangle_t array
+
   module Random = MakeRandom (Base) (V2DOp)
   module Sampler = MakeSampler (Base) (V2DOp)
 
 module V3D = struct
   include MakeAll(V3DOp)
 
+  type triangle_t = t * t * t
+  type triangle_geom_t = triangle_t array
+
   let cross (a0, b0, c0) (a1, b1, c1) =
     b0 *. c1 -. b1 *. c0,
     a1 *. c0 -. a0 *. c1,

File src/PaplVector.mli

View file
  • Ignore whitespace
 (** {2 2D vectors} *)
 
 (** 2-tuples as vectors. *)
-module V2D : ALL with type t = float * float
+module V2D : sig
+  include ALL with type t = float * float
+
+  type triangle_t = t * t * t
+  type triangle_geom_t = triangle_t array
+end
 
 (** {2 3D vectors} *)
 
 module V3D : sig
   include ALL with type t = float * float * float
 
+  type triangle_t = t * t * t
+  type triangle_geom_t = triangle_t array
+
   val cross : t -> t -> t
 end