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.


Topics - kkl

Pages: 1 2 3 [4]
46
Support / Draw line
« on: February 05, 2013, 10:18:39 am »
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.

47
Support / Multiple screen size issue
« on: January 29, 2013, 04:28:04 pm »
Hi I tried to put 3D object in a fixed location (say the bottom of the screen), but the object's location appears to be different in different devices which has different screen size and density. I tried using reproject2D3D or reproject2D3DWS to put objects in place, but no luck for that. I guess you are using perspective view instead of frustum. Is there any way to sort it out?

48
Support / Texture issue
« on: January 14, 2013, 04:53:17 pm »
Hi I have a texture issue... It somewhat shows the border of the image while the actual one doesn't have it... Hope you guys could help me out..




[attachment deleted by admin]

49
Support / Scaling issue
« on: January 09, 2013, 04:14:45 pm »
Hi, I wanted to scale object in custom factor x and factor y, but I found only scale(float factor) which I think it is scaling factor x and y equally. Is there any simply function to do factor x and y scaling? or I have to do it from ground up by multiplying the matrix?

50
Support / Interact2D issue after camera transformation
« on: December 29, 2012, 08:30:23 am »
Hi I'm working on object following finger touch by Interact2D in android. The reproject2D3D gave unexpected value after I translated the camera. I know the reproject2D3D doesn't take account of camera transformation. Is there any way to get correct location after camera transformation?

Here's the code

Happens when finger touching:
Code: [Select]
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);
}

Move the camera along X axis:
Code: [Select]
Camera cam = renderer.getWorld().getCamera();
cam.moveCamera(cam.getXAxis(), 1);

Creating objects and world:
Code: [Select]
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());

51
Support / Blending issue
« on: December 25, 2012, 03:43:39 pm »
Hi I'm new to opengl and JCPT android. I tried putting in a texture with tranparency, and it shows up in an unexpected way. Did I miss anything? Could anyone show me the proper way to do it?


The code is as followed:


Code: [Select]
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();

Thanks for help ;)

[attachment deleted by admin]

Pages: 1 2 3 [4]