From c976ebf21f857bae4a25272452aad1a1a6b95079 Mon Sep 17 00:00:00 2001 From: Renanse Date: Fri, 9 Nov 2012 15:34:02 -0600 Subject: small cleanup --- .../src/main/java/com/ardor3d/example/applet/LwjglBaseApplet.java | 8 ++++---- .../src/main/java/com/ardor3d/example/canvas/JoglSwtExample.java | 6 +++--- .../src/main/java/com/ardor3d/example/canvas/LwjglSwtExample.java | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'trunk/ardor3d-examples') diff --git a/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/applet/LwjglBaseApplet.java b/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/applet/LwjglBaseApplet.java index 3f289ed..394e141 100644 --- a/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/applet/LwjglBaseApplet.java +++ b/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/applet/LwjglBaseApplet.java @@ -119,8 +119,8 @@ public abstract class LwjglBaseApplet extends Applet implements Scene { public Void call() throws Exception { final Camera cam = _glCanvas.getCanvasRenderer().getCamera(); cam.resize(getWidth(), getHeight()); - cam.setFrustumPerspective(cam.getFovY(), getWidth() / (float) getHeight(), cam - .getFrustumNear(), cam.getFrustumFar()); + cam.setFrustumPerspective(cam.getFovY(), getWidth() / (double) getHeight(), + cam.getFrustumNear(), cam.getFrustumFar()); appletResized(getWidth(), getHeight()); return null; } @@ -234,8 +234,8 @@ public abstract class LwjglBaseApplet extends Applet implements Scene { if (_glCanvas.isFullScreen()) { final DisplayMode mode = Display.getDisplayMode(); cam.resize(mode.getWidth(), mode.getHeight()); - cam.setFrustumPerspective(cam.getFovY(), mode.getWidth() / (float) mode.getHeight(), cam - .getFrustumNear(), cam.getFrustumFar()); + cam.setFrustumPerspective(cam.getFovY(), mode.getWidth() / (float) mode.getHeight(), + cam.getFrustumNear(), cam.getFrustumFar()); appletResized(mode.getWidth(), mode.getHeight()); } else { cam.resize(getWidth(), getHeight()); diff --git a/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/canvas/JoglSwtExample.java b/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/canvas/JoglSwtExample.java index 91687e9..840b9b8 100644 --- a/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/canvas/JoglSwtExample.java +++ b/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/canvas/JoglSwtExample.java @@ -260,8 +260,8 @@ public class JoglSwtExample { private static MouseCursor createMouseCursor(final AWTImageLoader awtImageLoader, final String resourceName) throws IOException { - final com.ardor3d.image.Image image = awtImageLoader.load(ResourceLocatorTool.getClassPathResourceAsStream( - JoglSwtExample.class, resourceName), false); + final com.ardor3d.image.Image image = awtImageLoader.load( + ResourceLocatorTool.getClassPathResourceAsStream(JoglSwtExample.class, resourceName), false); return new MouseCursor("cursor1", image, 0, image.getHeight() - 1); } @@ -278,7 +278,7 @@ public class JoglSwtExample { final float aspect = (float) size.width / (float) size.height; final Camera camera = canvasRenderer.getCamera(); if (camera != null) { - final float fovY = 45; // XXX no camera.getFov() + final double fovY = camera.getFovY(); final double near = camera.getFrustumNear(); final double far = camera.getFrustumFar(); camera.setFrustumPerspective(fovY, aspect, near, far); diff --git a/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/canvas/LwjglSwtExample.java b/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/canvas/LwjglSwtExample.java index 94bda8d..14bc43b 100644 --- a/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/canvas/LwjglSwtExample.java +++ b/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/canvas/LwjglSwtExample.java @@ -290,8 +290,8 @@ public class LwjglSwtExample { private static MouseCursor createMouseCursor(final AWTImageLoader awtImageLoader, final String resourceName) throws IOException { - final com.ardor3d.image.Image image = awtImageLoader.load(ResourceLocatorTool.getClassPathResourceAsStream( - LwjglSwtExample.class, resourceName), false); + final com.ardor3d.image.Image image = awtImageLoader.load( + ResourceLocatorTool.getClassPathResourceAsStream(LwjglSwtExample.class, resourceName), false); return new MouseCursor("cursor1", image, 0, image.getHeight() - 1); } @@ -308,7 +308,7 @@ public class LwjglSwtExample { final float aspect = (float) size.width / (float) size.height; final Camera camera = canvasRenderer.getCamera(); if (camera != null) { - final float fovY = 45; // XXX no camera.getFov() + final double fovY = camera.getFovY(); final double near = camera.getFrustumNear(); final double far = camera.getFrustumFar(); camera.setFrustumPerspective(fovY, aspect, near, far); -- cgit v1.2.3