Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="quad2triangle"></param>
        public ObjVNFParser(bool quad2triangle)
        {
            var generality     = new GeneralityParser();
            var meshParser     = new MeshParser();
            var normalParser   = new NormalParser();
            var texCoordParser = new TexCoordParser();
            var locationParser = new LocationParser();

            if (quad2triangle)
            {
                this.parserList = new ObjParserBase[] { generality, meshParser, normalParser, texCoordParser, new Quad2TriangleParser(), locationParser, };
            }
            else
            {
                this.parserList = new ObjParserBase[] { generality, meshParser, normalParser, texCoordParser, locationParser, };
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="quad2triangle"></param>
        /// <param name="reverseNormal"></param>
        public ObjVNFParser(bool quad2triangle = true, bool reverseNormal = false)
        {
            var generalityParser = new GeneralityParser();
            var meshParser       = new MeshParser();
            var normalParser     = new NormalParser();
            var texCoordParser   = new TexCoordParser();
            var tangentParser    = new TangentParser();
            var locationParser   = new LocationParser();
            var list             = new List <ObjParserBase>();

            list.Add(new GeneralityParser());
            list.Add(new MeshParser());
            list.Add(new NormalParser(reverseNormal));
            list.Add(new TexCoordParser());
            if (quad2triangle)
            {
                list.Add(new Quad2TriangleParser());
            }
            list.Add(new TangentParser());
            list.Add(new LocationParser());

            this.parserList = list.ToArray();
        }