Removed warnings in PLY Reader ( Thanks to Ilya A. Kriveshko)
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@128 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -192,25 +192,25 @@ _PLYReader_::read_ascii(std::fstream& _in, BaseImporter& _bi) const
|
|||||||
break;
|
break;
|
||||||
case COLORRED:
|
case COLORRED:
|
||||||
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
||||||
_in >> tmp; c[0] = tmp * 255.0f;
|
_in >> tmp; c[0] = static_cast<OpenMesh::Vec4i::value_type>(tmp * 255.0f);
|
||||||
}else
|
}else
|
||||||
_in >> c[0];
|
_in >> c[0];
|
||||||
break;
|
break;
|
||||||
case COLORGREEN:
|
case COLORGREEN:
|
||||||
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
||||||
_in >> tmp; c[1] = tmp * 255.0f;
|
_in >> tmp; c[1] = static_cast<OpenMesh::Vec4i::value_type>(tmp * 255.0f);
|
||||||
}else
|
}else
|
||||||
_in >> c[1];
|
_in >> c[1];
|
||||||
break;
|
break;
|
||||||
case COLORBLUE:
|
case COLORBLUE:
|
||||||
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
||||||
_in >> tmp; c[2] = tmp * 255.0f;
|
_in >> tmp; c[2] = static_cast<OpenMesh::Vec4i::value_type>(tmp * 255.0f);
|
||||||
}else
|
}else
|
||||||
_in >> c[2];
|
_in >> c[2];
|
||||||
break;
|
break;
|
||||||
case COLORALPHA:
|
case COLORALPHA:
|
||||||
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
||||||
_in >> tmp; c[3] = tmp * 255.0f;
|
_in >> tmp; c[3] = static_cast<OpenMesh::Vec4i::value_type>(tmp * 255.0f);
|
||||||
}else
|
}else
|
||||||
_in >> c[3];
|
_in >> c[3];
|
||||||
break;
|
break;
|
||||||
@@ -372,28 +372,28 @@ _PLYReader_::read_binary(std::fstream& _in, BaseImporter& _bi, bool /*_swap*/) c
|
|||||||
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
||||||
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,tmp);
|
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,tmp);
|
||||||
|
|
||||||
c[0] = tmp * 255.0f;
|
c[0] = static_cast<OpenMesh::Vec4i::value_type>(tmp * 255.0f);
|
||||||
}else
|
}else
|
||||||
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,c[0]);
|
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,c[0]);
|
||||||
break;
|
break;
|
||||||
case COLORGREEN:
|
case COLORGREEN:
|
||||||
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
||||||
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,tmp);
|
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,tmp);
|
||||||
c[1] = tmp * 255.0f;
|
c[1] = static_cast<OpenMesh::Vec4i::value_type>(tmp * 255.0f);
|
||||||
}else
|
}else
|
||||||
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,c[1]);
|
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,c[1]);
|
||||||
break;
|
break;
|
||||||
case COLORBLUE:
|
case COLORBLUE:
|
||||||
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
||||||
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,tmp);
|
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,tmp);
|
||||||
c[2] = tmp * 255.0f;
|
c[2] = static_cast<OpenMesh::Vec4i::value_type>(tmp * 255.0f);
|
||||||
}else
|
}else
|
||||||
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,c[2]);
|
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,c[2]);
|
||||||
break;
|
break;
|
||||||
case COLORALPHA:
|
case COLORALPHA:
|
||||||
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
if ( vertexPropertyMap_ [ propertyIndex].second == ValueTypeFLOAT32 ){
|
||||||
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,tmp);
|
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,tmp);
|
||||||
c[3] = tmp * 255.0f;
|
c[3] = static_cast<OpenMesh::Vec4i::value_type>(tmp * 255.0f);
|
||||||
}else
|
}else
|
||||||
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,c[3]);
|
readValue(vertexPropertyMap_ [ propertyIndex].second,_in,c[3]);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user