Added typedef typename in InsertedV

This commit is contained in:
Paolo Cignoni 2004-05-13 09:59:20 +00:00
parent 68ff2a601b
commit e9ce5ba039
1 changed files with 15 additions and 9 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.4 2004/05/07 10:06:46 turini
include Plane3 removed.
Revision 1.3 2004/05/07 09:35:09 turini Revision 1.3 2004/05/07 09:35:09 turini
Added History Info Added History Info
@ -41,13 +44,16 @@ namespace tri {
template <class I_MESH_TYPE> template <class I_MESH_TYPE>
struct InsertedV struct InsertedV
{ {
InsertedV(I_MESH_TYPE::vertex_type *_v, typedef I_MESH_TYPE IMeshType;
I_MESH_TYPE::face_pointer _f, typedef typename IMeshType::VertexPointer VertexPointer;
int _z):v(_v),f(_f),z(_z) typedef typename IMeshType::FacePointer FacePointer;
InsertedV(VertexPointer _v, FacePointer _f, int _z)
: v(_v), f(_f), z(_z)
{} {}
I_MESH_TYPE::vertex_type *v; VertexPointer v;
I_MESH_TYPE::face_pointer f; FacePointer f;
int z; int z;
const bool operator <(const InsertedV & o) const bool operator <(const InsertedV & o)
@ -76,13 +82,13 @@ void SubSet(STL_CONT & subSet, S_MESH_TYPE & m)
{ {
vector< InsertedV<S_MESH_TYPE> > newVertices; vector< InsertedV<S_MESH_TYPE> > newVertices;
STL_CONT::iterator pfi; STL_CONT::iterator pfi;
S_MESH_TYPE::vertex_iterator vi; S_MESH_TYPE::VertexIterator vi;
vector<S_MESH_TYPE::vertex_pointer> redirect; vector<S_MESH_TYPE::VertexPointer> redirect;
for(pfi=subSet.begin(); pfi!=subSet.end(); ++pfi) for(pfi=subSet.begin(); pfi!=subSet.end(); ++pfi)
m.face.push_back(*(*pfi)); m.face.push_back(*(*pfi));
S_MESH_TYPE::face_iterator fi; S_MESH_TYPE::FaceIterator fi;
for(fi=m.face.begin(); fi!=m.face.end(); ++fi) for(fi=m.face.begin(); fi!=m.face.end(); ++fi)
{ {
newVertices.push_back(InsertedV<S_MESH_TYPE>((*fi).V(0), &(*fi),0)); newVertices.push_back(InsertedV<S_MESH_TYPE>((*fi).V(0), &(*fi),0));
@ -99,7 +105,7 @@ void SubSet(STL_CONT & subSet, S_MESH_TYPE & m)
{ {
if((*curr)!=(*next)) if((*curr)!=(*next))
pos++; pos++;
(*next).f->V((*next).z)=(S_MESH_TYPE::vertex_pointer)pos; (*next).f->V((*next).z)=(S_MESH_TYPE::VertexPointer)pos;
curr=next; curr=next;
next++; next++;
} }