support now face coords for OM reader/writer
This commit is contained in:
@@ -182,7 +182,6 @@ bool _OMReader_::read_binary(std::istream& _is, BaseImporter& _bi, Options& _opt
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
while (!_is.eof()) {
|
||||
bytes_ += restore(_is, chunk_header_, swap);
|
||||
|
||||
@@ -661,6 +660,28 @@ bool _OMReader_::read_binary_halfedge_chunk(std::istream &_is, BaseImporter &_bi
|
||||
bytes_ += restore_binary_custom_data(_is, _bi.kernel()->_get_hprop(property_name_), 2 * header_.n_edges_, _swap);
|
||||
break;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
case Chunk::Type_Texcoord:
|
||||
{
|
||||
assert( OMFormat::dimensions(chunk_header_) == size_t(OpenMesh::Vec2f::dim()));
|
||||
|
||||
//fileOptions_ += OpenMesh::IO::Options::FaceTexCoord;
|
||||
|
||||
if (_opt.face_has_texcoord())
|
||||
{
|
||||
_bi.request_face_texcoords2D();
|
||||
}
|
||||
OpenMesh::Vec2f v2f;
|
||||
for (size_t e_idx = 0; e_idx < header_.n_edges_*2; ++e_idx)
|
||||
{
|
||||
bytes_ += vector_restore(_is, v2f, _swap);
|
||||
if (_opt.face_has_texcoord())
|
||||
_bi.set_texcoord(HalfedgeHandle(int(e_idx)), v2f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------
|
||||
case Chunk::Type_Topology:
|
||||
{
|
||||
std::vector<HalfedgeHandle> next_halfedges;
|
||||
|
||||
Reference in New Issue
Block a user