public void AddBinaryForceComponent(BinaryForceComponent bfc) { bfc.BodyA.FGens.Add(bfc.ForceGenA); bfc.BodyB.FGens.Add(bfc.ForceGenB); bfcs.Add(bfc); }
public void RemoveBinaryForceComponent(BinaryForceComponent bfc) { bfc.BodyA.FGens.Remove(bfc.ForceGenA); bfc.BodyB.FGens.Remove(bfc.ForceGenB); bfcs.Remove(bfc); }
private void DrawSpring(BinaryForceComponent bfc) { var end1 = bfc.BodyA.Position + MathUtil.RotatePt(bfc.ConA, bfc.BodyA.Rotation); var end2 = bfc.BodyB.Position + MathUtil.RotatePt(bfc.ConB, bfc.BodyB.Rotation); GraphicsEngine.DrawLine(end1.P2C(), end2.P2C(), Color.Firebrick, 5); }