diff --git a/resources/build.xml b/resources/build.xml index 8f59567..75114ea 100644 --- a/resources/build.xml +++ b/resources/build.xml @@ -18,7 +18,7 @@ - + diff --git a/src/peasy/PeasyCam.java b/src/peasy/PeasyCam.java index b0777f4..d59775f 100644 --- a/src/peasy/PeasyCam.java +++ b/src/peasy/PeasyCam.java @@ -238,6 +238,11 @@ private void mouseRotate(final double dx, final double dy) } } + public double getDistance() + { + return distance; + } + public void setDistance(final double newDistance) { setDistance(newDistance, 300); @@ -249,6 +254,12 @@ public void setDistance(final double newDistance, final long animationTimeMillis animationTimeMillis)); } + public float[] getLookAt() + { + return new float[] { (float) center.getX(), (float) center.getY(), + (float) center.getZ() }; + } + public void lookAt(final double x, final double y, final double z) { centerInterps.startInterpolation(new CenterInterp(new Vector3D(x, y, z), 300)); diff --git a/web/index.html b/web/index.html index 2fb7173..78319a0 100644 --- a/web/index.html +++ b/web/index.html @@ -169,6 +169,7 @@

Thanks

Useful bug reports and feature suggestions were provided by:

Please let me know if I've forgotten to acknowledge you.

@@ -205,6 +206,9 @@

Methods

camera.setDistance(double d); // distance from looked-at point camera.pan(double dx, double dy); // move the looked-at point relative to current orientation +double camera.getDistance(); // current distance +float[] camera.getLookAt(); // float[] { x, y, z }, looked-at point + camera.setMinimumDistance(double minimumDistance); camera.setMaximumDistance(double maximumDistance); // clamp zooming