PLY Reader: Fix reading doubles from PLY, missing cast (Thanks to Leo Walsh for the patch)
This commit is contained in:
@@ -21,6 +21,12 @@
|
||||
<li>PropertyManager: add hasProperty function</li>
|
||||
</ul>
|
||||
|
||||
<b>IO</b>
|
||||
<ul>
|
||||
<li>PLY Reader: Fix reading doubles from PLY, missing cast (Thanks to Leo Walsh for the patch)</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<b>Build System</b>
|
||||
<ul>
|
||||
<li>Generate OpenMeshConfig.cmake (Thanks to Thibault Payet for the patch)</li>
|
||||
|
||||
@@ -804,6 +804,12 @@ void _PLYReader_::readValue(ValueType _type, std::istream& _in, float& _value) c
|
||||
restore(_in, tmp, options_.check(Options::MSB));
|
||||
_value = tmp;
|
||||
break;
|
||||
case ValueTypeDOUBLE:
|
||||
case ValueTypeFLOAT64:
|
||||
double dtmp;
|
||||
readValue(_type, _in, dtmp);
|
||||
_value = static_cast<float>(dtmp);
|
||||
break;
|
||||
default:
|
||||
_value = 0.0;
|
||||
std::cerr << "unsupported conversion type to float: " << _type << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user