public class ViewSceneObserver extends SceneObserver implements CameraListener
Constructor and Description |
---|
ViewSceneObserver(View observingView,
Camera observingCamera,
VirtualSpace targetVirtualSpace) |
Modifier and Type | Method and Description |
---|---|
void |
cameraMoved(Camera cam,
Point2D.Double loc,
double alt)
Called back when a Camera is moved.
|
double |
getAltitude() |
double[] |
getGlobalView(int d,
EndAction ea)
Get a global view of the scene from this SceneObserver.
|
double[] |
getVisibleRegion() |
double |
getX() |
double |
getY() |
getCamera, getCurrentLevel, getLevelListener, getPreviousAltitude, getRegionListener, getTargetVirtualSpace, getTargetVirtualSpaces, isOfInterest, setLevelListener, setPreviousAltitude, setRegionListener
public ViewSceneObserver(View observingView, Camera observingCamera, VirtualSpace targetVirtualSpace)
observingView
- view that observes the sceneobservingCamera
- camera in view that observes the scenetargetVirtualSpace
- virtual space in which the scene objects should be putpublic double[] getVisibleRegion()
getVisibleRegion
in class SceneObserver
public double getX()
getX
in class SceneObserver
public double getY()
getY
in class SceneObserver
public double getAltitude()
getAltitude
in class SceneObserver
public void cameraMoved(Camera cam, Point2D.Double loc, double alt)
CameraListener
cameraMoved
in interface CameraListener
cam
- camera which was movedloc
- camera xy coordinates after the movealt
- camera altitude after the moveCamera.addListener(fr.inria.zvtm.event.CameraListener)
,
Camera.removeListener(fr.inria.zvtm.event.CameraListener)
public double[] getGlobalView(int d, EndAction ea)
d
- duration of animation from current location to global viewea
- action to be perfomed after camera has reached its new position (can be null)Copyright © 2000-2002 Xerox Corporation. All Rights Reserved
Copyright © 2003 World Wide Web Consortium. All Rights Reserved
Copyright © 2004-2015 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.