Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Pitiot
CGoGN
Commits
424530df
Commit
424530df
authored
Apr 27, 2012
by
Lionel Untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import / export choupi
parent
da676e6e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
1 deletion
+52
-1
include/Algo/Export/export.h
include/Algo/Export/export.h
+8
-1
include/Algo/Export/export.hpp
include/Algo/Export/export.hpp
+33
-0
include/Algo/Import/import.h
include/Algo/Import/import.h
+11
-0
No files found.
include/Algo/Export/export.h
View file @
424530df
...
@@ -134,8 +134,15 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
...
@@ -134,8 +134,15 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const typename PFP::TVEC3& posi
template
<
typename
PFP
>
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
=
allDarts
)
;
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
)
;
/**
* export meshes used at the workbench
* export just a list of vertices and edges connectivity
* @param map
* @param position
* @return
*/
template
<
typename
PFP
>
template
<
typename
PFP
>
bool
exportChoupi
<
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
const
FunctorSelect
&
good
=
allDarts
)
;
bool
exportChoupi
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
=
allDarts
)
;
}
// namespace Export
}
// namespace Export
...
...
include/Algo/Export/export.hpp
View file @
424530df
...
@@ -918,6 +918,39 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
...
@@ -918,6 +918,39 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
return
true
;
return
true
;
}
}
template
<
typename
PFP
>
bool
exportChoupi
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
)
{
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
VEC3
VEC3
;
std
::
ofstream
out
(
filename
,
std
::
ios
::
out
)
;
if
(
!
out
.
good
())
{
CGoGNerr
<<
"Unable to open file "
<<
CGoGNendl
;
return
false
;
}
out
<<
map
.
getNbOrbits
(
VERTEX
)
<<
" "
<<
map
.
getNbOrbits
(
EDGE
)
<<
std
::
endl
;
TraversorV
<
typename
PFP
::
MAP
>
travV
(
map
);
for
(
Dart
dit
=
travV
.
begin
()
;
dit
!=
travV
.
end
()
;
dit
=
travV
.
next
())
{
out
<<
map
.
getEmbedding
(
VERTEX
,
dit
)
<<
" "
<<
position
[
dit
]
<<
std
::
endl
;
}
TraversorE
<
typename
PFP
::
MAP
>
travE
(
map
);
unsigned
int
indexE
=
0
;
for
(
Dart
dit
=
travE
.
begin
()
;
dit
!=
travE
.
end
()
;
dit
=
travE
.
next
())
{
out
<<
indexE
<<
" "
<<
map
.
getEmbedding
(
VERTEX
,
dit
)
<<
" "
<<
map
.
getEmbedding
(
VERTEX
,
map
.
phi2
(
dit
))
<<
std
::
endl
;
++
indexE
;
}
out
.
close
()
;
return
true
;
}
}
// namespace Export
}
// namespace Export
}
// namespace Algo
}
// namespace Algo
...
...
include/Algo/Import/import.h
View file @
424530df
...
@@ -83,6 +83,15 @@ template <typename PFP>
...
@@ -83,6 +83,15 @@ template <typename PFP>
bool
importMoka
(
typename
PFP
::
MAP
&
gmap
,
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
);
bool
importMoka
(
typename
PFP
::
MAP
&
gmap
,
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
);
/**
* import a Choupi file
* @param map
* @param filename
* @return
*/
template
<
typename
PFP
>
bool
importChoupi
(
const
std
::
string
&
filename
,
const
std
::
vector
<
typename
PFP
::
VEC3
>&
tabV
,
const
std
::
vector
<
unsigned
int
>&
tabE
);
/*
/*
* TODO a transformer en utilisant un MeshTableVolume.
* TODO a transformer en utilisant un MeshTableVolume.
*/
*/
...
@@ -117,4 +126,6 @@ bool importTs(typename PFP::MAP& the_map, const std::string& filename, std::vect
...
@@ -117,4 +126,6 @@ bool importTs(typename PFP::MAP& the_map, const std::string& filename, std::vect
#include "Algo/Import/importTs.hpp"
#include "Algo/Import/importTs.hpp"
#include "Algo/Import/importNodeEle.hpp"
#include "Algo/Import/importNodeEle.hpp"
#include "Algo/Import/importChoupi.hpp"
#endif
#endif
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