问题
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