Export example of points and triangles from mesh (e.g. for rendering)
- C++
int main()
{
const std::vector<MR::Vector3f> & points = mesh.
points.vec_;
const int * vertexTripples = reinterpret_cast<const int*>( triangles.data() );
return 0;
}
MRMESH_API std::vector< ThreeVertIds > getAllTriVerts() const
returns three vertex ids for valid triangles, invalid triangles are skipped
MRMESH_API Mesh makeCube(const Vector3f &size=Vector3f::diagonal(1.0f), const Vector3f &base=Vector3f::diagonal(-0.5f))
Definition MRMesh/MRMesh.h:23
MeshTopology topology
Definition MRMesh/MRMesh.h:24
VertCoords points
Definition MRMesh/MRMesh.h:25
- Python See a more relevant example Numpy support