public void Init(Verlet[] vs) { vertices = vs; Lengths = new float[vs.Length, vs.Length]; for (int i = 0; i < vs.Length; i++) { for (int j = 0; j < vs.Length; j++) { Lengths[i, j] = Vector3.Distance(vs[i].Pos, vs[j].Pos); } } }
public Boat() { float L = 2, W = 1, H = 1, D = 0.5f; var vs = new Verlet[] { new Verlet(L, 0, W), new Verlet(L, 0, -W), new Verlet(-L, 0, -W), new Verlet(-L, 0, W), new Verlet(0, H, 0), new Verlet(-L, -D, 0) }; Init(vs); }
public Boat() { float L = 2, W = 1, H = 1, D = 0.5f; var vs = new Verlet[] { new Verlet(L,0,W), new Verlet(L,0,-W), new Verlet(-L,0,-W), new Verlet(-L,0, W), new Verlet(0,H,0), new Verlet(-L,-D,0) }; Init(vs); }