@Override public void moved( PositionEvent event ) { Position pos = master.getView( ).getCurrentEyePosition( ); slave.getView( ).setEyePosition( pos ); slave.redraw( ); } } );
@Override public boolean handleMessage(Message msg) { onNavigatorStopped(); return false; } });
public double getDrawTimeStdDev() { synchronized (this.drawLock) { return this.computeTimeStdDev(this.drawMetrics); } }
protected void gestureDidBegin() { if (this.activeGestures++ == 0) { this.wwd.getNavigator().getAsLookAt(this.wwd.getGlobe(), this.beginLookAt); this.lookAt.set(this.beginLookAt); } }
@Override protected void gestureDidBegin() { if (this.activeGestures++ == 0) { this.wwd.getNavigator().getAsCamera(this.wwd.getGlobe(), this.beginCamera); this.camera.set(this.beginCamera); } }
/** * Performs a pick at the tap location and conditionally arms the dragging flag, so that dragging can occur if * the next event is an onScroll event. */ public void pick(MotionEvent event) { // Perform the pick at the screen x, y PickedObjectList pickList = getWorldWindow().pick(event.getX(), event.getY()); // Examine the picked objects for Renderables PickedObject topPickedObject = pickList.topPickedObject(); // There is only one placemark on the globe and this.isDraggingArmed = topPickedObject != null && topPickedObject.getUserObject() instanceof Placemark; }
/******************************************************************************************************************* * * ******************************************************************************************************************/ @Override @Nonnull public Coordinate pointToCoordinates (final @Nonnull Point point) { final View view = worldWindow.getView(); return toCoordinate(view.computePositionFromScreenPoint(point.x, point.y)); }
@Override public void run() { if (!isActivityThread()) { runOnActivityThread(this); } else { this.wwd.getFrameMetrics().reset(); } } }
@Override public void gestureStateChanged(MotionEvent event, GestureRecognizer recognizer) { if (recognizer == this.panRecognizer) { this.handlePan(recognizer); } else if (recognizer == this.pinchRecognizer) { this.handlePinch(recognizer); } else if (recognizer == this.rotationRecognizer) { this.handleRotate(recognizer); } else if (recognizer == this.tiltRecognizer) { this.handleTilt(recognizer); } }
@Override public void drawFrame(DrawContext dc) { this.clearFrame(dc); this.drawDrawables(dc); if (dc.pickMode && dc.pickPoint != null) { this.resolvePick(dc); } else if (dc.pickMode) { this.resolvePickRect(dc); } }
protected void notifyListeners(int action, InputEvent inputEvent) { NavigatorEvent event = NavigatorEvent.obtain(this.wwd.navigator, action, inputEvent); for (int idx = 0, len = this.listeners.size(); idx < len; idx++) { this.listeners.get(idx).onNavigatorEvent(this.wwd, event); } event.recycle(); } }
/** * Constructs a WorldWindow associated with the specified application context. This is the constructor to use when * creating a WorldWindow from code. */ public WorldWindow(Context context) { super(context); this.init(null); }
public double getDrawTimeAverage() { synchronized (this.drawLock) { return this.computeTimeAverage(this.drawMetrics); } }
public void offerPickedObject(PickedObject pickedObject) { if (this.pickedObjects != null) { this.pickedObjects.offerPickedObject(pickedObject); } }
public void reset() { this.resetTimeMetrics(this.renderMetrics); synchronized (this.drawLock) { this.resetTimeMetrics(this.drawMetrics); } }
public void setNavigatorStoppedDelay(long delay, TimeUnit unit) { this.navigatorEvents.setNavigatorStoppedDelay(delay, unit); }
public long getNavigatorStoppedDelay() { return this.navigatorEvents.getNavigatorStoppedDelay(); }
/** * Constructs a WorldWindow associated with the specified application context and EGL configuration chooser. This is * the constructor to use when creating a WorldWindow from code. */ public WorldWindow(Context context, EGLConfigChooser configChooser) { super(context); this.init(configChooser); }
public double getRenderTimeAverage() { return this.computeTimeAverage(this.renderMetrics); }