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); }
private float integrateUp( final float time) { float s = this.speed_up; final boolean forward = this.input.isTargetMovingUp(); if (forward) { s += this.target_acceleration * time; } final boolean backward = this.input.isTargetMovingDown(); if (backward) { s -= this.target_acceleration * time; } s = Clamp.clamp(s, -this.target_maximum_speed, this.target_maximum_speed); this.camera.cameraMoveTargetUp(s * time); return JCameraSphericalLinearIntegratorZoomScaled.applyDrag( s, this.target_drag, time); }
private double integrateUp( final double time) { double s = this.speed_up; final boolean forward = this.input.isTargetMovingUp(); if (forward) { s += this.target_acceleration * time; } final boolean backward = this.input.isTargetMovingDown(); if (backward) { s -= this.target_acceleration * time; } s = Clamp.clamp(s, -this.target_maximum_speed, this.target_maximum_speed); this.camera.cameraMoveTargetUp(s * time); return JCameraSphericalLinearIntegratorZoomScaled.applyDrag( s, this.target_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 double integrateRight( final double time, final double linear_zoom_scale, final double drag_zoom_scale) { double s = this.speed_right; final boolean forward = this.input.isTargetMovingRight(); if (forward) { s += this.target_acceleration * time * linear_zoom_scale; } final boolean backward = this.input.isTargetMovingLeft(); if (backward) { s -= this.target_acceleration * time * linear_zoom_scale; } s = Clamp.clamp( s, -this.target_maximum_speed * linear_zoom_scale, this.target_maximum_speed * linear_zoom_scale); s += this.input.takeTargetMovingRight() * this.target_acceleration * drag_zoom_scale * time; this.camera.cameraMoveTargetRight(s * time); return JCameraSphericalLinearIntegratorZoomScaled.applyDrag( s, this.target_drag, time); }
private float integrateForward( final float time, final float linear_zoom_scale, final float drag_zoom_scale) { float s = this.speed_forward; final boolean forward = this.input.isTargetMovingForward(); if (forward) { s += this.target_acceleration * time * linear_zoom_scale; } final boolean backward = this.input.isTargetMovingBackward(); if (backward) { s -= this.target_acceleration * time * linear_zoom_scale; } s = Clamp.clamp( s, -this.target_maximum_speed * linear_zoom_scale, this.target_maximum_speed * linear_zoom_scale); s += this.input.takeTargetMovingForward() * this.target_acceleration * drag_zoom_scale * time; this.camera.cameraMoveTargetForwardOnXZ(s * time); return JCameraSphericalLinearIntegratorZoomScaled.applyDrag( s, this.target_drag, time); }
private float integrateRight( final float time, final float linear_zoom_scale, final float drag_zoom_scale) { float s = this.speed_right; final boolean forward = this.input.isTargetMovingRight(); if (forward) { s += this.target_acceleration * time * linear_zoom_scale; } final boolean backward = this.input.isTargetMovingLeft(); if (backward) { s -= this.target_acceleration * time * linear_zoom_scale; } s = Clamp.clamp( s, -this.target_maximum_speed * linear_zoom_scale, this.target_maximum_speed * linear_zoom_scale); s += this.input.takeTargetMovingRight() * this.target_acceleration * drag_zoom_scale * time; this.camera.cameraMoveTargetRight(s * time); return JCameraSphericalLinearIntegratorZoomScaled.applyDrag( s, this.target_drag, time); }
private double integrateForward( final double time, final double linear_zoom_scale, final double drag_zoom_scale) { double s = this.speed_forward; final boolean forward = this.input.isTargetMovingForward(); if (forward) { s += this.target_acceleration * time * linear_zoom_scale; } final boolean backward = this.input.isTargetMovingBackward(); if (backward) { s -= this.target_acceleration * time * linear_zoom_scale; } s = Clamp.clamp( s, -this.target_maximum_speed * linear_zoom_scale, this.target_maximum_speed * linear_zoom_scale); s += this.input.takeTargetMovingForward() * this.target_acceleration * drag_zoom_scale * time; this.camera.cameraMoveTargetForwardOnXZ(s * time); return JCameraSphericalLinearIntegratorZoomScaled.applyDrag( s, this.target_drag, time); }