Skip to content

Latest commit

 

History

History

template_meshlab

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

You can use data structure used by MeshLab.

What you have to do is only to import meshlab/src/common/ml_mesh_type.h

Then you can declare mesh data as CMeshO.

CMakeLists.txt

# define path of meshlab source
set(MESHLAB_DIR C:/Users/Public/Documents/GitHub/meshlab_latest/src)
add_definitions(-DMESHLAB_SCALAR=float) # you should add this definition if you use meshlab source

main.cpp

#include <vcg/complex/algorithms/create/platonic.h>
#include <vcg/complex/complex.h>
#include <common/ml_mesh_type.h>

using namespace vcg;
using namespace std;

int main(){
	CMeshO mesh;
	tri::Tetrahedron(mesh); // create preset mesh data

	for(CMeshO::VertexType &vt : mesh.vert){
		cout << vt.Index() << endl;
	}
	
	return 1;
}