-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A parser for simplified-syntax OFF files
--
-- A simple datatype and parser for 3D OFF files, loosely based on
-- http://people.sc.fsu.edu/~jburkardt/data/off/off.html, but uses
-- the file header to determine whether the object's faces contain color
-- values.
@package off-simple
@version 0.1
-- | A simple datatype and parser for 3D OFF files. A single type is used
-- for OFF information with or without color. Loosely based on
-- http://people.sc.fsu.edu/~jburkardt/data/off/off.html, but uses
-- the file header to determine whether the object's faces contain color
-- values.
module Graphics.Formats.OFF.Simple
-- | Representation of an object in OFF format; a pair of vectors
-- containing the vertices and the faces of the object.
data OFF
OFF :: Vector Vertex -> Vector Face -> OFF
vertices :: OFF -> Vector Vertex
faces :: OFF -> Vector Face
-- | A face is a vector of vertex indices and an optional color value.
data Face
Face :: (Vector Int) -> (Maybe Color) -> Face
-- | The number of vertices in an OFF object.
vertexCount :: OFF -> Int
-- | The number of faces in an OFF object.
faceCount :: OFF -> Int
-- | Returns True if the OFF object has color values
-- associated with its faces.
hasColor :: OFF -> Bool
-- | Parse a Text string representing an OFF object.
parseOFF :: Parser OFF
-- | Read an OFF object from the given FilePath, returning either
-- the corresponding OFF value or a ParseError.
readOFFFile :: FilePath -> IO (Either ParseError OFF)
instance Show Face
instance Eq Face
instance Ord Face
instance Show OFF
instance Eq OFF
instance Ord OFF