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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
aae843c0
Commit
aae843c0
authored
Jun 13, 2012
by
untereiner
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of cgogn:~cgogn/CGoGN
parents
b780824b
c6088ade
Changes
29
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
2640 additions
and
484 deletions
+2640
-484
Apps/Tuto/CMakeLists.txt
Apps/Tuto/CMakeLists.txt
+7
-1
Apps/Tuto/tuto_histo.cpp
Apps/Tuto/tuto_histo.cpp
+324
-0
Apps/Tuto/tuto_histo.h
Apps/Tuto/tuto_histo.h
+142
-0
Debug/CMakeLists.txt
Debug/CMakeLists.txt
+5
-2
Release/CMakeLists.txt
Release/CMakeLists.txt
+6
-3
include/Algo/Export/export.h
include/Algo/Export/export.h
+4
-3
include/Algo/Export/export.hpp
include/Algo/Export/export.hpp
+8
-4
include/Algo/Histogram/histogram.h
include/Algo/Histogram/histogram.h
+362
-0
include/Algo/Histogram/histogram.hpp
include/Algo/Histogram/histogram.hpp
+285
-0
include/Algo/Import/import2tables.h
include/Algo/Import/import2tables.h
+3
-3
include/Algo/Import/import2tablesSurface.hpp
include/Algo/Import/import2tablesSurface.hpp
+396
-301
include/Algo/Render/GL2/topo3Render.hpp
include/Algo/Render/GL2/topo3Render.hpp
+1
-2
include/Algo/Render/GL2/topoRender.hpp
include/Algo/Render/GL2/topoRender.hpp
+2
-2
include/Topology/generic/attributeHandler.h
include/Topology/generic/attributeHandler.h
+5
-0
include/Topology/generic/attributeHandler.hpp
include/Topology/generic/attributeHandler.hpp
+8
-0
include/Utils/Qt/qtSimple.h
include/Utils/Qt/qtSimple.h
+1
-1
include/Utils/Qt/qtcolorschooser.h
include/Utils/Qt/qtcolorschooser.h
+3
-3
include/Utils/Qt/qthistodraw.h
include/Utils/Qt/qthistodraw.h
+177
-0
include/Utils/Qt/qtpopup.h
include/Utils/Qt/qtpopup.h
+10
-4
include/Utils/colorMaps.h
include/Utils/colorMaps.h
+80
-140
include/Utils/colorMaps.hpp
include/Utils/colorMaps.hpp
+153
-0
src/Algo/Histogram/histogram.cpp
src/Algo/Histogram/histogram.cpp
+211
-0
src/Container/attributeContainer.cpp
src/Container/attributeContainer.cpp
+1
-1
src/Topology/generic/genericmap.cpp
src/Topology/generic/genericmap.cpp
+5
-1
src/Utils/Qt/qtSimple.cpp
src/Utils/Qt/qtSimple.cpp
+3
-0
src/Utils/Qt/qtcolorschooser.cpp
src/Utils/Qt/qtcolorschooser.cpp
+1
-1
src/Utils/Qt/qthistodraw.cpp
src/Utils/Qt/qthistodraw.cpp
+396
-0
src/Utils/Qt/qtinputs.cpp
src/Utils/Qt/qtinputs.cpp
+0
-0
src/Utils/Qt/qtpopup.cpp
src/Utils/Qt/qtpopup.cpp
+41
-12
No files found.
Apps/Tuto/CMakeLists.txt
View file @
aae843c0
...
...
@@ -34,7 +34,7 @@ QT4_WRAP_UI( tuto2_ui tuto2.ui )
QT4_WRAP_CPP
(
tuto2_moc tuto2.h
)
add_executable
(
tuto2 tuto2.cpp tuto2.h
${
tuto2_ui
}
${
tuto2_moc
}
)
target_link_libraries
(
tuto2
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
QtSvg
)
QT4_WRAP_CPP
(
tuto3_moc tuto3.h
)
add_executable
(
tuto3 tuto3.cpp
${
tuto3_moc
}
)
...
...
@@ -86,6 +86,12 @@ add_executable( tp_master tp_master.cpp ${tp_master_moc})
target_link_libraries
(
tp_master
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
QT4_WRAP_CPP
(
tuto_histo_moc tuto_histo.h
)
add_executable
(
tuto_histo tuto_histo.cpp tuto_histo.h
${
tuto_histo_ui
}
${
tuto_histo_moc
}
)
target_link_libraries
(
tuto_histo
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
QtSvg
)
#BOOST_LIBS macro: allow using compiled boost in windows (see readme)
# -first argument variable that will contain the libs
# -second argument list of boost libs separated by ; in " "
...
...
Apps/Tuto/tuto_histo.cpp
0 → 100644
View file @
aae843c0
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#include "tuto_histo.h"
#include "Algo/Geometry/boundingbox.h"
#include "Algo/Import/import.h"
#include "Algo/Geometry/area.h"
#include "Topology/generic/traversorCell.h"
#include <cmath>
#include <sstream>
using
namespace
CGoGN
;
int
main
(
int
argc
,
char
**
argv
)
{
// // interface
QApplication
app
(
argc
,
argv
);
MyQT
sqt
;
// copy output tout Qt console of application (shift enter)
CGoGNout
.
toConsole
(
&
sqt
);
// example code itself
sqt
.
createMap
(
std
::
string
(
argv
[
1
]));
// set help message in menu
sqt
.
setHelpMsg
(
"Tuto Histogram:
\n
Load mesh & compute histogram & quantiles
\n
+/- increase/decrease \
number of classes
\n
o/p increase/decrease number of quantiles
\n
w/x change \
min/max
\n
c center the histogram on 0
\n
h show/hide histogram
\n
q show/hide quantiles\
File/Save for exporting histogram in svg format"
);
// final show for redraw
sqt
.
show
();
// and wait for the end
return
app
.
exec
();
}
void
MyQT
::
createMap
(
const
std
::
string
&
filename
)
{
myMap
.
clear
(
true
)
;
size_t
pos
=
filename
.
rfind
(
"."
);
// position of "." in filename
std
::
string
extension
=
filename
.
substr
(
pos
);
std
::
vector
<
std
::
string
>
attrNames
;
if
(
!
Algo
::
Import
::
importMesh
<
PFP
>
(
myMap
,
filename
.
c_str
(),
attrNames
))
{
CGoGNerr
<<
"could not import "
<<
filename
<<
CGoGNendl
;
return
;
}
VertexAttribute
<
VEC3
>
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
])
;
// attribute on which we make the histogram
VertexAttribute
<
float
>
area
=
myMap
.
addAttribute
<
float
,
VERTEX
>
(
"area"
);
// attribute color to generate from histo
VertexAttribute
<
VEC3
>
colorF
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
"colorF"
);
// compute the area attribute
Algo
::
Geometry
::
computeOneRingAreaVertices
<
PFP
>
(
myMap
,
position
,
area
);
// just some tricks to obtain relatives value
float
amax
=
0
;
for
(
unsigned
int
i
=
area
.
begin
();
i
!=
area
.
end
();
area
.
next
(
i
))
if
(
area
[
i
]
>
amax
)
amax
=
area
[
i
];
for
(
unsigned
int
i
=
area
.
begin
();
i
!=
area
.
end
();
area
.
next
(
i
))
area
[
i
]
-=
amax
/
4
;
// create a colormap class for histogram coloring
l_cm
=
new
ColMap
();
// create the histogram
l_histo
=
new
Algo
::
Histogram
::
Histogram
(
*
l_cm
);
// init data with specific conversion (direction init is: l_histo->initData(area);)
AttConv
ac
(
area
);
l_histo
->
initDataConvert
(
ac
);
// compute the histogram
l_nbc
=
20
;
l_histo
->
populateHisto
(
l_nbc
);
//compute the quantiles
l_nbq
=
10
;
l_histo
->
populateQuantiles
(
l_nbq
);
// compute color attribute from histogram (histogram can alsdo directly update a VBO see below)
// l_histo->histoColorize(colorF);
// create a popup window
l_popup
=
new
Utils
::
QT
::
QtPopUp
(
this
);
// create the widget to view histogram
l_histodraw
=
new
Utils
::
QT
::
RenderHistogram
(
l_popup
,
*
l_histo
);
// some simple parameters
l_histodraw
->
setQuantilesDraw
(
true
);
l_histodraw
->
setHistoPosition
(
true
);
l_histodraw
->
setOpacity
(
0.6
f
);
// create a table of color
std
::
vector
<
Geom
::
Vec3f
>
colors
;
Utils
::
createTableColor01
(
colors
,
10
,
Utils
::
color_map_blue_green_red
);
// and us it to color the quantiles
l_histodraw
->
setQuantilesColors
(
colors
);
// add the widget to the popup
l_popup
->
addWidget
(
l_histodraw
,
0
,
0
);
l_popup
->
show
();
// connect the clicked signal of histogram widget to a slot
QObject
::
connect
(
l_histodraw
,
SIGNAL
(
clicked
(
unsigned
int
,
unsigned
int
)
),
this
,
SLOT
(
clickHisto
(
unsigned
int
,
unsigned
int
)
)
);
// bounding box of scene
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
position
);
float
lWidthObj
=
std
::
max
<
PFP
::
REAL
>
(
std
::
max
<
PFP
::
REAL
>
(
bb
.
size
(
0
),
bb
.
size
(
1
)),
bb
.
size
(
2
));
Geom
::
Vec3f
lPosObj
=
(
bb
.
min
()
+
bb
.
max
())
/
PFP
::
REAL
(
2
);
// send BB info to interface for centering on GL screen
setParamObject
(
lWidthObj
,
lPosObj
.
data
());
// first show for be sure that GL context is binded
show
();
// update of position VBO (context GL necessary)
m_positionVBO
->
updateData
(
position
);
// m_colorVBO2->updateData(colorF);
// histogram can directly update a VBO (warning GL context must be accessible, after the first show!)
l_histo
->
histoColorizeVBO
(
*
m_colorVBO2
);
// construct rendering primities
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
TRIANGLES
);
}
void
MyQT
::
cb_keyPress
(
int
keycode
)
{
switch
(
keycode
)
{
case
'+'
:
l_nbc
++
;
l_histo
->
populateHisto
(
l_nbc
);
l_histodraw
->
repaint
();
break
;
case
'-'
:
if
(
l_nbc
>
0
)
l_nbc
--
;
l_histo
->
populateHisto
(
l_nbc
);
l_histodraw
->
repaint
();
break
;
case
'p'
:
l_nbq
++
;
l_histo
->
populateQuantiles
(
l_nbq
);
l_histodraw
->
repaint
();
break
;
case
'o'
:
if
(
l_nbq
>
0
)
l_nbq
--
;
l_histo
->
populateQuantiles
(
l_nbq
);
l_histodraw
->
repaint
();
break
;
case
'q'
:
l_histodraw
->
setQuantilesDraw
(
!
l_histodraw
->
getQuantilesDraw
());
l_histodraw
->
repaint
();
break
;
case
'h'
:
l_histodraw
->
setHistoDraw
(
!
l_histodraw
->
getHistoDraw
());
l_histodraw
->
repaint
();
break
;
case
'c'
:
l_histo
->
centerOnZero
();
l_histo
->
populateHisto
(
l_nbc
);
l_histodraw
->
repaint
();
break
;
case
'w'
:
{
double
av
=
(
l_histo
->
getMin
()
+
l_histo
->
getMax
()
)
/
2.0
;
l_histo
->
setMin
(
av
*
0.1
+
l_histo
->
getMin
()
*
0.9
);
l_histo
->
setMax
(
av
*
0.1
+
l_histo
->
getMax
()
*
0.9
);
l_histo
->
populateHisto
(
l_nbc
);
l_histodraw
->
repaint
();
}
break
;
case
'x'
:
{
double
av
=
(
l_histo
->
getMin
()
+
l_histo
->
getMax
()
)
/
2.0
;
l_histo
->
setMin
(
-
0.1
*
av
+
l_histo
->
getMin
()
*
1.1
);
l_histo
->
setMax
(
-
0.1
*
av
+
l_histo
->
getMax
()
*
1.1
);
l_histo
->
populateHisto
(
l_nbc
);
l_histodraw
->
repaint
();
}
break
;
default:
break
;
}
}
void
MyQT
::
cb_initGL
()
{
// choose to use GL version 2
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
2
);
// create the render
m_render
=
new
Algo
::
Render
::
GL2
::
MapRender
();
// VBOs
m_positionVBO
=
new
Utils
::
VBO
();
m_colorVBO2
=
new
Utils
::
VBO
();
//shader
m_shader2
=
new
Utils
::
ShaderColorPerVertex
();
m_shader2
->
setAttributePosition
(
m_positionVBO
);
registerShader
(
m_shader2
);
}
void
MyQT
::
cb_redraw
()
{
glPolygonMode
(
GL_FRONT_AND_BACK
,
GL_FILL
);
// draw faces with pervertex color rendering
m_shader2
->
setAttributeColor
(
m_colorVBO2
);
m_render
->
draw
(
m_shader2
,
Algo
::
Render
::
GL2
::
TRIANGLES
);
glDisable
(
GL_POLYGON_OFFSET_FILL
);
}
void
MyQT
::
clickHisto
(
unsigned
int
i
,
unsigned
int
j
)
{
std
::
cout
<<
"CLICK on column Histo: "
<<
i
<<
" / Quantiles: "
<<
j
<<
std
::
endl
;
if
(
i
!=
Utils
::
QT
::
RenderHistogram
::
NONE
)
{
std
::
vector
<
unsigned
int
>
vc
;
l_histo
->
cellsOfHistogramColumn
(
i
,
vc
);
std
::
cout
<<
"Cells of histo: "
<<
std
::
endl
;
for
(
unsigned
int
k
=
0
;
k
<
vc
.
size
();
++
k
)
std
::
cout
<<
vc
[
k
]
<<
"/"
;
std
::
cout
<<
std
::
endl
;
CellMarker
<
VERTEX
>
cm
(
myMap
);
std
::
cout
<<
l_histo
->
markCellsOfHistogramColumn
(
i
,
cm
)
<<
" marked cells"
<<
std
::
endl
;
}
if
(
j
!=
Utils
::
QT
::
RenderHistogram
::
NONE
)
{
std
::
vector
<
unsigned
int
>
vc
;
l_histo
->
cellsOfHistogramColumn
(
j
,
vc
);
std
::
cout
<<
"Cells of quantile: "
<<
std
::
endl
;
for
(
unsigned
int
k
=
0
;
k
<
vc
.
size
();
++
k
)
std
::
cout
<<
vc
[
k
]
<<
"/"
;
std
::
cout
<<
std
::
endl
;
}
}
void
MyQT
::
cb_Save
()
{
std
::
string
filename
=
selectFileSave
(
"export svg"
,
"."
,
"*.svg"
)
;
if
(
filename
.
empty
())
return
;
l_histodraw
->
svgExport
(
filename
);
}
void
MyQT
::
cb_exit
()
{
if
(
m_render
!=
NULL
)
delete
m_render
;
if
(
m_shader2
!=
NULL
)
delete
m_shader2
;
if
(
m_positionVBO
!=
NULL
)
delete
m_positionVBO
;
if
(
l_cm
!=
NULL
)
delete
l_cm
;
if
(
l_histo
!=
NULL
)
delete
l_histo
;
if
(
l_histodraw
!=
NULL
)
delete
l_histodraw
;
if
(
l_popup
!=
NULL
)
delete
l_popup
;
}
Apps/Tuto/tuto_histo.h
0 → 100644
View file @
aae843c0
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef _TUTO2_
#define _TUTO2_
#include "Utils/Qt/qtSimple.h"
#include "Utils/cgognStream.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/Shaders/shaderColorPerVertex.h"
#include "Algo/Histogram/histogram.h"
#include "Utils/Qt/qthistodraw.h"
using
namespace
CGoGN
;
struct
PFP
:
public
PFP_STANDARD
{
typedef
EmbeddedMap2
MAP
;
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
VEC3
VEC3
;
/*
* color map class for histogram color
*/
class
ColMap
:
public
Algo
::
Histogram
::
HistoColorMap
{
public:
Geom
::
Vec3f
color
(
double
f
)
const
{
return
Utils
::
color_map_BCGYR
(
float
(
f
));}
};
/*
* Attribute conversion to double
*/
//class AttConv: public Algo::Histogram::AttributeConvert
//{
//// VertexAttribute<float>& m_va;
//public:
// /// constructor with attribute reference
// AttConv(VertexAttribute<float>& va): m_va(va){}
//
// /// just call begin of attribute handler
// unsigned int begin() const { return m_va.begin();}
//
// /// just call end of attribute handler
// unsigned int end() const { return m_va.end();}
//
// /// just call next of attribute handler
// void next(unsigned int& i) const { m_va.next(i);}
// unsigned int nbElements() const { return m_va.nbElements();}
// double operator[](unsigned int i) const { return double(m_va[i])*0.33;}
//};
class
AttConv
:
public
Algo
::
Histogram
::
AttributeConvert
<
VertexAttribute
<
float
>
>
{
public:
/// constructor with attribute reference
AttConv
(
VertexAttribute
<
float
>&
va
)
:
Algo
::
Histogram
::
AttributeConvert
<
VertexAttribute
<
float
>
>
(
va
){}
double
operator
[](
unsigned
int
i
)
const
{
return
double
(
attrib
[
i
])
*
0.33
;}
};
class
MyQT
:
public
Utils
::
QT
::
SimpleQT
{
Q_OBJECT
public:
MyQT
()
:
m_render
(
NULL
),
m_positionVBO
(
NULL
),
m_shader2
(
NULL
),
l_cm
(
NULL
),
l_histo
(
NULL
),
l_popup
(
NULL
),
l_histodraw
(
NULL
)
{}
void
cb_redraw
();
void
cb_initGL
();
protected:
MAP
myMap
;
// render, VBO & shader
Algo
::
Render
::
GL2
::
MapRender
*
m_render
;
Utils
::
VBO
*
m_positionVBO
;
// position 3D
Utils
::
VBO
*
m_colorVBO2
;
// color per vertex for edge drawing
Utils
::
ShaderColorPerVertex
*
m_shader2
;
// some ptr
ColMap
*
l_cm
;
Algo
::
Histogram
::
Histogram
*
l_histo
;
Utils
::
QT
::
QtPopUp
*
l_popup
;
Utils
::
QT
::
RenderHistogram
*
l_histodraw
;
unsigned
int
l_nbc
;
unsigned
int
l_nbq
;
public:
// example of simple map creation
void
createMap
(
const
std
::
string
&
filename
);
void
cb_Save
();
void
cb_exit
();
void
cb_keyPress
(
int
keycode
);
public
slots
:
void
clickHisto
(
unsigned
int
i
,
unsigned
int
j
);
};
#endif
Debug/CMakeLists.txt
View file @
aae843c0
...
...
@@ -91,10 +91,13 @@ IF(WITH_QT)
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/*.hpp
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/*.h
)
file
(
GLOB
_RECURSE
GLOB
utils_qt_headers
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/qtgl.h
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/qtSimple.h
)
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/qtSimple.h
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/qtpopup.h
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/qthistodraw.h
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/qtcolorschooser.h
)
QT4_WRAP_CPP
(
UTILS_QT_HEADERS_MOC
${
utils_qt_headers
}
)
SET
(
files_utils_withQt
${
files_utils
}
${
files_utils_qt
}
${
UTILS_QT_HEADERS_MOC
}
)
...
...
Release/CMakeLists.txt
View file @
aae843c0
...
...
@@ -79,18 +79,21 @@ file(
)
IF
(
WITH_QT
)
file
(
GLOB
files_utils_qt
${
CGoGN_ROOT_DIR
}
/src/Utils/Qt/*.cpp
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/*.hpp
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/*.h
)
file
(
GLOB
_RECURSE
GLOB
utils_qt_headers
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/qtgl.h
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/qtSimple.h
)
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/qtSimple.h
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/qtpopup.h
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/qthistodraw.h
${
CGoGN_ROOT_DIR
}
/include/Utils/Qt/qtcolorschooser.h
)
QT4_WRAP_CPP
(
UTILS_QT_HEADERS_MOC
${
utils_qt_headers
}
)
SET
(
files_utils_withQt
${
files_utils
}
${
files_utils_qt
}
${
UTILS_QT_HEADERS_MOC
}
)
...
...
include/Algo/Export/export.h
View file @
aae843c0
...
...
@@ -128,9 +128,9 @@ bool exportTrian(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC
* @param nbCoefs the number of coefficients of the representation
* @return true
*/
template
<
typename
PFP
>
/*
template <typename PFP>
bool exportPlyPTMgeneric(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, const FunctorSelect& good = allDarts) ;
*/
/**
* export the map into a PLYPTMgeneric file (K. Vanhoey generic format)
* @param map map to be exported
...
...
@@ -140,9 +140,10 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const VertexAttribute<typename
* @param colorPTM the 6 coefficients (x3 channels) of the PTM functions
* @return true
*/
/*
template <typename PFP>
bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const VertexAttribute<typename PFP::VEC3>& position, const VertexAttribute<typename PFP::VEC3> frame[3], const VertexAttribute<typename PFP::VEC3> colorPTM[6], const FunctorSelect& good = allDarts) ;
*/
/**
* export meshes used at the workbench
* export just a list of vertices and edges connectivity
...
...
include/Algo/Export/export.hpp
View file @
aae843c0
...
...
@@ -281,9 +281,12 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type
{
// ascii vertices
for
(
unsigned
int
i
=
0
;
i
<
vertices
.
size
();
++
i
)
{
for
(
typename
std
::
vector
<
VertexAttribute
<
typename
PFP
::
VEC3
>*
>::
const_iterator
attrHandler
=
attributeHandlers
.
begin
()
;
attrHandler
!=
attributeHandlers
.
end
()
;
++
attrHandler
)
if
((
*
attrHandler
)
->
isValid
()
&&
(
*
attrHandler
)
->
getOrbit
()
==
VERTEX
)
out
<<
(
*
(
*
attrHandler
))[
vertices
[
i
]]
<<
std
::
endl
;
out
<<
(
*
(
*
attrHandler
))[
vertices
[
i
]]
;
out
<<
std
::
endl
;
}
// ascii faces
for
(
unsigned
int
i
=
0
;
i
<
facesSize
.
size
();
++
i
)
...
...
@@ -309,7 +312,7 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type
for
(
unsigned
int
i
=
0
;
i
<
facesSize
.
size
();
++
i
)
{
uint8_t
nbe
=
facesSize
[
i
]
;
out
.
write
((
char
*
)(
&
nbe
),
sizeof
(
u
nsigned
char
))
;
out
.
write
((
char
*
)(
&
nbe
),
sizeof
(
u
int8_t
))
;
out
.
write
((
char
*
)(
&
(
facesIdx
[
i
][
0
])),
facesSize
[
i
]
*
sizeof
(
facesIdx
[
i
][
0
]))
;
}
}
...
...
@@ -385,7 +388,7 @@ bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
out
.
close
()
;
return
true
;
}
/*
template <typename PFP>
bool exportOBJ(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good)
{
...
...
@@ -590,6 +593,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const VertexAttribute<typename
out.close() ;
return true ;
}
*/
/*
template <typename PFP>
bool exportPlySLFgeneric(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, const FunctorSelect& good)
...
...
@@ -861,7 +865,6 @@ bool exportPlySLFgenericBin(typename PFP::MAP& map, const VertexAttribute<typena
out.close() ;
return true ;
}
*/
template <typename PFP>
bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const VertexAttribute<typename PFP::VEC3>& position, const VertexAttribute<typename PFP::VEC3> frame[3], const VertexAttribute<typename PFP::VEC3> colorPTM[6], const FunctorSelect& good)
...
...
@@ -975,6 +978,7 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const VertexAttr
out.close() ;
return true ;
}
*/
template
<
typename
PFP
>
bool
exportChoupi
(
typename
PFP
::
MAP
&
map
,
const
AttributeHandler
<
typename
PFP
::
VEC3
,
VERTEX
>&
position
,
const
char
*
filename
,
const
FunctorSelect
&
good
)
...
...
include/Algo/Histogram/histogram.h
0 → 100644
View file @
aae843c0
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *