| Copyright | (C) 2015 Dimitri Sabadie |
|---|---|
| License | BSD3 |
| Maintainer | Dimitri Sabadie <dimitri.sabadie@gmail.com> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Codec.Wavefront.Object
Description
- data Ctxt = Ctxt {
- ctxtName :: Maybe Text
- ctxtLocations :: DList Location
- ctxtTexCoords :: DList TexCoord
- ctxtNormals :: DList Normal
- ctxtPoints :: DList (Element Point)
- ctxtLines :: DList (Element Line)
- ctxtFaces :: DList (Element Face)
- ctxtCurrentObject :: Maybe Text
- ctxtCurrentGroups :: [Text]
- ctxtCurrentMtl :: Maybe Text
- ctxtMtlLibs :: DList Text
- emptyCtxt :: Ctxt
- data Element a = Element {}
- lexer :: TokenStream -> Ctxt
- type WavefrontOBJ = Ctxt
Context and elements
The lexer context. The result of lexing a stream of tokens is this exact type.
Constructors
| Ctxt | |
Fields
| |
The empty Ctxt. Such a context exists at the beginning of the token stream and gets altered
as we consume tokens.
An element holds a value along with the user-defined object’s name (if exists), the associated groups and the used material.
Constructors
| Element | |
Wavefront OBJ
type WavefrontOBJ = Ctxt Source
Wavefront OBJ type.