Simple Mechanics Simulator (SiMS) API

This document is the API specification for SiMS

Class Summary
case class DistanceJoint (val node1 : Body, val anchor1 : Vector2D, val node2 : Body, val anchor2 : Vector2D) extends Joint with scala.Product
DistanceJoints keep their connection points at a constant distance.
trait ForceJoint extends AnyRef
A joint which can apply a force to its anchor bodies, thus adding or removing energy to the system.
abstract class Joint extends Constraint with AnyRef
Joints constrain the movement of two bodies. Their implementation was inspired by Erin Catto's box2d.
case class RevoluteJoint (val node1 : Body, val node2 : Body, val anchor : Vector2D) extends Joint with scala.Product
A revolute joint that connects two bodies at a singe point. Inspired from JBox2D. Warning: there are still several bugs with revolute joints, if they are between two free bodies and not connected at their respective COMs.
case class SpringJoint (val node1 : Body, val anchor1 : Vector2D, val node2 : Body, val anchor2 : Vector2D, val springConstant : Double, val initialLength : Double) extends Joint with ForceJoint with scala.Product
A spring obeying Hooke's law.
Object Summary
object DistanceJoint extends (Body, Vector2D, Body, Vector2D) => DistanceJoint
object RevoluteJoint extends (Body, Body, Vector2D) => RevoluteJoint
object SpringJoint extends (Body, Vector2D, Body, Vector2D, Double, Double) => SpringJoint