6
« on: December 09, 2014, 06:05:13 am »
Hai, i have 3ds file and when i render it with jpct-ae i can see the object not render perfectly.. this my code:
world = new World();
world.setAmbientLight(30, 30, 30);
sun = new Light(world);
sun.setIntensity(255, 255, 255);
// Create a texture out of the icon...:-)
TextureManager txtMgr = TextureManager.getInstance();
if (!txtMgr.containsTexture("BURJ_AL_.JPG")) {
Texture texture = new Texture(BitmapHelper.rescale(
BitmapHelper.convert(mActivity.getResources().getDrawable(R.drawable.burj_al_arab_map)), 512, 512));
txtMgr.addTexture("BURJ_AL_.JPG", texture);
}
Context mContext =mActivity.getApplicationContext();
InputStream stream = null;
try {
stream = mContext.getAssets().open("burj_al_arab.3DS");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//cube = Primitives.getCylinder(20, 80);
cube=Loader.load3DS(stream, 1f)[0];
cube.setCulling(false);
cube.strip();
cube.build();
world.addObject(cube);
I attach pic of screen shot.