www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Darkflame on July 13, 2010, 05:00:02 pm

Title: Possibly to download/display a mesh at runtime?
Post by: Darkflame on July 13, 2010, 05:00:02 pm
Is it possible to download a mesh (say, OBJ or 3DS) at runtime and use this in a scene?

I assume you'd have to pre-download and then use it as a input-stream for Loader.load3DS, but I have no idea how to do this, or if its even possible.

Sorry if this has been asked before, btw, I tried searching but couldn't see anything.
Thanks,
Thomas
Title: Re: Possibly to download/display a mesh at runtime?
Post by: EgonOlsen on July 13, 2010, 10:24:47 pm
Never tried it on Android, but in "normal" Java, you can simply get an InputStream from an URLConnection. Should be possible on Android too.

Edit: I think you have to allow the Activity to access the web before this is possible though.
Title: Re: Possibly to download/display a mesh at runtime?
Post by: Darkflame on July 14, 2010, 02:21:30 am
Oh, if thats the case, its much easier then I expected :)
I already gave my app internet permissions. (to stream the locations of some 3d objects to the field of view).

Thanks.