{-# LANGUAGE OverloadedStrings #-}
module Graphics.Formats.STL.Types
(
STL(..),
Triangle(..),
Vector,
triple,
) where
import qualified Data.ByteString as BS
data STL = STL
{ STL -> ByteString
name :: BS.ByteString
, STL -> [Triangle]
triangles :: [Triangle]
}
data Triangle = Triangle
{ Triangle -> Maybe Vector
normal :: Maybe Vector
, Triangle -> (Vector, Vector, Vector)
vertices :: (Vector, Vector, Vector)
}
type Vector = (Float, Float, Float)
triple :: a -> a -> a -> (a, a, a)
triple :: a -> a -> a -> (a, a, a)
triple a
a a
b a
c = (a
a, a
b, a
c)