blob: 652df97b19612368bd5b5587097ec572d5630bf9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
}
|