Commit ed1d2878 authored by Sylvain Thery's avatar Sylvain Thery

dll compiling

parent 7f6ebf00
...@@ -94,6 +94,8 @@ void MyQT::createMap() ...@@ -94,6 +94,8 @@ void MyQT::createMap()
// render the topo of the map without boundary darts // render the topo of the map without boundary darts
m_render_topo->setInitialBoundaryDartsColor(0,1,0); m_render_topo->setInitialBoundaryDartsColor(0,1,0);
m_render_topo->updateDataGMap<PFP>(myMap, position, 0.9f, 0.9f,true); m_render_topo->updateDataGMap<PFP>(myMap, position, 0.9f, 0.9f,true);
CGoGNout << "hopla" << CGoGNendl;
} }
// initialization GL callback // initialization GL callback
......
...@@ -116,19 +116,20 @@ IF (CGoGN_ONELIB) ...@@ -116,19 +116,20 @@ IF (CGoGN_ONELIB)
ELSE() ELSE()
IF (CGoGN_WITH_QT) IF (CGoGN_WITH_QT)
add_definitions(-DCGoGN_QT_DLL_EXPORT)
add_library( utils ${files_utils_withQt} ) add_library( utils ${files_utils_withQt} )
ELSE() ELSE()
add_library( utils ${files_utils} ) add_library( utils ${files_utils} )
ENDIF() ENDIF()
target_link_libraries(utils ${CGoGN_EXT_LIBS}) target_link_libraries(utils ${CGoGN_EXT_LIBS})
add_library( container ${files_container}) add_library( container ${files_container})
target_link_libraries(container utils) target_link_libraries(container utils)
add_library( topology ${files_topology}) add_library( topology ${files_topology})
target_link_libraries(topology container) target_link_libraries(topology container)
add_library( algo ${files_algo}) add_library( algo ${files_algo})
target_link_libraries(algo utils topology) target_link_libraries(algo utils topology)
......
...@@ -33,6 +33,16 @@ ...@@ -33,6 +33,16 @@
#include "Utils/colorMaps.h" #include "Utils/colorMaps.h"
#include "Utils/vbo_base.h" #include "Utils/vbo_base.h"
#ifdef WIN32
#ifndef CGoGN_ALGO_API
#if defined CGoGN_ALGO_DLL_EXPORT
#define CGoGN_ALGO_API __declspec(dllexport)
#else
#define CGoGN_ALGO_API __declspec(dllimport)
#endif
#endif
#endif
namespace CGoGN namespace CGoGN
{ {
...@@ -42,7 +52,7 @@ namespace Algo ...@@ -42,7 +52,7 @@ namespace Algo
namespace Histogram namespace Histogram
{ {
class HistoColorMap class CGoGN_ALGO_API HistoColorMap
{ {
protected: protected:
double m_min; double m_min;
...@@ -121,7 +131,7 @@ public: ...@@ -121,7 +131,7 @@ public:
* Histogram class * Histogram class
* T must have operators -, / ,< ,> * T must have operators -, / ,< ,>
*/ */
class Histogram class CGoGN_ALGO_API Histogram
{ {
// std::vector<double> m_data; // std::vector<double> m_data;
...@@ -196,22 +206,22 @@ public: ...@@ -196,22 +206,22 @@ public:
/** /**
* get min value of attribute (perhaps modified by user) * get min value of attribute (perhaps modified by user)
*/ */
double getMin() const; inline double getMin() const;
/** /**
* get max value of attribute (perhaps modified by user) * get max value of attribute (perhaps modified by user)
*/ */
double getMax() const; inline double getMax() const;
/** /**
* get real min value of attribute * get real min value of attribute
*/ */
double getQMin() const; inline double getQMin() const;
/** /**
* get real max value of attribute * get real max value of attribute
*/ */
double getQMax() const; inline double getQMax() const;
/** /**
......
...@@ -28,6 +28,18 @@ ...@@ -28,6 +28,18 @@
#include "Topology/map/embeddedMap3.h" #include "Topology/map/embeddedMap3.h"
#include "Algo/Multiresolution/filter.h" #include "Algo/Multiresolution/filter.h"
#ifdef WIN32
#ifndef CGoGN_ALGO_API
#if defined CGoGN_ALGO_DLL_EXPORT
#define CGoGN_ALGO_API __declspec(dllexport)
#else
#define CGoGN_ALGO_API __declspec(dllimport)
#endif
#endif
#endif
namespace CGoGN namespace CGoGN
{ {
...@@ -42,7 +54,7 @@ namespace IHM ...@@ -42,7 +54,7 @@ namespace IHM
template<typename T, unsigned int ORBIT> class AttributeHandler_IHM ; template<typename T, unsigned int ORBIT> class AttributeHandler_IHM ;
class ImplicitHierarchicalMap3 : public EmbeddedMap3 CGoGN_ALGO_API class ImplicitHierarchicalMap3 : public EmbeddedMap3
{ {
template<typename T, unsigned int ORBIT> friend class AttributeHandler_IHM ; template<typename T, unsigned int ORBIT> friend class AttributeHandler_IHM ;
......
...@@ -31,10 +31,20 @@ ...@@ -31,10 +31,20 @@
#include "Algo/Import/ply.h" #include "Algo/Import/ply.h"
#ifdef WIN32
#ifndef CGoGN_ALGO_API
#if defined CGoGN_ALGO_DLL_EXPORT
#define CGoGN_ALGO_API __declspec(dllexport)
#else
#define CGoGN_ALGO_API __declspec(dllimport)
#endif
#endif
#endif
namespace CGoGN namespace CGoGN
{ {
class PlyImportData class CGoGN_ALGO_API PlyImportData
{ {
public: public:
......
...@@ -1182,7 +1182,7 @@ void MarchingCube<DataType, Windowing, PFP>::removeFacesOfBoundary(VertexAttribu ...@@ -1182,7 +1182,7 @@ void MarchingCube<DataType, Windowing, PFP>::removeFacesOfBoundary(VertexAttribu
DartMarker<L_MAP> mf(*m_map); DartMarker<L_MAP> mf(*m_map);
for (Dart d = m_map->begin(); d != m_map->end();) // next done inside loop because of deleteFace for (Dart d = m_map->begin(); d != m_map->end();) // next done inside loop because of deleteFace
{ {
if (!mf.isMarked(d) && !m_map->isBoundaryMarked2(d)) if (!mf.isMarked(d) && !m_map->isBoundaryMarked<2>(d))
{ {
Dart dd = d; Dart dd = d;
Dart e = m_map->phi1(d); Dart e = m_map->phi1(d);
......
...@@ -26,6 +26,18 @@ ...@@ -26,6 +26,18 @@
#define __MC_TABLE__ #define __MC_TABLE__
#include "type.h" #include "type.h"
#ifdef WIN32
#ifndef CGoGN_ALGO_API
#if defined CGoGN_ALGO_DLL_EXPORT
#define CGoGN_ALGO_API __declspec(dllexport)
#else
#define CGoGN_ALGO_API __declspec(dllimport)
#endif
#endif
#endif
namespace CGoGN namespace CGoGN
{ {
...@@ -47,7 +59,7 @@ namespace MC ...@@ -47,7 +59,7 @@ namespace MC
* file. It can not be included in the marching-cube files * file. It can not be included in the marching-cube files
* because it is template * because it is template
*/ */
class accelMCTable class CGoGN_ALGO_API accelMCTable
{ {
public: public:
/** /**
......
...@@ -42,6 +42,16 @@ ...@@ -42,6 +42,16 @@
// forward definition // forward definition
namespace CGoGN { namespace Utils { class GLSLShader; } } namespace CGoGN { namespace Utils { class GLSLShader; } }
#ifdef WIN32
#ifndef CGoGN_ALGO_API
#if defined CGoGN_ALGO_DLL_EXPORT
#define CGoGN_ALGO_API __declspec(dllexport)
#else
#define CGoGN_ALGO_API __declspec(dllimport)
#endif
#endif
#endif
namespace CGoGN namespace CGoGN
{ {
...@@ -65,7 +75,7 @@ enum drawingType ...@@ -65,7 +75,7 @@ enum drawingType
SIZE_BUFFER SIZE_BUFFER
} ; } ;
class MapRender class CGoGN_ALGO_API MapRender
{ {
protected: protected:
/** /**
......
...@@ -469,7 +469,7 @@ void TopoPrimalRender<PFP>::updateData(MAP& map, const VertexAttribute<VEC3, MAP ...@@ -469,7 +469,7 @@ void TopoPrimalRender<PFP>::updateData(MAP& map, const VertexAttribute<VEC3, MAP
*positionDartBuf++ = P; *positionDartBuf++ = P;
*positionDartBuf++ = PP; *positionDartBuf++ = PP;
if (map.isBoundaryMarked2(d)) if (map.isBoundaryMarked<2>(d))
{ {
*colorDartBuf++ = m_boundaryDartsColor; *colorDartBuf++ = m_boundaryDartsColor;
*colorDartBuf++ = m_boundaryDartsColor; *colorDartBuf++ = m_boundaryDartsColor;
...@@ -488,7 +488,7 @@ void TopoPrimalRender<PFP>::updateData(MAP& map, const VertexAttribute<VEC3, MAP ...@@ -488,7 +488,7 @@ void TopoPrimalRender<PFP>::updateData(MAP& map, const VertexAttribute<VEC3, MAP
*positionDartBuf++ = QQ; *positionDartBuf++ = QQ;
Dart dx = map.phi2(d); Dart dx = map.phi2(d);
if (map.isBoundaryMarked2(dx)) if (map.isBoundaryMarked<2>(dx))
{ {
*colorDartBuf++ = m_boundaryDartsColor; *colorDartBuf++ = m_boundaryDartsColor;
*colorDartBuf++ = m_boundaryDartsColor; *colorDartBuf++ = m_boundaryDartsColor;
......
...@@ -39,6 +39,16 @@ ...@@ -39,6 +39,16 @@
#include "Utils/Shaders/shaderSimpleColor.h" #include "Utils/Shaders/shaderSimpleColor.h"
#ifdef WIN32
#ifndef CGoGN_ALGO_API
#if defined CGoGN_ALGO_DLL_EXPORT
#define CGoGN_ALGO_API __declspec(dllexport)
#else
#define CGoGN_ALGO_API __declspec(dllimport)
#endif
#endif
#endif
namespace CGoGN namespace CGoGN
{ {
...@@ -52,10 +62,7 @@ namespace GL2 ...@@ -52,10 +62,7 @@ namespace GL2
{ {
class CGoGN_ALGO_API TopoGenRender
class TopoGenRender
{ {
protected: protected:
/** /**
......
...@@ -197,6 +197,17 @@ bool AttributeContainer::removeAttribute(unsigned int index) ...@@ -197,6 +197,17 @@ bool AttributeContainer::removeAttribute(unsigned int index)
return true ; return true ;
} }
template <typename T>
unsigned int AttributeContainer::getAttributeBlocksPointers(unsigned int attrIndex, std::vector<T*>& vect_ptr, unsigned int& byteBlockSize)
{
assert(attrIndex < m_tableAttribs.size() || !"getAttributeBlocksPointers: attribute index out of bounds");
assert(m_tableAttribs[attrIndex] != NULL || !"getAttributeBlocksPointers: attribute does not exist");
AttributeMultiVector<T>* atm = dynamic_cast<AttributeMultiVector<T>*>(m_tableAttribs[attrIndex]);
assert((atm != NULL) || !"getAttributeBlocksPointers: wrong type");
return atm->getBlocksPointers(vect_ptr, byteBlockSize);
}
/************************************** /**************************************
* INFO ABOUT THE CONTAINER * * INFO ABOUT THE CONTAINER *
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "Container/sizeblock.h" #include "Container/sizeblock.h"
namespace CGoGN namespace CGoGN
{ {
......
...@@ -45,6 +45,17 @@ ...@@ -45,6 +45,17 @@
#include <thread> #include <thread>
#include <mutex> #include <mutex>
#ifdef WIN32
//#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API __declspec(dllexport)
#else
#define CGoGN_TOPO_API __declspec(dllimport)
#endif
//#endif
#endif
namespace CGoGN namespace CGoGN
{ {
...@@ -53,7 +64,7 @@ namespace Parallel ...@@ -53,7 +64,7 @@ namespace Parallel
/** /**
* @brief Number of threads used for // traversal foreach * @brief Number of threads used for // traversal foreach
*/ */
extern int NumberOfThreads; CGoGN_TOPO_API extern int NumberOfThreads;
/** /**
* @brief get number of cores of computer (threads, /2 if hyperthreading) * @brief get number of cores of computer (threads, /2 if hyperthreading)
...@@ -86,7 +97,7 @@ class DartMarkerGen ; ...@@ -86,7 +97,7 @@ class DartMarkerGen ;
class CellMarkerGen ; class CellMarkerGen ;
class MapManipulator; class MapManipulator;
class GenericMap class CGoGN_TOPO_API GenericMap
{ {
template<typename T, unsigned int ORBIT, typename MAP> friend class AttributeHandler ; template<typename T, unsigned int ORBIT, typename MAP> friend class AttributeHandler ;
template<typename T, typename MAP> friend class DartAutoAttribute ; template<typename T, typename MAP> friend class DartAutoAttribute ;
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
*******************************************************************************/ *******************************************************************************/
#include "Topology/generic/dartmarker.h" #include "Topology/generic/dartmarker.h"
#include "Topology/generic/traversor/traversorCell.h"
#include "Topology/generic/traversor/traversorFactory.h"
namespace CGoGN namespace CGoGN
{ {
......
...@@ -27,10 +27,20 @@ ...@@ -27,10 +27,20 @@
#include "Topology/generic/genericmap.h" #include "Topology/generic/genericmap.h"
#ifdef WIN32
//#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API __declspec(dllexport)
#else
#define CGoGN_TOPO_API __declspec(dllimport)
#endif
//#endif
#endif
namespace CGoGN namespace CGoGN
{ {
class MapMono : public GenericMap class CGoGN_TOPO_API MapMono : public GenericMap
{ {
template<typename MAP> friend class DartMarkerTmpl ; template<typename MAP> friend class DartMarkerTmpl ;
template<typename MAP> friend class DartMarkerStore ; template<typename MAP> friend class DartMarkerStore ;
......
...@@ -27,12 +27,22 @@ ...@@ -27,12 +27,22 @@
#include "Topology/generic/genericmap.h" #include "Topology/generic/genericmap.h"
#ifdef WIN32
#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API __declspec(dllexport)
#else
#define CGoGN_TOPO_API __declspec(dllimport)
#endif
#endif
#endif
namespace CGoGN namespace CGoGN
{ {
class MapMono; class MapMono;
class MapMulti : public GenericMap class CGoGN_TOPO_API MapMulti : public GenericMap
{ {
template<typename MAP> friend class DartMarkerTmpl ; template<typename MAP> friend class DartMarkerTmpl ;
template<typename MAP> friend class DartMarkerStore ; template<typename MAP> friend class DartMarkerStore ;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "Topology/generic/dart.h" #include "Topology/generic/dart.h"
#include "Topology/generic/cells.h" #include "Topology/generic/cells.h"
#include "Topology/generic/cellmarker.h" #include "Topology/generic/cellmarker.h"
#include "Topology/generic/traversor/traversorCell.h" //#include "Topology/generic/traversor/traversorCell.h"
#include "Topology/generic/traversor/traversorDoO.h" #include "Topology/generic/traversor/traversorDoO.h"
#include "Topology/generic/traversor/iterTrav.h" #include "Topology/generic/traversor/iterTrav.h"
......
...@@ -28,6 +28,16 @@ ...@@ -28,6 +28,16 @@
#include "Topology/gmap/gmap2.h" #include "Topology/gmap/gmap2.h"
#include "Topology/generic/mapImpl/mapMono.h" #include "Topology/generic/mapImpl/mapMono.h"
#ifdef WIN32
#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API //__declspec(dllexport)
#else
#define CGoGN_TOPO_API //__declspec(dllimport)
#endif
#endif
#endif
namespace CGoGN namespace CGoGN
{ {
...@@ -35,7 +45,7 @@ namespace CGoGN ...@@ -35,7 +45,7 @@ namespace CGoGN
* Class of 2-dimensional G-maps * Class of 2-dimensional G-maps
* with managed embeddings * with managed embeddings
*/ */
class EmbeddedGMap2 : public GMap2<MapMono> class CGoGN_TOPO_API EmbeddedGMap2 : public GMap2<MapMono>
{ {
EmbeddedGMap2(const EmbeddedGMap2& m):GMap2<MapMono>(m) {} EmbeddedGMap2(const EmbeddedGMap2& m):GMap2<MapMono>(m) {}
public: public:
......
...@@ -28,6 +28,16 @@ ...@@ -28,6 +28,16 @@
#include "Topology/gmap/gmap3.h" #include "Topology/gmap/gmap3.h"
#include "Topology/generic/mapImpl/mapMono.h" #include "Topology/generic/mapImpl/mapMono.h"
#ifdef WIN32
#ifndef CGoGN_TOPO_API
#if defined CGoGN_TOPO_DLL_EXPORT
#define CGoGN_TOPO_API //__declspec(dllexport)
#else
#define CGoGN_TOPO_API //__declspec(dllimport)
#endif
#endif
#endif