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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
eeaa15ab
Commit
eeaa15ab
authored
Apr 29, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CGoGNendl -> std::endl : incompatible avec ostream
parent
c1269877
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
90 additions
and
108 deletions
+90
-108
Apps/Tuto/tuto2.h
Apps/Tuto/tuto2.h
+0
-1
include/Algo/Decimation/decimation.hpp
include/Algo/Decimation/decimation.hpp
+1
-1
include/Algo/Export/export.hpp
include/Algo/Export/export.hpp
+55
-63
include/Algo/Import/importInESS.hpp
include/Algo/Import/importInESS.hpp
+1
-2
include/Algo/ProgressiveMesh/pmesh.h
include/Algo/ProgressiveMesh/pmesh.h
+1
-0
include/Algo/ProgressiveMesh/pmesh.hpp
include/Algo/ProgressiveMesh/pmesh.hpp
+8
-18
include/Algo/ProgressiveMesh/vsplit.h
include/Algo/ProgressiveMesh/vsplit.h
+0
-2
include/Geometry/intersection.hpp
include/Geometry/intersection.hpp
+1
-2
include/Utils/qtSimple.h
include/Utils/qtSimple.h
+6
-2
include/Utils/qtgl.h
include/Utils/qtgl.h
+0
-2
include/Utils/qtui.h
include/Utils/qtui.h
+6
-4
include/Utils/quadricRGBfunctions.h
include/Utils/quadricRGBfunctions.h
+4
-4
include/Utils/quantization.hpp
include/Utils/quantization.hpp
+1
-1
src/Utils/GLSLShader.cpp
src/Utils/GLSLShader.cpp
+2
-1
src/Utils/qtSimple.cpp
src/Utils/qtSimple.cpp
+0
-1
src/Utils/qtgl.cpp
src/Utils/qtgl.cpp
+4
-4
No files found.
Apps/Tuto/tuto2.h
View file @
eeaa15ab
...
@@ -47,7 +47,6 @@ using namespace CGoGN ;
...
@@ -47,7 +47,6 @@ using namespace CGoGN ;
* Ajouter les widgets necessaires, mettre des noms clairs pour
* Ajouter les widgets necessaires, mettre des noms clairs pour
* les utiliser dans le .cpp (pour les call back principalement)
* les utiliser dans le .cpp (pour les call back principalement)
*/
*/
class
MyQT
:
public
Utils
::
QT
::
SimpleQT
class
MyQT
:
public
Utils
::
QT
::
SimpleQT
{
{
Q_OBJECT
Q_OBJECT
...
...
include/Algo/Decimation/decimation.hpp
View file @
eeaa15ab
...
@@ -149,7 +149,7 @@ void decimate(
...
@@ -149,7 +149,7 @@ void decimate(
while
(
!
finished
)
while
(
!
finished
)
{
{
CGoGNout
<<
"Countdown : "
;
CGoGNout
<<
"Countdown : "
;
CGoGNout
<<
std
::
setprecision
(
8
)
<<
(
nbVertices
-
nbWantedVertices
)
<<
"
\r
"
<<
std
::
flush
;
CGoGNout
<<
std
::
setprecision
(
8
)
<<
(
nbVertices
-
nbWantedVertices
)
<<
"
\r
"
<<
/* flush */
CGoGNendl
;
if
(
!
selector
->
nextEdge
(
d
))
{
if
(
!
selector
->
nextEdge
(
d
))
{
CGoGNout
<<
CGoGNendl
<<
"out"
<<
CGoGNendl
;
CGoGNout
<<
CGoGNendl
<<
"out"
<<
CGoGNendl
;
...
...
include/Algo/Export/export.hpp
View file @
eeaa15ab
...
@@ -86,28 +86,28 @@ bool exportPLY(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
...
@@ -86,28 +86,28 @@ bool exportPLY(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
}
}
}
}
out
<<
"ply"
<<
CGoGN
endl
;
out
<<
"ply"
<<
std
::
endl
;
out
<<
"format ascii 1.0"
<<
CGoGN
endl
;
out
<<
"format ascii 1.0"
<<
std
::
endl
;
out
<<
"comment no comment"
<<
CGoGN
endl
;
out
<<
"comment no comment"
<<
std
::
endl
;
out
<<
"element vertex "
<<
vertices
.
size
()
<<
CGoGN
endl
;
out
<<
"element vertex "
<<
vertices
.
size
()
<<
std
::
endl
;
out
<<
"property float x"
<<
CGoGN
endl
;
out
<<
"property float x"
<<
std
::
endl
;
out
<<
"property float y"
<<
CGoGN
endl
;
out
<<
"property float y"
<<
std
::
endl
;
out
<<
"property float z"
<<
CGoGN
endl
;
out
<<
"property float z"
<<
std
::
endl
;
out
<<
"element face "
<<
facesSize
.
size
()
<<
CGoGN
endl
;
out
<<
"element face "
<<
facesSize
.
size
()
<<
std
::
endl
;
out
<<
"property list uchar int vertex_indices"
<<
CGoGN
endl
;
out
<<
"property list uchar int vertex_indices"
<<
std
::
endl
;
out
<<
"end_header"
<<
CGoGN
endl
;
out
<<
"end_header"
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
vertices
.
size
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
vertices
.
size
();
++
i
)
{
{
const
VEC3
&
v
=
position
[
vertices
[
i
]]
;
const
VEC3
&
v
=
position
[
vertices
[
i
]]
;
out
<<
v
[
0
]
<<
" "
<<
v
[
1
]
<<
" "
<<
v
[
2
]
<<
CGoGN
endl
;
out
<<
v
[
0
]
<<
" "
<<
v
[
1
]
<<
" "
<<
v
[
2
]
<<
std
::
endl
;
}
}
for
(
unsigned
int
i
=
0
;
i
<
facesSize
.
size
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
facesSize
.
size
();
++
i
)
{
{
out
<<
facesSize
[
i
]
;
out
<<
facesSize
[
i
]
;
for
(
unsigned
int
j
=
0
;
j
<
facesIdx
[
i
].
size
();
++
j
)
for
(
unsigned
int
j
=
0
;
j
<
facesIdx
[
i
].
size
();
++
j
)
out
<<
" "
<<
facesIdx
[
i
][
j
]
;
out
<<
" "
<<
facesIdx
[
i
][
j
]
;
out
<<
CGoGN
endl
;
out
<<
std
::
endl
;
}
}
out
.
close
()
;
out
.
close
()
;
...
@@ -164,20 +164,20 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
...
@@ -164,20 +164,20 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
}
}
}
}
out
<<
"OFF"
<<
CGoGN
endl
;
out
<<
"OFF"
<<
std
::
endl
;
out
<<
vertices
.
size
()
<<
" "
<<
facesSize
.
size
()
<<
" "
<<
0
<<
CGoGN
endl
;
out
<<
vertices
.
size
()
<<
" "
<<
facesSize
.
size
()
<<
" "
<<
0
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
vertices
.
size
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
vertices
.
size
();
++
i
)
{
{
const
VEC3
&
v
=
position
[
vertices
[
i
]]
;
const
VEC3
&
v
=
position
[
vertices
[
i
]]
;
out
<<
v
[
0
]
<<
" "
<<
v
[
1
]
<<
" "
<<
v
[
2
]
<<
CGoGN
endl
;
out
<<
v
[
0
]
<<
" "
<<
v
[
1
]
<<
" "
<<
v
[
2
]
<<
std
::
endl
;
}
}
for
(
unsigned
int
i
=
0
;
i
<
facesSize
.
size
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
facesSize
.
size
();
++
i
)
{
{
out
<<
facesSize
[
i
]
;
out
<<
facesSize
[
i
]
;
for
(
unsigned
int
j
=
0
;
j
<
facesIdx
[
i
].
size
();
++
j
)
for
(
unsigned
int
j
=
0
;
j
<
facesIdx
[
i
].
size
();
++
j
)
out
<<
" "
<<
facesIdx
[
i
][
j
]
;
out
<<
" "
<<
facesIdx
[
i
][
j
]
;
out
<<
CGoGN
endl
;
out
<<
std
::
endl
;
}
}
out
.
close
()
;
out
.
close
()
;
...
@@ -219,7 +219,6 @@ bool exportCTM(typename PFP::MAP& the_map, const typename PFP::TVEC3& position,
...
@@ -219,7 +219,6 @@ bool exportCTM(typename PFP::MAP& the_map, const typename PFP::TVEC3& position,
verticesBuffer
.
push_back
(
vert
[
0
]);
verticesBuffer
.
push_back
(
vert
[
0
]);
verticesBuffer
.
push_back
(
vert
[
1
]);
verticesBuffer
.
push_back
(
vert
[
1
]);
verticesBuffer
.
push_back
(
vert
[
2
]);
verticesBuffer
.
push_back
(
vert
[
2
]);
// CGoGNout << vert<< CGoGNendl;
}
}
indicesBuffer
.
push_back
(
tableVertLab
[
e
]);
indicesBuffer
.
push_back
(
tableVertLab
[
e
]);
e
=
the_map
.
phi1
(
e
);
e
=
the_map
.
phi1
(
e
);
...
@@ -227,13 +226,6 @@ bool exportCTM(typename PFP::MAP& the_map, const typename PFP::TVEC3& position,
...
@@ -227,13 +226,6 @@ bool exportCTM(typename PFP::MAP& the_map, const typename PFP::TVEC3& position,
}
}
}
}
// for (int i=0; i< indicesBuffer.size(); ++i)
// {
// CGoGNout << indicesBuffer[i]<<", "<< CGoGNendl;
// if (i%3==0)
// CGoGNout << CGoGNendl;
// }
// Save the file using the OpenCTM API
// Save the file using the OpenCTM API
CTMexporter
ctm
;
CTMexporter
ctm
;
...
@@ -311,43 +303,43 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
...
@@ -311,43 +303,43 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
}
}
}
}
out
<<
"ply"
<<
CGoGN
endl
;
out
<<
"ply"
<<
std
::
endl
;
out
<<
"format ascii 1.0"
<<
CGoGN
endl
;
out
<<
"format ascii 1.0"
<<
std
::
endl
;
out
<<
"comment ply PTM (F. Larue format)"
<<
CGoGN
endl
;
out
<<
"comment ply PTM (F. Larue format)"
<<
std
::
endl
;
out
<<
"element vertex "
<<
vertices
.
size
()
<<
CGoGN
endl
;
out
<<
"element vertex "
<<
vertices
.
size
()
<<
std
::
endl
;
out
<<
"property float x"
<<
CGoGN
endl
;
out
<<
"property float x"
<<
std
::
endl
;
out
<<
"property float y"
<<
CGoGN
endl
;
out
<<
"property float y"
<<
std
::
endl
;
out
<<
"property float z"
<<
CGoGN
endl
;
out
<<
"property float z"
<<
std
::
endl
;
out
<<
"property float tx"
<<
CGoGN
endl
;
out
<<
"property float tx"
<<
std
::
endl
;
out
<<
"property float ty"
<<
CGoGN
endl
;
out
<<
"property float ty"
<<
std
::
endl
;
out
<<
"property float tz"
<<
CGoGN
endl
;
out
<<
"property float tz"
<<
std
::
endl
;
out
<<
"property float bx"
<<
CGoGN
endl
;
out
<<
"property float bx"
<<
std
::
endl
;
out
<<
"property float by"
<<
CGoGN
endl
;
out
<<
"property float by"
<<
std
::
endl
;
out
<<
"property float bz"
<<
CGoGN
endl
;
out
<<
"property float bz"
<<
std
::
endl
;
out
<<
"property float nx"
<<
CGoGN
endl
;
out
<<
"property float nx"
<<
std
::
endl
;
out
<<
"property float ny"
<<
CGoGN
endl
;
out
<<
"property float ny"
<<
std
::
endl
;
out
<<
"property float nz"
<<
CGoGN
endl
;
out
<<
"property float nz"
<<
std
::
endl
;
out
<<
"property float L1_a"
<<
CGoGN
endl
;
out
<<
"property float L1_a"
<<
std
::
endl
;
out
<<
"property float L1_b"
<<
CGoGN
endl
;
out
<<
"property float L1_b"
<<
std
::
endl
;
out
<<
"property float L1_c"
<<
CGoGN
endl
;
out
<<
"property float L1_c"
<<
std
::
endl
;
out
<<
"property float L1_d"
<<
CGoGN
endl
;
out
<<
"property float L1_d"
<<
std
::
endl
;
out
<<
"property float L1_e"
<<
CGoGN
endl
;
out
<<
"property float L1_e"
<<
std
::
endl
;
out
<<
"property float L1_f"
<<
CGoGN
endl
;
out
<<
"property float L1_f"
<<
std
::
endl
;
out
<<
"property float L2_a"
<<
CGoGN
endl
;
out
<<
"property float L2_a"
<<
std
::
endl
;
out
<<
"property float L2_b"
<<
CGoGN
endl
;
out
<<
"property float L2_b"
<<
std
::
endl
;
out
<<
"property float L2_c"
<<
CGoGN
endl
;
out
<<
"property float L2_c"
<<
std
::
endl
;
out
<<
"property float L2_d"
<<
CGoGN
endl
;
out
<<
"property float L2_d"
<<
std
::
endl
;
out
<<
"property float L2_e"
<<
CGoGN
endl
;
out
<<
"property float L2_e"
<<
std
::
endl
;
out
<<
"property float L2_f"
<<
CGoGN
endl
;
out
<<
"property float L2_f"
<<
std
::
endl
;
out
<<
"property float L3_a"
<<
CGoGN
endl
;
out
<<
"property float L3_a"
<<
std
::
endl
;
out
<<
"property float L3_b"
<<
CGoGN
endl
;
out
<<
"property float L3_b"
<<
std
::
endl
;
out
<<
"property float L3_c"
<<
CGoGN
endl
;
out
<<
"property float L3_c"
<<
std
::
endl
;
out
<<
"property float L3_d"
<<
CGoGN
endl
;
out
<<
"property float L3_d"
<<
std
::
endl
;
out
<<
"property float L3_e"
<<
CGoGN
endl
;
out
<<
"property float L3_e"
<<
std
::
endl
;
out
<<
"property float L3_f"
<<
CGoGN
endl
;
out
<<
"property float L3_f"
<<
std
::
endl
;
out
<<
"element face "
<<
nbf
<<
CGoGN
endl
;
out
<<
"element face "
<<
nbf
<<
std
::
endl
;
out
<<
"property list uchar int vertex_indices"
<<
CGoGN
endl
;
out
<<
"property list uchar int vertex_indices"
<<
std
::
endl
;
out
<<
"end_header"
<<
CGoGN
endl
;
out
<<
"end_header"
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
vertices
.
size
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
vertices
.
size
();
++
i
)
{
{
...
@@ -358,7 +350,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
...
@@ -358,7 +350,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
out
<<
frame
[
2
][
vi
][
0
]
<<
" "
<<
frame
[
2
][
vi
][
1
]
<<
" "
<<
frame
[
2
][
vi
][
2
]
<<
" "
;
out
<<
frame
[
2
][
vi
][
0
]
<<
" "
<<
frame
[
2
][
vi
][
1
]
<<
" "
<<
frame
[
2
][
vi
][
2
]
<<
" "
;
out
<<
colorPTM
[
0
][
vi
][
0
]
<<
" "
<<
colorPTM
[
1
][
vi
][
0
]
<<
" "
<<
colorPTM
[
2
][
vi
][
0
]
<<
" "
<<
colorPTM
[
3
][
vi
][
0
]
<<
" "
<<
colorPTM
[
4
][
vi
][
0
]
<<
" "
<<
colorPTM
[
5
][
vi
][
0
]
<<
" "
;
out
<<
colorPTM
[
0
][
vi
][
0
]
<<
" "
<<
colorPTM
[
1
][
vi
][
0
]
<<
" "
<<
colorPTM
[
2
][
vi
][
0
]
<<
" "
<<
colorPTM
[
3
][
vi
][
0
]
<<
" "
<<
colorPTM
[
4
][
vi
][
0
]
<<
" "
<<
colorPTM
[
5
][
vi
][
0
]
<<
" "
;
out
<<
colorPTM
[
0
][
vi
][
1
]
<<
" "
<<
colorPTM
[
1
][
vi
][
1
]
<<
" "
<<
colorPTM
[
2
][
vi
][
1
]
<<
" "
<<
colorPTM
[
3
][
vi
][
1
]
<<
" "
<<
colorPTM
[
4
][
vi
][
1
]
<<
" "
<<
colorPTM
[
5
][
vi
][
1
]
<<
" "
;
out
<<
colorPTM
[
0
][
vi
][
1
]
<<
" "
<<
colorPTM
[
1
][
vi
][
1
]
<<
" "
<<
colorPTM
[
2
][
vi
][
1
]
<<
" "
<<
colorPTM
[
3
][
vi
][
1
]
<<
" "
<<
colorPTM
[
4
][
vi
][
1
]
<<
" "
<<
colorPTM
[
5
][
vi
][
1
]
<<
" "
;
out
<<
colorPTM
[
0
][
vi
][
2
]
<<
" "
<<
colorPTM
[
1
][
vi
][
2
]
<<
" "
<<
colorPTM
[
2
][
vi
][
2
]
<<
" "
<<
colorPTM
[
3
][
vi
][
2
]
<<
" "
<<
colorPTM
[
4
][
vi
][
2
]
<<
" "
<<
colorPTM
[
5
][
vi
][
2
]
<<
CGoGN
endl
;
out
<<
colorPTM
[
0
][
vi
][
2
]
<<
" "
<<
colorPTM
[
1
][
vi
][
2
]
<<
" "
<<
colorPTM
[
2
][
vi
][
2
]
<<
" "
<<
colorPTM
[
3
][
vi
][
2
]
<<
" "
<<
colorPTM
[
4
][
vi
][
2
]
<<
" "
<<
colorPTM
[
5
][
vi
][
2
]
<<
std
::
endl
;
}
}
std
::
vector
<
unsigned
int
>::
iterator
it
=
faces
.
begin
();
std
::
vector
<
unsigned
int
>::
iterator
it
=
faces
.
begin
();
...
@@ -368,7 +360,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
...
@@ -368,7 +360,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
out
<<
nbe
;
out
<<
nbe
;
for
(
unsigned
int
j
=
0
;
j
<
nbe
;
++
j
)
for
(
unsigned
int
j
=
0
;
j
<
nbe
;
++
j
)
out
<<
" "
<<
*
it
++
;
out
<<
" "
<<
*
it
++
;
out
<<
CGoGN
endl
;
out
<<
std
::
endl
;
}
}
out
.
close
()
;
out
.
close
()
;
...
...
include/Algo/Import/importInESS.hpp
View file @
eeaa15ab
...
@@ -56,8 +56,7 @@ typename PFP::VEC3 stringToEmb(std::string s)
...
@@ -56,8 +56,7 @@ typename PFP::VEC3 stringToEmb(std::string s)
return
coord
;
return
coord
;
}
}
inline
unsigned
int
gcd
(
unsigned
int
a
,
unsigned
int
b
)
unsigned
int
gcd
(
unsigned
int
a
,
unsigned
int
b
)
{
{
while
(
true
)
while
(
true
)
...
...
include/Algo/ProgressiveMesh/pmesh.h
View file @
eeaa15ab
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include "Algo/ProgressiveMesh/vsplit.h"
#include "Algo/ProgressiveMesh/vsplit.h"
#include "Algo/Decimation/selector.h"
#include "Algo/Decimation/selector.h"
#include "Algo/Decimation/edgeSelector.h"
#include "Algo/Decimation/geometryApproximator.h"
#include "Algo/Decimation/geometryApproximator.h"
#include "Algo/Decimation/geometryPredictor.h"
#include "Algo/Decimation/geometryPredictor.h"
#include "Algo/Decimation/lightfieldApproximator.h"
#include "Algo/Decimation/lightfieldApproximator.h"
...
...
include/Algo/ProgressiveMesh/pmesh.hpp
View file @
eeaa15ab
...
@@ -41,7 +41,7 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
...
@@ -41,7 +41,7 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
)
:
)
:
m_map
(
map
),
positionsTable
(
position
),
inactiveMarker
(
inactive
),
dartSelect
(
inactiveMarker
)
m_map
(
map
),
positionsTable
(
position
),
inactiveMarker
(
inactive
),
dartSelect
(
inactiveMarker
)
{
{
CGoGNout
<<
" creating approximator and predictor.."
<<
std
::
flush
;
CGoGNout
<<
" creating approximator and predictor.."
<<
/* flush */
CGoGNendl
;
switch
(
a
)
switch
(
a
)
{
{
case
Algo
::
Decimation
::
A_QEM
:
{
case
Algo
::
Decimation
::
A_QEM
:
{
...
@@ -70,17 +70,10 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
...
@@ -70,17 +70,10 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
m_predictors
.
push_back
(
pred
)
;
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
positionsTable
,
pred
))
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
positionsTable
,
pred
))
;
break
;
}
break
;
}
case
Algo
::
Decimation
::
A_LightfieldFull
:
{
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_QEM
<
PFP
>
(
m_map
,
positionsTable
))
;
AttributeHandler
<
Geom
::
Matrix
<
3
,
3
,
typename
PFP
::
REAL
>
>
frame
=
m_map
.
template
getAttribute
<
Geom
::
Matrix
<
3
,
3
,
typename
PFP
::
REAL
>
>
(
VERTEX_ORBIT
,
"frame"
)
;
AttributeHandler
<
Geom
::
Matrix
<
3
,
6
,
typename
PFP
::
REAL
>
>
RGBfunctions
=
m_map
.
template
getAttribute
<
Geom
::
Matrix
<
3
,
6
,
typename
PFP
::
REAL
>
>
(
VERTEX_ORBIT
,
"RGBfunctions"
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_Frame
<
PFP
>
(
m_map
,
frame
))
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_RGBfunctions
<
PFP
>
(
m_map
,
RGBfunctions
))
;
break
;
}
}
}
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
" creating selector.."
<<
std
::
flush
;
CGoGNout
<<
" creating selector.."
<<
/* flush */
CGoGNendl
;
switch
(
s
)
switch
(
s
)
{
{
case
Algo
::
Decimation
::
S_MapOrder
:
{
case
Algo
::
Decimation
::
S_MapOrder
:
{
...
@@ -101,15 +94,12 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
...
@@ -101,15 +94,12 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
case
Algo
::
Decimation
::
S_Curvature
:
{
case
Algo
::
Decimation
::
S_Curvature
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Curvature
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Curvature
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
break
;
}
break
;
}
case
Algo
::
Decimation
::
S_Lightfield
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Lightfield
<
PFP
>
(
map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
break
;
}
}
}
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
m_initOk
=
true
;
m_initOk
=
true
;
CGoGNout
<<
" initializing approximators.."
<<
std
::
flush
;
CGoGNout
<<
" initializing approximators.."
<<
/* flush */
CGoGNendl
;
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
ApproximatorGen
<
PFP
>*>::
iterator
it
=
m_approximators
.
begin
();
it
!=
m_approximators
.
end
();
++
it
)
{
{
if
(
!
(
*
it
)
->
init
())
if
(
!
(
*
it
)
->
init
())
...
@@ -119,13 +109,13 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
...
@@ -119,13 +109,13 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
}
}
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
" initializing predictors.."
<<
std
::
flush
;
CGoGNout
<<
" initializing predictors.."
<<
/* flush */
CGoGNendl
;
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
PredictorGen
<
PFP
>*>::
iterator
it
=
m_predictors
.
begin
();
it
!=
m_predictors
.
end
();
++
it
)
for
(
typename
std
::
vector
<
Algo
::
Decimation
::
PredictorGen
<
PFP
>*>::
iterator
it
=
m_predictors
.
begin
();
it
!=
m_predictors
.
end
();
++
it
)
if
(
!
(
*
it
)
->
init
())
if
(
!
(
*
it
)
->
init
())
m_initOk
=
false
;
m_initOk
=
false
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
" initializing selector.."
<<
std
::
flush
;
CGoGNout
<<
" initializing selector.."
<<
/* flush */
CGoGNendl
;
m_initOk
=
m_selector
->
init
()
;
m_initOk
=
m_selector
->
init
()
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
...
@@ -155,7 +145,7 @@ void ProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices)
...
@@ -155,7 +145,7 @@ void ProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices)
{
{
unsigned
int
nbVertices
=
m_map
.
getNbOrbits
(
VERTEX_ORBIT
)
;
unsigned
int
nbVertices
=
m_map
.
getNbOrbits
(
VERTEX_ORBIT
)
;
unsigned
int
nbWantedVertices
=
nbVertices
*
percentWantedVertices
/
100
;
unsigned
int
nbWantedVertices
=
nbVertices
*
percentWantedVertices
/
100
;
CGoGNout
<<
" creating PM ("
<<
nbVertices
<<
" vertices).."
<<
std
::
flush
;
CGoGNout
<<
" creating PM ("
<<
nbVertices
<<
" vertices).."
<<
/* flush */
CGoGNendl
;
bool
finished
=
false
;
bool
finished
=
false
;
Dart
d
;
Dart
d
;
...
@@ -535,7 +525,7 @@ void ProgressiveMesh<PFP>::calculCourbeDebitDistortion()
...
@@ -535,7 +525,7 @@ void ProgressiveMesh<PFP>::calculCourbeDebitDistortion()
float distance;
float distance;
Point p;
Point p;
CGoGNout << "calcul de la courbe débit distortion " <<
std::flush
;
CGoGNout << "calcul de la courbe débit distortion " <<
CGoGNendl
;
// get original detail vectors
// get original detail vectors
for(unsigned int i = 0; i < m_splits.size(); ++i)
for(unsigned int i = 0; i < m_splits.size(); ++i)
...
@@ -573,7 +563,7 @@ void ProgressiveMesh<PFP>::calculCourbeDebitDistortion()
...
@@ -573,7 +563,7 @@ void ProgressiveMesh<PFP>::calculCourbeDebitDistortion()
courbe.push_back(p);
courbe.push_back(p);
// returns to coarse mesh
// returns to coarse mesh
gotoLevel(nbSplits());
gotoLevel(nbSplits());
CGoGNout << "..." <<
std::flush
;
CGoGNout << "..." <<
CGoGNendl
;
}
}
q.erase();
q.erase();
}
}
...
...
include/Algo/ProgressiveMesh/vsplit.h
View file @
eeaa15ab
...
@@ -34,7 +34,6 @@ namespace Algo
...
@@ -34,7 +34,6 @@ namespace Algo
namespace
PMesh
namespace
PMesh
{
{
template
<
typename
PFP
>
template
<
typename
PFP
>
class
VSplit
class
VSplit
{
{
...
@@ -98,7 +97,6 @@ public:
...
@@ -98,7 +97,6 @@ public:
}
}
}
;
}
;
}
//namespace PMesh
}
//namespace PMesh
}
//namespace Algo
}
//namespace Algo
...
...
include/Geometry/intersection.hpp
View file @
eeaa15ab
...
@@ -284,8 +284,7 @@ Intersection intersectionSegmentTriangle(const VEC3& PA, const VEC3& PB, const V
...
@@ -284,8 +284,7 @@ Intersection intersectionSegmentTriangle(const VEC3& PA, const VEC3& PB, const V
template
<
typename
VEC3
,
typename
PLANE3D
>
template
<
typename
VEC3
,
typename
PLANE3D
>
Intersection
intersectPlaneRay
(
const
PLANE3D
&
pl
,
const
VEC3
&
p1
,
const
VEC3
&
dir
,
VEC3
&
Inter
)
Intersection
intersectPlaneRay
(
const
PLANE3D
&
pl
,
const
VEC3
&
p1
,
const
VEC3
&
dir
,
VEC3
&
Inter
)
{
{
typename
VEC3
::
DATA_TYPE
isect
;
typename
VEC3
::
DATA_TYPE
isect
=
(
pl
.
normal
()
*
(
pl
.
normal
()
*
pl
.
d
()
-
p1
))
/
(
pl
.
normal
()
*
dir
);
isect
=
(
pl
.
normal
()
*
(
pl
.
normal
()
*
pl
.
d
()
-
p1
))
/
(
pl
.
normal
()
*
dir
);
if
(
0.0
f
<=
isect
)
if
(
0.0
f
<=
isect
)
{
{
...
...
include/Utils/qtSimple.h
View file @
eeaa15ab
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
#include "Geometry/vector_gen.h"
#include "Geometry/vector_gen.h"
namespace
CGoGN
{
namespace
Utils
{
class
GLSLShader
;
}
}
namespace
CGoGN
{
namespace
Utils
{
class
GLSLShader
;
}
}
//namespace CGoGN { namespace Geom { class Vec3f; } }
namespace
CGoGN
namespace
CGoGN
{
{
...
@@ -173,6 +172,11 @@ public:
...
@@ -173,6 +172,11 @@ public:
*/
*/
void
setParamObject
(
float
width
,
float
*
pos
)
{
m_glWidget
->
setParamObject
(
width
,
pos
);
}
void
setParamObject
(
float
width
,
float
*
pos
)
{
m_glWidget
->
setParamObject
(
width
,
pos
);
}
/**
* set focal
*/
void
setFocal
(
float
f
)
{
m_glWidget
->
setFocal
(
f
);
}
/**
/**
* get the mouse position in GL widget
* get the mouse position in GL widget
*/
*/
...
@@ -310,7 +314,7 @@ public:
...
@@ -310,7 +314,7 @@ public:
* @param dir base directory
* @param dir base directory
* @param filters file filters (syntax: "label1 (filter1);; label2 (filter2);; ...")
* @param filters file filters (syntax: "label1 (filter1);; label2 (filter2);; ...")
*/
*/
std
::
string
selectFile
(
const
std
::
string
&
title
=
"open file"
,
const
std
::
string
&
dir
=
"."
,
const
std
::
string
&
filters
=
"all (*.*)"
);
std
::
string
selectFile
(
const
std
::
string
&
title
=
"open file"
,
const
std
::
string
&
dir
=
"."
,
const
std
::
string
&
filters
=
"all (*.*)"
);
public
slots
:
public
slots
:
virtual
void
cb_New
()
{
std
::
cerr
<<
"callback not implemented"
<<
std
::
endl
;
}
virtual
void
cb_New
()
{
std
::
cerr
<<
"callback not implemented"
<<
std
::
endl
;
}
...
...
include/Utils/qtgl.h
View file @
eeaa15ab
...
@@ -71,8 +71,6 @@ protected:
...
@@ -71,8 +71,6 @@ protected:
int
m_current_button
;
int
m_current_button
;
int
beginx
;
int
beginx
;
int
beginy
;
int
beginy
;
// float curquat[4];
// float lastquat[4];
int
newModel
;
int
newModel
;
int
moving
;
int
moving
;
...
...
include/Utils/qtui.h
View file @
eeaa15ab
...
@@ -34,14 +34,16 @@ namespace Utils
...
@@ -34,14 +34,16 @@ namespace Utils
namespace
QT
namespace
QT
{
{
class
uiDockInterface
:
public
QDockWidget
,
public
Ui
::
DockWidget
class
uiDockInterface
:
public
QDockWidget
,
public
Ui
::
DockWidget
{
{
public:
public:
uiDockInterface
()
{
setupUi
(
this
);
}
uiDockInterface
()
{
setupUi
(
this
);
}
};
};
}
}
// namespace QT
}
}
}
// namespace Utils
}
// namespace CGoGN
#endif
#endif
include/Utils/quadricRGBfunctions.h
View file @
eeaa15ab
...
@@ -72,11 +72,11 @@ public:
...
@@ -72,11 +72,11 @@ public:
void
zero
()
;
void
zero
()
;
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
QuadricRGBfunctions
&
q
)
{
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
QuadricRGBfunctions
&
q
)
{
out
<<
"quadricRGBf : "
<<
CGoGN
endl
;
out
<<
"quadricRGBf : "
<<
std
::
endl
;
out
<<
"q.A"
<<
"= "
<<
q
.
A
<<
CGoGN
endl
;
out
<<
"q.A"
<<
"= "
<<
q
.
A
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
3
;
++
i
)
{
for
(
unsigned
int
i
=
0
;
i
<
3
;
++
i
)
{
out
<<
"q.b["
<<
i
<<
"] = "
<<
q
.
b
[
i
]
<<
CGoGN
endl
;
out
<<
"q.b["
<<
i
<<
"] = "
<<
q
.
b
[
i
]
<<
std
::
endl
;
out
<<
"q.c["
<<
i
<<
"] = "
<<
q
.
c
[
i
]
<<
CGoGN
endl
;
out
<<
"q.c["
<<
i
<<
"] = "
<<
q
.
c
[
i
]
<<
std
::
endl
;
}
}
return
out
;
return
out
;
}
;
}
;
...
...
include/Utils/quantization.hpp
View file @
eeaa15ab
...
@@ -280,7 +280,7 @@ void Quantization<VEC>::vectorQuantizationDistortion(float distortionGoal, std::
...
@@ -280,7 +280,7 @@ void Quantization<VEC>::vectorQuantizationDistortion(float distortionGoal, std::
computeDiscreteEntropy
()
;
computeDiscreteEntropy
()
;
}
}
float
log2
(
float
x
)
inline
float
log2
(
float
x
)
{
{
return
log
(
x
)
/
log
(
2.0
f
)
;
return
log
(
x
)
/
log
(
2.0
f
)
;
}
}
...
...
src/Utils/GLSLShader.cpp
View file @
eeaa15ab
...
@@ -542,7 +542,8 @@ bool GLSLShader::bind() const
...
@@ -542,7 +542,8 @@ bool GLSLShader::bind() const
glUseProgramObjectARB
(
m_program_object
);
glUseProgramObjectARB
(
m_program_object
);
return
true
;
return
true
;
}
}
else
return
false
;
else
return
false
;
}