Back to project page min3d.
The source code is released under:
MIT License
If you think the Android project min3d listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.min3d.lib; //w ww . j ava2 s.c o m import android.content.res.Resources; /** * Parser factory class. Specify the parser type and the corresponding * specialized class will be returned. * @author dennis.ippel * */ public class Parser { /** * Parser types enum * @author dennis.ippel * */ public static enum Type { OBJ, MAX_3DS, MD2 }; /** * Create a parser of the specified type. * @param type * @param resources * @param resourceID * @return */ public static IParser createParser(Type type, Resources resources, int resourceID, String packageID, boolean generateMipMap) { switch(type) { case OBJ: return new ObjParser(resources, resourceID, packageID, generateMipMap); case MAX_3DS: return new Max3DSParser(resources, resourceID, packageID, generateMipMap); case MD2: return new MD2Parser(resources, resourceID, packageID, generateMipMap); } return null; } }