1. Solution one
// 1) Create Coordinate class. However, you may make a struct as well.
public class Coordinate
{
public int x;
public int y;
public int z;
public Coordinate()
{
}
public int X
{
get { return x; }
set { this.x = value; }
}
public int Y
{
get { return y; }
set { this.y = value; }
}
public int Z
{
get { return z; }
set { this.z = value; }
}
}
// 2 Create instance of Coordinate List
List<coordinate> xyz = new List<coordinate>(); // see System.Collections.Generic namespace
// Create instance of coordinate object
Coordinate cor = new Coordinate();
// Then, add the points to the coordinate object
cor.X = 12;
cor.Y = 24;
cor.Z = 32;
xyz.Add(cor); // add the coordinate object to the list
// ..... add
// ..... add
// ......// Repeat this as many times
// 3) Now you hold many points in the list
2. Solution Two
You mentioned that you are getting these points (x, y, z) from a depth image. In general,
for example, if you have an image with size of 1024 x 1024, you may have many many points. In this case the solution above is not working or not working efficiently. The best way is: you may create an image with 3 layers (or three dimensional array), just like RGB images. Each layer (or band) of the RGB image holds x, y, or z points, respectively. However, we need to know the dinamic ranges of your values. You may use "PixelFormat.Format48bppRgb" image to hold these points. This image has value ranges from 0 to 65535.
You may find some usefull DLL from here:
http://www.artuxsoft.com/[
^]