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
KennethVanhoey
CGoGN
Commits
eeaa15ab
Commit
eeaa15ab
authored
Apr 29, 2011
by
Pierre Kraemer
Browse files
CGoGNendl -> std::endl : incompatible avec ostream
parent
c1269877
Changes
16
Hide whitespace changes
Inline
Side-by-side
Apps/Tuto/tuto2.h
View file @
eeaa15ab
...
...
@@ -47,7 +47,6 @@ using namespace CGoGN ;
* Ajouter les widgets necessaires, mettre des noms clairs pour
* les utiliser dans le .cpp (pour les call back principalement)
*/
class
MyQT
:
public
Utils
::
QT
::
SimpleQT
{
Q_OBJECT
...
...
include/Algo/Decimation/decimation.hpp
View file @
eeaa15ab
...
...
@@ -149,7 +149,7 @@ void decimate(
while
(
!
finished
)
{
CGoGNout
<<
"Countdown : "
;
CGoGNout
<<
std
::
setprecision
(
8
)
<<
(
nbVertices
-
nbWantedVertices
)
<<
"
\r
"
<<
std
::
flush
;
CGoGNout
<<
std
::
setprecision
(
8
)
<<
(
nbVertices
-
nbWantedVertices
)
<<
"
\r
"
<<
/* flush */
CGoGNendl
;
if
(
!
selector
->
nextEdge
(
d
))
{
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
}
}
out
<<
"ply"
<<
CGoGN
endl
;
out
<<
"format ascii 1.0"
<<
CGoGN
endl
;
out
<<
"comment no comment"
<<
CGoGN
endl
;
out
<<
"element vertex "
<<
vertices
.
size
()
<<
CGoGN
endl
;
out
<<
"property float x"
<<
CGoGN
endl
;
out
<<
"property float y"
<<
CGoGN
endl
;
out
<<
"property float z"
<<
CGoGN
endl
;
out
<<
"element face "
<<
facesSize
.
size
()
<<
CGoGN
endl
;
out
<<
"property list uchar int vertex_indices"
<<
CGoGN
endl
;
out
<<
"end_header"
<<
CGoGN
endl
;
out
<<
"ply"
<<
std
::
endl
;
out
<<
"format ascii 1.0"
<<
std
::
endl
;
out
<<
"comment no comment"
<<
std
::
endl
;
out
<<
"element vertex "
<<
vertices
.
size
()
<<
std
::
endl
;
out
<<
"property float x"
<<
std
::
endl
;
out
<<
"property float y"
<<
std
::
endl
;
out
<<
"property float z"
<<
std
::
endl
;
out
<<
"element face "
<<
facesSize
.
size
()
<<
std
::
endl
;
out
<<
"property list uchar int vertex_indices"
<<
std
::
endl
;
out
<<
"end_header"
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
vertices
.
size
();
++
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
)
{
out
<<
facesSize
[
i
]
;
for
(
unsigned
int
j
=
0
;
j
<
facesIdx
[
i
].
size
();
++
j
)
out
<<
" "
<<
facesIdx
[
i
][
j
]
;
out
<<
CGoGN
endl
;
out
<<
std
::
endl
;
}
out
.
close
()
;
...
...
@@ -164,20 +164,20 @@ bool exportOFF(typename PFP::MAP& map, const typename PFP::TVEC3& position, cons
}
}
out
<<
"OFF"
<<
CGoGN
endl
;
out
<<
vertices
.
size
()
<<
" "
<<
facesSize
.
size
()
<<
" "
<<
0
<<
CGoGN
endl
;
out
<<
"OFF"
<<
std
::
endl
;
out
<<
vertices
.
size
()
<<
" "
<<
facesSize
.
size
()
<<
" "
<<
0
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
vertices
.
size
();
++
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
)
{
out
<<
facesSize
[
i
]
;
for
(
unsigned
int
j
=
0
;
j
<
facesIdx
[
i
].
size
();
++
j
)
out
<<
" "
<<
facesIdx
[
i
][
j
]
;
out
<<
CGoGN
endl
;
out
<<
std
::
endl
;
}
out
.
close
()
;
...
...
@@ -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
[
1
]);
verticesBuffer
.
push_back
(
vert
[
2
]);
// CGoGNout << vert<< CGoGNendl;
}
indicesBuffer
.
push_back
(
tableVertLab
[
e
]);
e
=
the_map
.
phi1
(
e
);
...
...
@@ -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
CTMexporter
ctm
;
...
...
@@ -311,43 +303,43 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
}
}
out
<<
"ply"
<<
CGoGN
endl
;
out
<<
"format ascii 1.0"
<<
CGoGN
endl
;
out
<<
"comment ply PTM (F. Larue format)"
<<
CGoGN
endl
;
out
<<
"element vertex "
<<
vertices
.
size
()
<<
CGoGN
endl
;
out
<<
"property float x"
<<
CGoGN
endl
;
out
<<
"property float y"
<<
CGoGN
endl
;
out
<<
"property float z"
<<
CGoGN
endl
;
out
<<
"property float tx"
<<
CGoGN
endl
;
out
<<
"property float ty"
<<
CGoGN
endl
;
out
<<
"property float tz"
<<
CGoGN
endl
;
out
<<
"property float bx"
<<
CGoGN
endl
;
out
<<
"property float by"
<<
CGoGN
endl
;
out
<<
"property float bz"
<<
CGoGN
endl
;
out
<<
"property float nx"
<<
CGoGN
endl
;
out
<<
"property float ny"
<<
CGoGN
endl
;
out
<<
"property float nz"
<<
CGoGN
endl
;
out
<<
"property float L1_a"
<<
CGoGN
endl
;
out
<<
"property float L1_b"
<<
CGoGN
endl
;
out
<<
"property float L1_c"
<<
CGoGN
endl
;
out
<<
"property float L1_d"
<<
CGoGN
endl
;
out
<<
"property float L1_e"
<<
CGoGN
endl
;
out
<<
"property float L1_f"
<<
CGoGN
endl
;
out
<<
"property float L2_a"
<<
CGoGN
endl
;
out
<<
"property float L2_b"
<<
CGoGN
endl
;
out
<<
"property float L2_c"
<<
CGoGN
endl
;
out
<<
"property float L2_d"
<<
CGoGN
endl
;
out
<<
"property float L2_e"
<<
CGoGN
endl
;
out
<<
"property float L2_f"
<<
CGoGN
endl
;
out
<<
"property float L3_a"
<<
CGoGN
endl
;
out
<<
"property float L3_b"
<<
CGoGN
endl
;
out
<<
"property float L3_c"
<<
CGoGN
endl
;
out
<<
"property float L3_d"
<<
CGoGN
endl
;
out
<<
"property float L3_e"
<<
CGoGN
endl
;
out
<<
"property float L3_f"
<<
CGoGN
endl
;
out
<<
"element face "
<<
nbf
<<
CGoGN
endl
;
out
<<
"property list uchar int vertex_indices"
<<
CGoGN
endl
;
out
<<
"end_header"
<<
CGoGN
endl
;
out
<<
"ply"
<<
std
::
endl
;
out
<<
"format ascii 1.0"
<<
std
::
endl
;
out
<<
"comment ply PTM (F. Larue format)"
<<
std
::
endl
;
out
<<
"element vertex "
<<
vertices
.
size
()
<<
std
::
endl
;
out
<<
"property float x"
<<
std
::
endl
;
out
<<
"property float y"
<<
std
::
endl
;
out
<<
"property float z"
<<
std
::
endl
;
out
<<
"property float tx"
<<
std
::
endl
;
out
<<
"property float ty"
<<
std
::
endl
;
out
<<
"property float tz"
<<
std
::
endl
;
out
<<
"property float bx"
<<
std
::
endl
;
out
<<
"property float by"
<<
std
::
endl
;
out
<<
"property float bz"
<<
std
::
endl
;
out
<<
"property float nx"
<<
std
::
endl
;
out
<<
"property float ny"
<<
std
::
endl
;
out
<<
"property float nz"
<<
std
::
endl
;
out
<<
"property float L1_a"
<<
std
::
endl
;
out
<<
"property float L1_b"
<<
std
::
endl
;
out
<<
"property float L1_c"
<<
std
::
endl
;
out
<<
"property float L1_d"
<<
std
::
endl
;
out
<<
"property float L1_e"
<<
std
::
endl
;
out
<<
"property float L1_f"
<<
std
::
endl
;
out
<<
"property float L2_a"
<<
std
::
endl
;
out
<<
"property float L2_b"
<<
std
::
endl
;
out
<<
"property float L2_c"
<<
std
::
endl
;
out
<<
"property float L2_d"
<<
std
::
endl
;
out
<<
"property float L2_e"
<<
std
::
endl
;
out
<<
"property float L2_f"
<<
std
::
endl
;
out
<<
"property float L3_a"
<<
std
::
endl
;
out
<<
"property float L3_b"
<<
std
::
endl
;
out
<<
"property float L3_c"
<<
std
::
endl
;
out
<<
"property float L3_d"
<<
std
::
endl
;
out
<<
"property float L3_e"
<<
std
::
endl
;
out
<<
"property float L3_f"
<<
std
::
endl
;
out
<<
"element face "
<<
nbf
<<
std
::
endl
;
out
<<
"property list uchar int vertex_indices"
<<
std
::
endl
;
out
<<
"end_header"
<<
std
::
endl
;
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
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
][
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
();
...
...
@@ -368,7 +360,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
out
<<
nbe
;
for
(
unsigned
int
j
=
0
;
j
<
nbe
;
++
j
)
out
<<
" "
<<
*
it
++
;
out
<<
CGoGN
endl
;
out
<<
std
::
endl
;
}
out
.
close
()
;
...
...
include/Algo/Import/importInESS.hpp
View file @
eeaa15ab
...
...
@@ -56,8 +56,7 @@ typename PFP::VEC3 stringToEmb(std::string s)
return
coord
;
}
unsigned
int
gcd
(
unsigned
int
a
,
unsigned
int
b
)
inline
unsigned
int
gcd
(
unsigned
int
a
,
unsigned
int
b
)
{
while
(
true
)
...
...
include/Algo/ProgressiveMesh/pmesh.h
View file @
eeaa15ab
...
...
@@ -28,6 +28,7 @@
#include
"Algo/ProgressiveMesh/vsplit.h"
#include
"Algo/Decimation/selector.h"
#include
"Algo/Decimation/edgeSelector.h"
#include
"Algo/Decimation/geometryApproximator.h"
#include
"Algo/Decimation/geometryPredictor.h"
#include
"Algo/Decimation/lightfieldApproximator.h"
...
...
include/Algo/ProgressiveMesh/pmesh.hpp
View file @
eeaa15ab
...
...
@@ -41,7 +41,7 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
)
:
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
)
{
case
Algo
::
Decimation
::
A_QEM
:
{
...
...
@@ -70,17 +70,10 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
m_predictors
.
push_back
(
pred
)
;
m_approximators
.
push_back
(
new
Algo
::
Decimation
::
Approximator_MidEdge
<
PFP
>
(
m_map
,
positionsTable
,
pred
))
;
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
<<
" creating selector.."
<<
std
::
flush
;
CGoGNout
<<
" creating selector.."
<<
/* flush */
CGoGNendl
;
switch
(
s
)
{
case
Algo
::
Decimation
::
S_MapOrder
:
{
...
...
@@ -101,15 +94,12 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
case
Algo
::
Decimation
::
S_Curvature
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Curvature
<
PFP
>
(
m_map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
break
;
}
case
Algo
::
Decimation
::
S_Lightfield
:
{
m_selector
=
new
Algo
::
Decimation
::
EdgeSelector_Lightfield
<
PFP
>
(
map
,
positionsTable
,
m_approximators
,
dartSelect
)
;
break
;
}
}
CGoGNout
<<
"..done"
<<
CGoGNendl
;
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
)
{
if
(
!
(
*
it
)
->
init
())
...
...
@@ -119,13 +109,13 @@ ProgressiveMesh<PFP>::ProgressiveMesh(
}
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
)
if
(
!
(
*
it
)
->
init
())
m_initOk
=
false
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
CGoGNout
<<
" initializing selector.."
<<
std
::
flush
;
CGoGNout
<<
" initializing selector.."
<<
/* flush */
CGoGNendl
;
m_initOk
=
m_selector
->
init
()
;
CGoGNout
<<
"..done"
<<
CGoGNendl
;
...
...
@@ -155,7 +145,7 @@ void ProgressiveMesh<PFP>::createPM(unsigned int percentWantedVertices)
{
unsigned
int
nbVertices
=
m_map
.
getNbOrbits
(
VERTEX_ORBIT
)
;
unsigned
int
nbWantedVertices
=
nbVertices
*
percentWantedVertices
/
100
;
CGoGNout
<<
" creating PM ("
<<
nbVertices
<<
" vertices).."
<<
std
::
flush
;
CGoGNout
<<
" creating PM ("
<<
nbVertices
<<
" vertices).."
<<
/* flush */
CGoGNendl
;
bool
finished
=
false
;
Dart
d
;
...
...
@@ -535,7 +525,7 @@ void ProgressiveMesh<PFP>::calculCourbeDebitDistortion()
float distance;
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
for(unsigned int i = 0; i < m_splits.size(); ++i)
...
...
@@ -573,7 +563,7 @@ void ProgressiveMesh<PFP>::calculCourbeDebitDistortion()
courbe.push_back(p);
// returns to coarse mesh
gotoLevel(nbSplits());
CGoGNout << "..." <<
std::flush
;
CGoGNout << "..." <<
CGoGNendl
;
}
q.erase();
}
...
...
include/Algo/ProgressiveMesh/vsplit.h
View file @
eeaa15ab
...
...
@@ -34,7 +34,6 @@ namespace Algo
namespace
PMesh
{
template
<
typename
PFP
>
class
VSplit
{
...
...
@@ -98,7 +97,6 @@ public:
}
}
;
}
//namespace PMesh
}
//namespace Algo
...
...
include/Geometry/intersection.hpp
View file @
eeaa15ab
...
...
@@ -284,8 +284,7 @@ Intersection intersectionSegmentTriangle(const VEC3& PA, const VEC3& PB, const V
template
<
typename
VEC3
,
typename
PLANE3D
>
Intersection
intersectPlaneRay
(
const
PLANE3D
&
pl
,
const
VEC3
&
p1
,
const
VEC3
&
dir
,
VEC3
&
Inter
)
{
typename
VEC3
::
DATA_TYPE
isect
;
isect
=
(
pl
.
normal
()
*
(
pl
.
normal
()
*
pl
.
d
()
-
p1
))
/
(
pl
.
normal
()
*
dir
);
typename
VEC3
::
DATA_TYPE
isect
=
(
pl
.
normal
()
*
(
pl
.
normal
()
*
pl
.
d
()
-
p1
))
/
(
pl
.
normal
()
*
dir
);
if
(
0.0
f
<=
isect
)
{
...
...
include/Utils/qtSimple.h
View file @
eeaa15ab
...
...
@@ -36,7 +36,6 @@
#include
"Geometry/vector_gen.h"
namespace
CGoGN
{
namespace
Utils
{
class
GLSLShader
;
}
}
//namespace CGoGN { namespace Geom { class Vec3f; } }
namespace
CGoGN
{
...
...
@@ -173,6 +172,11 @@ public:
*/
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
*/
...
...
@@ -310,7 +314,7 @@ public:
* @param dir base directory
* @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
:
virtual
void
cb_New
()
{
std
::
cerr
<<
"callback not implemented"
<<
std
::
endl
;
}
...
...
include/Utils/qtgl.h
View file @
eeaa15ab
...
...
@@ -71,8 +71,6 @@ protected:
int
m_current_button
;
int
beginx
;
int
beginy
;
// float curquat[4];
// float lastquat[4];
int
newModel
;
int
moving
;
...
...
include/Utils/qtui.h
View file @
eeaa15ab
...
...
@@ -34,14 +34,16 @@ namespace Utils
namespace
QT
{
class
uiDockInterface
:
public
QDockWidget
,
public
Ui
::
DockWidget
class
uiDockInterface
:
public
QDockWidget
,
public
Ui
::
DockWidget
{
public:
uiDockInterface
()
{
setupUi
(
this
);
}
};
}
}
}
}
// namespace QT
}
// namespace Utils
}
// namespace CGoGN
#endif
include/Utils/quadricRGBfunctions.h
View file @
eeaa15ab
...
...
@@ -72,11 +72,11 @@ public:
void
zero
()
;
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
QuadricRGBfunctions
&
q
)
{
out
<<
"quadricRGBf : "
<<
CGoGN
endl
;
out
<<
"q.A"
<<
"= "
<<
q
.
A
<<
CGoGN
endl
;
out
<<
"quadricRGBf : "
<<
std
::
endl
;
out
<<
"q.A"
<<
"= "
<<
q
.
A
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
3
;
++
i
)
{
out
<<
"q.b["
<<
i
<<
"] = "
<<
q
.
b
[
i
]
<<
CGoGN
endl
;
out
<<
"q.c["
<<
i
<<
"] = "
<<
q
.
c
[
i
]
<<
CGoGN
endl
;
out
<<
"q.b["
<<
i
<<
"] = "
<<
q
.
b
[
i
]
<<
std
::
endl
;
out
<<
"q.c["
<<
i
<<
"] = "
<<
q
.
c
[
i
]
<<
std
::
endl
;
}
return
out
;
}
;
...
...
include/Utils/quantization.hpp
View file @
eeaa15ab
...
...
@@ -280,7 +280,7 @@ void Quantization<VEC>::vectorQuantizationDistortion(float distortionGoal, std::
computeDiscreteEntropy
()
;
}
float
log2
(
float
x
)
inline
float
log2
(
float
x
)
{
return
log
(
x
)
/
log
(
2.0
f
)
;
}
...
...
src/Utils/GLSLShader.cpp
View file @
eeaa15ab
...
...
@@ -542,7 +542,8 @@ bool GLSLShader::bind() const
glUseProgramObjectARB
(
m_program_object
);
return
true
;
}
else
return
false
;
else
return
false
;
}
void
GLSLShader
::
unbind
()
const
...
...
src/Utils/qtSimple.cpp
View file @
eeaa15ab
...
...
@@ -43,7 +43,6 @@ namespace QT
SimpleQT
::
SimpleQT
()
:
m_dock
(
NULL
)
{
m_glWidget
=
new
GLWidget
(
this
);
setCentralWidget
(
m_glWidget
);
setWindowTitle
(
tr
(
"CGoGN"
));
...
...
src/Utils/qtgl.cpp
View file @
eeaa15ab
...
...
@@ -69,8 +69,8 @@ void GLWidget::setParamObject(float width, float* pos)
void
GLWidget
::
setFocal
(
float
df
)
{
if
(
df
>
3
.0
f
)
df
=
3
.0
f
;
if
(
df
>
5
.0
f
)
df
=
5
.0
f
;
if
(
df
<
0.2
f
)
df
=
0.2
f
;
...
...
@@ -180,7 +180,7 @@ void GLWidget::mouseMoveEvent(QMouseEvent* event)
break
;
case
Qt
::
MidButton
:
{
float
wl
=
-
0.
2
f
*
FAR_PLANE
/
foc
;
float
wl
=
-
0.
5
f
*
FAR_PLANE
/
foc
;
m_cbs
->
trans_z
()
-=
wl
/
W
*
(
x
-
beginx
);
m_cbs
->
trans_z
()
-=
wl
/
H
*
(
y
-
beginy
);
}
...
...
@@ -209,7 +209,7 @@ void GLWidget::mouseMoveEvent(QMouseEvent* event)
void
GLWidget
::
wheelEvent
(
QWheelEvent
*
event
)
{
float
wl
=
-
0.0
2
f
*
FAR_PLANE
/
foc
;
float
wl
=
-
0.0
5
f
*
FAR_PLANE
/
foc
;
if
(
event
->
delta
()
>
0
)
m_cbs
->
trans_z
()
+=
wl
;
...
...
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