Commit 2904fbf9 authored by Sylvain Thery's avatar Sylvain Thery

Merge branch 'CGoGN_MT'

parents 8f014cc6 be1ee120
......@@ -4,7 +4,9 @@ project(Tutos)
#SET (COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} gzstream AntTweakBar openctm)
SET(CMAKE_BUILD_TYPE Release)
SET (CMAKE_BUILD_TYPE Debug)
#SET(CMAKE_BUILD_TYPE Release)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
......@@ -14,6 +16,7 @@ include_directories(
${CGoGN_ROOT_DIR}/ThirdParty/gzstream
${CGoGN_ROOT_DIR}/ThirdParty/OpenCTM
${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include
${CGoGN_ROOT_DIR}/ThirdParty/glm
${CGoGN_ROOT_DIR}/include
)
......@@ -49,3 +52,14 @@ target_link_libraries( tuto_subdivision
add_executable( tp_master tp_master.cpp)
target_link_libraries( tp_master
container topology utils algo ${COMMON_LIBS} )
add_executable( tuto_mt tuto_mt.cpp)
target_link_libraries( tuto_mt
containerD topologyD utilsD algoD ${COMMON_LIBS} boost_thread)
# container topology utils algo ${COMMON_LIBS} boost_thread)
add_executable( tuto_ogl3 tuto_ogl3.cpp)
target_link_libraries( tuto_ogl3
containerD topologyD utilsD algoD ${COMMON_LIBS} )
# container topology utils algo ${COMMON_LIBS} )
......@@ -100,6 +100,7 @@ Dart d_maison;
Dart Carre()
{
return Dart::nil();
}
......@@ -107,7 +108,7 @@ Dart Carre()
Dart Triangle()
{
return Dart::nil();
}
......@@ -141,7 +142,7 @@ void ColleMilieu(Dart d, Dart e)
Dart Maison()
{
return Dart::nil();
}
......@@ -634,7 +635,6 @@ void myGlutWin::myKeyboard(unsigned char keycode, int x, int y)
/// calcul du rayon
getOrthoScreenRay(x,y,rayA,rayB);
PFP::VEC3 AB = rayB-rayA;
float AB2 = AB.norm2();
d_faces.clear();
d_edges.clear();
......@@ -678,7 +678,6 @@ void myGlutWin::myKeyboard(unsigned char keycode, int x, int y)
/// Rayon
getOrthoScreenRay(x,y,rayA,rayB);
PFP::VEC3 AB = rayB-rayA;
float AB2 = AB.norm2();
d_faces.clear();
d_edges.clear();
......
This diff is collapsed.
Dépendences Linux:
installer les paquets suivants:
cmake libXi-dev libXmu-dev freeglut3-dev libdevil-dev libglew-dev libgmp3-dev libxml2-dev libboost-dev
cmake libXi-dev libXmu-dev freeglut3-dev libdevil-dev libglew-dev libgmp3-dev libxml2-dev libboost-dev lizip-dev
Pour compiler CGoGN:
......
cmake_minimum_required( VERSION 2.6 )
PROJECT( Assimp )
set(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Release)
INCLUDE_DIRECTORIES( ../include )
SET( LIBRARY_VERSION "1.0.0" )
SET( LIBRARY_SOVERSION "1" )
IF(WIN32)
SET( ENABLE_BOOST_WORKAROUND "1" )
ENDIF(WIN32)
IF ( ENABLE_BOOST_WORKAROUND )
INCLUDE_DIRECTORIES( BoostWorkaround )
ADD_DEFINITIONS( -DASSIMP_BUILD_BOOST_WORKAROUND )
MESSAGE( STATUS "Building a non-boost version of Assimp." )
ELSE ( ENABLE_BOOST_WORKAROUND )
FIND_PACKAGE( Boost 1.35 )
FIND_PACKAGE( Boost )
IF ( NOT Boost_FOUND )
MESSAGE( FATAL_ERROR
......
......@@ -11,11 +11,18 @@ find_package(GLUT)
#On Windows we use AntTweakBar/OpenCTM of dependencies, not compiled
IF(WIN32)
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib)#release added by visual
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/)
add_subdirectory(Zinri/Build)
add_subdirectory(gzstream/Build)
add_subdirectory(Numerical)
add_subdirectory(Assimp)
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()
ELSE(WIN32)
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Release)
add_custom_target( FakeTargetOpenCTM ALL "make"
WORKING_DIRECTORY ${CGoGN_ROOT_DIR}/ThirdParty/OpenCTM
COMMENT "Custom compile of OpenCTM" )
......
......@@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 2.6)
project(Numerical)
set(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Release)
SUBDIRS(C_BLAS_LAPACK)
......
......@@ -135,7 +135,7 @@ if(BLAS_COMPLEX16)
${ALLBLAS} ${ZBLAS2} ${ZBLAS3})
endif()
set(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Release)
add_library(blas ${ALLOBJ})
if(UNIX)
target_link_libraries(blas m)
......
......@@ -58,6 +58,7 @@ if(WIN32)
endif()
include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c)
include_directories(${CLAPACK_BINARY_DIR}/F2CLIBS/libf2c)
set(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Release)
add_library(f2c ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
set_property(TARGET f2c PROPERTY PREFIX lib)
#set_property(TARGET f2c PROPERTY PREFIX lib)
#pb sous windows avec le prefix lib
\ No newline at end of file
......@@ -376,7 +376,6 @@ if(BUILD_COMPLEX16)
set(ALLOBJ ${ZLASRC} ${ALLAUX} ${DZLAUX})
endif()
set(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Release)
add_library(lapack ${ALLOBJ} ${ALLXOBJ})
target_link_libraries(lapack blas)
......@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 2.6)
project(Zinri)
set(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Release)
include_directories(..)
file(
......
///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2008-07-24
// Updated : 2008-08-31
// Licence : This source is under MIT License
// File : glm/core/_detail.hpp
///////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_detail
#define glm_core_detail
#include "../setup.hpp"
#include <cassert>
namespace glm{
namespace detail{
class thalf;
#if(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC))
typedef signed __int64 sint64;
typedef unsigned __int64 uint64;
#elif(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_GCC))
__extension__ typedef signed long long sint64;
__extension__ typedef unsigned long long uint64;
#else//unknown compiler
typedef signed long sint64;
typedef unsigned long uint64;
#endif//GLM_COMPILER
template<bool C>
struct If
{
template<typename F, typename T>
static inline T apply(F functor, const T& val)
{
return functor(val);
}
};
template<>
struct If<false>
{
template<typename F, typename T>
static inline T apply(F, const T& val)
{
return val;
}
};
//template <typename T>
//struct traits
//{
// static const bool is_signed = false;
// static const bool is_float = false;
// static const bool is_vector = false;
// static const bool is_matrix = false;
// static const bool is_genType = false;
// static const bool is_genIType = false;
// static const bool is_genUType = false;
//};
//template <>
//struct traits<half>
//{
// static const bool is_float = true;
// static const bool is_genType = true;
//};
//template <>
//struct traits<float>
//{
// static const bool is_float = true;
// static const bool is_genType = true;
//};
//template <>
//struct traits<double>
//{
// static const bool is_float = true;
// static const bool is_genType = true;
//};
//template <typename genType>
//struct desc
//{
// typedef genType type;
// typedef genType * pointer;
// typedef genType const* const_pointer;
// typedef genType const *const const_pointer_const;
// typedef genType *const pointer_const;
// typedef genType & reference;
// typedef genType const& const_reference;
// typedef genType const& param_type;
// typedef typename genType::value_type value_type;
// typedef typename genType::size_type size_type;
// static const typename size_type value_size;
//};
//template <typename genType>
//const typename desc<genType>::size_type desc<genType>::value_size = genType::value_size();
union uif32
{
uif32() :
i(0)
{}
uif32(float f) :
f(f)
{}
uif32(unsigned int i) :
i(i)
{}
float f;
unsigned int i;
};
union uif64
{
uif64() :
i(0)
{}
uif64(double f) :
f(f)
{}
uif64(uint64 i) :
i(i)
{}
double f;
uint64 i;
};
typedef uif32 uif;
//////////////////
// int
template <typename T>
struct is_int
{
enum is_int_enum
{
_YES = 0,
_NO = 1
};
};
#define GLM_DETAIL_IS_INT(T) \
template <> \
struct is_int<T> \
{ \
enum is_int_enum \
{ \
_YES = 1, \
_NO = 0 \
}; \
}
//////////////////
// uint
template <typename T>
struct is_uint
{
enum is_uint_enum
{
_YES = 0,
_NO = 1
};
};
#define GLM_DETAIL_IS_UINT(T) \
template <> \
struct is_uint<T> \
{ \
enum is_uint_enum \
{ \
_YES = 1, \
_NO = 0 \
}; \
}
//GLM_DETAIL_IS_UINT(unsigned long long)
//////////////////
// float
template <typename T>
struct is_float
{
enum is_float_enum
{
_YES = 0,
_NO = 1
};
};
#define GLM_DETAIL_IS_FLOAT(T) \
template <> \
struct is_float<T> \
{ \
enum is_float_enum \
{ \
_YES = 1, \
_NO = 0 \
}; \
}
//////////////////
// bool
template <typename T>
struct is_bool
{
enum is_bool_enum
{
_YES = 0,
_NO = 1
};
};
template <>
struct is_bool<bool>
{
enum is_bool_enum
{
_YES = 1,
_NO = 0
};
};
//////////////////
// vector
template <typename T>
struct is_vector
{
enum is_vector_enum
{
_YES = 0,
_NO = 1
};
};
#define GLM_DETAIL_IS_VECTOR(T) \
template <> \
struct is_vector \
{ \
enum is_vector_enum \
{ \
_YES = 1, \
_NO = 0 \
}; \
}
//////////////////
// matrix
template <typename T>
struct is_matrix
{
enum is_matrix_enum
{
_YES = 0,
_NO = 1
};
};
#define GLM_DETAIL_IS_MATRIX(T) \
template <> \
struct is_matrix \
{ \
enum is_matrix_enum \
{ \
_YES = 1, \
_NO = 0 \
}; \
}
//////////////////
// type
template <typename T>
struct type
{
enum type_enum
{
is_float = is_float<T>::_YES,
is_int = is_int<T>::_YES,
is_uint = is_uint<T>::_YES,
is_bool = is_bool<T>::_YES
};
};
//////////////////
// type
typedef signed char int8;
typedef signed short int16;
typedef signed int int32;
typedef detail::sint64 int64;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
typedef detail::uint64 uint64;
typedef detail::thalf float16;
typedef float float32;
typedef double float64;
}//namespace detail
}//namespace glm
#endif//glm_core_detail
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2006-04-27
// Updated : 2006-04-27
// Licence : This source is under MIT License
// File : _swizzle.inl
///////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef __swizzle_inl__
#define __swizzle_inl__
#include "./_swizzle.h"
namespace glm
{
}
#endif//__swizzle_inl__
///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2011-01-19
// Updated : 2011-01-19
// Licence : This source is under MIT License
// File : glm/setup.hpp
///////////////////////////////////////////////////////////////////////////////////////////////////
// Dummy file, GLM is a header only library
#include "../glm.hpp"
#include "../ext.hpp"
int main()
{
}
This diff is collapsed.
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2008-08-08
// Updated : 2010-02-04
// Licence : This source is under MIT License
// File : glm/core/func_exponential.hpp
///////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_exponential
#define glm_core_func_exponential
namespace glm
{
namespace test{
void main_core_func_exponential();
}//namespace test
namespace core{
namespace function{
//! Define all exponential functions from Section 8.2 of GLSL 1.30.8 specification. Included in glm namespace.
namespace exponential{
//! Returns x raised to the y power.
//! (From GLSL 1.30.08 specification, section 8.2)
template <typename genType>
genType pow(genType const & x, genType const & y);
//! Returns the natural exponentiation of x, i.e., e^x.
//! (From GLSL 1.30.08 specification, section 8.2)
template <typename genType>
genType exp(genType const & x);