public static PointCloudVertices TransformPoints(this Matrix4d matrix, PointCloudVertices a) { if (a == null || a.Count == 0) { return(null); } PointCloudVertices b = new PointCloudVertices(); for (int i = 0; i < a.Count; i++) { Vector3d p1 = a[i].Vector; Vector3d pointReturn = matrix.TransformVector3d(p1); b.Add(new Vertex(i, pointReturn, a[i].Color)); } return(b); }