⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adasub.cc

📁 penMesh is a generic and efficient data structure for representing and manipulating polygonal meshes
💻 CC
字号:
#include <iostream>#include <algorithm>#include <iterator>#include <OpenMesh/Core/IO/MeshIO.hh>#include <OpenMesh/Core/Mesh/Types/TriMesh_ArrayKernelT.hh>#include <OpenMesh/Tools/Subdivider/Adaptive/CompositeT.hh>// ----------------------------------------using OpenMesh::Subdivider::Adaptive;// ---------------------------------------- necessary typesOpenMesh::TriMesh_ArrayKernelT< CompositeTraits > MyMesh;CompositeT< MyMesh >                              Subdivider;// ---------------------------------------- setup a subdividerint main(int argc, char **argv){  MyMesh     mesh; // create mesh and fill it  if (!OpenMesh::IO::read_mesh(mesh, argv[1]))    return 1; // error reading mesh  Subdivider subdivider(mesh); // bind subdivider to mesh  // -------------------- add some rules  // anonymous registration  subdivider.add< Tvv3<MyMesh>::Handle >();  subdivider.add< VF<MyMesh>::Handle   >();  subdivider.add< FF<MyMesh>::Handle   >();  // 'named' registration  FVc<MyMesh>::Handle hFVc;  subdivider.add( hFVc );  // print pre-computed coefficients to std::cout...  std::copy(subdivider.rule( hFVc ).coeffs().begin(),            subdivider.rule( hFVc ).coeffs().end(),            std::ostream_iterator<double>(std::cout, ", "));  // prepare subdivider and the traits  if (!subdivider.initialize())    return 1; // error initializing subdivider  MyMesh::FaceHandle fh; // select a face  subdivider.refine(fh); }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -