PDA

View Full Version : Controlling the camera to look *from* a specific point


krheinwald
10-15-2007, 09:11 PM
Hi!

As I understand, OrbitView assumes you are looking at a specific point (lat,lon) on the ground from the given altitude with the given tilt and heading and shifts the camera around accordingly.

I need to control the camera to look from a specific point (lat,lon,ele) in space with a specific tilt and heading.

Can you please give me hints?

Thanks,
Klaus

patmurris
10-15-2007, 10:50 PM
You have to write your own 'free look' view class to replace BasicOrbitView.
You may also need to have your own input handler in place of the actual AWTInputHandler.

The WWJ SDK is built such as to allow changing or 'swapping' of its components. The default classes involved are described in config/worldwind.properties.

krheinwald
10-15-2007, 11:13 PM
You have to write your own 'free look' view class to replace BasicOrbitView.

I was afraid you would say this. :-(

You may also need to have your own input handler in place of the actual AWTInputHandler.

Luckily there's no need to handle input specially, as this view would only be set programatically.

I guess this will be an endavour for the coming long winter nights. Any suggestions on where to start investigating?

Thanks,
Klaus

patmurris
10-16-2007, 02:31 AM
Have a look at the View and OrbitView interface, AbstractView, BasicOrbitView and BasicOrbitViewModel code in worldwind.view.

Syris3000
02-19-2009, 01:50 PM
Have a look at the View and OrbitView interface, AbstractView, BasicOrbitView and BasicOrbitViewModel code in worldwind.view.

Is there going be any internal support for things like this in upcoming releases? Let me explain what I'm looking to do soon. Be able to switch from the basic overhead view to, on the fly, say a camera that is attached to a moving object (i.e. a plane flying). How difficult do you think this would be?

patmurris
02-19-2009, 03:54 PM
You can actually set the orbit view so that it's 'lookat' center point is in the same place as the eye by setting the zoom to zero. This is done in the applications.SAR package in AnalysisPanel i think. This allows you to turn around the eye in a similar way as you would with a first person view. Although you cannot tilt it to look up, it may be enough for a flying plane slightly looking down.