Commit 589c0b8b authored by Jan Möbius's avatar Jan Möbius

Merge branch 'PLY_double_patch' into 'master'

PLY Reader: Fix reading doubles from PLY, missing cast (Thanks to Leo Walsh for the patch)

See merge request !220
parents 53616eb9 32c952c8
Pipeline #10341 passed with stages
in 49 minutes and 6 seconds
...@@ -21,6 +21,12 @@ ...@@ -21,6 +21,12 @@
<li>PropertyManager: add hasProperty function</li> <li>PropertyManager: add hasProperty function</li>
</ul> </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> <b>Build System</b>
<ul> <ul>
<li>Generate OpenMeshConfig.cmake (Thanks to Thibault Payet for the patch)</li> <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 ...@@ -804,6 +804,12 @@ void _PLYReader_::readValue(ValueType _type, std::istream& _in, float& _value) c
restore(_in, tmp, options_.check(Options::MSB)); restore(_in, tmp, options_.check(Options::MSB));
_value = tmp; _value = tmp;
break; break;
case ValueTypeDOUBLE:
case ValueTypeFLOAT64:
double dtmp;
readValue(_type, _in, dtmp);
_value = static_cast<float>(dtmp);
break;
default: default:
_value = 0.0; _value = 0.0;
std::cerr << "unsupported conversion type to float: " << _type << std::endl; std::cerr << "unsupported conversion type to float: " << _type << std::endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment