MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / load_PolygonMesh_model

Function load_PolygonMesh_model

simulation/tools/sim_test_simple.cpp:535–552  ·  view source on GitHub ↗

Read in a 3D model

Source from the content-addressed store, hash-verified

533
534// Read in a 3D model
535void
536load_PolygonMesh_model(char* polygon_file)
537{
538 pcl::PolygonMesh mesh; // (new pcl::PolygonMesh);
539 // pcl::io::loadPolygonFile("/home/mfallon/data/models/dalet/Darlek_modified_works.obj",mesh);
540 pcl::io::loadPolygonFile(polygon_file, mesh);
541 pcl::PolygonMesh::Ptr cloud(new pcl::PolygonMesh(mesh));
542
543 // Not sure if PolygonMesh assumes triangles if to
544 // TODO: Ask a developer
545 PolygonMeshModel::Ptr model =
546 PolygonMeshModel::Ptr(new PolygonMeshModel(GL_POLYGON, cloud));
547 scene_->add(model);
548
549 std::cout << "Just read " << polygon_file << std::endl;
550 std::cout << mesh.polygons.size() << " polygons and " << mesh.cloud.data.size()
551 << " triangles\n";
552}
553
554void
555initialize(int, char** argv)

Callers 1

initializeFunction · 0.70

Calls 2

addMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected