diff options
author | Jakob Odersky <jodersky@gmail.com> | 2015-06-29 12:32:00 +0200 |
---|---|---|
committer | Jakob Odersky <jodersky@gmail.com> | 2015-06-29 12:32:00 +0200 |
commit | 01c5c700647feba596e02cb7a2e672f5301504ff (patch) | |
tree | bb0b0e1c2efde6b5362a294089fe081db0724833 /src/main/scala/sims/dynamics/joints/Joint.scala | |
parent | 998e545e8e42fee597f7274e47428d35dcf29e7b (diff) | |
download | sims-01c5c700647feba596e02cb7a2e672f5301504ff.tar.gz sims-01c5c700647feba596e02cb7a2e672f5301504ff.tar.bz2 sims-01c5c700647feba596e02cb7a2e672f5301504ff.zip |
Port to scala 2.11
Diffstat (limited to 'src/main/scala/sims/dynamics/joints/Joint.scala')
-rw-r--r-- | src/main/scala/sims/dynamics/joints/Joint.scala | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/scala/sims/dynamics/joints/Joint.scala b/src/main/scala/sims/dynamics/joints/Joint.scala new file mode 100644 index 0000000..652df97 --- /dev/null +++ b/src/main/scala/sims/dynamics/joints/Joint.scala @@ -0,0 +1,27 @@ +/* + * Simple Mechanics Simulator (SiMS) + * copyright (c) 2009 Jakob Odersky + * made available under the MIT License +*/ + +package sims.dynamics.joints + +import sims.geometry._ +import sims.dynamics._ + +/**Joints constrain the movement of two bodies. + * Their implementation was inspired by Erin Catto's box2d.*/ +abstract class Joint extends Constraint{ + + /**First body of the joint.*/ + val node1: Body + + /**Second body of the joint.*/ + val node2: Body + + /**Corrects the velocities of this joint's associated bodies.*/ + def correctVelocity(h: Double): Unit + + /**Corrects the positions of this joint's associated bodies.*/ + def correctPosition(h: Double): Unit +}
\ No newline at end of file |