Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Thomas Pitiot
CGoGN
Commits
38f91aa0
Commit
38f91aa0
authored
Mar 02, 2012
by
Kenneth Vanhoey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
export pour SLF generique (rangement à venir)
parent
62b16433
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
build/.gitignore
build/.gitignore
+0
-0
include/Algo/Export/export.h
include/Algo/Export/export.h
+1
-1
include/Algo/Export/export.hpp
include/Algo/Export/export.hpp
+6
-1
include/Algo/Import/import2tablesSurface.hpp
include/Algo/Import/import2tablesSurface.hpp
+2
-2
No files found.
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
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