/***************************************************/ private static void SetKDTree(Audience audience) { List <double[]> points = new List <double[]>(); foreach (Spectator s in audience.Spectators) { double[] pt = new double[] { s.Head.PairOfEyes.ReferenceLocation.X, s.Head.PairOfEyes.ReferenceLocation.Y, s.Head.PairOfEyes.ReferenceLocation.Z }; points.Add(pt); } Audience clone = audience.DeepClone(); m_KDTree = KDTree.FromData <Spectator>(points.ToArray(), clone.Spectators.ToArray(), true); }
public static Audience Audience(Audience audienceToCopy) { Audience copy = audienceToCopy.DeepClone(); return(copy); }