Skip to content

Tutorial_01: Create a point cloud from a set of points

Liangliang Nan edited this page Dec 10, 2018 · 1 revision
	PointCloud* cloud = new PointCloud;

	// Add some points. Here we add 100 points on a 10*10 grid.
	for (float i=-5; i<5; ++i) {
		for (float j = -5; j < 5; ++j) 
			cloud->add_vertex(vec3(i, j, 0));// z = 0: all points are on XY plane
	}
Clone this wiki locally