Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit f0b50352 authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

correction ajout d'un nouveau plongement de cellule a l'instanciation

d'un CellMarker si la cellule n'est pas encore plongee
parent f73c649f
...@@ -33,6 +33,10 @@ namespace CGoGN ...@@ -33,6 +33,10 @@ namespace CGoGN
class AttribMap : public GenericMap class AttribMap : public GenericMap
{ {
friend class CellMarker ;
friend class CellMarkerStore ;
friend class CellMarkerNoUnmark ;
template<typename T> friend class AutoAttributeHandler ; template<typename T> friend class AutoAttributeHandler ;
public: public:
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#define __CELL_MARKER__ #define __CELL_MARKER__
#include "Topology/generic/marker.h" #include "Topology/generic/marker.h"
#include "Topology/generic/genericmap.h" #include "Topology/generic/attribmap.h"
#define VERTEX_CELL VERTEX_ORBIT #define VERTEX_CELL VERTEX_ORBIT
#define EDGE_CELL EDGE_ORBIT #define EDGE_CELL EDGE_ORBIT
...@@ -45,7 +45,7 @@ class CellMarker ...@@ -45,7 +45,7 @@ class CellMarker
{ {
protected: protected:
Marker m_marker; Marker m_marker;
GenericMap& m_map; AttribMap& m_map;
public: public:
/** /**
...@@ -54,8 +54,10 @@ public: ...@@ -54,8 +54,10 @@ public:
* @param cell the type of cell we want to mark VERTEX_CELL, EDGE_CELL,... * @param cell the type of cell we want to mark VERTEX_CELL, EDGE_CELL,...
* \pre the cell is embedded in the map * \pre the cell is embedded in the map
*/ */
CellMarker(GenericMap& map, unsigned int cell): m_map(map) CellMarker(AttribMap& map, unsigned int cell): m_map(map)
{ {
if(!map.isOrbitEmbedded(cell))
map.addEmbedding(cell) ;
m_marker = map.getNewMarker(cell); m_marker = map.getNewMarker(cell);
} }
...@@ -168,7 +170,7 @@ public: ...@@ -168,7 +170,7 @@ public:
* @param cell the type of cell we want to mark VERTEX_CELL, EDGE_CELL,... * @param cell the type of cell we want to mark VERTEX_CELL, EDGE_CELL,...
* \pre the cell is embedded in the map * \pre the cell is embedded in the map
*/ */
CellMarkerStore(GenericMap& map, unsigned int cell): CellMarker(map, cell) CellMarkerStore(AttribMap& map, unsigned int cell): CellMarker(map, cell)
{} {}
protected: protected:
...@@ -217,7 +219,7 @@ public: ...@@ -217,7 +219,7 @@ public:
* @param cell the type of cell we want to mark VERTEX_CELL, EDGE_CELL,... * @param cell the type of cell we want to mark VERTEX_CELL, EDGE_CELL,...
* \pre the cell is embedded in the map * \pre the cell is embedded in the map
*/ */
CellMarkerNoUnmark(GenericMap& map, unsigned int cell): CellMarker(map, cell) CellMarkerNoUnmark(AttribMap& map, unsigned int cell): CellMarker(map, cell)
{} {}
~CellMarkerNoUnmark() ~CellMarkerNoUnmark()
......
...@@ -75,10 +75,6 @@ class GenericMap : public MapBrowser ...@@ -75,10 +75,6 @@ class GenericMap : public MapBrowser
friend class DartMarkerStore ; friend class DartMarkerStore ;
friend class DartMarkerNoUnmark ; friend class DartMarkerNoUnmark ;
friend class CellMarker ;
friend class CellMarkerStore ;
friend class CellMarkerNoUnmark ;
template<typename T> friend class AutoAttributeHandler ; template<typename T> friend class AutoAttributeHandler ;
protected: protected:
......
...@@ -242,7 +242,6 @@ inline AttribMultiVectGen& GenericMap::getMultiVec(unsigned int idAttr) ...@@ -242,7 +242,6 @@ inline AttribMultiVectGen& GenericMap::getMultiVec(unsigned int idAttr)
inline AttribContainer& GenericMap::getAttributeContainer(unsigned int orbit) inline AttribContainer& GenericMap::getAttributeContainer(unsigned int orbit)
{ {
// assert(isOrbitEmbedded(orbit) || !"Invalid parameter: orbit not embedded");
return m_attribs[orbit] ; return m_attribs[orbit] ;
} }
...@@ -252,7 +251,7 @@ inline AttribContainer& GenericMap::getAttributeContainer(unsigned int orbit) ...@@ -252,7 +251,7 @@ inline AttribContainer& GenericMap::getAttributeContainer(unsigned int orbit)
inline Marker GenericMap::getNewMarker(unsigned int cell) inline Marker GenericMap::getNewMarker(unsigned int cell)
{ {
assert(isOrbitEmbedded(cell) || !"Try to get a marker on non embedded cell! ") ; // assert(isOrbitEmbedded(cell) || !"Try to get a marker on non embedded cell! ") ;
return m_orbMarker[cell].getNewMarker(cell) ; return m_orbMarker[cell].getNewMarker(cell) ;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment