Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenMesh
OpenMesh
Commits
bca37d96
Commit
bca37d96
authored
May 17, 2016
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed binary reader errors in ply reader. (Thanks to Michael Kremer for the patch).
parent
f19aca3d
Pipeline
#1865
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/OpenMesh/Core/IO/reader/PLYReader.cc
src/OpenMesh/Core/IO/reader/PLYReader.cc
+5
-3
No files found.
src/OpenMesh/Core/IO/reader/PLYReader.cc
View file @
bca37d96
...
...
@@ -606,7 +606,7 @@ bool _PLYReader_::read_binary(std::istream& _in, BaseImporter& _bi, bool /*_swap
case
VERTEX_INDICES
:
// nV = number of Vertices for current face
unsigned
int
nV
;
read
Value
(
prop
.
listIndexType
,
_in
,
nV
);
read
Integer
(
prop
.
listIndexType
,
_in
,
nV
);
if
(
nV
==
3
)
{
vhandles
.
resize
(
3
);
...
...
@@ -636,11 +636,11 @@ bool _PLYReader_::read_binary(std::istream& _in, BaseImporter& _bi, bool /*_swap
if
(
_opt
.
check
(
Options
::
Custom
)
&&
fh
.
is_valid
())
readCustomProperty
<
true
>
(
_in
,
_bi
,
fh
,
prop
.
name
,
prop
.
value
,
prop
.
listIndexType
);
else
consume_input
(
_in
,
scalar_size_
[
vertex
Properties_
[
propertyIndex
].
value
]);
consume_input
(
_in
,
scalar_size_
[
face
Properties_
[
propertyIndex
].
value
]);
break
;
default:
consume_input
(
_in
,
scalar_size_
[
vertex
Properties_
[
propertyIndex
].
value
]);
consume_input
(
_in
,
scalar_size_
[
face
Properties_
[
propertyIndex
].
value
]);
break
;
}
}
...
...
@@ -1154,6 +1154,8 @@ bool _PLYReader_::can_u_read(std::istream& _is) const {
indexType
=
ValueTypeUINT8
;
}
else
if
(
listIndexType
==
"uchar"
)
{
indexType
=
ValueTypeUCHAR
;
}
else
if
(
listIndexType
==
"int"
)
{
indexType
=
ValueTypeINT
;
}
else
{
omerr
()
<<
"Unsupported Index type for property list: "
<<
listIndexType
<<
std
::
endl
;
continue
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment