OSDN Git Service

Add Path interface
authorXoppa <contact@xoppa.nl>
Tue, 12 Feb 2013 16:58:47 +0000 (17:58 +0100)
committerXoppa <contact@xoppa.nl>
Tue, 12 Feb 2013 16:58:47 +0000 (17:58 +0100)
gdx/src/com/badlogic/gdx/math/Path.java [new file with mode: 0644]

diff --git a/gdx/src/com/badlogic/gdx/math/Path.java b/gdx/src/com/badlogic/gdx/math/Path.java
new file mode 100644 (file)
index 0000000..e66f78e
--- /dev/null
@@ -0,0 +1,11 @@
+package com.badlogic.gdx.math;
+
+/** Interface that specifies a path of type T within the window 0.0<=t<=1.0.
+ * @author Xoppa */
+public interface Path<T> {
+       /** @return The value of the path at t where 0<=t<=1 */
+       T valueAt(T out, float t);
+       /** @return The approximated value (between 0 and 1) on the path which is closest to the specified value.
+        * Note that the implementation of this method might be optimized for speed against precision. */
+       float approximate(T v);
+}