Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - trn173

#1
Support / sphere texture inside
November 18, 2013, 03:51:25 AM
Hi everybody!

This is my first jpct project.I wanna develop panorama project.I use sphere object3d.I didnt understand "how i use camere inside my object3d(sphere)?" and "how i reverse sphere texture for panoramic picture?".

this is my code

Texture texture1 = new Texture(BitmapHelper.rescale(BitmapHelper.convert(getResources().getDrawable(R.drawable.stest)), 1024,512));
TextureManager.getInstance().addTexture("texture", texture1);

cube = Primitives.getSphere(100);
//cube.calcTextureWrapSpherical();
cube.setTexture("texture");
cube.setCulling(false);
cube.build();

world = new World();
world.setAmbientLight(200,200,200);

world.addObject(cube);

Camera camera = world.getCamera();
camera.moveCamera( Camera.CAMERA_MOVEOUT, 30 );
//camera.setPosition( mSphere.getTransformedCenter() );
camera.lookAt( cube.getTransformedCenter());
//camera.moveCamera(Camera.CAMERA_MOVEIN, 5);


if i didnt use "calcTextureWrapSpherical", sphere not show,


kind rigards