CCT.NUI.Core.Shape.ClusterShapeFactory.CreateMap C# (CSharp) Method

CreateMap() private method

private CreateMap ( Cluster cluster ) : DepthMap
cluster CCT.NUI.Core.Clustering.Cluster
return DepthMap
        private DepthMap CreateMap(Cluster cluster)
        {
            var map = new int[(int)cluster.Width + 1, (int)cluster.Height + 1];
            foreach (var point in cluster.AllPoints)
            {
                map[(int)(point.X - cluster.X), (int)(point.Y - cluster.Y)] = (int)point.Z;
            }
            return new DepthMap(map);
        }
    }