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
Hurstel
CGoGN
Commits
8a9198cc
Commit
8a9198cc
authored
Mar 20, 2012
by
Kenneth Vanhoey
Browse files
import Ply with color encoded as uint8
parent
132c1266
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/Algo/Import/import2tablesSurface.hpp
View file @
8a9198cc
...
...
@@ -381,10 +381,14 @@ bool MeshTablesSurface<PFP>::importOff(const std::string& filename, std::vector<
template
<
typename
PFP
>
bool
MeshTablesSurface
<
PFP
>::
importMeshBin
(
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
)
{
std
::
cout
<<
filename
<<
std
::
endl
;
AttributeHandler
<
typename
PFP
::
VEC3
>
positions
=
m_map
.
template
getAttribute
<
typename
PFP
::
VEC3
>(
VERTEX
,
"position"
)
;
if
(
!
positions
.
isValid
())
{
std
::
cout
<<
"Not valid"
<<
std
::
endl
;
positions
=
m_map
.
template
addAttribute
<
typename
PFP
::
VEC3
>(
VERTEX
,
"position"
)
;
}
attrNames
.
push_back
(
positions
.
name
())
;
...
...
@@ -413,7 +417,7 @@ bool MeshTablesSurface<PFP>::importMeshBin(const std::string& filename, std::vec
for
(
unsigned
int
vxNum
=
0
;
vxNum
<
m_nbVertices
;
++
vxNum
)
{
VEC3
pos
;
Geom
::
Vec3f
pos
;
fp
.
read
((
char
*
)
&
pos
[
0
],
sizeof
(
float
))
;
fp
.
read
((
char
*
)
&
pos
[
1
],
sizeof
(
float
))
;
fp
.
read
((
char
*
)
&
pos
[
2
],
sizeof
(
float
))
;
...
...
@@ -423,6 +427,7 @@ bool MeshTablesSurface<PFP>::importMeshBin(const std::string& filename, std::vec
verticesID
.
push_back
(
id
)
;
}
std
::
cout
<<
positions
[
0
]
<<
std
::
endl
;
// Read foreach face
m_nbEdges
.
reserve
(
m_nbFaces
)
;
...
...
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