private double integrateZoom( final double time) { double s = this.speed_zoom; final boolean forward = this.input.isZoomingIn(); if (forward) { s += this.zoom_acceleration * time; } final boolean backward = this.input.isZoomingOut(); if (backward) { s -= this.zoom_acceleration * time; } s = Clamp.clamp(s, -this.zoom_maximum_speed, this.zoom_maximum_speed); this.camera.cameraZoomIn(s * time); return applyDrag(s, this.zoom_drag, time); }
private float integrateZoom( final float time) { float s = this.speed_zoom; final boolean forward = this.input.isZoomingIn(); if (forward) { s += this.zoom_acceleration * time; } final boolean backward = this.input.isZoomingOut(); if (backward) { s -= this.zoom_acceleration * time; } s = Clamp.clamp(s, -this.zoom_maximum_speed, this.zoom_maximum_speed); this.camera.cameraZoomIn(s * time); return JCameraSphericalLinearIntegrator .applyDrag(s, this.zoom_drag, time); }
private double integrateZoom( final double time) { double s = this.speed_zoom; final boolean forward = this.input.isZoomingIn(); if (forward) { s += this.zoom_acceleration * time; } final boolean backward = this.input.isZoomingOut(); if (backward) { s -= this.zoom_acceleration * time; } s = Clamp.clamp(s, -this.zoom_maximum_speed, this.zoom_maximum_speed); this.camera.cameraZoomIn(s * time); return JCameraSphericalLinearIntegratorZoomScaled.applyDrag( s, this.zoom_drag, time); }
private float integrateZoom( final float time) { float s = this.speed_zoom; final boolean forward = this.input.isZoomingIn(); if (forward) { s += this.zoom_acceleration * time; } final boolean backward = this.input.isZoomingOut(); if (backward) { s -= this.zoom_acceleration * time; } s = Clamp.clamp(s, -this.zoom_maximum_speed, this.zoom_maximum_speed); this.camera.cameraZoomIn(s * time); return JCameraSphericalLinearIntegratorZoomScaled.applyDrag( s, this.zoom_drag, time); }