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
Etienne Schmitt
CGoGN
Commits
a04ff05d
Commit
a04ff05d
authored
Dec 07, 2011
by
Sylvain Thery
Browse files
remove remaining ctm
parent
bbbb8e0f
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/Algo/Export/export.h
View file @
a04ff05d
...
...
@@ -63,14 +63,6 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
template
<
typename
PFP
>
bool
exportTrian
(
typename
PFP
::
MAP
&
the_map
,
const
typename
PFP
::
TVEC3
&
position
,
char
*
filename
,
const
FunctorSelect
&
good
=
SelectorTrue
())
;
/**
* export the map into a Trian file
* @param the_map map to be exported
* @param filename filename of ply file
* @return true
*/
template
<
typename
PFP
>
bool
exportCTM
(
typename
PFP
::
MAP
&
the_map
,
const
typename
PFP
::
TVEC3
&
position
,
const
std
::
string
&
filename
,
const
FunctorSelect
&
good
=
SelectorTrue
())
;
/**
* export the map into a PLYPTMgeneric file (K. Vanhoey generic format).
...
...
include/Algo/Export/export.hpp
View file @
a04ff05d
...
...
@@ -183,68 +183,6 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
return
true
;
}
template
<
typename
PFP
>
bool
exportCTM
(
typename
PFP
::
MAP
&
the_map
,
const
typename
PFP
::
TVEC3
&
position
,
const
std
::
string
&
filename
,
const
FunctorSelect
&
good
)
{
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
VEC3
VEC3
;
AutoAttributeHandler
<
unsigned
int
>
tableVertLab
(
the_map
,
VERTEX
);
CellMarker
markV
(
the_map
,
VERTEX
);
unsigned
int
nbDarts
=
the_map
.
getNbDarts
()
;
std
::
vector
<
CTMfloat
>
verticesBuffer
;
std
::
vector
<
CTMuint
>
indicesBuffer
;
verticesBuffer
.
reserve
(
nbDarts
/
5
);
// TODO non optimal reservation
indicesBuffer
.
reserve
(
nbDarts
/
3
);
DartMarker
markF
(
the_map
);
unsigned
int
lab
=
0
;
for
(
Dart
d
=
the_map
.
begin
();
d
!=
the_map
.
end
();
the_map
.
next
(
d
))
{
if
(
good
(
d
)
&&
!
markF
.
isMarked
(
d
))
{
markF
.
markOrbit
(
FACE
,
d
)
;
Dart
e
=
d
;
do
{
if
(
!
markV
.
isMarked
(
e
))
{
tableVertLab
[
e
]
=
lab
++
;
markV
.
mark
(
e
);
const
VEC3
&
vert
=
position
[
e
];
verticesBuffer
.
push_back
(
vert
[
0
]);
verticesBuffer
.
push_back
(
vert
[
1
]);
verticesBuffer
.
push_back
(
vert
[
2
]);
}
indicesBuffer
.
push_back
(
tableVertLab
[
e
]);
e
=
the_map
.
phi1
(
e
);
}
while
(
e
!=
d
);
}
}
// Save the file using the OpenCTM API
CTMexporter
ctm
;
// Define mesh
ctm
.
DefineMesh
(
&
(
verticesBuffer
[
0
])
,
verticesBuffer
.
size
()
/
3
,
&
(
indicesBuffer
[
0
])
,
indicesBuffer
.
size
()
/
3
,
NULL
);
ctm
.
VertexPrecisionRel
(
0.0001
f
);
// Set compression method and level
ctm
.
CompressionMethod
(
CTM_METHOD_MG2
);
ctm
.
CompressionLevel
(
9
);
// Export file
ctm
.
Save
(
filename
.
c_str
());
return
true
;
}
template
<
typename
PFP
>
bool
exportPlyPTMgeneric
(
typename
PFP
::
MAP
&
map
,
const
char
*
filename
,
const
typename
PFP
::
TVEC3
&
position
,
const
FunctorSelect
&
good
)
...
...
include/Algo/Import/import2tables.h
View file @
a04ff05d
...
...
@@ -52,7 +52,7 @@ namespace Import
namespace
ImportSurfacique
{
enum
ImportType
{
UNKNOWNSURFACE
,
TRIAN
,
TRIANBGZ
,
PLY
,
PLYPTM
,
PLYPTMgeneric
,
OFF
,
OBJ
,
CTM
,
VRML
,
AHEM
};
enum
ImportType
{
UNKNOWNSURFACE
,
TRIAN
,
TRIANBGZ
,
PLY
,
PLYPTM
,
PLYPTMgeneric
,
OFF
,
OBJ
,
VRML
,
AHEM
};
}
namespace
ImportVolumique
...
...
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