Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CGoGN
CGoGN
Commits
dfbf0d92
Commit
dfbf0d92
authored
Mar 12, 2012
by
Kenneth Vanhoey
Browse files
binary import/export for SLF
parent
897b97cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/Algo/Export/export.hpp
View file @
dfbf0d92
...
...
@@ -532,9 +532,9 @@ bool exportPlySLFgenericBin(typename PFP::MAP& map, const typename PFP::TVEC3& p
std
::
string
tmp
;
tmp
=
std
::
string
(
"ply"
)
;
out
.
write
(
tmp
,
tmp
.
length
()
*
sizeof
(
char
))
;
out
.
write
(
tmp
.
c_str
()
,
tmp
.
length
()
*
sizeof
(
char
))
;
tmp
=
std
::
string
(
"format binary_little_endian 1.0"
)
;
out
.
write
(
tmp
,
tmp
.
length
()
*
sizeof
(
char
))
;
out
.
write
(
tmp
.
c_str
()
,
tmp
.
length
()
*
sizeof
(
char
))
;
std
::
stringstream
header
;
header
<<
"comment ply SLF (K. Vanhoey generic format): SLF_"
<<
((
extension
==
".plyPTMext"
)
?
"PTMext"
:
"SHreal"
)
<<
std
::
endl
;
...
...
include/Algo/Import/import2tablesSurface.hpp
View file @
dfbf0d92
...
...
@@ -816,6 +816,16 @@ bool MeshTablesSurface<PFP>::importPlySLFgenericBin(const std::string& filename,
return
false
;
}
buff
=
new
char
[
31
]
;
fp
.
read
(
buff
,
31
)
;
std
::
string
tag
(
buff
)
;
delete
[]
buff
;
if
(
tag
!=
std
::
string
(
"format binary_little_endian 1.0"
))
// verify file type
{
CGoGNerr
<<
filename
<<
" is not a little endian file !"
<<
CGoGNout
;
return
false
;
}
// read CHNum
unsigned
int
CHNum
;
fp
.
read
((
char
*
)
&
CHNum
,
sizeof
(
unsigned
int
))
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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