summaryrefslogtreecommitdiffstats
path: root/trunk/ardor3d-examples
diff options
context:
space:
mode:
authorRenanse <[email protected]>2012-11-09 15:34:02 -0600
committerRenanse <[email protected]>2012-11-09 15:34:02 -0600
commitc976ebf21f857bae4a25272452aad1a1a6b95079 (patch)
tree81eae15fafcdad2c34958711dcfc00464873e28f /trunk/ardor3d-examples
parentd54adebf990fee4a525e20538b58b55a8fbb39eb (diff)
small cleanup
Diffstat (limited to 'trunk/ardor3d-examples')
-rw-r--r--trunk/ardor3d-examples/src/main/java/com/ardor3d/example/applet/LwjglBaseApplet.java8
-rw-r--r--trunk/ardor3d-examples/src/main/java/com/ardor3d/example/canvas/JoglSwtExample.java6
-rw-r--r--trunk/ardor3d-examples/src/main/java/com/ardor3d/example/canvas/LwjglSwtExample.java6
3 files changed, 10 insertions, 10 deletions
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);