ply export custom point attribute - set list size to uchar type
This commit is contained in:
parent
6509139fc6
commit
702c139108
|
@ -490,18 +490,18 @@ public:
|
|||
}
|
||||
}
|
||||
else { //it is a Poin3f or a Point3d attribute. Saving it as a list
|
||||
static const unsigned int psize = 3;
|
||||
static const unsigned char psize = 3;
|
||||
switch (pi.VertDescriptorVec[i].stotype1)
|
||||
{
|
||||
case ply::T_FLOAT :
|
||||
fwrite(&psize, sizeof(unsigned int), 1,fpout);
|
||||
fwrite(&psize, sizeof(unsigned char), 1,fpout);
|
||||
fwrite(&thp3fv[i][vp][0], sizeof(float), 1,fpout);
|
||||
fwrite(&thp3fv[i][vp][1], sizeof(float), 1,fpout);
|
||||
fwrite(&thp3fv[i][vp][2], sizeof(float), 1,fpout);
|
||||
break;
|
||||
//fprintf(fpout,"%d %f %f %f", 3, thp3fv[i][vp][0], thp3fv[i][vp][1], thp3fv[i][vp][2]); break;
|
||||
case ply::T_DOUBLE :
|
||||
fwrite(&psize, sizeof(unsigned int), 1,fpout);
|
||||
fwrite(&psize, sizeof(unsigned char), 1,fpout);
|
||||
fwrite(&thp3dv[i][vp][0], sizeof(double), 1,fpout);
|
||||
fwrite(&thp3dv[i][vp][1], sizeof(double), 1,fpout);
|
||||
fwrite(&thp3dv[i][vp][2], sizeof(double), 1,fpout);
|
||||
|
|
|
@ -130,8 +130,8 @@ public:
|
|||
p.stotype1 = propertyType;
|
||||
p.memtype1 = propertyType;
|
||||
p.islist = true;
|
||||
p.stotype2 = vcg::ply::PlyTypes::T_UINT;
|
||||
p.stotype2 = vcg::ply::PlyTypes::T_UINT;
|
||||
p.memtype2 = vcg::ply::PlyTypes::T_UCHAR;
|
||||
p.stotype2 = vcg::ply::PlyTypes::T_UCHAR;
|
||||
|
||||
if (elemType == 0){ //vertex
|
||||
VertAttrNameVec.push_back(attrName);
|
||||
|
|
|
@ -176,7 +176,7 @@ public:
|
|||
int bestored; // 1 se va storata
|
||||
PropDescriptor desc; // Descrittore di memorizzazione
|
||||
|
||||
readelemcb cb; // Callback di lettura
|
||||
readelemcb cb = nullptr; // Callback di lettura
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue