46
I tried to use Polyline in jpct for java, but the class is not found. Is it available in jpct-java? I found it in jpct-java doc and jpct-ae though.
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.
public void onTouch(MotionEvent e) {
Camera cam = world.getCamera();
SimpleVector rayTemp = Interact2D.reproject2D3D(cam, frame, (int)e.getX(), (int)e.getY(), 50f);
rayTemp.z = 0;
plane.setOrigin(rayTemp);
}
Camera cam = renderer.getWorld().getCamera();
cam.moveCamera(cam.getXAxis(), 1);
frame = new FrameBuffer(gl, width, height);
world = new World();
world.setAmbientLight(10, 10, 10);
sun = new Light(world);
sun.setIntensity(255, 255, 255);
Texture texture = new Texture(BitmapHelper.convert(context.getResources().getDrawable(R.drawable.test3)), true);
TextureManager.getInstance().addTexture("texture", texture);
texture.setClamping(true);
plane = Primitives.getPlane(20, 2);
//cube.calcTextureWrapSpherical();
plane.setTexture("texture");
plane.setTransparency(0);
plane.build();
world.addObject(plane);
Camera cam = world.getCamera();
cam.moveCamera(Camera.CAMERA_MOVEOUT, 50);
cam.lookAt(plane.getTransformedCenter());
Config.glTransparencyMul = 1f;
Config.glTransparencyOffset = 1f;
frame = new FrameBuffer(gl, width, height);
world = new World();
world.setAmbientLight(20, 20, 20);
sun = new Light(world);
sun.setIntensity(250, 250, 250);
// Create a texture out of the icon...:-)
Texture texture = new Texture(BitmapHelper.rescale(BitmapHelper.convert(context.getResources().getDrawable(R.drawable.ic_launcher)), 64, 64));
TextureManager.getInstance().addTexture("texture", texture);
texture.setClamping(true);
plane = Primitives.getPlane(3, 10);
// cube.calcTextureWrapSpherical();
plane.setTexture("texture");
plane.setTransparency(0);
plane.strip();
plane.build();