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
CGoGN
CGoGN
Commits
6d652049
Commit
6d652049
authored
Mar 13, 2012
by
Kenneth Vanhoey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import/export for SLF in binary works
parent
b9d06a5a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
4 deletions
+20
-4
include/Algo/Export/export.h
include/Algo/Export/export.h
+15
-0
include/Utils/Qt/qtSimple.h
include/Utils/Qt/qtSimple.h
+1
-1
src/Utils/Qt/qtSimple.cpp
src/Utils/Qt/qtSimple.cpp
+2
-2
src/Utils/Qt/qtgl.cpp
src/Utils/Qt/qtgl.cpp
+2
-1
No files found.
include/Algo/Export/export.h
View file @
6d652049
...
...
@@ -78,6 +78,21 @@ bool exportTrian(typename PFP::MAP& map, const typename PFP::TVEC3& position, ch
template
<
typename
PFP
>
bool
exportPlySLFgeneric
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
=
allDarts
)
;
/**
* export the map into a PLYPTMgeneric file (K. Vanhoey generic format).
*
* exports position + any attribute named : "frame_T" (frame tangent : VEC3), "frame_B" (frame binormal : VEC3), "frame_N" (frame normal : VEC3),
* "colorPTM_a<i> : VEC3" (coefficient number i of the 3 polynomials - one per channel - ; the max i depends on the degree of the PTM polynomial),
* "errL2 : REAL" (L2 fitting error), "errLmax : REAL" (maximal fitting error), "stdDev : REAL" (standard deviation of the L2 fitting errors).
*
* @param map map to be exported
* @param filename filename of ply file
* @param position the position container
* @return true
*/
template
<
typename
PFP
>
bool
exportPlySLFgenericBin
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
=
allDarts
)
;
/**
* export the map into a PLYSLF file (K. Vanhoey generic format).
*
...
...
include/Utils/Qt/qtSimple.h
View file @
6d652049
...
...
@@ -402,7 +402,7 @@ public:
*/
std
::
string
selectFileSave
(
const
std
::
string
&
title
=
"open file"
,
const
std
::
string
&
dir
=
"."
,
const
std
::
string
&
filters
=
"all (*.*)"
);
void
snapshot
(
const
QString
&
filename
);
void
snapshot
(
const
QString
&
filename
,
const
char
*
format
=
0
,
const
int
&
quality
=
-
1
);
public
slots
:
virtual
void
cb_New
()
{
std
::
cerr
<<
"callback not implemented"
<<
std
::
endl
;
}
...
...
src/Utils/Qt/qtSimple.cpp
View file @
6d652049
...
...
@@ -514,10 +514,10 @@ void SimpleQT::cb_about()
QMessageBox
::
about
(
this
,
tr
(
"About App"
),
m_helpString
.
c_str
());
}
void
SimpleQT
::
snapshot
(
const
QString
&
filename
)
void
SimpleQT
::
snapshot
(
const
QString
&
filename
,
const
char
*
format
,
const
int
&
quality
)
{
QImage
im
=
m_glWidget
->
grabFrameBuffer
(
false
);
im
.
save
(
filename
);
im
.
save
(
filename
,
format
,
quality
);
}
void
SimpleQT
::
setGeometry
(
int
x
,
int
y
,
int
w
,
int
h
)
...
...
src/Utils/Qt/qtgl.cpp
View file @
6d652049
...
...
@@ -117,7 +117,7 @@ void GLWidget::recalcModelView()
oglTranslate
(
m_obj_pos
[
0
],
m_obj_pos
[
1
],
m_obj_pos
[
2
]);
// ajout transformation
//
m_cbs->modelViewMatrix() *=m_cbs->transfoMatrix();
//
m_cbs->modelViewMatrix() *=
m_cbs->transfoMatrix();
newModel
=
0
;
...
...
@@ -487,6 +487,7 @@ float GLWidget::getWidthInWorld(unsigned int pixel_width, const Geom::Vec3f& cen
void
GLWidget
::
transfoRotate
(
float
angle
,
float
x
,
float
y
,
float
z
)
{
m_cbs
->
transfoMatrix
()
=
glm
::
rotate
(
m_cbs
->
transfoMatrix
(),
angle
,
glm
::
vec3
(
x
,
y
,
z
));
recalcModelView
()
;
}
void
GLWidget
::
transfoTranslate
(
float
tx
,
float
ty
,
float
tz
)
...
...
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