summaryrefslogtreecommitdiff
path: root/src/graphyx/tests/Restitution.scala
diff options
context:
space:
mode:
authorJakob Odersky <jodersky@gmail.com>2009-11-05 21:02:40 +0000
committerJakob Odersky <jodersky@gmail.com>2009-11-05 21:02:40 +0000
commit9d20024aa35cd7f923ebfc1ed9a2ffbf2731da70 (patch)
tree4e97fadc391b310ee1cc7156fda590dff414b2c3 /src/graphyx/tests/Restitution.scala
parent034bc5930ea6f01745f64a6070711d899d2c27ae (diff)
downloadsims-9d20024aa35cd7f923ebfc1ed9a2ffbf2731da70.tar.gz
sims-9d20024aa35cd7f923ebfc1ed9a2ffbf2731da70.tar.bz2
sims-9d20024aa35cd7f923ebfc1ed9a2ffbf2731da70.zip
Initial import.
Diffstat (limited to 'src/graphyx/tests/Restitution.scala')
-rw-r--r--src/graphyx/tests/Restitution.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/graphyx/tests/Restitution.scala b/src/graphyx/tests/Restitution.scala
new file mode 100644
index 0000000..9501a36
--- /dev/null
+++ b/src/graphyx/tests/Restitution.scala
@@ -0,0 +1,21 @@
+/*
+ * Graphyx
+ * copyright (c) 2009 Jakob Odersky
+ * made available under the MIT License
+*/
+
+package graphyx.tests
+
+import sims.geometry._
+import sims.dynamics._
+
+object Restitution extends Test{
+ val title = "Restitution"
+ val world = new World
+
+ def init = {
+ world += new Body(new Rectangle(1000,0.1,10) {restitution = 1}) {fixed = true}
+ world ++= (for (i <- 0 until 10) yield (new Circle(0.05, 10) {pos = Vector2D(i * 0.5, 1); restitution = i / 10.0}).asBody)
+ }
+
+}