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

Pages: [1]
1
Support / How to get the "up" - part of the camera?
« on: September 21, 2006, 05:29:37 pm »
Hi,

a camera in 3d space can be defined by position, direction and up (the orientation). I found no way to access this up information in JPCT, and this is especially missing in the camera.lookAt(obj) method.

I need this for implementing a camera that can be rotated around a given object with the mouse. I wrote the following code for rotating around a object at the x axis:

Code: [Select]

      SimpleVector obj = object.getTransformedCenter();
      SimpleVector cam = camera.getPosition();
      SimpleVector v = cam.calcSub(obj);      
      Matrix m = new Matrix();
      m.rotateX(dx);
      v.matMul(m);
      v.add(obj);
      camera.setPosition(v);
      camera.lookAt(obj);


When I rotate around an object this way, the orientation flips around (upside-down) when I get close to a 180 degree rotation.

I think that this information is somehow stored in the camera.getBack() rotation matrix, but the math part of my has been shrunken since school  :oops:

By the way, did anyone use quaternions? I found some nice articles in the web about this, but I don't know how to integrate this with JPCT right know, I think there wait a lot of little traps like the column-or-row matrix question and such things when converting those examples from DirectX to the java JPCT world.

Thanks for any help

Sebastian[/code][/quote]

2
Support / Isometric projection
« on: September 11, 2006, 02:30:53 pm »
Is it possible to use any kind of isometric projection (or axonometric projection) in JPCT, that means a non perspective view of an object? I don't need a perfect isometric view but it should allmost look like it. I know that this could be done in reality by setting the camera position practical to infinity and use a very high zoom factor, but I don't see how to get this in JPCT.

Thanks for any help

Sebastian

3
Support / Need a new or enhanced Loader
« on: July 11, 2006, 12:47:03 pm »
Hi,

first I must say "thank you" for this great library. We think about using it in a commercial system. Would it be possible to see the source? I think about writing a additional loader for other formats or for retrieving more information (like texture and animation) from the files.

Best Regards,

Sebastian

Pages: [1]