Yet another bunch of missing typenames; corrected a signature mismatch between LoadMask and GetHeader
This commit is contained in:
parent
9057e1dcd6
commit
de93d3d941
|
@ -319,63 +319,63 @@ namespace io {
|
||||||
ReadString(f,s);
|
ReadString(f,s);
|
||||||
if( s == std::string("HAS_VERTEX_QUALITY_OCF")) {
|
if( s == std::string("HAS_VERTEX_QUALITY_OCF")) {
|
||||||
vert.EnableQuality();
|
vert.EnableQuality();
|
||||||
fread((void*)&vert.QV[0],sizeof(VertexType::QualityType),vert.size(),f);
|
fread((void*)&vert.QV[0],sizeof(typename VertexType::QualityType),vert.size(),f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertex color
|
// vertex color
|
||||||
ReadString(f,s);
|
ReadString(f,s);
|
||||||
if( s == std::string("HAS_VERTEX_COLOR_OCF")) {
|
if( s == std::string("HAS_VERTEX_COLOR_OCF")) {
|
||||||
vert.EnableColor();
|
vert.EnableColor();
|
||||||
fread((void*)&vert.CV[0],sizeof(VertexType::ColorType),vert.size(),f);
|
fread((void*)&vert.CV[0],sizeof(typename VertexType::ColorType),vert.size(),f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertex normal
|
// vertex normal
|
||||||
ReadString(f,s);
|
ReadString(f,s);
|
||||||
if( s == std::string("HAS_VERTEX_NORMAL_OCF")) {
|
if( s == std::string("HAS_VERTEX_NORMAL_OCF")) {
|
||||||
vert.EnableNormal();
|
vert.EnableNormal();
|
||||||
fread((void*)&vert.NV[0],sizeof(VertexType::NormalType),vert.size(),f);
|
fread((void*)&vert.NV[0],sizeof(typename VertexType::NormalType),vert.size(),f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertex mark
|
// vertex mark
|
||||||
ReadString(f,s);
|
ReadString(f,s);
|
||||||
if( s == std::string("HAS_VERTEX_MARK_OCF")) {
|
if( s == std::string("HAS_VERTEX_MARK_OCF")) {
|
||||||
vert.EnableMark();
|
vert.EnableMark();
|
||||||
fread((void*)&vert.MV[0],sizeof(VertexType::MarkType),vert.size(),f);
|
fread((void*)&vert.MV[0],sizeof(typename VertexType::MarkType),vert.size(),f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertex texcoord
|
// vertex texcoord
|
||||||
ReadString(f,s);
|
ReadString(f,s);
|
||||||
if( s == std::string("HAS_VERTEX_TEXCOORD_OCF")) {
|
if( s == std::string("HAS_VERTEX_TEXCOORD_OCF")) {
|
||||||
vert.EnableTexCoord();
|
vert.EnableTexCoord();
|
||||||
fread((void*)&vert.TV[0],sizeof(vertex::vector_ocf<VertexType>::TexCoordType),vert.size(),f);
|
fread((void*)&vert.TV[0],sizeof(typename VertexType::TexCoordType),vert.size(),f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertex-face adjacency
|
// vertex-face adjacency
|
||||||
ReadString(f,s);
|
ReadString(f,s);
|
||||||
if( s == std::string("HAS_VERTEX_VFADJACENCY_OCF")) {
|
if( s == std::string("HAS_VERTEX_VFADJACENCY_OCF")) {
|
||||||
vert.EnableVFAdjacency();
|
vert.EnableVFAdjacency();
|
||||||
fread((void*)&vert.AV[0],sizeof(vertex::vector_ocf<VertexType>::VFAdjType),vert.size(),f);
|
fread((void*)&vert.AV[0],sizeof(typename vertex::vector_ocf<VertexType>::VFAdjType),vert.size(),f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertex curvature
|
// vertex curvature
|
||||||
ReadString(f,s);
|
ReadString(f,s);
|
||||||
if( s == std::string("HAS_VERTEX_CURVATURE_OCF")) {
|
if( s == std::string("HAS_VERTEX_CURVATURE_OCF")) {
|
||||||
vert.EnableCurvature();
|
vert.EnableCurvature();
|
||||||
fread((void*)&vert.CuV[0],sizeof(VertexType::CurvatureType),vert.size(),f);
|
fread((void*)&vert.CuV[0],sizeof(typename VertexType::CurvatureType),vert.size(),f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertex curvature dir
|
// vertex curvature dir
|
||||||
ReadString(f,s);
|
ReadString(f,s);
|
||||||
if( s == std::string("HAS_VERTEX_CURVATUREDIR_OCF")) {
|
if( s == std::string("HAS_VERTEX_CURVATUREDIR_OCF")) {
|
||||||
vert.EnableCurvatureDir();
|
vert.EnableCurvatureDir();
|
||||||
fread((void*)&vert.CuDV[0],sizeof(VertexType::CurvatureDirType),vert.size(),f);
|
fread((void*)&vert.CuDV[0],sizeof(typename VertexType::CurvatureDirType),vert.size(),f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertex radius
|
// vertex radius
|
||||||
ReadString(f,s);
|
ReadString(f,s);
|
||||||
if( s == std::string("HAS_VERTEX_RADIUS_OCF")) {
|
if( s == std::string("HAS_VERTEX_RADIUS_OCF")) {
|
||||||
vert.EnableRadius();
|
vert.EnableRadius();
|
||||||
fread((void*)&vert.RadiusV[0],sizeof(vertex::vector_ocf<VertexType>::RadiusType),vert.size(),f);
|
fread((void*)&vert.RadiusV[0],sizeof(typename VertexType::RadiusType),vert.size(),f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -613,17 +613,17 @@ namespace io {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool GetHeader(char * filename,std::vector<std::string>& nameV, std::vector<std::string>& nameF, unsigned int & vertSize, unsigned int &faceSize,vcg::Box3f & bbox,int & mask){
|
static bool GetHeader(const char * filename,std::vector<std::string>& nameV, std::vector<std::string>& nameF, unsigned int & vertSize, unsigned int &faceSize,vcg::Box3f & bbox,int & mask){
|
||||||
F() = fopen(filename,"rb");
|
F() = fopen(filename,"rb");
|
||||||
return GetHeader(nameV, nameF, vertSize, faceSize,bbox,mask);
|
return GetHeader(nameV, nameF, vertSize, faceSize,bbox,mask);
|
||||||
fclose(F());
|
fclose(F());
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static bool LoadMask(FILE * f, int & mask){
|
static bool LoadMask(const char * f, int & mask){
|
||||||
std::vector<std::string> nameV;
|
std::vector<std::string> nameV;
|
||||||
std::vector<std::string> nameF;
|
std::vector<std::string> nameF;
|
||||||
int vertSize, faceSize;
|
unsigned int vertSize, faceSize;
|
||||||
vcg::Box3f bbox;
|
vcg::Box3f bbox;
|
||||||
GetHeader(f,nameV,nameF,vertSize, faceSize, bbox, mask);
|
GetHeader(f,nameV,nameF,vertSize, faceSize, bbox, mask);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue