(****************************************************************************** ** GEOMETRY_PRIMS.sml ** sml ** ** Guy Blelloch ** The GEOMETRY_PRIMS signature ** A set of primitives that need to be defined in order to create a geometry ** structure with the MakeGeometry functor ******************************************************************************) signature GEOMETRY_PRIMS = sig structure Number : NUMBER structure Vec : VEC where Number = Number val minCoords : Vec.t * Vec.t -> Vec.t val maxCoords : Vec.t * Vec.t -> Vec.t type plane val planeNormal : plane -> Vec.t val planeDistance : plane -> Vec.t -> Number.t val planeSide : plane -> Vec.t -> Side.t val planeFromPoints : (Vec.t Sequence.seq) -> plane val planeFromNormal : (Vec.t * Vec.t) -> plane val planeEqual : plane * plane -> bool val planeInvert : plane -> plane val planeToString : plane -> string type sphere val sphereSide : sphere -> Vec.t -> Side.t val sphereFromPoints : (Vec.t Sequence.seq) -> sphere end