This example shows how to create a point cloud from a set of points
27#include <easy3d/core/point_cloud.h>
28#include <easy3d/util/initializer.h>
39int main(
int argc,
char** argv) {
47 for (
int i=-5; i<5; ++i) {
48 for (
int j = -5; j < 5; ++j)
49 cloud->
add_vertex(
vec3(
static_cast<float>(i),
static_cast<float>(j), 0));
51 std::cout <<
"point cloud has " << cloud->n_vertices() <<
" points" << std::endl;
A data structure for point clouds.
Definition point_cloud.h:45
Vertex add_vertex(const vec3 &p)
Add a new vertex with position p.
Definition point_cloud.cpp:177
Definition collider.cpp:182