Commit c5e64b5b authored by CGoGN GIT Supervisor's avatar CGoGN GIT Supervisor

Merge branch 'master' of /home/untereiner/CGoGN

* 'master' of /home/untereiner/CGoGN:
  Derniere changements
  import des fichiers de l'iness + IHM3
  Revert "Merge branch 'master' of cgogn:~thery/CGoGN"
  retour dans le namespace IHM
  encore quelques modifs sur les 3-cartes

Conflicts:
	Apps/Tuto/tuto5.cpp
	include/Algo/Export/exportPov.h
	include/Algo/ImplicitHierarchicalMesh/ihm3.hpp
	include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
	include/Utils/GLSLShader.h
	include/Utils/text3d.h
	src/Algo/ImplicitHierarchicalMesh/ihm3.cpp
	src/Utils/GLSLShader.cpp
	src/Utils/text3d.cpp
parents 5ac4eeac c21de25f
...@@ -717,6 +717,11 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y) ...@@ -717,6 +717,11 @@ void MyGlutWin::myKeyboard(unsigned char keycode, int x, int y)
Algo::Export::exportOFF<PFP>(myMap, position, "export.off") ; Algo::Export::exportOFF<PFP>(myMap, position, "export.off") ;
break ; break ;
} }
case 'n':
{
myMap.saveMapBin("plop");
}
} }
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define EXPORT_POV #define EXPORT_POV
#include "Topology/generic/attributeHandler.h" #include "Topology/generic/attributeHandler.h"
#include "Utils/cgognStream.h"
namespace CGoGN namespace CGoGN
{ {
...@@ -15,33 +16,33 @@ namespace ExportPov ...@@ -15,33 +16,33 @@ namespace ExportPov
template <typename PFP> template <typename PFP>
void exportTriangleWire(std::ofstream& out,typename PFP::VEC3& p1,typename PFP::VEC3& p2,typename PFP::VEC3& p3) void exportTriangleWire(std::ofstream& out,typename PFP::VEC3& p1,typename PFP::VEC3& p2,typename PFP::VEC3& p3)
{ {
out << "cylinder {" << CGoGNendl; CGoGNout << "cylinder {" << CGoGNendl;
out << "<" << p1[0] << "," << p1[1] << "," << p1[2] << ">, <" << p2[0] << "," << p2[1] << "," << p2[2] << ">, 0.5" << CGoGNendl; CGoGNout << "<" << p1[0] << "," << p1[1] << "," << p1[2] << ">, <" << p2[0] << "," << p2[1] << "," << p2[2] << ">, 0.5" << CGoGNendl;
out << "}" << CGoGNendl; CGoGNout << "}" << CGoGNendl;
out << "cylinder {" << CGoGNendl; CGoGNout << "cylinder {" << CGoGNendl;
out << "<" << p1[0] << "," << p1[1] << "," << p1[2] << ">, <" << p3[0] << "," << p3[1] << "," << p3[2] << ">, 0.5" << CGoGNendl; CGoGNout << "<" << p1[0] << "," << p1[1] << "," << p1[2] << ">, <" << p3[0] << "," << p3[1] << "," << p3[2] << ">, 0.5" << CGoGNendl;
out << "}" << CGoGNendl; CGoGNout << "}" << CGoGNendl;
out << "cylinder {" << CGoGNendl; CGoGNout << "cylinder {" << CGoGNendl;
out << "<" << p3[0] << "," << p3[1] << "," << p3[2] << ">, <" << p2[0] << "," << p2[1] << "," << p2[2] << ">, 0.5" << CGoGNendl; CGoGNout << "<" << p3[0] << "," << p3[1] << "," << p3[2] << ">, <" << p2[0] << "," << p2[1] << "," << p2[2] << ">, 0.5" << CGoGNendl;
out << "}" << CGoGNendl; CGoGNout << "}" << CGoGNendl;
} }
template <typename PFP> template <typename PFP>
void exportTrianglePlain(std::ofstream& out,typename PFP::VEC3& p1,typename PFP::VEC3& p2,typename PFP::VEC3& p3) void exportTrianglePlain(std::ofstream& out,typename PFP::VEC3& p1,typename PFP::VEC3& p2,typename PFP::VEC3& p3)
{ {
out << "triangle {" << CGoGNendl; CGoGNout << "triangle {" << CGoGNendl;
out << "<" << p1[0] << "," << p1[1] << "," << p1[2] << ">," << CGoGNendl; CGoGNout << "<" << p1[0] << "," << p1[1] << "," << p1[2] << ">," << CGoGNendl;
out << "<" << p2[0] << "," << p2[1] << "," << p2[2] << ">, " << CGoGNendl; CGoGNout << "<" << p2[0] << "," << p2[1] << "," << p2[2] << ">, " << CGoGNendl;
out << "<" << p3[0] << "," << p3[1] << "," << p3[2] << "> " << CGoGNendl; CGoGNout << "<" << p3[0] << "," << p3[1] << "," << p3[2] << "> " << CGoGNendl;
out << "}" << CGoGNendl; CGoGNout << "}" << CGoGNendl;
} }
template <typename PFP> template <typename PFP>
void exportMeshPlain(std::ofstream& out, typename PFP::MAP& map, typename PFP::TVEC3& position, const std::string& meshName, const FunctorSelect& good = SelectorTrue()) void exportMeshPlain(std::ofstream& out, typename PFP::MAP& map, typename PFP::TVEC3& position, const std::string& meshName, const FunctorSelect& good = SelectorTrue())
{ {
out << "#declare " << meshName << "= union {" << CGoGNendl; CGoGNout << "#declare " << meshName << "= union {" << CGoGNendl;
DartMarkerStore traite(map); DartMarkerStore traite(map);
...@@ -59,25 +60,25 @@ void exportMeshPlain(std::ofstream& out, typename PFP::MAP& map, typename PFP::T ...@@ -59,25 +60,25 @@ void exportMeshPlain(std::ofstream& out, typename PFP::MAP& map, typename PFP::T
Algo::ExportPov::exportTrianglePlain<PFP>(out,position[dd],position[map.phi1(dd)],position[map.phi1(map.phi1(dd))]); Algo::ExportPov::exportTrianglePlain<PFP>(out,position[dd],position[map.phi1(dd)],position[map.phi1(map.phi1(dd))]);
} }
else { else {
out << "polygon{ " << nb+1 << CGoGNendl; CGoGNout << "polygon{ " << nb+1 << CGoGNendl;
dd=d; dd=d;
do { do {
out << "<" << position[dd][0] << "," << position[dd][1] << "," << position[dd][2] << ">," << CGoGNendl; CGoGNout << "<" << position[dd][0] << "," << position[dd][1] << "," << position[dd][2] << ">," << CGoGNendl;
dd = map.phi1(dd); dd = map.phi1(dd);
}while(dd!=d); }while(dd!=d);
out << "<" << position[d][0] << "," << position[d][1] << "," << position[d][2] << ">" << CGoGNendl; CGoGNout << "<" << position[d][0] << "," << position[d][1] << "," << position[d][2] << ">" << CGoGNendl;
out << "}" << CGoGNendl; CGoGNout << "}" << CGoGNendl;
} }
} }
} }
out << "}" << CGoGNendl; CGoGNout << "}" << CGoGNendl;
} }
template <typename PFP> template <typename PFP>
void exportMeshWire(std::ofstream& out, typename PFP::MAP& map, typename PFP::TVEC3& position, const std::string& meshName, const FunctorSelect& good = SelectorTrue()) void exportMeshWire(std::ofstream& out, typename PFP::MAP& map, typename PFP::TVEC3& position, const std::string& meshName, const FunctorSelect& good = SelectorTrue())
{ {
out << "#declare " << meshName << "= union {" << CGoGNendl; CGoGNout << "#declare " << meshName << "= union {" << CGoGNendl;
DartMarkerStore traite(map); DartMarkerStore traite(map);
...@@ -98,10 +99,10 @@ void exportMeshWire(std::ofstream& out, typename PFP::MAP& map, typename PFP::TV ...@@ -98,10 +99,10 @@ void exportMeshWire(std::ofstream& out, typename PFP::MAP& map, typename PFP::TV
dd=d; dd=d;
do { do {
if(position[dd][0]!=position[map.phi1(dd)][0] || position[dd][1]!=position[map.phi1(dd)][1] || position[dd][2]!=position[map.phi1(dd)][2]) { if(position[dd][0]!=position[map.phi1(dd)][0] || position[dd][1]!=position[map.phi1(dd)][1] || position[dd][2]!=position[map.phi1(dd)][2]) {
out << "cylinder{ " << CGoGNendl; CGoGNout << "cylinder{ " << CGoGNendl;
out << "<" << position[dd][0] << "," << position[dd][1] << "," << position[dd][2] << ">," << CGoGNendl; CGoGNout << "<" << position[dd][0] << "," << position[dd][1] << "," << position[dd][2] << ">," << CGoGNendl;
out << "<" << position[map.phi1(dd)][0] << "," << position[map.phi1(dd)][1] << "," << position[map.phi1(dd)][2] << ">, 0.5" << CGoGNendl; CGoGNout << "<" << position[map.phi1(dd)][0] << "," << position[map.phi1(dd)][1] << "," << position[map.phi1(dd)][2] << ">, 0.5" << CGoGNendl;
out << "}" << CGoGNendl; CGoGNout << "}" << CGoGNendl;
} }
dd = map.phi1(dd); dd = map.phi1(dd);
}while(dd!=d); }while(dd!=d);
...@@ -109,7 +110,7 @@ void exportMeshWire(std::ofstream& out, typename PFP::MAP& map, typename PFP::TV ...@@ -109,7 +110,7 @@ void exportMeshWire(std::ofstream& out, typename PFP::MAP& map, typename PFP::TV
} }
} }
out << "}" << CGoGNendl; CGoGNout << "}" << CGoGNendl;
} }
template <typename PFP> template <typename PFP>
...@@ -126,27 +127,27 @@ bool exportScenePov(typename PFP::MAP& map, typename PFP::TVEC3& position, const ...@@ -126,27 +127,27 @@ bool exportScenePov(typename PFP::MAP& map, typename PFP::TVEC3& position, const
float angleZ = angle_Z; float angleZ = angle_Z;
//define the camera position //define the camera position
out << "camera { location <" << cameraPos[0] << "," << cameraPos[1] << "," << cameraPos[2] << "> look_at <" << cameraLook[0] << "," << cameraLook[1] << "," << cameraLook[2] <<">}" << CGoGNendl;; CGoGNout << "camera { location <" << cameraPos[0] << "," << cameraPos[1] << "," << cameraPos[2] << "> look_at <" << cameraLook[0] << "," << cameraLook[1] << "," << cameraLook[2] <<">}" << CGoGNendl;;
//set a "infinite" plane //set a "infinite" plane
// out << "plane { y, -1 pigment { color rgb 1 } }" << CGoGNendl; // CGoGNout << "plane { y, -1 pigment { color rgb 1 } }" << CGoGNendl;
//set a sky sphere //set a sky sphere
out << "sphere { <0, 0, 0>, 5000"; CGoGNout << "sphere { <0, 0, 0>, 5000";
out << "texture{ pigment { color rgb <1, 1, 1>} finish { ambient 1 diffuse 0 } } }" << CGoGNendl; CGoGNout << "texture{ pigment { color rgb <1, 1, 1>} finish { ambient 1 diffuse 0 } } }" << CGoGNendl;
//put some lights //put some lights
out << "light_source { <" << cameraPos[0] << "," << cameraPos[1] << "," << cameraPos[2] << "> color rgb 0.45}" << CGoGNendl; CGoGNout << "light_source { <" << cameraPos[0] << "," << cameraPos[1] << "," << cameraPos[2] << "> color rgb 0.45}" << CGoGNendl;
// out << "light_source { <-120, -300, -10> color rgb 0.25 }"<< CGoGNendl; // CGoGNout << "light_source { <-120, -300, -10> color rgb 0.25 }"<< CGoGNendl;
//set a high quality rendering //set a high quality rendering
out << "global_settings {" << CGoGNendl; CGoGNout << "global_settings {" << CGoGNendl;
out << "radiosity {" << CGoGNendl; CGoGNout << "radiosity {" << CGoGNendl;
out << "pretrace_start 0.08 pretrace_end 0.04" << CGoGNendl; CGoGNout << "pretrace_start 0.08 pretrace_end 0.04" << CGoGNendl;
out << "count 100 nearest_count 10 error_bound 0.15 recursion_limit 1 low_error_factor 0.2 gray_threshold 0.0 minimum_reuse 0.015 brightness 1 adc_bailout 0.01/2 normal off media off} max_trace_level 255}" << CGoGNendl; CGoGNout << "count 100 nearest_count 10 error_bound 0.15 recursion_limit 1 low_error_factor 0.2 gray_threshold 0.0 minimum_reuse 0.015 brightness 1 adc_bailout 0.01/2 normal off media off} max_trace_level 255}" << CGoGNendl;
Algo::ExportPov::exportMeshPlain<PFP>(out,map,position,"myMesh",good); Algo::ExportPov::exportMeshPlain<PFP>(out,map,position,"myMesh",good);
out << "object {myMesh" << CGoGNendl; CGoGNout << "object {myMesh" << CGoGNendl;
out << "translate <" << translate[0] << "," << translate[1] << "," << translate[2] << ">" << CGoGNendl; CGoGNout << "translate <" << translate[0] << "," << translate[1] << "," << translate[2] << ">" << CGoGNendl;
out << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << CGoGNendl; CGoGNout << "rotate <" << angleX << "," << angleY << "," << angleZ << "> " << CGoGNendl;
out << "texture{ pigment{ color rgb<1.0,1.0,1>} finish { ambient rgb 0.05 brilliance 0.5 } } }" << CGoGNendl; CGoGNout << "texture{ pigment{ color rgb<1.0,1.0,1>} finish { ambient rgb 0.05 brilliance 0.5 } } }" << CGoGNendl;
out.close(); out.close();
return true; return true;
...@@ -158,4 +159,4 @@ bool exportScenePov(typename PFP::MAP& map, typename PFP::TVEC3& position, const ...@@ -158,4 +159,4 @@ bool exportScenePov(typename PFP::MAP& map, typename PFP::TVEC3& position, const
} }
#endif #endif
\ No newline at end of file
...@@ -35,7 +35,7 @@ namespace CGoGN ...@@ -35,7 +35,7 @@ namespace CGoGN
namespace Algo namespace Algo
{ {
namespace IHM3 namespace IHM
{ {
template<typename T> class AttributeHandler_IHM ; template<typename T> class AttributeHandler_IHM ;
...@@ -70,6 +70,10 @@ public: ...@@ -70,6 +70,10 @@ public:
template <typename T> template <typename T>
AttributeHandler_IHM<T> addAttribute(unsigned int orbit, const std::string& nameAttr) ; AttributeHandler_IHM<T> addAttribute(unsigned int orbit, const std::string& nameAttr) ;
template <typename T>
AttributeHandler_IHM<T> getAttribute(unsigned int orbit, const std::string& nameAttr) ;
/*************************************************** /***************************************************
* MAP TRAVERSAL * * MAP TRAVERSAL *
***************************************************/ ***************************************************/
...@@ -80,12 +84,12 @@ public: ...@@ -80,12 +84,12 @@ public:
Dart phi_1(Dart d) ; Dart phi_1(Dart d) ;
Dart phi2(Dart d) ;
private: private:
Dart phi2bis(Dart d) ; Dart phi2bis(Dart d) ;
public: public:
Dart phi2(Dart d) ;
Dart phi3(Dart d); Dart phi3(Dart d);
Dart alpha0(Dart d); Dart alpha0(Dart d);
...@@ -114,6 +118,16 @@ public: ...@@ -114,6 +118,16 @@ public:
virtual bool foreach_dart_of_cc(Dart d, FunctorType& f) ; virtual bool foreach_dart_of_cc(Dart d, FunctorType& f) ;
/****************************************************
* EMBEDDED FUNCTIONS *
****************************************************/
// virtual void cutEdge(Dart d);
//
// virtual void splitFace(Dart d, Dart e);
//
// virtual void sewVolumes(Dart d, Dart e);
/*************************************************** /***************************************************
* LEVELS MANAGEMENT * * LEVELS MANAGEMENT *
***************************************************/ ***************************************************/
...@@ -142,13 +156,24 @@ public: ...@@ -142,13 +156,24 @@ public:
*/ */
unsigned int getNewEdgeId() ; unsigned int getNewEdgeId() ;
/**
* Return the id of the edge of d
*/
unsigned int getEdgeId(Dart d) ; unsigned int getEdgeId(Dart d) ;
/**
* Set an edge id to all darts from an orbit of d
*/
//TODO changer l'ordre des parametres
void setEdgeId(Dart d, unsigned int i, unsigned int orbit); void setEdgeId(Dart d, unsigned int i, unsigned int orbit);
/*************************************************** /***************************************************
* FACE ID MANAGEMENT * * FACE ID MANAGEMENT *
***************************************************/ ***************************************************/
/**
* Give a new unique id to all the faces of the map
*/
void initFaceId() ; void initFaceId() ;
/** /**
...@@ -156,10 +181,19 @@ public: ...@@ -156,10 +181,19 @@ public:
*/ */
unsigned int getNewFaceId() ; unsigned int getNewFaceId() ;
/**
* Return the id of the face of d
*/
unsigned int getFaceId(Dart d) ; unsigned int getFaceId(Dart d) ;
/**
* Set a face id to all darts from an orbit of d
*/
//TODO changer l'ordre des parametres
void setFaceId(Dart d, unsigned int i, unsigned int orbit); void setFaceId(Dart d, unsigned int i, unsigned int orbit);
void setFaceId(unsigned int orbit, Dart d);
/*************************************************** /***************************************************
* CELLS INFORMATION * * CELLS INFORMATION *
***************************************************/ ***************************************************/
...@@ -175,22 +209,22 @@ public: ...@@ -175,22 +209,22 @@ public:
unsigned int edgeLevel(Dart d) ; unsigned int edgeLevel(Dart d) ;
/** /**
* * Return the level of the face of d in the current level map
*/ */
unsigned int faceLevel(Dart d); unsigned int faceLevel(Dart d);
/** /**
* * Return the level of the volume of d in the current level map
*/ */
unsigned int volumeLevel(Dart d); unsigned int volumeLevel(Dart d);
/** /**
* * Return the oldest dart of the face of d in the current level map
*/ */
Dart faceOldestDart(Dart d); Dart faceOldestDart(Dart d);
/** /**
* * Return the oldest dart of the volume of d in the current level map
*/ */
Dart volumeOldestDart(Dart d); Dart volumeOldestDart(Dart d);
...@@ -201,12 +235,14 @@ public: ...@@ -201,12 +235,14 @@ public:
bool edgeIsSubdivided(Dart d) ; bool edgeIsSubdivided(Dart d) ;
/** /**
* * Return true if the face of d in the current level map
* has already been subdivided to the next level
*/ */
bool faceIsSubdivided(Dart d) ; bool faceIsSubdivided(Dart d) ;
/** /**
* * Return true if the volume of d in the current level map
* has already been subdivided to the next level
*/ */
bool volumeIsSubdivided(Dart d); bool volumeIsSubdivided(Dart d);
} ; } ;
...@@ -220,7 +256,7 @@ public: ...@@ -220,7 +256,7 @@ public:
AttributeHandler_IHM() : AttributeHandler<T>() AttributeHandler_IHM() : AttributeHandler<T>()
{} {}
AttributeHandler_IHM(GenericMap* m, unsigned int idAttr) : AttributeHandler<T>(m, idAttr) AttributeHandler_IHM(GenericMap* m, AttributeMultiVector<T>* amv) : AttributeHandler<T>(m, amv)
{} {}
AttributeMultiVector<T>* getDataVector() const AttributeMultiVector<T>* getDataVector() const
......
...@@ -28,7 +28,7 @@ namespace CGoGN ...@@ -28,7 +28,7 @@ namespace CGoGN
namespace Algo namespace Algo
{ {
namespace IHM3 namespace IHM
{ {
/*************************************************** /***************************************************
...@@ -47,14 +47,20 @@ AttributeHandler_IHM<T> ImplicitHierarchicalMap3::addAttribute(unsigned int orbi ...@@ -47,14 +47,20 @@ AttributeHandler_IHM<T> ImplicitHierarchicalMap3::addAttribute(unsigned int orbi
if(addNextLevelCell) if(addNextLevelCell)
{ {
AttributeContainer& cellCont = m_attribs[orbit] ; AttributeContainer& cellCont = m_attribs[orbit] ;
unsigned int index = cellCont.addAttribute<unsigned int>("nextLevelCell") ; AttributeMultiVector<unsigned int>* amv = cellCont.addAttribute<unsigned int>("nextLevelCell") ;
AttributeMultiVector<unsigned int>& amv = cellCont.getDataVector<unsigned int>(index) ; m_nextLevelCell[orbit] = amv ;
m_nextLevelCell[orbit] = &amv ;
for(unsigned int i = cellCont.begin(); i < cellCont.end(); cellCont.next(i)) for(unsigned int i = cellCont.begin(); i < cellCont.end(); cellCont.next(i))
amv[i] = EMBNULL ; amv->operator[](i) = EMBNULL ;
} }
return AttributeHandler_IHM<T>(this, h.id()) ; return AttributeHandler_IHM<T>(this, h.getDataVector()) ;
}
template <typename T>
AttributeHandler_IHM<T> ImplicitHierarchicalMap3::getAttribute(unsigned int orbit, const std::string& nameAttr)
{
AttributeHandler<T> h = Map2::getAttribute<T>(orbit, nameAttr) ;
return AttributeHandler_IHM<T>(this, h.getDataVector()) ;
} }
/*************************************************** /***************************************************
...@@ -77,15 +83,18 @@ inline Dart ImplicitHierarchicalMap3::phi1(Dart d) ...@@ -77,15 +83,18 @@ inline Dart ImplicitHierarchicalMap3::phi1(Dart d)
unsigned int edgeId = m_edgeId[d] ; unsigned int edgeId = m_edgeId[d] ;
Dart it = d ; Dart it = d ;
do do
{ {
it = Map3::phi1(it) ; it = Map3::phi1(it) ;
if(m_dartLevel[it] <= m_curLevel) if(m_dartLevel[it] <= m_curLevel)
finished = true ; finished = true ;
else else
{ {
if(m_edgeId[it] != edgeId) while(m_edgeId[it] != edgeId)
it = Map3::phi1(phi2bis(it)); it = Map3::phi1(phi2bis(it));
} }
} while(!finished) ; } while(!finished) ;
...@@ -106,8 +115,8 @@ inline Dart ImplicitHierarchicalMap3::phi_1(Dart d) ...@@ -106,8 +115,8 @@ inline Dart ImplicitHierarchicalMap3::phi_1(Dart d)
else else
{ {
it = Map3::phi_1(it) ; it = Map3::phi_1(it) ;
if(m_edgeId[it] != edgeId) while(m_edgeId[it] != edgeId)
it = Map3::phi_1(phi2bis(it)) ; it = Map3::phi_1(phi2bis(it));
} }
} while(!finished) ; } while(!finished) ;
...@@ -117,10 +126,7 @@ inline Dart ImplicitHierarchicalMap3::phi_1(Dart d) ...@@ -117,10 +126,7 @@ inline Dart ImplicitHierarchicalMap3::phi_1(Dart d)
//TODO A verifier si besoin d'assertion //TODO A verifier si besoin d'assertion
inline Dart ImplicitHierarchicalMap3::phi2bis(Dart d) inline Dart ImplicitHierarchicalMap3::phi2bis(Dart d)
{ {
//assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
unsigned int faceId = m_faceId[d]; unsigned int faceId = m_faceId[d];
Dart it = d; Dart it = d;
it = Map3::phi2(it) ; it = Map3::phi2(it) ;
...@@ -129,8 +135,11 @@ inline Dart ImplicitHierarchicalMap3::phi2bis(Dart d) ...@@ -129,8 +135,11 @@ inline Dart ImplicitHierarchicalMap3::phi2bis(Dart d)
return it; return it;
else else
{ {
while(m_faceId[it] != faceId) do
it = Map3::alpha_2(it); {
it = Map3::phi2(Map3::phi3(it));
}
while(m_faceId[it] != faceId);
return it; return it;
} }
...@@ -160,7 +169,7 @@ inline Dart ImplicitHierarchicalMap3::alpha0(Dart d) ...@@ -160,7 +169,7 @@ inline Dart ImplicitHierarchicalMap3::alpha0(Dart d)
inline Dart ImplicitHierarchicalMap3::alpha1(Dart d) inline Dart ImplicitHierarchicalMap3::alpha1(Dart d)
{ {
assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ; //assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
return Map3::alpha1(d) ; return Map3::alpha1(d) ;
} }
...@@ -183,6 +192,8 @@ inline Dart ImplicitHierarchicalMap3::alpha2(Dart d) ...@@ -183,6 +192,8 @@ inline Dart ImplicitHierarchicalMap3::alpha2(Dart d)
e = phi3(f); e = phi3(f);
} }
return f; return f;
//return Map3::alpha2(d);
} }
inline Dart ImplicitHierarchicalMap3::alpha_2(Dart d) inline Dart ImplicitHierarchicalMap3::alpha_2(Dart d)
...@@ -202,6 +213,8 @@ inline Dart ImplicitHierarchicalMap3::alpha_2(Dart d) ...@@ -202,6 +213,8 @@ inline Dart ImplicitHierarchicalMap3::alpha_2(Dart d)
f = phi2(e); f = phi2(e);
} }
return e; return e;
//return Map3::alpha_2(d);
} }
inline Dart ImplicitHierarchicalMap3::begin() inline Dart ImplicitHierarchicalMap3::begin()
...@@ -222,7 +235,7 @@ inline void ImplicitHierarchicalMap3::next(Dart& d) ...@@ -222,7 +235,7 @@ inline void ImplicitHierarchicalMap3::next(Dart& d)
do do
{ {
Map3::next(d) ; Map3::next(d) ;
} while(m_dartLevel[d] > m_curLevel && d != Map3::end()) ; } while(d != Map3::end() && m_dartLevel[d] > m_curLevel) ;