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; //w w w.j av a 2 s . c o m import com.min3d.lib.IParser; import com.min3d.lib.Parser; import com.min3d.lib.core.Object3dContainer; import com.min3d.lib.core.RendererActivity; import com.min3d.lib.vos.Light; /** * How to load a model from a .obj file * * @author dennis.ippel * */ public class ExampleLoadObjFile extends RendererActivity { private Object3dContainer objModel; @Override public void initScene() { scene.lights().add(new Light()); IParser parser = Parser.createParser(Parser.Type.OBJ, getResources(), R.raw.camaro2_obj, getPackageName(), true); parser.parse(); objModel = parser.getParsedObject(); objModel.scale().x = objModel.scale().y = objModel.scale().z = .7f; scene.addChild(objModel); } @Override public void updateScene() { objModel.rotation().x++; objModel.rotation().z++; } }