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