public Vpl[] GetRandomVpls(int n) { Vpl[] res = new Vpl[n]; for (int i = 0; i < n; i++) { var np = rnd.Next(0, data.Length); //this.vpls.TryPeek(out res[i]); res[i] = data[np]; } return res; }
public void Add(Vpl vpl) { if (vpl.GeoNormal.IsZero()) { Debugger.Break(); } this.vpls.Add(vpl); if (Full) { data = ToArray(); } }
public void GetRandomVpl(out Vpl vpl) { var np = rnd.Next(0, data.Length); //this.vpls.TryPeek(out res[i]); vpl= data[np]; }