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
d0bd2a55
Commit
d0bd2a55
authored
Jul 28, 2011
by
CGoGN GIT Supervisor
Browse files
Merge branch 'master' of /home/thery/CGoGN
* 'master' of /home/thery/CGoGN: MAJ compilation sous windows
parents
fe464d5e
5c96d99d
Changes
9
Hide whitespace changes
Inline
Side-by-side
Apps/Tuto/tp_master.cpp
View file @
d0bd2a55
...
...
@@ -334,13 +334,13 @@ void MyQT::cb_initGL()
m_shader
=
new
Utils
::
ShaderPhong
();
m_shader
->
setAttributePosition
(
m_positionVBO
);
m_shader
->
setAttributeNormal
(
m_normalVBO
);
m_shader
->
setDiffuse
(
Geom
::
Vec4f
(
0.
,
0.6
,
0.
,
0.
));
m_shader
->
setSpecular
(
Geom
::
Vec4f
(
0.
,
0.0
,
0.
,
0.
));
// no specular
m_shader
->
setDiffuse
(
Geom
::
Vec4f
(
0.
0
f
,
0.6
f
,
0.
0
f
,
0.
0
f
));
m_shader
->
setSpecular
(
Geom
::
Vec4f
(
0.
0
f
,
0.0
f
,
0.
0
f
,
0.
0
f
));
// no specular
// using simple shader with color
m_shader2
=
new
Utils
::
ShaderSimpleColor
();
m_shader2
->
setAttributePosition
(
m_positionVBO
);
m_shader2
->
setColor
(
Geom
::
Vec4f
(
0.
,
0.1
,
0.
,
0.
));
m_shader2
->
setColor
(
Geom
::
Vec4f
(
0.
0
f
,
0.1
f
,
0.
0
f
,
0.
0
f
));
registerShader
(
m_shader
);
registerShader
(
m_shader2
);
}
...
...
Apps/Tuto/tuto5.cpp
View file @
d0bd2a55
...
...
@@ -160,7 +160,7 @@ void MyQT::cb_initGL()
m_sprite
=
new
Utils
::
PointSprite
();
m_sprite
->
setAttributePosition
(
m_positionVBO
);
m_strings
=
new
Utils
::
Strings3D
(
true
,
Geom
::
Vec3f
(
0.1
,
0.
,
0.3
));
m_strings
=
new
Utils
::
Strings3D
(
true
,
Geom
::
Vec3f
(
0.1
f
,
0.
0
f
,
0.3
f
));
storeVerticesInfo
();
m_strings
->
sendToVBO
();
...
...
@@ -192,7 +192,7 @@ void MyQT::cb_initGL()
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
LINES
);
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
POINTS
);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
allDarts
,
position
,
0.9
,
0.9
,
0.9
);
m_render_topo
->
updateData
<
PFP
>
(
myMap
,
allDarts
,
position
,
0.9
f
,
0.9
f
,
0.9
f
);
// timer example for animation
...
...
@@ -284,7 +284,7 @@ int main(int argc, char **argv)
{
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
CGoGNout
<<
5.34
<<
" toto "
<<
Geom
::
Vec3f
(
2.5
,
2.2
,
4.3
)
<<
CGoGNendl
;
CGoGNout
<<
5.34
<<
" toto "
<<
Geom
::
Vec3f
(
2.5
f
,
2.2
f
,
4.3
f
)
<<
CGoGNendl
;
CGoGNout
<<
3
<<
" tutu "
<<
4
<<
CGoGNendl
;
...
...
@@ -307,11 +307,11 @@ int main(int argc, char **argv)
sqt
.
setHelpMsg
(
"Enter pour dock on/off
\n
Shift Enter pour console on/off
\n
Shift Click gauche pour selectionner un brin"
);
CGoGNout
.
toStatusBar
(
&
sqt
);
CGoGNout
<<
"CGoGNOut StatusBar"
<<
Geom
::
Vec3f
(
2.5
,
2.2
,
4.3
)
<<
CGoGNendl
;
CGoGNout
<<
"CGoGNOut StatusBar"
<<
Geom
::
Vec3f
(
2.5
f
,
2.2
f
,
4.3
f
)
<<
CGoGNendl
;
CGoGNout
.
toConsole
(
&
sqt
);
CGoGNout
<<
"CGoGNOut dans la console"
<<
Geom
::
Vec3f
(
2.5
,
2.2
,
4.3
)
<<
CGoGNendl
;
CGoGNout
<<
"CGoGNOut dans la console"
<<
Geom
::
Vec3f
(
2.5
f
,
2.2
f
,
4.3
f
)
<<
CGoGNendl
;
CGoGNout
.
toStatusBar
(
NULL
);
CGoGNout
<<
"tirelipinpon .."
<<
CGoGNendl
;
...
...
README_VISUAL.TXT
View file @
d0bd2a55
...
...
@@ -2,26 +2,33 @@ Prérequis:
Visual Studio ou C++ Express (au moins 2005)
CMake (au moins 2.6)
Unziper le windows_dependencies.zip (http://iggservis.u-strasbg.fr/Data/) a la racine de CGoGN
Lancer CMake
Mettre le chemin de la racine de CGoGN + /ThirdParty pour les sources
Mettre le chemin de la racine de CGoGN + /ThirdParty/Visual (par exemple) pour le build
Cliquer sur Configure
Choisir le bon compilateur (celui de votre version de Visual C++)
Recliquer sur Configure
Cliquer sur Generate
Aller compiler sous visual(en release)
Relancer CMake
Mettre le chemin de la racine de CGoGN + /build pour les sources
Mettre le chemin de la racine de CGoGN + /Visual (par exemple) pour le build
ajouter deux entrees dans le cache (pour utilisation de boost precompile: www.boostpro.com)
boost_path avec le chemin d'acces (exemple: C:\Program Files\boost\boost_1_44\)
boost_extension avec ce que vous voulez utiliser (exemple: -vc100-mt-1_44)
Cliquer sur Configure
Choisir le bon compilateur (celui de votre version de Visual C++)
Recliquer sur Configure
Cliquer sur Generate
Unziper le windows_dependencies.zip (http://iggservis.u-strasbg.fr/Data/) a la racine de CGoGN
Aller dans Visual et double-cliquer sur CGoGN.sln !!
Pour que les executables fonctionnent ajouter le chemin vers les dll dans la variable d'environnement path
(ou copier les dll dans un répertoire déjà dans le path)
Remarque pour l'utilisation de boost (manière simple):
-installer les binaires a l'aide de boostpro (www.boostpro.com)
-definir la varible d'env "boost_extension" avec ce que vous voulez utiliser (exemple: -vc100-mt-1_44)
-definir la varible d'env "boost_path" avec le chemin d'acces (exemple: C:\Program Files\boost\boost_1_44\)
-ajouter le chemin vers les dll dans le path (comme cf ci-dessus)
...
...
build/CMakeLists.txt
View file @
d0bd2a55
...
...
@@ -39,15 +39,15 @@ IF(WIN32)
MACRO
(
BOOST_LIBS lib_lists names
)
SET
(
${
lib_lists
}
""
)
FOREACH
(
name
${
names
}
)
STRING
(
REGEX REPLACE
"-mt"
$
ENV
{boost_extension} newname
${
name
}
)
STRING
(
REGEX REPLACE
"-mt"
${
boost_extension
}
newname
${
name
}
)
SET
(
${
lib_lists
}
${${
lib_lists
}}
${
newname
}
)
ENDFOREACH
(
name
)
ENDMACRO
(
BOOST_LIBS
)
set
(
BOOST_INCLUDE_PATH $
ENV
{boost_path}
)
set
(
BOOST_INCLUDE_PATH
${
boost_path
}
)
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/windows_dependencies/include/
)
LINK_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/windows_dependencies/lib/ $
ENV
{boost_path}/lib
)
LINK_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/windows_dependencies/lib/
${
boost_path
}
/lib
)
add_subdirectory
(
Release
)
add_subdirectory
(
${
CGoGN_ROOT_DIR
}
/Apps Apps
)
if
(
EXISTS
"
${
CGoGN_ROOT_DIR
}
/Perso"
)
...
...
include/Algo/Import/import2tablesSurface.hpp
View file @
d0bd2a55
...
...
@@ -1127,7 +1127,7 @@ bool MeshTablesSurface<PFP>::importASSIMP(const std::string& filename, std::vect
template
<
typename
PFP
>
bool
MeshTablesSurface
<
PFP
>::
mergeCloseVertices
()
{
const
unsigned
int
NBV
=
64
;
// seems to be good
const
int
NBV
=
64
;
// seems to be good
const
int
NEIGH
[
27
]
=
{
-
NBV
*
NBV
-
NBV
-
1
,
-
NBV
*
NBV
-
NBV
,
-
NBV
*
NBV
-
NBV
+
1
,
...
...
include/Algo/Modelisation/subdivision.hpp
View file @
d0bd2a55
...
...
@@ -25,6 +25,9 @@
#include
"Algo/Geometry/centroid.h"
#include
"Topology/generic/autoAttributeHandler.h"
#define _USE_MATH_DEFINES
#include
<math.h>
namespace
CGoGN
{
...
...
include/Utils/frameManipulator.h
View file @
d0bd2a55
...
...
@@ -51,8 +51,7 @@ protected:
*/
static
const
unsigned
int
nb_segments
=
64
;
static
const
float
ring_half_width
=
0.08
f
;
static
const
float
ring_half_width
;
/**
* locking table
...
...
src/Utils/frameManipulator.cpp
View file @
d0bd2a55
...
...
@@ -28,17 +28,17 @@
#include
"Geometry/intersection.h"
#include
<glm/ext.hpp>
//#include <glm/gtc/matrix_transform.hpp>
//#include "glm/gtc/type_precision.hpp"
//#include "glm/gtc/type_ptr.hpp"
//#include <cmath>
#define _USE_MATH_DEFINES
#include
<math.h>
namespace
CGoGN
{
namespace
Utils
{
const
float
FrameManipulator
::
ring_half_width
=
0.08
f
;
FrameManipulator
::
FrameManipulator
()
:
m_highlighted
(
NONE
),
...
...
@@ -900,7 +900,7 @@ void FrameManipulator::rotateInScreen(int dx, int dy)
Geom
::
Vec3f
axisRotation
(
P
[
0
]
-
m_trans
[
0
],
P
[
1
]
-
m_trans
[
1
],
P
[
2
]
-
m_trans
[
2
]);
axisRotation
.
normalize
();
glm
::
mat4
tr
=
glm
::
rotate
(
glm
::
mat4
(
1.0
f
),
float
(
sqr
t
(
dx
*
dx
+
dy
*
dy
))
/
2.0
f
,
glm
::
vec3
(
axisRotation
[
0
],
axisRotation
[
1
],
axisRotation
[
2
]));
glm
::
mat4
tr
=
glm
::
rotate
(
glm
::
mat4
(
1.0
f
),
sqrt
(
floa
t
(
dx
*
dx
+
dy
*
dy
))
/
2.0
f
,
glm
::
vec3
(
axisRotation
[
0
],
axisRotation
[
1
],
axisRotation
[
2
]));
m_rotations
=
tr
*
m_rotations
;
}
...
...
src/Utils/pickables.cpp
View file @
d0bd2a55
...
...
@@ -26,8 +26,9 @@
#include
"glm/gtc/matrix_transform.hpp"
#include
"Geometry/distances.h"
#include
"Geometry/intersection.h"
#include
<cmath>
#include
<algorithm>
#define _USE_MATH_DEFINES
#include
<math.h>
namespace
CGoGN
{
...
...
@@ -915,7 +916,7 @@ void IcoSphere::changeTopo(unsigned int sub)
{
if
(
sub
<
2
)
sub
=
2
;
int
subd
=
int
(
log
(
sub
/
2
)
/
log
(
2.0
))
-
1
;
int
subd
=
int
(
log
(
0.5
*
sub
)
/
log
(
2.0
))
-
1
;
if
(
subd
<
0
)
subd
=
0
;
...
...
@@ -929,7 +930,7 @@ void IcoSphere::changeTopoSubdivision(unsigned int sub)
m_sub
=
sub
;
unsigned
int
subEdge
=
powf
(
2.0
f
,
4.0
f
-
sub
);
unsigned
int
subEdge
=
(
unsigned
int
)(
powf
(
2.0
f
,
4.0
f
-
sub
)
)
;
std
::
vector
<
Geom
::
Vec3f
>
points
;
points
.
reserve
(
10000
);
...
...
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