Commit d91986fc authored by Jan Möbius's avatar Jan Möbius

PLY: add support for unsigned custom property length

parent b15e09d1
......@@ -219,11 +219,11 @@ void _PLYReader_::readCreateCustomProperty(std::istream& _in, BaseImporter& _bi,
}
//init vector
int numberOfValues;
read(_listType, _in, numberOfValues, OpenMesh::GenProg::Bool2Type<binary>());
unsigned int numberOfValues;
readInteger(_listType, _in, numberOfValues, OpenMesh::GenProg::Bool2Type<binary>());
std::vector<T> vec(numberOfValues);
//read and assign
for (int i = 0; i < numberOfValues; ++i)
for (unsigned int i = 0; i < numberOfValues; ++i)
{
read(_valueType, _in, vec[i], OpenMesh::GenProg::Bool2Type<binary>());
}
......
......@@ -212,6 +212,18 @@ private:
_in >> _value;
}
template<typename T>
inline void readInteger(_PLYReader_::ValueType _type, std::istream& _in, T& _value, OpenMesh::GenProg::TrueType /*_binary*/) const
{
readInteger(_type, _in, _value);
}
template<typename T>
inline void readInteger(_PLYReader_::ValueType _type, std::istream& _in, T& _value, OpenMesh::GenProg::FalseType /*_binary*/) const
{
_in >> _value;
}
//read and assign custom properties with the given type. Also creates property, if not exist
template<bool binary, typename T, typename Handle>
void readCreateCustomProperty(std::istream& _in, BaseImporter& _bi, Handle _h, const std::string& _propName, const ValueType _valueType, const ValueType _listType) const;
......
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