úÎCw>©%      !"#$ (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> experimentalportableSafeA line is a pair of indexes.  vi vti. vi references the locations and vti& indexes the texture coordinates. If vti == ) , then that 3 doesn t have texture coordinates associated with.Keep in mind that } doesn t represent a polygonal line directly. It represents a line index, which is a pair. In theory, a polygonal line is 2 s.***(C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafe A face 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 ) means no information. That is, if vni == ) , then that ( doesn t have a normal associated with.Keep in mind that € doesn t represent a polygonal face directly. It represents a face index, which is a triplet. In theory, a polygonal face is 3 s.+++ (C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafe, A stream of -. ,-./0123456789:;<=>?@ABCDEFGHIJK ,-./0123456789:;<=>?@ABCDEFGHIJK,- ./0123456789:;<=>?@ABCDEFGHIJK (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 exists), the associated groups and the used material. Those values can be used to sort the data per object or per group and to lookup materials.LLL (C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableNone MNThe lexer context. The result of lexing a stream of tokens is this exact type.N Locations.OTexture coordinates.PNormals.QPoints.RLines.SFaces.TCurrent object.UCurrent groups.VCurrent material.WMaterial libraries.X The empty Md. Such a context exists at the beginning of the token stream and gets altered as we consume tokens.Y4The lexer function, consuming tokens and yielding a M.MZNOPQRSTUVWXY[MZNOPQRSTUVWXY[M ZNOPQRSTUVWXY[ (C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableNone Locations.Texture coordinates.Normals. Points.!Lines."Faces.#Material libraries.  !"#\]  !"#\] !"#\](C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableNone$ Extract a % from a Wavefront OBJ formatted file.$$$$(C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableNone%  !"#$8     !"#^  !" # $ % & ' ( ( ) * + , - . /0 123 4 5 6 7 8 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 [ \ ] ^ _ ` T a b cdwavef_EYWojuRRMwP6gyZyjP3upaCodec.WavefrontCodec.Wavefront.IOCodec.Wavefront.TexCoordCodec.Wavefront.PointCodec.Wavefront.NormalCodec.Wavefront.LocationCodec.Wavefront.LineCodec.Wavefront.FaceCodec.Wavefront.TokenCodec.Wavefront.ElementCodec.Wavefront.LexerCodec.Wavefront.ObjectTexCoord texcoordR texcoordS texcoordTPoint pointLocIndexNormalnorXnorYnorZLocationlocXlocYlocZlocWLine lineLocIndexlineTexCoordIndexFace faceLocIndexfaceTexCoordIndex faceNorIndexElementelObjectelGroupselMtlelValue WavefrontOBJ objLocations objTexCoords objNormals objPointsobjLinesobjFaces objMtlLibsfromFilebaseGHC.BaseNothing TokenStreamTokenTknVTknVNTknVTTknPTknLTknFTknGTknO TknMtlLib TknUseMtltokenize analyseResult cleanupTokenslocationnormaltexCoordpointslinesfacesgroupsobjectmtllibusemtlcomment slashThenElseeolname skipHSpacefloatuntilEndCtxt ctxtLocations ctxtTexCoords ctxtNormals ctxtPoints ctxtLines ctxtFacesctxtCurrentObjectctxtCurrentGroupsctxtCurrentMtl ctxtMtlLibs emptyCtxtlexerprepareElementctxtToWavefrontOBJ fromDList