Commit ed1d2878 authored by Sylvain Thery's avatar Sylvain Thery

dll compiling

parent 7f6ebf00
......@@ -94,6 +94,8 @@ void MyQT::createMap()
// render the topo of the map without boundary darts
m_render_topo->setInitialBoundaryDartsColor(0,1,0);
m_render_topo->updateDataGMap<PFP>(myMap, position, 0.9f, 0.9f,true);
CGoGNout << "hopla" << CGoGNendl;
}
// initialization GL callback
......
......@@ -116,19 +116,20 @@ IF (CGoGN_ONELIB)
ELSE()
IF (CGoGN_WITH_QT)
add_definitions(-DCGoGN_QT_DLL_EXPORT)
add_library( utils ${files_utils_withQt} )
ELSE()
add_library( utils ${files_utils} )
ENDIF()
target_link_libraries(utils ${CGoGN_EXT_LIBS})
add_library( container ${files_container})
add_library( container ${files_container})
target_link_libraries(container utils)
add_library( topology ${files_topology})
add_library( topology ${files_topology})
target_link_libraries(topology container)
add_library( algo ${files_algo})
add_library( algo ${files_algo})
target_link_libraries(algo utils topology)
......
......@@ -33,6 +33,16 @@
#include "Utils/colorMaps.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
{
......@@ -42,7 +52,7 @@ namespace Algo
namespace Histogram
{
class HistoColorMap
class CGoGN_ALGO_API HistoColorMap
{
protected:
double m_min;
......@@ -121,7 +131,7 @@ public:
* Histogram class
* T must have operators -, / ,< ,>
*/
class Histogram
class CGoGN_ALGO_API Histogram
{
// std::vector<double> m_data;
......@@ -196,22 +206,22 @@ public:
/**
* 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)
*/
double getMax() const;
inline double getMax() const;
/**
* get real min value of attribute
*/
double getQMin() const;
inline double getQMin() const;
/**
* get real max value of attribute
*/
double getQMax() const;
inline double getQMax() const;
/**
......
......@@ -28,6 +28,18 @@
#include "Topology/map/embeddedMap3.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
{
......@@ -42,7 +54,7 @@ namespace 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 ;
......
......@@ -31,10 +31,20 @@
#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
{
class PlyImportData
class CGoGN_ALGO_API PlyImportData
{
public:
......
......@@ -1182,7 +1182,7 @@ void MarchingCube<DataType, Windowing, PFP>::removeFacesOfBoundary(VertexAttribu
DartMarker<L_MAP> mf(*m_map);
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 e = m_map->phi1(d);
......
......@@ -26,6 +26,18 @@
#define __MC_TABLE__
#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
{
......@@ -47,7 +59,7 @@ namespace MC
* file. It can not be included in the marching-cube files
* because it is template
*/
class accelMCTable
class CGoGN_ALGO_API accelMCTable
{
public:
/**
......
......@@ -42,6 +42,16 @@
// forward definition
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
{
......@@ -65,7 +75,7 @@ enum drawingType
SIZE_BUFFER
} ;
class MapRender
class CGoGN_ALGO_API MapRender
{
protected:
/**
......
......@@ -469,7 +469,7 @@ void TopoPrimalRender<PFP>::updateData(MAP& map, const VertexAttribute<VEC3, MAP
*positionDartBuf++ = P;
*positionDartBuf++ = PP;
if (map.isBoundaryMarked2(d))
if (map.isBoundaryMarked<2>(d))
{
*colorDartBuf++ = m_boundaryDartsColor;
*colorDartBuf++ = m_boundaryDartsColor;
......@@ -488,7 +488,7 @@ void TopoPrimalRender<PFP>::updateData(MAP& map, const VertexAttribute<VEC3, MAP
*positionDartBuf++ = QQ;
Dart dx = map.phi2(d);
if (map.isBoundaryMarked2(dx))
if (map.isBoundaryMarked<2>(dx))
{
*colorDartBuf++ = m_boundaryDartsColor;
*colorDartBuf++ = m_boundaryDartsColor;
......
......@@ -39,6 +39,16 @@
#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
{
......@@ -52,10 +62,7 @@ namespace GL2
{
class TopoGenRender
class CGoGN_ALGO_API TopoGenRender
{
protected:
/**
......
......@@ -197,6 +197,17 @@ bool AttributeContainer::removeAttribute(unsigned int index)
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 *
......
......@@ -31,6 +31,7 @@
#include "Container/sizeblock.h"
namespace CGoGN
{
......
......@@ -45,6 +45,17 @@
#include <thread>
#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
{
......@@ -53,7 +64,7 @@ namespace Parallel
/**
* @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)
......@@ -86,7 +97,7 @@ class DartMarkerGen ;
class CellMarkerGen ;
class MapManipulator;
class GenericMap
class CGoGN_TOPO_API GenericMap
{
template<typename T, unsigned int ORBIT, typename MAP> friend class AttributeHandler ;
template<typename T, typename MAP> friend class DartAutoAttribute ;
......
......@@ -23,8 +23,6 @@
*******************************************************************************/
#include "Topology/generic/dartmarker.h"
#include "Topology/generic/traversor/traversorCell.h"
#include "Topology/generic/traversor/traversorFactory.h"
namespace CGoGN
{
......
......@@ -27,10 +27,20 @@
#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
{
class MapMono : public GenericMap
class CGoGN_TOPO_API MapMono : public GenericMap
{
template<typename MAP> friend class DartMarkerTmpl ;
template<typename MAP> friend class DartMarkerStore ;
......
......@@ -27,12 +27,22 @@
#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
{
class MapMono;
class MapMulti : public GenericMap
class CGoGN_TOPO_API MapMulti : public GenericMap
{
template<typename MAP> friend class DartMarkerTmpl ;
template<typename MAP> friend class DartMarkerStore ;
......
......@@ -28,7 +28,7 @@
#include "Topology/generic/dart.h"
#include "Topology/generic/cells.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/iterTrav.h"
......
......@@ -28,6 +28,16 @@
#include "Topology/gmap/gmap2.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
{
......@@ -35,7 +45,7 @@ namespace CGoGN
* Class of 2-dimensional G-maps
* with managed embeddings
*/
class EmbeddedGMap2 : public GMap2<MapMono>
class CGoGN_TOPO_API EmbeddedGMap2 : public GMap2<MapMono>
{
EmbeddedGMap2(const EmbeddedGMap2& m):GMap2<MapMono>(m) {}
public:
......
......@@ -28,6 +28,16 @@
#include "Topology/gmap/gmap3.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
{
......@@ -35,7 +45,7 @@ namespace CGoGN
* Class of 3-dimensional G-maps
* with managed embeddings
*/
class EmbeddedGMap3 : public GMap3<MapMono>
class CGoGN_TOPO_API EmbeddedGMap3 : public GMap3<MapMono>
{
EmbeddedGMap3(const EmbeddedGMap3& m):GMap3<MapMono>(m) {}
public:
......
......@@ -876,7 +876,7 @@ bool GMap2<MAP_IMPL>::sameOrientedVolume(Dart d, Dart e) const
// For every face added to the list
for (face = visitedFaces.begin(); face != visitedFaces.end(); ++face)
{
if (!this->isBoundaryMarked2(*face) && !mark.isMarked(*face)) // Face has not been visited yet
if (!this->isBoundaryMarked<2>(*face) && !mark.isMarked(*face)) // Face has not been visited yet
{
Dart it = *face ;
do
......@@ -886,7 +886,7 @@ bool GMap2<MAP_IMPL>::sameOrientedVolume(Dart d, Dart e) const
mark.mark(it); // Mark
Dart adj = phi2(it); // Get adjacent face
if (!this->isBoundaryMarked2(adj) && !mark.isMarked(adj))
if (!this->isBoundaryMarked<2>(adj) && !mark.isMarked(adj))
visitedFaces.push_back(adj); // Add it
it = this->phi1(it);
} while(it != *face);
......@@ -924,7 +924,7 @@ unsigned int GMap2<MAP_IMPL>::volumeDegree(Dart d) const
{
mark.mark(it); // Mark
Dart adj = phi2(it); // Get adjacent face
if ( !this->isBoundaryMarked2(adj) && !mark.isMarked(adj) )
if ( !this->isBoundaryMarked<2>(adj) && !mark.isMarked(adj) )
visitedFaces.push_back(adj);// Add it
it = this->phi1(it);
} while(it != df);
......@@ -957,7 +957,7 @@ int GMap2<MAP_IMPL>::checkVolumeDegree(Dart d, unsigned int volDeg) const
{
mark.mark(it); // Mark
Dart adj = phi2(it); // Get adjacent face
if ( !this->isBoundaryMarked2(adj) && !mark.isMarked(adj) )
if ( !this->isBoundaryMarked<2>(adj) && !mark.isMarked(adj) )
visitedFaces.push_back(adj);// Add it
it = this->phi1(it);
} while(it != df);
......
......@@ -857,7 +857,7 @@ bool GMap3<MAP_IMPL>::isBoundaryAdjacentVolume(Dart d) const
for(unsigned int i = 0; i < visitedFaces.size(); ++i)
{
if (isBoundaryMarked3(beta3(visitedFaces[i])))
if (isBoundaryMarked<3>(beta3(visitedFaces[i])))
return true ;
Dart e = visitedFaces[i] ;
......
......@@ -27,13 +27,23 @@
#include "Topology/map/embeddedMap2.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
{
template<typename T, unsigned int ORBIT> class AttributeHandler_IHM ;
class ImplicitHierarchicalMap2 : public EmbeddedMap2
class CGoGN_TOPO_API ImplicitHierarchicalMap2 : public EmbeddedMap2
{
template<typename T, unsigned int ORBIT> friend class AttributeHandler_IHM ;
typedef EmbeddedMap2::TOPO_MAP TOPO_MAP;
......
......@@ -27,6 +27,16 @@
#include "Topology/map/embeddedMap3.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
{
......@@ -34,7 +44,7 @@ template<typename T, unsigned int ORBIT> class AttributeHandler_IHM ;
class ImplicitHierarchicalMap3 : public EmbeddedMap3
class CGoGN_TOPO_API ImplicitHierarchicalMap3 : public EmbeddedMap3
{
template<typename T, unsigned int ORBIT> friend class AttributeHandler_IHM ;
typedef EmbeddedMap3::TOPO_MAP TOPO_MAP;
......
......@@ -28,6 +28,16 @@
#include "Topology/map/map2.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
{
......@@ -35,7 +45,7 @@ namespace CGoGN
* Class of 2-dimensional maps
* with managed embeddings
*/
class EmbeddedMap2 : public Map2<MapMono>
class CGoGN_TOPO_API EmbeddedMap2 : public Map2<MapMono>
{
EmbeddedMap2(const EmbeddedMap2& m):Map2<MapMono>(m) {}
......
......@@ -28,6 +28,15 @@
#include "Topology/map/map2.h"
#include "Topology/generic/mapImpl/mapMulti.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
{
......@@ -35,7 +44,7 @@ namespace CGoGN
* Class of 2-dimensional maps
* with managed embeddings
*/
class EmbeddedMap2_MR : public Map2<MapMulti>
class CGoGN_TOPO_API EmbeddedMap2_MR : public Map2<MapMulti>
{
public:
typedef MapMulti IMPL;
......
......@@ -28,12 +28,22 @@
#include "Topology/map/map3.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
{
/*! Class of 3-dimensional maps with managed embeddings
*/
class EmbeddedMap3 : public Map3<MapMono>
class CGoGN_TOPO_API EmbeddedMap3 : public Map3<MapMono>
{
EmbeddedMap3(const EmbeddedMap3& m) : Map3<MapMono>(m) {}
public:
......
......@@ -866,7 +866,7 @@ bool Map2<MAP_IMPL>::sameOrientedVolume(Vol v1, Vol v2) const
mark.mark(it); // Mark
Dart adj = phi2(it); // Get adjacent face
if (!this->isBoundaryMarked2(adj) && !mark.isMarked(adj))
if (!this->isBoundaryMarked<2>(adj) && !mark.isMarked(adj))
visitedFaces.push_back(adj); // Add it
it = this->phi1(it);
} while(it != *face);
......@@ -903,7 +903,7 @@ unsigned int Map2<MAP_IMPL>::volumeDegree(Vol v) const
{
mark.mark(it); // Mark
Dart adj = phi2(it); // Get adjacent face
if ( !this->isBoundaryMarked2(adj) && !mark.isMarked(adj) )
if ( !this->isBoundaryMarked<2>(adj) && !mark.isMarked(adj) )
visitedFaces.push_back(adj);// Add it
it = this->phi1(it);
} while(it != df);
......@@ -935,7 +935,7 @@ int Map2<MAP_IMPL>::checkVolumeDegree(Vol v, unsigned int vd) const
{
mark.mark(it); // Mark
Dart adj = phi2(it); // Get adjacent face
if ( !this->isBoundaryMarked2(adj) && !mark.isMarked(adj) )
if ( !this->isBoundaryMarked<2>(adj) && !mark.isMarked(adj) )
visitedFaces.push_back(adj);// Add it
it = this->phi1(it);
} while(it != df);
......@@ -951,7 +951,7 @@ template <typename MAP_IMPL>
bool Map2<MAP_IMPL>::isTriangular() const
{
bool tri = true;
foreach_cell_until<FACE>(this, [&] (Face f)
foreach_cell_until<FACE>(*this, [&] (Face f)
{
if (this->faceDegree(f) != 3)
tri = false;
......
This diff is collapsed.
......@@ -43,6 +43,7 @@
#include <vector>
#include <set>
#include "Utils/dll.h"
namespace CGoGN
{
......@@ -50,7 +51,7 @@ namespace CGoGN
namespace Utils
{
class GLSLShader
class CGoGN_UTILS_API GLSLShader
{
public:
struct VAStr
......
......@@ -33,6 +33,8 @@
#include <QDialog>
#include <QLabel>
#include "Utils/dll.h"
namespace CGoGN
{
......@@ -66,7 +68,7 @@ public:
* Class for boolean input in dialog window