def _read(self, stream, text, byte_order):
'''
Read the actual data from a PLY file.
'''
if self._have_list:
# There are list properties, so a simple load is
# impossible.
if text:
self._read_txt(stream)
else:
self._read_bin(stream, byte_order)
else:
# There are no list properties, so loading the data is
# much more straightforward.
if text:
self.data = _np.loadtxt(
_islice(iter(stream.readline, ''), self.count),
self.dtype())
else:
self.data = _np.fromfile(
stream, self.dtype(byte_order), self.count)
评论列表
文章目录