Commit f0b50352 authored by Pierre Kraemer's avatar Pierre Kraemer

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
class AttribMap : public GenericMap
{
friend class CellMarker ;
friend class CellMarkerStore ;
friend class CellMarkerNoUnmark ;
template<typename T> friend class AutoAttributeHandler ;
public:
......
......@@ -26,7 +26,7 @@
#define __CELL_MARKER__
#include "Topology/generic/marker.h"
#include "Topology/generic/genericmap.h"
#include "Topology/generic/attribmap.h"
#define VERTEX_CELL VERTEX_ORBIT
#define EDGE_CELL EDGE_ORBIT
......@@ -45,7 +45,7 @@ class CellMarker
{
protected:
Marker m_marker;
GenericMap& m_map;
AttribMap& m_map;
public:
/**
......@@ -54,8 +54,10 @@ public:
* @param cell the type of cell we want to mark VERTEX_CELL, EDGE_CELL,...
* \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);
}
......@@ -168,7 +170,7 @@ public:
* @param cell the type of cell we want to mark VERTEX_CELL, EDGE_CELL,...
* \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:
......@@ -217,7 +219,7 @@ public:
* @param cell the type of cell we want to mark VERTEX_CELL, EDGE_CELL,...
* \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()
......
......@@ -75,10 +75,6 @@ class GenericMap : public MapBrowser
friend class DartMarkerStore ;
friend class DartMarkerNoUnmark ;
friend class CellMarker ;
friend class CellMarkerStore ;
friend class CellMarkerNoUnmark ;
template<typename T> friend class AutoAttributeHandler ;
protected:
......
......@@ -242,7 +242,6 @@ inline AttribMultiVectGen& GenericMap::getMultiVec(unsigned int idAttr)
inline AttribContainer& GenericMap::getAttributeContainer(unsigned int orbit)
{
// assert(isOrbitEmbedded(orbit) || !"Invalid parameter: orbit not embedded");
return m_attribs[orbit] ;
}
......@@ -252,7 +251,7 @@ inline AttribContainer& GenericMap::getAttributeContainer(unsigned int orbit)
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) ;
}
......
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