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.

Messages - kkl

Pages: 1 ... 17 18 [19] 20
Support / Re: Draw line
« on: February 05, 2013, 03:17:26 pm »
Sorry, my bad... I was using the old library in my another pc... Din't notice there was an update. Thanks.

Support / Re: Multiple screen size issue
« on: February 05, 2013, 03:15:46 pm »
Ok. Thanks alot for the help. Appreciate it.

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.

Support / Re: Multiple screen size issue
« on: February 05, 2013, 10:08:00 am »
Scale factor for objects... I tried different devices, it seems like it scales correctly. Just need to double confirm if I need to calculate object scale factor by different screen size.

Support / Re: Multiple screen size issue
« on: February 03, 2013, 05:15:36 pm »
Okay... I got it by using ratio of the screen size~ Thanx alot... Just wondering, if I have to calculate the location of the screen by myself, do I calculate the scale factor based on screen size too?

Support / Re: Multiple screen size issue
« on: January 31, 2013, 05:59:24 pm »
I thought the reproject2D3DWS handles all the screen size n resolution issue? How should I adjust the fixed x and y? Sorry for all the troubles.. Still new in graphic field

Support / Re: Multiple screen size issue
« on: January 31, 2013, 05:49:05 pm »
Hi thanks for the improved library... It does help alot ;) Unfortunately, I still get the same issue..

Here's the code:
Code: [Select]
Camera cam = world.getCamera();
cam.moveCamera(Camera.CAMERA_MOVEOUT, 50f);
cam.lookAt(new SimpleVector(0, 0, 0));

SimpleVector v3 = Interact2D.reproject2D3DWS(world.getCamera(), frame, 200, 650, 50f);
object.translate(v3.x, v3.y, 0);

[attachment deleted by admin]

Support / Re: Multiple screen size issue
« on: January 30, 2013, 05:45:42 pm »
Sorry for the confusion. What I meant was that, by guessing, JPCT is using gluPerspective (uses FOV) for camera view instead of glFrustum. I have experience in using glFrustum, but I haven't tried the one with FOV before. Since the vertical FOV is adjusted automatically, perhaps that is the cause of incorrect position?

I tried reproject2D3DWS to place object at fixed location, by doing the following:

Code: [Select]
SimpleVector tempVec = Interact2D.reproject2D3DWS(camera, buffer, x, y).normalize();
float ratio = tempVec.z / 50f;
float vx = tempVec.x / ratio;
float vy = tempVec.y / ratio;
float vz = tempVec.z / ratio;
SimpleVector v3 = new SimpleVector(vx, vy, vz);
object.translate(v3.x, v3.y, 0);
The reason I divide the 50f is that I set the camera move out for 50f from origin. I use the normalized vector to find coordinates at the origin along the vector from the camera. In S2, the object is properly aligned at the bottom of the screen, but when I put it in S3 which has bigger screen, the object hanged in the middle and does not align to the bottom.

Am I doing it right or I missed anything?

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?

Support / Re: Texture issue
« on: January 19, 2013, 07:44:40 am »
Thanx alot~ It's fine now.. Cheers~

Support / Re: Texture issue
« on: January 15, 2013, 03:37:31 pm »
Ok, I got it worked... Thanx for your help. Really appreciate it.

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]

Support / Re: Scaling issue
« on: January 10, 2013, 01:35:10 pm »
I just tried the static scaling... It worked!! But I haven't go through the dynamic scaling yet... Will keep you posted. Thanx ;)

Support / Re: Scaling issue
« on: January 09, 2013, 05:15:07 pm »
Both... On one side, I would like to scale a plane from square to rectangle shape. I guess this would be the static one. On the other side, I want to scale 3D object dynamically to create sort of cartoon effect (e.g. ball bouncing effect). How shall I do it?

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?

Pages: 1 ... 17 18 [19] 20