Load Md2 Model in android using JPCT Engine
by mariganesh[ Edit ] 2014-02-21 12:57:33
Load Md2 Model in android using JPCT Engine
The following codes are explain how to add snork(3d toy) in android.
/* Create texture for grass */
private World world = null;
private Object3D grass = null;
world = new World();//intialize full screen
TextureManager tm = TextureManager.getInstance();
Texture disco = new Texture(res.openRawResource(R.raw.disco));
tm.addTexture("disco", disco); // add texture
snork = Loader.loadMD2(res.openRawResource(R.raw.snork), 5f);
snork.getMesh().cloneMesh(true);
snork.translate(-100, -85, -50);
snork.setTexture("disco");
world.addObject(snork); //add snork to screen