how to add 3d models dynamically in glsurface view renderer in android

扶醉桌前 提交于 2019-12-08 12:13:13

问题


In my Augmented reality application I need to render 3D model over a marker. with predefined/ initialized 3d model i can show teapot over a marker detecion. but now I want to replace it with another 3d model dynamically from sd card on some trigger event like button click. is there any suggestion or guideline how i can implement it? I am using JPCT-AE for 3d models.

Thanx


回答1:


After so much research and trial and errors finally i got it to work. When I asked this question I wanted to display 3d model over marker dynamically by downloading it from remote server on SD card and then render it. you could do it using Rajawali api like this

getCurrentScene().removeChild(myCurrentObj);
ObjParser parser = new ObjParser(this, 'mydir\myfile.obj');
parser.parse();
getCurrentScene().addChild(parser.getParsedObject());


来源:https://stackoverflow.com/questions/16900549/how-to-add-3d-models-dynamically-in-glsurface-view-renderer-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!