0

Has anyone done trimesh refining in the VCG library? I would add that as a tag but I don't have high enough reputation yet. Every time I include any of the refine libraries I get the following errors:

../../../addons/ofxVCGLib/vcglib/vcg/complex/trimesh/refine.h:880:0 
../../../addons/ofxVCGLib/vcglib/vcg/complex/trimesh/refine.h:880: error: expected 
unqualified-id before numeric constant

which is on this line:

typename TRIMESH_TYPE::FacePointer FF0;

the definition that contains that (excuse the giant c/p) looks like this:

template<class TRIMESH_TYPE, class CenterPoint>
void TriSplit(typename TRIMESH_TYPE::FacePointer f,
                            typename TRIMESH_TYPE::FacePointer f1,typename TRIMESH_TYPE::FacePointer f2,
                            typename TRIMESH_TYPE::VertexPointer vB, CenterPoint    Center)
{

my vertex, face, & mesh are declared like so:

class innerMeshFace:public Face<myTypes, face::FFAdj, face::Mark, face::VertexRef, face::BitFlags, face::Normal3f, face::InfoOcf> {

};

class myVertex: 
public Vertex<myTypes, vertex::Coord3f, vertex::BitFlags, vertex::TexCoord2f, vertex::Normal3f, vertex::Mark, vertex::Color4b, vertex::VFAdj, vertex::InfoOcf>  
{}

class myMesh:public tri::TriMesh< vector<myVertex>, vector<innerMeshFace> > { }

so I'm not sure if there's something in there that's I'm misunderstanding. I use the myMesh::FacePointer elsewhere in my code, I think there's something in the template pile that I'm missing. This all works fine (i.e. compiles and does what it's supposed to) until I try to include the refine.h. Any pointers from anyone w/VCG experience would be very much appreciated.

hlovdal
  • 26,565
  • 10
  • 94
  • 165
Joshua Noble
  • 830
  • 2
  • 12
  • 26

2 Answers2

1

After talking to the creators, it turns out this is a problem in how GCC compiles that particular part of the library. I don't understand the details, but LLVM is fine with it, GCC is not. It works fine on Linux but as I was working with it in XCode I was having problems. It's something they're not going to be updating any time soon, so it looks like for the moment VCG mesh-refining isn't working on GCC 4.2.

Joshua Noble
  • 830
  • 2
  • 12
  • 26
1

I got an example of Refine working (finally!) under MingW GCC-3.4.5 http://pastebin.com/uYnCepEY

benp
  • 36
  • 2