我试图在OpenMesh
中使用小数算法。我遵循了这个链接中提供的基本设置:docu.html,但是我得到了来自modquadrict.hh(part of the library)
的以下错误。
error C2039: 'remove_property' : is not a member of 'OpenMesh::Decimater::DecimaterT<MeshT>'
main.cpp
#include "MyMesh.h"
#include <conio.h>
#include <iostream>
int main()
{
MyMesh mesh;
decimater deci (mesh);
HModQuadric hModQuad;
if(!OpenMesh::IO::read_mesh(mesh, "models/monkey.obj"));
{
std::cout<<"Cannot read mesh";
}
deci.add(hModQuad);
std::cout << deci.module( hM).name() << std::endl;
getch();
return 0;
}
MyMesh.h
#pragma once
// OpenMesh
#pragma warning(push)
#pragma warning(disable: 4267)
#include <OpenMesh/Core/IO/MeshIO.hh>
#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
#include <OpenMesh/Tools/Decimater/ModQuadricT.hh>
#include <OpenMesh/Tools/Decimater/DecimaterT.hh>
#pragma warning(pop)
//Additional mesh parameters
struct MeshTraits : public OpenMesh::DefaultTraits
{
VertexAttributes(OpenMesh::Attributes::Normal);
FaceAttributes(OpenMesh::Attributes::Normal);
};
typedef OpenMesh::TriMesh_ArrayKernelT<MeshTraits> MyMesh;
// Decimater type
typedef OpenMesh::Decimater::DecimaterT< MyMesh > decimater;
// Decimation Module Handle type
typedef OpenMesh::Decimater::ModQuadricT< decimater >::Handle HModQuadric;
发布于 2014-04-29 17:20:15
问题就在这条线上。
OpenMesh::Decimater::ModQuadricT< >::Handle HModQuadric;
应该是这样的:
OpenMesh::Decimater::ModQuadricT< MyMesh >::Handle HModQuadric;
在编写3.0版本时,我参考了2.0版的文档
在最近的版本中,模板依赖于网格而不是抽取器。
https://stackoverflow.com/questions/23319276
复制相似问题