I'm new to VCG and facing some problem with creating a VertexPointer of size 400K+ Vertex. The actual question was asked here in the solution's comment.
I tried to make an array of VertexPointer
MyMesh::VertexPointer vi[400000];
The program crashes with no error in the above line of code.
This is MyMesh Declaration
class MyFace;
class MyVertex;
struct MyUsedTypes : public vcg::UsedTypes< vcg::Use<MyVertex>::AsVertexType,
vcg::Use<MyFace>::AsFaceType>{};
class MyVertex : public vcg::Vertex< MyUsedTypes, vcg::vertex::Coord3f, vcg::vertex::Normal3f, vcg::vertex::VFAdj, vcg::vertex::BitFlags, vcg::vertex::Mark>{};
class MyFace : public vcg::Face < MyUsedTypes, vcg::face::VertexRef, vcg::face::Normal3f, vcg::face::FFAdj, vcg::face::Mark, vcg::face::VFAdj, vcg::face::BitFlags > {};
class MyMesh : public vcg::tri::TriMesh< std::vector<MyVertex>, std::vector<MyFace> > {};
I wanted to ask if there is any way I can insert Vertex and Normals in the mesh of MyMesh type. Please help. Thank you.
This should get you started. You basically need to use the allocators. A good way to find how VCG works is by looking at the examples and load/save functions that vcg has for difference file formats.