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
38f91aa0
Commit
38f91aa0
authored
Mar 02, 2012
by
Kenneth Vanhoey
Browse files
export pour SLF generique (rangement à venir)
parent
62b16433
Changes
4
Hide whitespace changes
Inline
Side-by-side
build/.gitignore
deleted
100644 → 0
View file @
62b16433
include/Algo/Export/export.h
View file @
38f91aa0
...
...
@@ -103,7 +103,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typ
* @return true
*/
template
<
typename
PFP
>
bool
exportPLYPTM
(
typename
PFP
::
MAP
&
map
,
const
char
*
filename
,
const
typename
PFP
::
TVEC3
&
position
,
const
typename
PFP
::
TVEC3
frame
[
3
],
const
typename
PFP
::
TVEC3
colorPTM
[
6
],
const
FunctorSelect
&
good
)
;
bool
exportPLYPTM
(
typename
PFP
::
MAP
&
map
,
const
char
*
filename
,
const
typename
PFP
::
TVEC3
&
position
,
const
typename
PFP
::
TVEC3
frame
[
3
],
const
typename
PFP
::
TVEC3
colorPTM
[
6
],
const
FunctorSelect
&
good
=
allDarts
)
;
}
// namespace Export
...
...
include/Algo/Export/export.hpp
View file @
38f91aa0
...
...
@@ -387,9 +387,14 @@ bool exportPlySLF(typename PFP::MAP& map, const char* filename, const typename P
coefs
[
i
]
=
map
.
template
getAttribute
<
VEC3
>(
VERTEX
,
name
.
str
())
;
}
std
::
string
file
(
filename
)
;
size_t
pos
=
file
.
rfind
(
"."
)
;
// position of "." in filename
std
::
cout
<<
file
<<
" ; "
<<
pos
<<
std
::
endl
;
std
::
string
extension
=
file
.
substr
(
pos
)
;
out
<<
"ply"
<<
std
::
endl
;
out
<<
"format ascii 1.0"
<<
std
::
endl
;
out
<<
"comment ply SLF (K. Vanhoey generic format)
"
<<
std
::
endl
;
out
<<
"comment ply SLF (K. Vanhoey generic format)
: SLF_"
<<
((
extension
==
".plyPTMext"
)
?
"PTMext"
:
"SHreal"
)
<<
std
::
endl
;
out
<<
"element vertex "
<<
vertices
.
size
()
<<
std
::
endl
;
out
<<
"property float x"
<<
std
::
endl
;
out
<<
"property float y"
<<
std
::
endl
;
...
...
include/Algo/Import/import2tablesSurface.hpp
View file @
38f91aa0
...
...
@@ -682,7 +682,7 @@ bool MeshTablesSurface<PFP>::importPlyPTMgeneric(const std::string& filename, st
binormal
=
true
;
else
if
(
tag
==
std
::
string
(
"nx"
)
||
tag
==
std
::
string
(
"ny"
)
||
tag
==
std
::
string
(
"nz"
))
normal
=
true
;
else
if
(
tag
.
substr
(
2
,
2
)
==
std
::
string
(
"_
a
"
))
if
(
tag
.
substr
(
0
,
1
)
==
std
::
string
(
"C"
)
&&
tag
.
substr
(
2
,
1
)
==
std
::
string
(
"_"
))
++
nbCoefsPerPol
;
}
while
(
tag
!=
std
::
string
(
"face"
))
;
unsigned
int
nbRemainders
=
nbProps
;
// # remaining properties
...
...
@@ -758,7 +758,7 @@ bool MeshTablesSurface<PFP>::importPlyPTMgeneric(const std::string& filename, st
// Read faces index
m_nbEdges
.
reserve
(
m_nbFaces
)
;
m_emb
.
reserve
(
3
*
m_nbFaces
)
;
m_emb
.
reserve
(
3
*
m_nbFaces
)
;
for
(
unsigned
int
i
=
0
;
i
<
m_nbFaces
;
++
i
)
{
// read the indices of vertices for current face
...
...
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