úÎDq?7      !"#$%&'()*+,-./0123456 (C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafelA texture coordinate is a 3D-floating vector. You can access to its components by pattern matching on them: , let TexCoord r s t = TexCoord 0.1 0.2 0.3  That type is strcit and unboxed.(C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafexA point is a single index that references the locations. It s a canonical type that truly represents a polygonal point.(C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafe^A normal is a 3-floating vector. You can access to its components by pattern matching on them: + let Normal nx ny nz = Normal 0.1 0.2 0.3  That type is strict and unboxed.    (C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafe `A location is a 4-floating vector. You can access to its components by pattern matching on them: * let Location x y z w = Location 1 2 3 4  That type is strict and unboxed.    (C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafe#A line index is a pair of indices.  vi vti. vi references the locations and vti& indexes the texture coordinates. If vti == 7 , then that 3 doesn t have texture coordinates associated with.(C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafeZA face gathers several 1 to build up faces. It has a least three vertices&A face index is a triplet of indices.  vi vti vni, is a face that indexes the locations with vi, the texture coordinates with vti and the normals with vni. An index set to 7 means no information. That is, if vni == 7 , then that ( doesn t have a normal associated with.  !"#  !"#  !"# !"# (C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafe8 A stream of 9."89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY"89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY89 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY(C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafe$ÿ 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.$%&'()*$%&'()*$%&'()*$%&'()* (C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableNoneZNThe lexer context. The result of lexing a stream of tokens is this exact type.[ Locations.\Texture coordinates.]Normals.^Points._Lines.`Faces.aCurrent object.bCurrent groups.cCurrent material.dMaterial libraries.eCurrent smoothing group.f The empty Zd. Such a context exists at the beginning of the token stream and gets altered as we consume tokens.g4The lexer function, consuming tokens and yielding a Z.Zh[\]^_`abcdefgiZh[\]^_`abcdefgiZ h[\]^_`abcdefgi(C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableNone- Locations..Texture coordinates./Normals.0Points.1Lines.2Faces.3Material libraries. +,-./012345 +,-./012345 +,-./012345+,-./012345 (C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableNone6 Extract a +% from a Wavefront OBJ formatted file.6666 (C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableNoneZ5  !"#$%&'()*+,-./012364   !"#$%&'()*+,-./0123j   !""##$%&'())*+,-.//012345678 9:;< = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l _ mnwavef_2R6ceg6749uEv0SlEF8nfZCodec.Wavefront.TexCoordCodec.Wavefront.PointCodec.Wavefront.NormalCodec.Wavefront.LocationCodec.Wavefront.LineCodec.Wavefront.FaceCodec.Wavefront.ElementCodec.Wavefront.ObjectCodec.Wavefront.IOCodec.Wavefront.TokenCodec.Wavefront.LexerCodec.WavefrontTexCoord texcoordR texcoordS texcoordTPoint pointLocIndexNormalnorXnorYnorZLocationlocXlocYlocZlocWLine lineIndexA lineIndexB LineIndex lineLocIndexlineTexCoordIndexFace FaceIndex faceLocIndexfaceTexCoordIndex faceNorIndexTriangleQuadElementelObjectelGroupselMtlelSmoothingGroupelValue WavefrontOBJ objLocations objTexCoords objNormals objPointsobjLinesobjFaces objMtlLibsctxtToWavefrontOBJ fromDListfromFilebaseGHC.BaseNothing TokenStreamTokenTknVTknVNTknVTTknPTknLTknFTknGTknO TknMtlLib TknUseMtlTknStokenize analyseResult cleanupTokenslocationnormaltexCoordpointslinesfacegroupsobjectmtllibusemtlsmoothingGroupcomment slashThenElseeolname skipHSpacefloatuntilEndCtxt ctxtLocations ctxtTexCoords ctxtNormals ctxtPoints ctxtLines ctxtFacesctxtCurrentObjectctxtCurrentGroupsctxtCurrentMtl ctxtMtlLibsctxtCurrentSmoothingGroup emptyCtxtlexerprepareElement