Author Topic: Dimension of the viewable area  (Read 533 times)

Offline Marius

  • byte
  • *
  • Posts: 4
    • View Profile
Dimension of the viewable area
« on: June 19, 2013, 09:53:25 pm »
Hello,

i think my question is very easy to answer, but i don't get it..
I want to place 16 objects on the screen. The objects should be organized in 4 rows with each 4 columns. The space between the objects should be the same between all objects. This all is easy if i'm calculating with pixels according to the dimension of my screen. But i don't get it, how to get the "dimension" of the viewable area. Lets say the camera is a position x=0,y=0,z=100. How "big" is the area the user sees? How do i calculate this value?

Thanks in advance,
Marius

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: Dimension of the viewable area
« Reply #1 on: June 20, 2013, 07:22:17 am »
You can use this method http://www.jpct.net/doc/com/threed/jpct/Interact2D.html#reproject2D3D(com.threed.jpct.Camera, com.threed.jpct.FrameBuffer, int, int, float) to find the 3d coordinates that represent the corners in screen space for a given depth.

Offline Marius

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Dimension of the viewable area
« Reply #2 on: June 20, 2013, 08:43:12 am »
Thank you so much!! That is what i was looking for!