-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Wavefront OBJ loader
--   
--   A Wavefront OBJ loader. Currently supports polygonal information. More
--   could be added if needed (like curves and surface) if people
--   contribute. Feel free to help!
@package wavefront
@version 0.7.1


module Codec.Wavefront.TexCoord

-- | A texture coordinate is a 3D-floating vector. You can access to its
--   components by pattern matching on them:
--   
--   <pre>
--   let TexCoord r s t = TexCoord 0.1 0.2 0.3
--   </pre>
--   
--   That type is strcit and unboxed.
data TexCoord
TexCoord :: {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> TexCoord
[texcoordR] :: TexCoord -> {-# UNPACK #-} !Float
[texcoordS] :: TexCoord -> {-# UNPACK #-} !Float
[texcoordT] :: TexCoord -> {-# UNPACK #-} !Float
instance GHC.Show.Show Codec.Wavefront.TexCoord.TexCoord
instance GHC.Classes.Eq Codec.Wavefront.TexCoord.TexCoord


module Codec.Wavefront.Point

-- | A point is a single index that references the locations. It’s a
--   canonical type that truly represents a polygonal point.
data Point
Point :: {-# UNPACK #-} !Int -> Point
[pointLocIndex] :: Point -> {-# UNPACK #-} !Int
instance GHC.Show.Show Codec.Wavefront.Point.Point
instance GHC.Classes.Eq Codec.Wavefront.Point.Point


module Codec.Wavefront.Normal

-- | A normal is a 3-floating vector. You can access to its components by
--   pattern matching on them:
--   
--   <pre>
--   let Normal nx ny nz = Normal 0.1 0.2 0.3
--   </pre>
--   
--   That type is strict and unboxed.
data Normal
Normal :: {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> Normal
[norX] :: Normal -> {-# UNPACK #-} !Float
[norY] :: Normal -> {-# UNPACK #-} !Float
[norZ] :: Normal -> {-# UNPACK #-} !Float
instance GHC.Show.Show Codec.Wavefront.Normal.Normal
instance GHC.Classes.Eq Codec.Wavefront.Normal.Normal


module Codec.Wavefront.Location

-- | A location is a 4-floating vector. You can access to its components by
--   pattern matching on them:
--   
--   <pre>
--   let Location x y z w = Location 1 2 3 4
--   </pre>
--   
--   That type is strict and unboxed.
data Location
Location :: {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> Location
[locX] :: Location -> {-# UNPACK #-} !Float
[locY] :: Location -> {-# UNPACK #-} !Float
[locZ] :: Location -> {-# UNPACK #-} !Float
[locW] :: Location -> {-# UNPACK #-} !Float
instance GHC.Show.Show Codec.Wavefront.Location.Location
instance GHC.Classes.Eq Codec.Wavefront.Location.Location


module Codec.Wavefront.Line

-- | A line index is a pair of indices. <tt><a>LineIndex</a> vi vti</tt>.
--   <tt>vi</tt> references the locations and <tt>vti</tt> indexes the
--   texture coordinates. If <tt>vti == <a>Nothing</a></tt>, then that
--   <a>LineIndex</a> doesn’t have texture coordinates associated with.
data LineIndex
LineIndex :: {-# UNPACK #-} !Int -> !(Maybe Int) -> LineIndex
[lineLocIndex] :: LineIndex -> {-# UNPACK #-} !Int
[lineTexCoordIndex] :: LineIndex -> !(Maybe Int)
data Line
Line :: LineIndex -> LineIndex -> Line
[lineIndexA] :: Line -> LineIndex
[lineIndexB] :: Line -> LineIndex
instance GHC.Show.Show Codec.Wavefront.Line.Line
instance GHC.Classes.Eq Codec.Wavefront.Line.Line
instance GHC.Show.Show Codec.Wavefront.Line.LineIndex
instance GHC.Classes.Eq Codec.Wavefront.Line.LineIndex


module Codec.Wavefront.Face

-- | A face index is a triplet of indices. <tt><a>FaceIndex</a> vi vti
--   vni</tt> is a face that indexes the locations with <tt>vi</tt>, the
--   texture coordinates with <tt>vti</tt> and the normals with
--   <tt>vni</tt>. An index set to <a>Nothing</a> means <i>no
--   information</i>. That is, if <tt>vni == <a>Nothing</a></tt>, then that
--   <a>FaceIndex</a> doesn’t have a normal associated with.
data FaceIndex
FaceIndex :: {-# UNPACK #-} !Int -> !(Maybe Int) -> !(Maybe Int) -> FaceIndex
[faceLocIndex] :: FaceIndex -> {-# UNPACK #-} !Int
[faceTexCoordIndex] :: FaceIndex -> !(Maybe Int)
[faceNorIndex] :: FaceIndex -> !(Maybe Int)

-- | A face gathers several <a>FaceIndex</a> to build up faces. It has a
--   least three vertices
data Face
Face :: FaceIndex -> FaceIndex -> FaceIndex -> [FaceIndex] -> Face
instance GHC.Show.Show Codec.Wavefront.Face.Face
instance GHC.Classes.Eq Codec.Wavefront.Face.Face
instance GHC.Show.Show Codec.Wavefront.Face.FaceIndex
instance GHC.Classes.Eq Codec.Wavefront.Face.FaceIndex


module Codec.Wavefront.Element

-- | An element holds a value along with the user-defined object’s name (if
--   any), the associated groups, the used material and the smoothing group
--   the element belongs to (if any). Those values can be used to sort the
--   data per object or per group and to lookup materials.
data Element a
Element :: Maybe Text -> [Text] -> Maybe Text -> Natural -> a -> Element a
[elObject] :: Element a -> Maybe Text
[elGroups] :: Element a -> [Text]
[elMtl] :: Element a -> Maybe Text
[elSmoothingGroup] :: Element a -> Natural
[elValue] :: Element a -> a
instance GHC.Show.Show a => GHC.Show.Show (Codec.Wavefront.Element.Element a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Codec.Wavefront.Element.Element a)


module Codec.Wavefront.Object
data WavefrontOBJ
WavefrontOBJ :: Vector Location -> Vector TexCoord -> Vector Normal -> Vector (Element Point) -> Vector (Element Line) -> Vector (Element Face) -> Vector Text -> WavefrontOBJ

-- | Locations.
[objLocations] :: WavefrontOBJ -> Vector Location

-- | Texture coordinates.
[objTexCoords] :: WavefrontOBJ -> Vector TexCoord

-- | Normals.
[objNormals] :: WavefrontOBJ -> Vector Normal

-- | Points.
[objPoints] :: WavefrontOBJ -> Vector (Element Point)

-- | Lines.
[objLines] :: WavefrontOBJ -> Vector (Element Line)

-- | Faces.
[objFaces] :: WavefrontOBJ -> Vector (Element Face)

-- | Material libraries.
[objMtlLibs] :: WavefrontOBJ -> Vector Text
ctxtToWavefrontOBJ :: Ctxt -> WavefrontOBJ
fromDList :: DList a -> Vector a
instance GHC.Show.Show Codec.Wavefront.Object.WavefrontOBJ
instance GHC.Classes.Eq Codec.Wavefront.Object.WavefrontOBJ


module Codec.Wavefront.IO

-- | Extract a <a>WavefrontOBJ</a> from a Wavefront OBJ formatted file.
fromFile :: (MonadIO m) => FilePath -> m (Either String WavefrontOBJ)


-- | Currently, you can parse a file and get a <a>WavefrontOBJ</a> with the
--   <a>fromFile</a> function.
module Codec.Wavefront

-- | A location is a 4-floating vector. You can access to its components by
--   pattern matching on them:
--   
--   <pre>
--   let Location x y z w = Location 1 2 3 4
--   </pre>
--   
--   That type is strict and unboxed.
data Location
Location :: {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> Location
[locX] :: Location -> {-# UNPACK #-} !Float
[locY] :: Location -> {-# UNPACK #-} !Float
[locZ] :: Location -> {-# UNPACK #-} !Float
[locW] :: Location -> {-# UNPACK #-} !Float

-- | A texture coordinate is a 3D-floating vector. You can access to its
--   components by pattern matching on them:
--   
--   <pre>
--   let TexCoord r s t = TexCoord 0.1 0.2 0.3
--   </pre>
--   
--   That type is strcit and unboxed.
data TexCoord
TexCoord :: {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> TexCoord
[texcoordR] :: TexCoord -> {-# UNPACK #-} !Float
[texcoordS] :: TexCoord -> {-# UNPACK #-} !Float
[texcoordT] :: TexCoord -> {-# UNPACK #-} !Float

-- | A normal is a 3-floating vector. You can access to its components by
--   pattern matching on them:
--   
--   <pre>
--   let Normal nx ny nz = Normal 0.1 0.2 0.3
--   </pre>
--   
--   That type is strict and unboxed.
data Normal
Normal :: {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> {-# UNPACK #-} !Float -> Normal
[norX] :: Normal -> {-# UNPACK #-} !Float
[norY] :: Normal -> {-# UNPACK #-} !Float
[norZ] :: Normal -> {-# UNPACK #-} !Float

-- | A point is a single index that references the locations. It’s a
--   canonical type that truly represents a polygonal point.
data Point
Point :: {-# UNPACK #-} !Int -> Point
[pointLocIndex] :: Point -> {-# UNPACK #-} !Int
data Line
Line :: LineIndex -> LineIndex -> Line
[lineIndexA] :: Line -> LineIndex
[lineIndexB] :: Line -> LineIndex

-- | A line index is a pair of indices. <tt><a>LineIndex</a> vi vti</tt>.
--   <tt>vi</tt> references the locations and <tt>vti</tt> indexes the
--   texture coordinates. If <tt>vti == <a>Nothing</a></tt>, then that
--   <a>LineIndex</a> doesn’t have texture coordinates associated with.
data LineIndex
LineIndex :: {-# UNPACK #-} !Int -> !(Maybe Int) -> LineIndex
[lineLocIndex] :: LineIndex -> {-# UNPACK #-} !Int
[lineTexCoordIndex] :: LineIndex -> !(Maybe Int)

-- | A face gathers several <a>FaceIndex</a> to build up faces. It has a
--   least three vertices
data Face
Face :: FaceIndex -> FaceIndex -> FaceIndex -> [FaceIndex] -> Face

-- | A face index is a triplet of indices. <tt><a>FaceIndex</a> vi vti
--   vni</tt> is a face that indexes the locations with <tt>vi</tt>, the
--   texture coordinates with <tt>vti</tt> and the normals with
--   <tt>vni</tt>. An index set to <a>Nothing</a> means <i>no
--   information</i>. That is, if <tt>vni == <a>Nothing</a></tt>, then that
--   <a>FaceIndex</a> doesn’t have a normal associated with.
data FaceIndex
FaceIndex :: {-# UNPACK #-} !Int -> !(Maybe Int) -> !(Maybe Int) -> FaceIndex
[faceLocIndex] :: FaceIndex -> {-# UNPACK #-} !Int
[faceTexCoordIndex] :: FaceIndex -> !(Maybe Int)
[faceNorIndex] :: FaceIndex -> !(Maybe Int)

-- | An element holds a value along with the user-defined object’s name (if
--   any), the associated groups, the used material and the smoothing group
--   the element belongs to (if any). Those values can be used to sort the
--   data per object or per group and to lookup materials.
data Element a
Element :: Maybe Text -> [Text] -> Maybe Text -> Natural -> a -> Element a
[elObject] :: Element a -> Maybe Text
[elGroups] :: Element a -> [Text]
[elMtl] :: Element a -> Maybe Text
[elSmoothingGroup] :: Element a -> Natural
[elValue] :: Element a -> a
data WavefrontOBJ
WavefrontOBJ :: Vector Location -> Vector TexCoord -> Vector Normal -> Vector (Element Point) -> Vector (Element Line) -> Vector (Element Face) -> Vector Text -> WavefrontOBJ

-- | Locations.
[objLocations] :: WavefrontOBJ -> Vector Location

-- | Texture coordinates.
[objTexCoords] :: WavefrontOBJ -> Vector TexCoord

-- | Normals.
[objNormals] :: WavefrontOBJ -> Vector Normal

-- | Points.
[objPoints] :: WavefrontOBJ -> Vector (Element Point)

-- | Lines.
[objLines] :: WavefrontOBJ -> Vector (Element Line)

-- | Faces.
[objFaces] :: WavefrontOBJ -> Vector (Element Face)

-- | Material libraries.
[objMtlLibs] :: WavefrontOBJ -> Vector Text
