Commit cb9f0df4 authored by Pierre Kraemer's avatar Pierre Kraemer

Merge cgogn:~cgogn/CGoGN

parents 5d64b236 01ef1b3d
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
*******************************************************************************/ *******************************************************************************/
#include "clipping.h" #include "clipping.h"
#include "Utils/vbo.h"
#include "Utils/static_assert.h" #include "Utils/static_assert.h"
/******************************************************************************* /*******************************************************************************
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "Algo/Render/GL2/mapRender.h" #include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderSimpleColor.h" #include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/vbo.h"
#include <glm/gtc/type_ptr.hpp> #include <glm/gtc/type_ptr.hpp>
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "Algo/Render/GL2/mapRender.h" #include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderFlat.h" #include "Utils/Shaders/shaderFlat.h"
#include "Utils/Shaders/shaderSimpleColor.h" #include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/vbo.h"
#include <vector> #include <vector>
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "Algo/Render/GL2/mapRender.h" #include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderFlat.h" #include "Utils/Shaders/shaderFlat.h"
#include "Utils/Shaders/shaderSimpleColor.h" #include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/vbo.h"
#include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h"
#include "Algo/MC/marchingcube.h" #include "Algo/MC/marchingcube.h"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "texturesExample.h" #include "texturesExample.h"
#include "Algo/Geometry/boundingbox.h" #include "Algo/Geometry/boundingbox.h"
#include "Algo/Modelisation/polyhedron.h" #include "Algo/Modelisation/polyhedron.h"
#include "Utils/vbo.h"
TexView::TexView(): TexView::TexView():
m_render(NULL), m_render(NULL),
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#include "Utils/Shaders/shaderVectorPerVertex.h" #include "Utils/Shaders/shaderVectorPerVertex.h"
#include "Utils/pointSprite.h" #include "Utils/pointSprite.h"
#include "Utils/text3d.h" #include "Utils/text3d.h"
#include "Utils/vboRender.h" #include "Utils/vbo.h"
#include "Utils/Qt/qtInputs.h" #include "Utils/Qt/qtInputs.h"
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "Algo/Render/GL2/mapRender.h" #include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderSimpleColor.h" #include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/Shaders/shaderColorPerVertex.h" #include "Utils/Shaders/shaderColorPerVertex.h"
#include "Utils/vbo.h"
using namespace CGoGN ; using namespace CGoGN ;
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "Topology/generic/cellmarker.h" #include "Topology/generic/cellmarker.h"
#include "Utils/text3d.h" #include "Utils/text3d.h"
#include "Utils/vbo.h"
#include "Utils/pointSprite.h" #include "Utils/pointSprite.h"
#include "Utils/Shaders/shaderSimpleColor.h" #include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/Shaders/shaderVectorPerVertex.h" #include "Utils/Shaders/shaderVectorPerVertex.h"
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "Algo/Render/GL2/mapRender.h" #include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderSimpleColor.h" #include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/Shaders/shaderColorPerVertex.h" #include "Utils/Shaders/shaderColorPerVertex.h"
#include "Utils/vbo.h"
#include "Algo/Histogram/histogram.h" #include "Algo/Histogram/histogram.h"
#include "Utils/Qt/qthistodraw.h" #include "Utils/Qt/qthistodraw.h"
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "Utils/Shaders/shaderSimpleColor.h" #include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/Shaders/shaderVectorPerVertex.h" #include "Utils/Shaders/shaderVectorPerVertex.h"
#include "Utils/vbo.h"
#include "Utils/cgognStream.h" #include "Utils/cgognStream.h"
#include "Utils/Qt/qtSimple.h" #include "Utils/Qt/qtSimple.h"
......
...@@ -440,17 +440,17 @@ void computeCurvatureVertices_NormalCycles( ...@@ -440,17 +440,17 @@ void computeCurvatureVertices_NormalCycles(
if (!map. template isOrbitEmbedded<VERTEX>()) if (!map. template isOrbitEmbedded<VERTEX>())
{ {
CellMarkerNoUnmark<VERTEX> cm(map); CellMarkerNoUnmark<VERTEX> cm(map);
map. template initOrbitEmbedding<VERTEX>(); map. template initAllOrbitsEmbedding<VERTEX>();
} }
if (!map. template isOrbitEmbedded<EDGE>()) if (!map. template isOrbitEmbedded<EDGE>())
{ {
CellMarkerNoUnmark<EDGE> cm(map); CellMarkerNoUnmark<EDGE> cm(map);
map. template initOrbitEmbedding<EDGE>(); map. template initAllOrbitsEmbedding<EDGE>();
} }
if (!map. template isOrbitEmbedded<FACE>()) if (!map. template isOrbitEmbedded<FACE>())
{ {
CellMarkerNoUnmark<FACE> cm(map); CellMarkerNoUnmark<FACE> cm(map);
map. template initOrbitEmbedding<FACE>(); map. template initAllOrbitsEmbedding<FACE>();
} }
FunctorComputeCurvatureVertices_NormalCycles<PFP> funct(map, radius, position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal); FunctorComputeCurvatureVertices_NormalCycles<PFP> funct(map, radius, position, normal, edgeangle, kmax, kmin, Kmax, Kmin, Knormal);
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "Topology/generic/cellmarker.h" #include "Topology/generic/cellmarker.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
#include "Utils/colorMaps.h" #include "Utils/colorMaps.h"
#include "Utils/vbo.h" #include "Utils/vbo_base.h"
namespace CGoGN namespace CGoGN
......
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef _BOUND_EMBD_H
#define _BOUND_EMBD_H
namespace CGoGN
{
namespace Algo
{
namespace Modelisation
{
template <typename PFP>
void sewFaceEmb(typename PFP::MAP& map, Dart d, Dart e)
{
map.sewFaces(d, e, false) ;
if (map.template isOrbitEmbedded<EDGE>())
map.template initOrbitEmbeddingNewCell<EDGE>(d) ;
}
template <typename PFP>
Dart newFaceEmb(typename PFP::MAP& map, unsigned int n)
{
Dart d = map.newFace(n,false);
if (map.template isOrbitEmbedded<FACE>())
map.template initOrbitEmbeddingNewCell<FACE>(d) ;
return d;
}
}
}
}
#endif
...@@ -44,6 +44,12 @@ namespace Modelisation ...@@ -44,6 +44,12 @@ namespace Modelisation
enum { NONE, GRID, CUBE, CYLINDER, CONE, SPHERE, TORE, COMPOSED }; enum { NONE, GRID, CUBE, CYLINDER, CONE, SPHERE, TORE, COMPOSED };
//template <typename PFP>
//void sewFaceEmb(typename PFP::MAP& map, Dart d, Dart e);
//
//template <typename PFP>
//Dart newFaceEmb(typename PFP::MAP& map, unsigned int n);
/** /**
* sudivide the all quads of a CC into 2 triangles * sudivide the all quads of a CC into 2 triangles
*/ */
...@@ -194,7 +200,8 @@ protected: ...@@ -194,7 +200,8 @@ protected:
void computeCenter(); void computeCenter();
Dart grid_topo_open(unsigned int x, unsigned int y);
Dart cylinder_topo_open(unsigned int n, unsigned int z);
public: public:
/** /**
* Constructor * Constructor
...@@ -233,6 +240,8 @@ public: ...@@ -233,6 +240,8 @@ public:
*/ */
std::vector<Dart>& getVertexDarts() { return m_tableVertDarts; } std::vector<Dart>& getVertexDarts() { return m_tableVertDarts; }
/** /**
* Create a 2D grid * Create a 2D grid
* quads are oriented counter-clockwise and the returned dart * quads are oriented counter-clockwise and the returned dart
......
This diff is collapsed.
...@@ -42,14 +42,14 @@ public: ...@@ -42,14 +42,14 @@ public:
} }
void vertexState(const VEC3& current, CellMarkerMemo<FACE> * memo_cross) ; void vertexState(const VEC3& current, CellMarkerMemo<FACE>& memo_cross) ;
void edgeState(const VEC3& current, CellMarkerMemo<FACE> * memo_cross, Geom::Orientation2D sideOfEdge = Geom::ALIGNED) ; void edgeState(const VEC3& current, CellMarkerMemo<FACE>& memo_cross, Geom::Orientation2D sideOfEdge = Geom::ALIGNED) ;
void faceState(const VEC3& current, CellMarkerMemo<FACE> * memo_cross) ; void faceState(const VEC3& current, CellMarkerMemo<FACE>& memo_cross) ;
void move(const VEC3& goal, CellMarkerMemo<FACE> * memo_cross) ; std::vector<Dart> move(const VEC3& goal) ;
std::vector<Dart> get_memo(const VEC3& goal); std::vector<Dart> move(const VEC3& goal, CellMarkerMemo<FACE>& memo_cross) ;
} ; } ;
#include "particle_cell_2D_memo.hpp" #include "particle_cell_2D_memo.hpp"
......
template <typename PFP> template <typename PFP>
void ParticleCell2DMemo<PFP>::move(const VEC3& goal, CellMarkerMemo<FACE> * memo_cross) std::vector<Dart> ParticleCell2DMemo<PFP>::move(const VEC3& goal)
{ {
this->crossCell = NO_CROSS ; this->crossCell = NO_CROSS ;
if (!Geom::arePointsEquals(goal, this->getPosition())) if (!Geom::arePointsEquals(goal, this->getPosition()))
{ {
CellMarkerMemo<FACE> memo_cross(this->m);
memo_cross.mark(this->d);
switch (this->getState()) switch (this->getState())
{ {
case VERTEX : case VERTEX :
...@@ -16,28 +19,52 @@ void ParticleCell2DMemo<PFP>::move(const VEC3& goal, CellMarkerMemo<FACE> * memo ...@@ -16,28 +19,52 @@ void ParticleCell2DMemo<PFP>::move(const VEC3& goal, CellMarkerMemo<FACE> * memo
faceState(goal,memo_cross) ; faceState(goal,memo_cross) ;
break ; break ;
} }
return memo_cross.get_markedCells();
} }
else else
this->ParticleBase<PFP>::move(goal) ; this->ParticleBase<PFP>::move(goal) ;
std::vector<Dart> res;
res.push_back(this->d);
return res;
} }
template <typename PFP> template <typename PFP>
std::vector<Dart> ParticleCell2DMemo<PFP>::get_memo(const VEC3& goal) std::vector<Dart> ParticleCell2DMemo<PFP>::move(const VEC3& goal, CellMarkerMemo<FACE>& memo_cross)
{ {
CellMarkerMemo<FACE> memo_cross(this->m);
memo_cross.mark(this->d); memo_cross.mark(this->d);
this->move(goal,&memo_cross);
this->crossCell = NO_CROSS ;
if (!Geom::arePointsEquals(goal, this->getPosition()))
{
switch (this->getState())
{
case VERTEX :
vertexState(goal,memo_cross) ;
break ;
case EDGE :
edgeState(goal,memo_cross) ;
break ;
case FACE :
faceState(goal,memo_cross) ;
break ;
}
}
else
this->ParticleBase<PFP>::move(goal) ;
return memo_cross.get_markedCells(); return memo_cross.get_markedCells();
} }
template <typename PFP> template <typename PFP>
void ParticleCell2DMemo<PFP>::vertexState(const VEC3& current, CellMarkerMemo<FACE> * memo_cross) void ParticleCell2DMemo<PFP>::vertexState(const VEC3& current, CellMarkerMemo<FACE>& memo_cross)
{ {
#ifdef DEBUG #ifdef DEBUG
CGoGNout << "vertexState" << this->d << CGoGNendl ; CGoGNout << "vertexState" << this->d << CGoGNendl ;
#endif #endif
assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2])) ; assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2])) ;
(*memo_cross).mark(this->d); memo_cross.mark(this->d);
this->crossCell = CROSS_OTHER ; this->crossCell = CROSS_OTHER ;
if (Algo::Geometry::isPointOnVertex < PFP > (this->m, this->d, this->positionAttribut, current)) if (Algo::Geometry::isPointOnVertex < PFP > (this->m, this->d, this->positionAttribut, current))
...@@ -119,7 +146,7 @@ void ParticleCell2DMemo<PFP>::vertexState(const VEC3& current, CellMarkerMemo<FA ...@@ -119,7 +146,7 @@ void ParticleCell2DMemo<PFP>::vertexState(const VEC3& current, CellMarkerMemo<FA
} }
template <typename PFP> template <typename PFP>
void ParticleCell2DMemo<PFP>::edgeState(const VEC3& current, CellMarkerMemo<FACE>* memo_cross, Geom::Orientation2D sideOfEdge) void ParticleCell2DMemo<PFP>::edgeState(const VEC3& current, CellMarkerMemo<FACE>& memo_cross, Geom::Orientation2D sideOfEdge)
{ {
#ifdef DEBUG #ifdef DEBUG
CGoGNout << "edgeState" << this->d << CGoGNendl ; CGoGNout << "edgeState" << this->d << CGoGNendl ;
...@@ -127,7 +154,7 @@ void ParticleCell2DMemo<PFP>::edgeState(const VEC3& current, CellMarkerMemo<FACE ...@@ -127,7 +154,7 @@ void ParticleCell2DMemo<PFP>::edgeState(const VEC3& current, CellMarkerMemo<FACE
assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2])) ; assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2])) ;
// assert(Algo::Geometry::isPointOnEdge<PFP>(m,d,m_positions,m_position)); // assert(Algo::Geometry::isPointOnEdge<PFP>(m,d,m_positions,m_position));
(*memo_cross).mark(this->d); memo_cross.mark(this->d);
if (this->crossCell == NO_CROSS) if (this->crossCell == NO_CROSS)
{ {
this->crossCell = CROSS_EDGE ; this->crossCell = CROSS_EDGE ;
...@@ -173,7 +200,7 @@ void ParticleCell2DMemo<PFP>::edgeState(const VEC3& current, CellMarkerMemo<FACE ...@@ -173,7 +200,7 @@ void ParticleCell2DMemo<PFP>::edgeState(const VEC3& current, CellMarkerMemo<FACE
} }
template <typename PFP> template <typename PFP>
void ParticleCell2DMemo<PFP>::faceState(const VEC3& current, CellMarkerMemo<FACE> * memo_cross) void ParticleCell2DMemo<PFP>::faceState(const VEC3& current, CellMarkerMemo<FACE>& memo_cross)
{ {
#ifdef DEBUG #ifdef DEBUG
CGoGNout << "faceState" << this->d << CGoGNendl ; CGoGNout << "faceState" << this->d << CGoGNendl ;
...@@ -184,7 +211,7 @@ void ParticleCell2DMemo<PFP>::faceState(const VEC3& current, CellMarkerMemo<FACE ...@@ -184,7 +211,7 @@ void ParticleCell2DMemo<PFP>::faceState(const VEC3& current, CellMarkerMemo<FACE
&& std::isfinite(this->getPosition()[2])) ; && std::isfinite(this->getPosition()[2])) ;
assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2])) ; assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2])) ;
// assert(Algo::Geometry::isPointInConvexFace2D<PFP>(m,d,m_positions,m_position,true)); // assert(Algo::Geometry::isPointInConvexFace2D<PFP>(m,d,m_positions,m_position,true));
(*memo_cross).mark(this->d); memo_cross.mark(this->d);
Dart dd = this->d ; Dart dd = this->d ;
float wsoe = this->getOrientationFace(current, this->m.phi1(this->d)) ; float wsoe = this->getOrientationFace(current, this->m.phi1(this->d)) ;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "Topology/generic/dart.h" #include "Topology/generic/dart.h"
#include "Topology/generic/attributeHandler.h" #include "Topology/generic/attributeHandler.h"
#include "Topology/generic/functor.h" #include "Topology/generic/functor.h"
#include "Utils/vbo.h" #include "Utils/vbo_base.h"
#include "Utils/GLSLShader.h" #include "Utils/GLSLShader.h"
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "Topology/generic/dart.h" #include "Topology/generic/dart.h"
#include "Topology/generic/attributeHandler.h" #include "Topology/generic/attributeHandler.h"
#include "Topology/generic/functor.h" #include "Topology/generic/functor.h"
#include "Utils/vbo.h" #include "Utils/vbo_base.h"
#include "Utils/Shaders/shaderExplodeVolumes.h" #include "Utils/Shaders/shaderExplodeVolumes.h"
#include "Utils/Shaders/shaderExplodeVolumesLines.h" #include "Utils/Shaders/shaderExplodeVolumesLines.h"
......
...@@ -33,13 +33,13 @@ ...@@ -33,13 +33,13 @@
#include <set> #include <set>
#include <utility> #include <utility>
#include "Utils/gl_def.h"
#include "Topology/generic/dart.h" #include "Topology/generic/dart.h"
#include "Topology/generic/functor.h" #include "Topology/generic/functor.h"
#include "Topology/generic/attributeHandler.h" #include "Topology/generic/attributeHandler.h"
#include "Container/convert.h" #include "Container/convert.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
#include "Utils/vbo.h"
// forward definition // forward definition
namespace CGoGN { namespace Utils { class GLSLShader; } } namespace CGoGN { namespace Utils { class GLSLShader; } }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "Topology/generic/cellmarker.h" #include "Topology/generic/cellmarker.h"
#include "Topology/generic/traversorCell.h" #include "Topology/generic/traversorCell.h"
#include "Utils/vbo.h" //#include "Utils/vbo.h"
#include "Geometry/intersection.h" #include "Geometry/intersection.h"
#include "Algo/Geometry/normal.h" #include "Algo/Geometry/normal.h"
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "Topology/generic/functor.h" #include "Topology/generic/functor.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
#include "Utils/vbo.h" #include "Utils/vbo_base.h"
#include "Utils/svg.h" #include "Utils/svg.h"
// forward // forward
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "Topology/generic/functor.h" #include "Topology/generic/functor.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
#include "Utils/vbo.h" #include "Utils/vbo_base.h"
#include "Utils/svg.h" #include "Utils/svg.h"
// forward // forward
......
...@@ -137,8 +137,8 @@ inline T& AttributeHandler<T, ORBIT>::operator[](Dart d) ...@@ -137,8 +137,8 @@ inline T& AttributeHandler<T, ORBIT>::operator[](Dart d)
assert(valid || !"Invalid AttributeHandler") ; assert(valid || !"Invalid AttributeHandler") ;
unsigned int a = m_map->getEmbedding<ORBIT>(d) ; unsigned int a = m_map->getEmbedding<ORBIT>(d) ;
// if (a == EMBNULL) if (a == EMBNULL)
// a = m_map->setOrbitEmbeddingOnNewCell<ORBIT>(d) ; a = m_map->setOrbitEmbeddingOnNewCell<ORBIT>(d) ;
return m_attrib->operator[](a) ; return m_attrib->operator[](a) ;
} }
......
...@@ -132,8 +132,8 @@ public: ...@@ -132,8 +132,8 @@ public:
assert(m_markVector != NULL); assert(m_markVector != NULL);
unsigned int a = m_map.getEmbedding<CELL>(d) ; unsigned int a = m_map.getEmbedding<CELL>(d) ;
// if (a == EMBNULL) if (a == EMBNULL)
// a = m_map.setOrbitEmbeddingOnNewCell<CELL>(d) ; a = m_map.setOrbitEmbeddingOnNewCell<CELL>(d) ;
m_markVector->operator[](a).setMark(m_mark) ; m_markVector->operator[](a).setMark(m_mark) ;
} }
...@@ -146,8 +146,8 @@ public: ...@@ -146,8 +146,8 @@ public:
assert(m_markVector != NULL); assert(m_markVector != NULL);
unsigned int a = m_map.getEmbedding<CELL>(d) ; unsigned int a = m_map.getEmbedding<CELL>(d) ;
// if (a == EMBNULL) if (a == EMBNULL)
// a = m_map.setOrbitEmbeddingOnNewCell<CELL>(d) ; a = m_map.setOrbitEmbeddingOnNewCell<CELL>(d) ;
m_markVector->operator[](a).unsetMark(m_mark) ; m_markVector->operator[](a).unsetMark(m_mark) ;
} }
...@@ -160,8 +160,8 @@ public: ...@@ -160,8 +160,8 @@ public:
assert(m_markVector != NULL); assert(m_markVector != NULL);
unsigned int a = m_map.getEmbedding<CELL>(d) ; unsigned int a = m_map.getEmbedding<CELL>(d) ;
// if (a == EMBNULL) if (a == EMBNULL)
// return false ; return false ;
return m_markVector->operator[](a).testMark(m_mark) ; return m_markVector->operator[](a).testMark(m_mark) ;
} }
......
...@@ -438,6 +438,14 @@ public: ...@@ -438,6 +438,14 @@ public:
template <unsigned int ORBIT> template <unsigned int ORBIT>
void initCell(unsigned int i) ; void initCell(unsigned int i) ;
/**
* Traverse the map and embed all orbits of the given dimension with a new cell
* @param realloc if true -> all the orbits are embedded on new cells, if false -> already embedded orbits are not impacted
*/
template <unsigned int ORBIT>
void initAllOrbitsEmbedding(bool realloc = false) ;
/**************************************** /****************************************
* QUICK TRAVERSAL MANAGEMENT * * QUICK TRAVERSAL MANAGEMENT *
****************************************/ ****************************************/
......
...@@ -398,12 +398,12 @@ inline void GenericMap::copyCell(Dart d, Dart e) ...@@ -398,12 +398,12 @@ inline void GenericMap::copyCell(Dart d, Dart e)
assert(isOrbitEmbedded<ORBIT>() || !"Invalid parameter: orbit not embedded"); assert(isOrbitEmbedded<ORBIT>() || !"Invalid parameter: orbit not embedded");
unsigned int dE = getEmbedding<ORBIT>(d) ; unsigned int dE = getEmbedding<ORBIT>(d) ;
unsigned int eE = getEmbedding<ORBIT>(e) ; unsigned int eE = getEmbedding<ORBIT>(e) ;
// if(eE != EMBNULL) // if the source is NULL, nothing to copy if(eE != EMBNULL) // if the source is NULL, nothing to copy
// { {
// if(dE == EMBNULL) // if the dest is NULL, create a new cell if(dE == EMBNULL) // if the dest is NULL, create a new cell
// dE = setOrbitEmbeddingOnNewCell<ORBIT>(d) ; dE = setOrbitEmbeddingOnNewCell<ORBIT>(d) ;
m_attribs[ORBIT].copyLine(dE, eE) ; // copy the data m_attribs[ORBIT].copyLine(dE, eE) ; // copy the data
// } }
}