-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMesh_test.cpp
More file actions
28 lines (23 loc) · 736 Bytes
/
Mesh_test.cpp
File metadata and controls
28 lines (23 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
// Created by dinhnambkhn on 21. 11. 28..
//
#include <iostream>
#include "open3d/Open3D.h"
int main() {
//create a shape mesh
auto mesh = open3d::geometry::TriangleMesh::CreateSphere(1.0, 32, 32);
mesh->ComputeVertexNormals();
mesh->ComputeTriangleNormals();
// create a line mesh
//auto line = open3d::geometry::LineSet::CreateFromTriangleMesh(*mesh);
// create a point cloud
//draw the mesh
open3d::visualization::DrawGeometries({mesh});
//create a box mesh
auto box = open3d::geometry::TriangleMesh::CreateBox(0.5, 0.2, 0.8);
box->ComputeVertexNormals();
box->ComputeTriangleNormals();
// draw the box
open3d::visualization::DrawGeometries({box});
return 0;
}