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
CGoGN
CGoGN
Commits
f8f7c2e2
Commit
f8f7c2e2
authored
May 01, 2011
by
thery
Browse files
simplification compilation windows
pb VarInt sous Windows et static const float
parent
0603269f
Changes
18
Hide whitespace changes
Inline
Side-by-side
Apps/CMakeLists.txt
View file @
f8f7c2e2
...
...
@@ -2,13 +2,14 @@ SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin)
SET
(
COMMON_LIBS
${
GLUT_LIBRARY
}
${
OPENGL_LIBRARY
}
${
GLEW_LIBRARY
}
${
DEVIL_LIBRARIES
}
${
ZLIB_LIBRARIES
}
${
LIBXML2_LIBRARIES
}
gzstream AntTweakBar openctm assimp
)
SET
(
CGoGN_LIBS_D topologyD algoD containerD utilsD
)
SET
(
CGoGN_LIBS_R topology algo container utils
)
SET
(
CGoGN_LIBS_R topology algo container utils
)
IF
(
WIN32
)
SET
(
CGoGN_LIBS_D topology algo container utils
)
# libs have same name but in different place in Visual
add_subdirectory
(
Examples/Release
)
add_subdirectory
(
Tuto
)
ELSE
(
WIN32
)
SET
(
CGoGN_LIBS_D topologyD algoD containerD utilsD
)
add_subdirectory
(
Examples/Release
)
add_subdirectory
(
Examples/Debug
)
add_subdirectory
(
Examples/Tests
)
...
...
Apps/Examples/Release/CMakeLists.txt
View file @
f8f7c2e2
...
...
@@ -28,9 +28,12 @@ include_directories(
)
# define libs path
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
)
IF
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/$
(
ConfigurationName
)
)
ELSE
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
)
ENDIF
(
WIN32
)
#define exec to compile
...
...
Apps/Tuto/CMakeLists.txt
View file @
f8f7c2e2
...
...
@@ -2,12 +2,8 @@ cmake_minimum_required(VERSION 2.6)
project
(
Tutos
)
#SET (COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} gzstream AntTweakBar openctm)
SET
(
CMAKE_BUILD_TYPE Debug
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DNOTOPOWARNING"
)
# FOR Qt4
...
...
@@ -28,9 +24,14 @@ include_directories(
${
CGoGN_ROOT_DIR
}
/include
)
# define libs path
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
${
CGoGN_ROOT_DIR
}
/lib/Debug
)
IF
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/$
(
ConfigurationName
))
ELSE
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
${
CGoGN_ROOT_DIR
}
/lib/Debug
)
ENDIF
(
WIN32
)
#define exec to compile
...
...
Apps/Tuto/tuto_mt.cpp
View file @
f8f7c2e2
...
...
@@ -408,7 +408,7 @@ int main(int argc, char **argv)
{
using
namespace
CGoGN
::
Utils
::
QT
;
inputValues
(
VarInt
(
0
,
20
,
xx
,
"Entier"
,
inputValues
(
VarInt
eger
(
0
,
20
,
xx
,
"Entier"
,
VarBool
(
zz
,
"Bool"
,
VarDbl
(
0.314
,
3.14
,
yy
,
"Double"
,
VarSlider
(
10
,
100
,
kk
,
"Slider"
,
...
...
ThirdParty/CMakeLists.txt
View file @
f8f7c2e2
...
...
@@ -8,6 +8,7 @@ SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/..)
find_package
(
OpenGL
)
find_package
(
GLUT
)
IF
(
APPLE
)
SET
(
CMAKE_OSX_ARCHITECTURES x86_64
)
ENDIF
(
APPLE
)
...
...
@@ -19,10 +20,10 @@ IF(WIN32)
add_subdirectory
(
gzstream/Build
)
add_subdirectory
(
Numerical
)
add_subdirectory
(
Assimp/code
)
if
(
CMAKE_CONFIGURATION_TYPES
)
set
(
CMAKE_CONFIGURATION_TYPES Release
)
set
(
CMAKE_CONFIGURATION_TYPES
"
${
CMAKE_CONFIGURATION_TYPES
}
"
CACHE STRING
"Use only Release configuration for ThirdParty"
FORCE
)
endif
()
#
if(CMAKE_CONFIGURATION_TYPES)
#
set(CMAKE_CONFIGURATION_TYPES Release)
#
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Use only Release configuration for ThirdParty" FORCE)
#
endif()
ELSE
(
WIN32
)
SET
(
LIBRARY_OUTPUT_PATH
${
CGoGN_ROOT_DIR
}
/lib/Release
)
add_custom_target
(
FakeTargetOpenCTM ALL
"make"
...
...
ThirdParty/gzstream/gzstream.h
View file @
f8f7c2e2
...
...
@@ -36,10 +36,10 @@
#include
<stdio.h>
#include
<limits>
#include
<cmath>
#ifndef PI_DEFINED
#define PI_DEFINED
const
double
M_PI
=
3.14159265359
;
#endif
//
#ifndef PI_DEFINED
//
#define PI_DEFINED
//
double M_PI = 3.14159265359;
//
#endif
#endif
...
...
build/CMakeLists.txt
View file @
f8f7c2e2
...
...
@@ -9,7 +9,8 @@ SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/..)
SET
(
CMAKE_MODULE_PATH
"
${
CMAKE_MODULE_PATH
}
${
CGoGN_ROOT_DIR
}
/cmake_modules/"
)
find_package
(
OpenGL
)
find_package
(
OpenGL REQUIRED
)
find_package
(
Qt4 REQUIRED
)
find_package
(
GLUT
)
# qq definition specifiques pour mac
...
...
@@ -28,7 +29,6 @@ IF(WIN32)
SET
(
LIBXML2_LIBRARIES xml2
)
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/windows_dependencies/include/
)
LINK_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/windows_dependencies/lib/
)
# add_subdirectory(${CGoGN_ROOT_DIR}/ThirdParty ThirdParty)
add_subdirectory
(
Release
)
add_subdirectory
(
${
CGoGN_ROOT_DIR
}
/Apps Apps
)
if
(
EXISTS
"
${
CGoGN_ROOT_DIR
}
/Perso"
)
...
...
@@ -37,7 +37,7 @@ IF(WIN32)
if
(
CMAKE_CONFIGURATION_TYPES
)
set
(
CMAKE_CONFIGURATION_TYPES Release Debug
)
set
(
CMAKE_CONFIGURATION_TYPES
"
${
CMAKE_CONFIGURATION_TYPES
}
"
CACHE STRING
"
Use o
nly Release
configuration for ThirdParty
"
FORCE
)
set
(
CMAKE_CONFIGURATION_TYPES
"
${
CMAKE_CONFIGURATION_TYPES
}
"
CACHE STRING
"
O
nly Release
or Debug
"
FORCE
)
endif
()
ELSE
(
WIN32
)
...
...
@@ -51,7 +51,7 @@ ELSE(WIN32)
ELSE
(
IL_LIBRARIES
)
SET
(
DEVIL_LIBRARIES
${
IL_LIBRARY
}
${
ILU_LIBRARY
}
${
ILUT_LIBRARY
}
)
ENDIF
(
IL_LIBRARIES
)
# add_subdirectory(${CGoGN_ROOT_DIR}/ThirdParty ThirdParty)
add_subdirectory
(
Release
)
add_subdirectory
(
Debug
)
add_subdirectory
(
${
CGoGN_ROOT_DIR
}
/Apps Apps
)
...
...
build/Debug/CMakeLists.txt
View file @
f8f7c2e2
...
...
@@ -2,15 +2,17 @@ cmake_minimum_required(VERSION 2.6)
project
(
CGoGNDebug
)
set
(
LIBRARY_OUTPUT_PATH
${
CGoGN_ROOT_DIR
}
/lib/Debug
)
#SET(BUILD_SHARED_LIBS,FALSE)
SET
(
CMAKE_BUILD_TYPE Debug
)
IF
(
WIN32
)
SET
(
LIBRARY_OUTPUT_PATH
${
CGoGN_ROOT_DIR
}
/lib
)
ELSE
(
WIN32
)
SET
(
LIBRARY_OUTPUT_PATH
${
CGoGN_ROOT_DIR
}
/lib/Debug
)
ENDIF
(
WIN32
)
#SET(BUILD_SHARED_LIBS,FALSE)
# FOR Qt4
FIND_PACKAGE
(
Qt4 REQUIRED
)
SET
(
QT_USE_QTOPENGL TRUE
)
INCLUDE
(
${
QT_USE_FILE
}
)
ADD_DEFINITIONS
(
${
QT_DEFINITIONS
}
)
...
...
build/Release/CMakeLists.txt
View file @
f8f7c2e2
...
...
@@ -2,15 +2,19 @@ cmake_minimum_required(VERSION 2.6)
project
(
CGoGNRelease
)
set
(
LIBRARY_OUTPUT_PATH
${
CGoGN_ROOT_DIR
}
/lib/
Release
)
SET
(
CMAKE_BUILD_TYPE
Release
)
IF
(
WIN32
)
SET
(
LIBRARY_OUTPUT_PATH
${
CGoGN_ROOT_DIR
}
/lib
)
ELSE
(
WIN32
)
SET
(
LIBRARY_OUTPUT_PATH
${
CGoGN_ROOT_DIR
}
/lib/Release
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DNOTOPOWARNING"
)
ENDIF
(
WIN32
)
#SET(BUILD_SHARED_LIBS,FALSE)
SET
(
CMAKE_BUILD_TYPE Release
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DNOTOPOWARNING"
)
# FOR Qt4
FIND_PACKAGE
(
Qt4 REQUIRED
)
SET
(
QT_USE_QTOPENGL TRUE
)
INCLUDE
(
${
QT_USE_FILE
}
)
ADD_DEFINITIONS
(
${
QT_DEFINITIONS
}
)
...
...
include/Utils/glutwin.h
View file @
f8f7c2e2
...
...
@@ -30,7 +30,7 @@
#define __X_GL_H
#define GLAPIENTRY
#include
<GL/
free
glut.h>
#include
<GL/glut.h>
#ifndef WIN32
#ifdef MAC_OSX
...
...
@@ -54,7 +54,7 @@ namespace CGoGN
namespace
Utils
{
APIEXPORT
class
SimpleGlutWin
class
SimpleGlutWin
{
protected:
// internal values used for the manipulation of object
...
...
include/Utils/img3D_IO.h
View file @
f8f7c2e2
...
...
@@ -45,7 +45,7 @@ namespace Img3D_IO
* Initialization of IO
* Necessary before any other call
*/
void
APIEXPORT
initIO
();
void
initIO
();
/**
* Load bool image (0/255)
...
...
@@ -77,7 +77,7 @@ namespace Img3D_IO
* @param vz voxel size z
* @param tag image tag
*/
APIEXPORT
void
saveBool
(
ILstring
filename
,
unsigned
char
*
data
,
int
w
,
int
h
,
int
d
,
float
vx
,
float
vy
,
float
vz
,
int
tag
);
void
saveBool
(
ILstring
filename
,
unsigned
char
*
data
,
int
w
,
int
h
,
int
d
,
float
vx
,
float
vy
,
float
vz
,
int
tag
);
/**
* Load 8 bits image, if image is boolean compressed, it uncompress it !
...
...
@@ -92,7 +92,7 @@ namespace Img3D_IO
* @param tag image tag (reference out)
* @return a pointer on the image data (that have been allocated by function)
*/
APIEXPORT
unsigned
char
*
loadVal_8
(
ILstring
filename
,
int
&
w
,
int
&
h
,
int
&
d
,
float
&
vx
,
float
&
vy
,
float
&
vz
,
int
&
tag
);
unsigned
char
*
loadVal_8
(
ILstring
filename
,
int
&
w
,
int
&
h
,
int
&
d
,
float
&
vx
,
float
&
vy
,
float
&
vz
,
int
&
tag
);
/**
* Save 8bits val image
...
...
@@ -108,7 +108,7 @@ namespace Img3D_IO
* @param vz voxel size z
* @param tag image tag
*/
APIEXPORT
void
saveVal
(
ILstring
filename
,
unsigned
char
*
data
,
int
w
,
int
h
,
int
d
,
float
vx
,
float
vy
,
float
vz
,
int
tag
);
void
saveVal
(
ILstring
filename
,
unsigned
char
*
data
,
int
w
,
int
h
,
int
d
,
float
vx
,
float
vy
,
float
vz
,
int
tag
);
/**
...
...
@@ -124,7 +124,7 @@ namespace Img3D_IO
* @param tag image tag (reference out)
* @return a pointer on the image data (that have been allocated by function)
*/
APIEXPORT
unsigned
short
*
loadVal_16
(
ILstring
filename
,
int
&
w
,
int
&
h
,
int
&
d
,
float
&
vx
,
float
&
vy
,
float
&
vz
,
int
&
tag
);
unsigned
short
*
loadVal_16
(
ILstring
filename
,
int
&
w
,
int
&
h
,
int
&
d
,
float
&
vx
,
float
&
vy
,
float
&
vz
,
int
&
tag
);
/**
* Save 16bits val image
...
...
@@ -140,7 +140,7 @@ namespace Img3D_IO
* @param vz voxel size z
* @param tag image tag
*/
APIEXPORT
void
saveVal_16
(
ILstring
filename
,
unsigned
short
*
data
,
int
w
,
int
h
,
int
d
,
float
vx
,
float
vy
,
float
vz
,
int
tag
);
void
saveVal_16
(
ILstring
filename
,
unsigned
short
*
data
,
int
w
,
int
h
,
int
d
,
float
vx
,
float
vy
,
float
vz
,
int
tag
);
/**
* Load float value image
...
...
@@ -155,7 +155,7 @@ namespace Img3D_IO
* @param tag image tag (reference out)
* @return a pointer on the image data (that have been allocated by function)
*/
APIEXPORT
float
*
loadVal_float
(
ILstring
filename
,
int
&
w
,
int
&
h
,
int
&
d
,
float
&
vx
,
float
&
vy
,
float
&
vz
,
int
&
id
);
float
*
loadVal_float
(
ILstring
filename
,
int
&
w
,
int
&
h
,
int
&
d
,
float
&
vx
,
float
&
vy
,
float
&
vz
,
int
&
id
);
/**
* Save float val image
...
...
@@ -171,7 +171,7 @@ namespace Img3D_IO
* @param vz voxel size z
* @param tag image tag
*/
APIEXPORT
void
saveVal_float
(
ILstring
filename
,
float
*
data
,
int
w
,
int
h
,
int
d
,
float
vx
,
float
vy
,
float
vz
,
int
tag
);
void
saveVal_float
(
ILstring
filename
,
float
*
data
,
int
w
,
int
h
,
int
d
,
float
vx
,
float
vy
,
float
vz
,
int
tag
);
/**
...
...
@@ -187,7 +187,7 @@ namespace Img3D_IO
* @param tag image tag (reference out)
* @return a pointer on the image data (that have been allocated by function)
*/
APIEXPORT
unsigned
char
*
loadRGB
(
ILstring
filename
,
int
&
w
,
int
&
h
,
int
&
d
,
float
&
vx
,
float
&
vy
,
float
&
vz
,
int
&
id
);
unsigned
char
*
loadRGB
(
ILstring
filename
,
int
&
w
,
int
&
h
,
int
&
d
,
float
&
vx
,
float
&
vy
,
float
&
vz
,
int
&
id
);
/**
* Save RGB 8 bits image
...
...
@@ -203,7 +203,7 @@ namespace Img3D_IO
* @param vz voxel size z
* @param tag image tag
*/
APIEXPORT
void
saveRGB
(
ILstring
filename
,
unsigned
char
*
data
,
int
w
,
int
h
,
int
d
,
float
vx
,
float
vy
,
float
vz
,
int
tag
);
void
saveRGB
(
ILstring
filename
,
unsigned
char
*
data
,
int
w
,
int
h
,
int
d
,
float
vx
,
float
vy
,
float
vz
,
int
tag
);
}
//namespace
}
//namespace
...
...
include/Utils/os_spec.h
View file @
f8f7c2e2
...
...
@@ -8,19 +8,10 @@
#include
<stdio.h>
#include
<limits>
#include
<cmath>
#ifndef PI_DEFINED
#define PI_DEFINED
const
double
M_PI
=
3
.
14159265359
;
#endif
#ifdef EXPORTING
// #define APIEXPORT __declspec(dllexport)
#define APIEXPORT
#else
// #define APIEXPORT __declspec(dllimport)
#define APIEXPORT
#endif
#else
#define APIEXPORT
//#ifndef PI_DEFINED
//#define PI_DEFINED
//double M_PI=3.14159265359;
//#endif
#endif
// SPECIFIC FOR MAC
...
...
include/Utils/qtInputs.h
View file @
f8f7c2e2
...
...
@@ -82,15 +82,15 @@ public:
* Class for integer input in dialog window (with spinbox)
* Use: VarBool(min,max,ref_to_val, "label" [,nextVar])
*/
class
VarInt
:
public
Var
class
VarInt
eger
:
public
Var
{
public:
int
m_min
;
int
m_max
;
int
&
m_val
;
public:
VarInt
(
int
min
,
int
max
,
int
&
val
,
const
std
::
string
&
label
);
VarInt
(
int
min
,
int
max
,
int
&
val
,
const
std
::
string
&
label
,
const
Var
&
var
);
VarInt
eger
(
int
min
,
int
max
,
int
&
val
,
const
std
::
string
&
label
);
VarInt
eger
(
int
min
,
int
max
,
int
&
val
,
const
std
::
string
&
label
,
const
Var
&
var
);
QWidget
*
createInput
()
const
;
void
updateFrom
(
QWidget
*
widg
)
const
;
};
...
...
include/Utils/qtgl.h
View file @
f8f7c2e2
...
...
@@ -62,7 +62,7 @@ public:
protected:
static
const
float
FAR_PLANE
=
500.0
f
;
static
float
FAR_PLANE
;
SimpleQT
*
m_cbs
;
...
...
include/Utils/trackball.h
View file @
f8f7c2e2
...
...
@@ -64,7 +64,7 @@ namespace Utils
* The resulting rotation is returned as a quaternion rotation in the
* first paramater.
*/
APIEXPORT
void
void
trackball
(
float
q
[
4
],
float
p1x
,
float
p1y
,
float
p2x
,
float
p2y
);
/*
...
...
@@ -75,14 +75,14 @@ trackball(float q[4], float p1x, float p1y, float p2x, float p2y);
* rotation, the second and third the total rotation (which will be
* over-written with the resulting new total rotation).
*/
APIEXPORT
void
void
add_quats
(
float
*
q1
,
float
*
q2
,
float
*
dest
);
/*
* A useful function, builds a rotation matrix in Matrix based on
* given quaternion.
*/
APIEXPORT
void
void
build_rotmatrix
(
float
m
[
4
][
4
],
float
q
[
4
]);
...
...
@@ -93,7 +93,7 @@ void build_rotmatrixgl3(glm::mat4& m, float q[4]);
* the given vector) and an angle about which to rotate. The angle is
* expressed in radians. The result is put into the third argument.
*/
APIEXPORT
void
void
axis_to_quat
(
float
a
[
3
],
float
phi
,
float
q
[
4
]);
}
//namespace Utils
...
...
src/Algo/Render/mapRender.cpp
View file @
f8f7c2e2
...
...
@@ -50,8 +50,6 @@ MapRender::MapRender():
MapRender
::~
MapRender
()
{
glDeleteBuffersARB
(
4
,
m_VBOBuffers
);
delete
[]
m_VBOBuffers
;
}
...
...
src/Utils/qtgl.cpp
View file @
f8f7c2e2
...
...
@@ -35,6 +35,7 @@ namespace Utils
namespace
QT
{
float
GLWidget
::
FAR_PLANE
=
500.0
f
;
GLWidget
::
GLWidget
(
SimpleQT
*
cbs
,
QWidget
*
parent
)
:
QGLWidget
(
QGLFormat
(
QGL
::
Rgba
|
QGL
::
DoubleBuffer
|
QGL
::
DepthBuffer
),
parent
),
...
...
src/Utils/qtinputs.cpp
View file @
f8f7c2e2
...
...
@@ -144,20 +144,20 @@ void VarBool::updateFrom( QWidget* widg) const
//class VarInt
VarInt
::
VarInt
(
int
min
,
int
max
,
int
&
val
,
const
std
::
string
&
label
)
:
VarInt
eger
::
VarInt
eger
(
int
min
,
int
max
,
int
&
val
,
const
std
::
string
&
label
)
:
m_min
(
min
),
m_max
(
max
),
m_val
(
val
)
{
m_label
=
label
;
}
VarInt
::
VarInt
(
int
min
,
int
max
,
int
&
val
,
const
std
::
string
&
label
,
const
Var
&
var
)
:
VarInt
eger
::
VarInt
eger
(
int
min
,
int
max
,
int
&
val
,
const
std
::
string
&
label
,
const
Var
&
var
)
:
Var
(
var
),
m_min
(
min
),
m_max
(
max
),
m_val
(
val
)
{
m_label
=
label
;
}
QWidget
*
VarInt
::
createInput
()
const
QWidget
*
VarInt
eger
::
createInput
()
const
{
QSpinBox
*
spin
=
new
QSpinBox
();
spin
->
setRange
(
m_min
,
m_max
);
...
...
@@ -165,7 +165,7 @@ QWidget* VarInt::createInput() const
return
spin
;
}
void
VarInt
::
updateFrom
(
QWidget
*
widg
)
const
void
VarInt
eger
::
updateFrom
(
QWidget
*
widg
)
const
{
QSpinBox
*
spin
=
dynamic_cast
<
QSpinBox
*>
(
widg
);
m_val
=
spin
->
value
();
...
...
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