diff options
author | Jakob Odersky <jodersky@gmail.com> | 2009-11-05 21:02:40 +0000 |
---|---|---|
committer | Jakob Odersky <jodersky@gmail.com> | 2009-11-05 21:02:40 +0000 |
commit | 9d20024aa35cd7f923ebfc1ed9a2ffbf2731da70 (patch) | |
tree | 4e97fadc391b310ee1cc7156fda590dff414b2c3 /src/graphyx/tests/Joints1.scala | |
parent | 034bc5930ea6f01745f64a6070711d899d2c27ae (diff) | |
download | sims-9d20024aa35cd7f923ebfc1ed9a2ffbf2731da70.tar.gz sims-9d20024aa35cd7f923ebfc1ed9a2ffbf2731da70.tar.bz2 sims-9d20024aa35cd7f923ebfc1ed9a2ffbf2731da70.zip |
Initial import.
Diffstat (limited to 'src/graphyx/tests/Joints1.scala')
-rw-r--r-- | src/graphyx/tests/Joints1.scala | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/graphyx/tests/Joints1.scala b/src/graphyx/tests/Joints1.scala new file mode 100644 index 0000000..ad143ec --- /dev/null +++ b/src/graphyx/tests/Joints1.scala @@ -0,0 +1,24 @@ +/* + * Graphyx + * copyright (c) 2009 Jakob Odersky + * made available under the MIT License +*/ + +package graphyx.tests + +import sims.dynamics._ +import sims.dynamics.joints._ +import sims.geometry._ + +object Joints1 extends Test{ + override val title = "Joints1" + val world = new World + def init = { + val anchor = new Body(new Circle(0.03, 1) {pos = Vector2D(1,5)}) {fixed = true} + val weight = (new Rectangle(0.1, 0.5, 1) {pos = Vector2D(1,0)}).asBody + val joint = new DistanceJoint(anchor, anchor.pos, weight, weight.pos + Vector2D(0.1,0.2)) + world += anchor + world += weight + world += joint + } +} |