bug fixing:

- mixup of nomes Edge and Face on the components.
- possibly use of empty vector in import_obj.h
Thanks to nagaokagetora for showing them
This commit is contained in:
ganovelli 2011-10-25 10:03:10 +00:00
parent d155a34740
commit cedf5fb284
4 changed files with 13 additions and 12 deletions

View File

@ -1034,7 +1034,7 @@ public:
template <class ATTR_TYPE>
static
typename MeshType::template PerVertexAttributeHandle<ATTR_TYPE>
typename MeshType::template PerEdgeAttributeHandle<ATTR_TYPE>
AddPerEdgeAttribute( MeshType & m){
return AddPerEdgeAttribute<ATTR_TYPE>(m,std::string(""));
}

View File

@ -333,7 +333,8 @@ struct Env{
TypeNameBounds().insert(std::pair<std::string,CATBaseBase*>(n,res));
return res;
}
else (CAT<TYPE_1,TYPE_2> *) (*ti).second;
else
return (CAT<TYPE_1,TYPE_2> *) (*ti).second;
}
};

View File

@ -601,16 +601,16 @@ public:
_fep[1]=0;
_fep[2]=0;
}
typename T::FacePointer &FEp(const int j) { assert(j>=0 && j<3); return _fep[j]; }
typename T::FacePointer const FEp(const int j) const { assert(j>=0 && j<3); return _fep[j]; }
typename T::FacePointer const cFEp(const int j) const { assert(j>=0 && j<3); return _fep[j]; }
typename T::EdgePointer &FEp(const int j) { assert(j>=0 && j<3); return _fep[j]; }
typename T::EdgePointer const FEp(const int j) const { assert(j>=0 && j<3); return _fep[j]; }
typename T::EdgePointer const cFEp(const int j) const { assert(j>=0 && j<3); return _fep[j]; }
char &FEi(const int j) { return _fei[j]; }
const char &cFEi(const int j) const { return _fei[j]; }
typename T::FacePointer &FEp1( const int j ) { return FEp((j+1)%3);}
typename T::FacePointer &FEp2( const int j ) { return FEp((j+2)%3);}
typename T::FacePointer const FEp1( const int j ) const { return FEp((j+1)%3);}
typename T::FacePointer const FEp2( const int j ) const { return FEp((j+2)%3);}
typename T::EdgePointer &FEp1( const int j ) { return FEp((j+1)%3);}
typename T::EdgePointer &FEp2( const int j ) { return FEp((j+2)%3);}
typename T::EdgePointer const FEp1( const int j ) const { return FEp((j+1)%3);}
typename T::EdgePointer const FEp2( const int j ) const { return FEp((j+2)%3);}
template <class RightF>
void ImportData(const RightF & rightF){T::ImportData(rightF);}
@ -620,7 +620,7 @@ public:
static void Name(std::vector<std::string> & name){name.push_back(std::string("FEAdj"));T::Name(name);}
private:
typename T::FacePointer _fep[3] ;
typename T::EdgePointer _fep[3] ;
char _fei[3] ;
};

View File

@ -643,9 +643,9 @@ public:
}
}
}
while (( line[0] == '#' || line.length()==0) && !stream.eof()); // skip comments and empty lines
while (( line.length()==0 || line[0] == '#') && !stream.eof()); // skip comments and empty lines
if ((line[0] == '#') || (line.length() == 0)) // can be true only on last line of file
if ( (line.length() == 0)||(line[0] == '#') ) // can be true only on last line of file
return;
size_t from = 0;