Sorry I just forgot to put the GH_Point version in the file (wich is faster then the Point3d Version).
GH_points version :
List<GH_Point> gridPoints = new List<GH_Point>();
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
for (int k = 0; k < n; k++)
double x = i * iSize;
double y = j * iSize;
double z = k * iSize;
gridPoints.Add(new GH_Point(new Point3d(x, y, z)));
outputPoints = gridPoints;
I don’t know if I was clear in my question, but my idea is to find the fastest way to display a pointcloud for the user, I don’t need to be able to retrieve the points, just to see it in the view port. I made a little test just to explain what I’m talking about.
Benchmark 1 :
for 1 000 000 points - with PointCloud
for 1 000 000 points - with Point3d
for 1 000 000 points - with GH_Point (its sparing the double cast to Point3d I guess).
I mean… The choice is then obvious between GH_Points and Point3d ^^
The problem there is that GH_Points need to be converted to be customizable and then its a lot slower. But point cloud are already witch a choosen color and still offer really nice performances.
And when come the time to move the view port camera… doing so with GH_Points i’ve got an horrible framerate, but with pointclouds is very fluid.
I would like to display the pointclouds in a grid and not random, maybe you could help.
The file version2 : GH_Pointcloud2.gh (27.2 KB)