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
David Cazier
CGoGN
Commits
5c96d99d
Commit
5c96d99d
authored
Jul 28, 2011
by
thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MAJ compilation sous windows
parent
c296fc49
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
39 additions
and
29 deletions
+39
-29
Apps/Tuto/tp_master.cpp
Apps/Tuto/tp_master.cpp
+3
-3
Apps/Tuto/tuto5.cpp
Apps/Tuto/tuto5.cpp
+5
-5
README_VISUAL.TXT
README_VISUAL.TXT
+14
-7
build/CMakeLists.txt
build/CMakeLists.txt
+3
-3
include/Algo/Import/import2tablesSurface.hpp
include/Algo/Import/import2tablesSurface.hpp
+1
-1
include/Algo/Modelisation/subdivision.hpp
include/Algo/Modelisation/subdivision.hpp
+3
-0
include/Utils/frameManipulator.h
include/Utils/frameManipulator.h
+1
-2
src/Utils/frameManipulator.cpp
src/Utils/frameManipulator.cpp
+5
-5
src/Utils/pickables.cpp
src/Utils/pickables.cpp
+4
-3
No files found.
Apps/Tuto/tp_master.cpp
View file @
5c96d99d
...
@@ -334,13 +334,13 @@ void MyQT::cb_initGL()
...
@@ -334,13 +334,13 @@ void MyQT::cb_initGL()
m_shader
=
new
Utils
::
ShaderPhong
();
m_shader
=
new
Utils
::
ShaderPhong
();
m_shader
->
setAttributePosition
(
m_positionVBO
);
m_shader
->
setAttributePosition
(
m_positionVBO
);
m_shader
->
setAttributeNormal
(
m_normalVBO
);
m_shader
->
setAttributeNormal
(
m_normalVBO
);
m_shader
->
setDiffuse
(
Geom
::
Vec4f
(
0.
,
0.6
,
0.
,
0.
));
m_shader
->
setDiffuse
(
Geom
::
Vec4f
(
0.
0
f
,
0.6
f
,
0.
0
f
,
0.
0
f
));
m_shader
->
setSpecular
(
Geom
::
Vec4f
(
0.
,
0.0
,
0.
,
0.
));
// no specular
m_shader
->
setSpecular
(
Geom
::
Vec4f
(
0.
0
f
,
0.0
f
,
0.
0
f
,
0.
0
f
));
// no specular
// using simple shader with color
// using simple shader with color
m_shader2
=
new
Utils
::
ShaderSimpleColor
();
m_shader2
=
new
Utils
::
ShaderSimpleColor
();
m_shader2
->
setAttributePosition
(
m_positionVBO
);
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_shader
);
registerShader
(
m_shader2
);
registerShader
(
m_shader2
);
}
}
...
...
Apps/Tuto/tuto5.cpp
View file @
5c96d99d
...
@@ -160,7 +160,7 @@ void MyQT::cb_initGL()
...
@@ -160,7 +160,7 @@ void MyQT::cb_initGL()
m_sprite
=
new
Utils
::
PointSprite
();
m_sprite
=
new
Utils
::
PointSprite
();
m_sprite
->
setAttributePosition
(
m_positionVBO
);
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
();
storeVerticesInfo
();
m_strings
->
sendToVBO
();
m_strings
->
sendToVBO
();
...
@@ -192,7 +192,7 @@ void MyQT::cb_initGL()
...
@@ -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
::
LINES
);
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
allDarts
,
Algo
::
Render
::
GL2
::
POINTS
);
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
// timer example for animation
...
@@ -284,7 +284,7 @@ int main(int argc, char **argv)
...
@@ -284,7 +284,7 @@ int main(int argc, char **argv)
{
{
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
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
;
CGoGNout
<<
3
<<
" tutu "
<<
4
<<
CGoGNendl
;
...
@@ -307,11 +307,11 @@ int main(int argc, char **argv)
...
@@ -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"
);
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
.
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
.
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
.
toStatusBar
(
NULL
);
CGoGNout
<<
"tirelipinpon .."
<<
CGoGNendl
;
CGoGNout
<<
"tirelipinpon .."
<<
CGoGNendl
;
...
...
README_VISUAL.TXT
View file @
5c96d99d
...
@@ -2,26 +2,33 @@ Prérequis:
...
@@ -2,26 +2,33 @@ Prérequis:
Visual Studio ou C++ Express (au moins 2005)
Visual Studio ou C++ Express (au moins 2005)
CMake (au moins 2.6)
CMake (au moins 2.6)
Unziper le windows_dependencies.zip (http://iggservis.u-strasbg.fr/Data/) a la racine de CGoGN
Lancer CMake
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 + /build pour les sources
Mettre le chemin de la racine de CGoGN + /Visual (par exemple) pour le build
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
Cliquer sur Configure
Choisir le bon compilateur (celui de votre version de Visual C++)
Choisir le bon compilateur (celui de votre version de Visual C++)
Recliquer sur Configure
Recliquer sur Configure
Cliquer sur Generate
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 !!
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
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)
(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 @
5c96d99d
...
@@ -39,15 +39,15 @@ IF(WIN32)
...
@@ -39,15 +39,15 @@ IF(WIN32)
MACRO
(
BOOST_LIBS lib_lists names
)
MACRO
(
BOOST_LIBS lib_lists names
)
SET
(
${
lib_lists
}
""
)
SET
(
${
lib_lists
}
""
)
FOREACH
(
name
${
names
}
)
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
}
)
SET
(
${
lib_lists
}
${${
lib_lists
}}
${
newname
}
)
ENDFOREACH
(
name
)
ENDFOREACH
(
name
)
ENDMACRO
(
BOOST_LIBS
)
ENDMACRO
(
BOOST_LIBS
)
set
(
BOOST_INCLUDE_PATH $
ENV
{boost_path}
)
set
(
BOOST_INCLUDE_PATH
${
boost_path
}
)
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/windows_dependencies/include/
)
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
(
Release
)
add_subdirectory
(
${
CGoGN_ROOT_DIR
}
/Apps Apps
)
add_subdirectory
(
${
CGoGN_ROOT_DIR
}
/Apps Apps
)
if
(
EXISTS
"
${
CGoGN_ROOT_DIR
}
/Perso"
)
if
(
EXISTS
"
${
CGoGN_ROOT_DIR
}
/Perso"
)
...
...
include/Algo/Import/import2tablesSurface.hpp
View file @
5c96d99d
...
@@ -1096,7 +1096,7 @@ bool MeshTablesSurface<PFP>::importASSIMP(const std::string& filename, std::vect
...
@@ -1096,7 +1096,7 @@ bool MeshTablesSurface<PFP>::importASSIMP(const std::string& filename, std::vect
template
<
typename
PFP
>
template
<
typename
PFP
>
bool
MeshTablesSurface
<
PFP
>::
mergeCloseVertices
()
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
]
=
{
const
int
NEIGH
[
27
]
=
{
-
NBV
*
NBV
-
NBV
-
1
,
-
NBV
*
NBV
-
NBV
,
-
NBV
*
NBV
-
NBV
+
1
,
-
NBV
*
NBV
-
NBV
-
1
,
-
NBV
*
NBV
-
NBV
,
-
NBV
*
NBV
-
NBV
+
1
,
...
...
include/Algo/Modelisation/subdivision.hpp
View file @
5c96d99d
...
@@ -25,6 +25,9 @@
...
@@ -25,6 +25,9 @@
#include "Algo/Geometry/centroid.h"
#include "Algo/Geometry/centroid.h"
#include "Topology/generic/autoAttributeHandler.h"
#include "Topology/generic/autoAttributeHandler.h"
#define _USE_MATH_DEFINES
#include <math.h>
namespace
CGoGN
namespace
CGoGN
{
{
...
...
include/Utils/frameManipulator.h
View file @
5c96d99d
...
@@ -51,8 +51,7 @@ protected:
...
@@ -51,8 +51,7 @@ protected:
*/
*/
static
const
unsigned
int
nb_segments
=
64
;
static
const
unsigned
int
nb_segments
=
64
;
static
const
float
ring_half_width
=
0.08
f
;
static
const
float
ring_half_width
;
/**
/**
* locking table
* locking table
...
...
src/Utils/frameManipulator.cpp
View file @
5c96d99d
...
@@ -28,17 +28,17 @@
...
@@ -28,17 +28,17 @@
#include "Geometry/intersection.h"
#include "Geometry/intersection.h"
#include <glm/ext.hpp>
#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
CGoGN
{
{
namespace
Utils
namespace
Utils
{
{
const
float
FrameManipulator
::
ring_half_width
=
0.08
f
;
FrameManipulator
::
FrameManipulator
()
:
FrameManipulator
::
FrameManipulator
()
:
m_highlighted
(
NONE
),
m_highlighted
(
NONE
),
...
@@ -900,7 +900,7 @@ void FrameManipulator::rotateInScreen(int dx, int dy)
...
@@ -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
]);
Geom
::
Vec3f
axisRotation
(
P
[
0
]
-
m_trans
[
0
],
P
[
1
]
-
m_trans
[
1
],
P
[
2
]
-
m_trans
[
2
]);
axisRotation
.
normalize
();
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
;
m_rotations
=
tr
*
m_rotations
;
}
}
...
...
src/Utils/pickables.cpp
View file @
5c96d99d
...
@@ -26,8 +26,9 @@
...
@@ -26,8 +26,9 @@
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtc/matrix_transform.hpp"
#include "Geometry/distances.h"
#include "Geometry/distances.h"
#include "Geometry/intersection.h"
#include "Geometry/intersection.h"
#include <cmath>
#include <algorithm>
#include <algorithm>
#define _USE_MATH_DEFINES
#include <math.h>
namespace
CGoGN
namespace
CGoGN
{
{
...
@@ -915,7 +916,7 @@ void IcoSphere::changeTopo(unsigned int sub)
...
@@ -915,7 +916,7 @@ void IcoSphere::changeTopo(unsigned int sub)
{
{
if
(
sub
<
2
)
if
(
sub
<
2
)
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
)
if
(
subd
<
0
)
subd
=
0
;
subd
=
0
;
...
@@ -929,7 +930,7 @@ void IcoSphere::changeTopoSubdivision(unsigned int sub)
...
@@ -929,7 +930,7 @@ void IcoSphere::changeTopoSubdivision(unsigned int sub)
m_sub
=
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
;
std
::
vector
<
Geom
::
Vec3f
>
points
;
points
.
reserve
(
10000
);
points
.
reserve
(
10000
);
...
...
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