Commit 273fc127 authored by Pierre Kraemer's avatar Pierre Kraemer

orbit as template -> volumeExplorer OK

parent 70b2a513
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
PFP::MAP myMap; PFP::MAP myMap;
PFP::TVEC3 position ; AttributeHandler<PFP::VEC3, VERTEX> position ;
PFP::TVEC3 color ; AttributeHandler<PFP::VEC3, VOLUME> color ;
void MyQT::volumes_onoff(bool x) void MyQT::volumes_onoff(bool x)
{ {
...@@ -139,7 +139,7 @@ void MyQT::cb_initGL() ...@@ -139,7 +139,7 @@ void MyQT::cb_initGL()
SelectorDartNoBoundary<PFP::MAP> nb(myMap); SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_topo_render->updateData<PFP>(myMap, position, 0.8f, 0.8f, 0.8f, nb); m_topo_render->updateData<PFP>(myMap, position, 0.8f, 0.8f, 0.8f, nb);
m_explode_render->updateData<PFP>(myMap,position,color); m_explode_render->updateData<PFP>(myMap, position, color);
m_explode_render->setExplodeVolumes(0.8f); m_explode_render->setExplodeVolumes(0.8f);
m_explode_render->setExplodeFaces(0.9f); m_explode_render->setExplodeFaces(0.9f);
m_explode_render->setAmbiant(Geom::Vec4f(0.2f,0.2f,0.2f,1.0f)); m_explode_render->setAmbiant(Geom::Vec4f(0.2f,0.2f,0.2f,1.0f));
...@@ -316,7 +316,7 @@ int main(int argc, char **argv) ...@@ -316,7 +316,7 @@ int main(int argc, char **argv)
return 1; return 1;
} }
else else
position = myMap.getAttribute<PFP::VEC3>(VERTEX , attrNames[0]) ; position = myMap.getAttribute<PFP::VEC3, VERTEX>(attrNames[0]) ;
} }
if(extension == std::string(".off")) if(extension == std::string(".off"))
...@@ -328,39 +328,39 @@ int main(int argc, char **argv) ...@@ -328,39 +328,39 @@ int main(int argc, char **argv)
} }
else else
{ {
position = myMap.getAttribute<PFP::VEC3>(VERTEX , attrNames[0]) ; position = myMap.getAttribute<PFP::VEC3, VERTEX>(attrNames[0]) ;
myMap.closeMap(); myMap.closeMap();
} }
} }
color = myMap.addAttribute<PFP::VEC3>(VOLUME, "color"); color = myMap.addAttribute<PFP::VEC3, VOLUME>("color");
TraversorCell<PFP::MAP> tra(myMap,VOLUME); TraversorCell<PFP::MAP, VOLUME> tra(myMap);
float maxV=0.0f; float maxV = 0.0f;
for (Dart d = tra.begin(); d != tra.end(); d=tra.next()) for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
{ {
float v = Algo::Geometry::tetrahedronVolume<PFP>(myMap,d,position); float v = Algo::Geometry::tetrahedronVolume<PFP>(myMap, d, position);
color[d] = PFP::VEC3(v,0,0); color[d] = PFP::VEC3(v,0,0);
if (v>maxV) if (v>maxV)
maxV=v; maxV=v;
} }
for (unsigned int i = color.begin(); i!=color.end(); color.next(i)) for (unsigned int i = color.begin(); i != color.end(); color.next(i))
{ {
color[i][0] /= maxV; color[i][0] /= maxV;
color[i][2] = 1.0f -color[i][0]; color[i][2] = 1.0f - color[i][0];
} }
} }
else else
{ {
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position"); position = myMap.addAttribute<PFP::VEC3, VERTEX>("position");
Algo::Modelisation::Primitive3D<PFP> prim(myMap, position); Algo::Modelisation::Primitive3D<PFP> prim(myMap, position);
int nb = 8; int nb = 8;
prim.hexaGrid_topo(nb,nb,nb); prim.hexaGrid_topo(nb,nb,nb);
prim.embedHexaGrid(1.0f,1.0f,1.0f); prim.embedHexaGrid(1.0f,1.0f,1.0f);
color = myMap.addAttribute<PFP::VEC3>(VOLUME, "color"); color = myMap.addAttribute<PFP::VEC3, VOLUME>("color");
TraversorCell<PFP::MAP> tra(myMap,VOLUME); TraversorW<PFP::MAP> tra(myMap);
for (Dart d = tra.begin(); d != tra.end(); d=tra.next()) for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
color[d] = position[d] + PFP::VEC3(0.5,0.5,0.5); color[d] = position[d] + PFP::VEC3(0.5,0.5,0.5);
} }
// un peu d'interface // un peu d'interface
......
...@@ -97,11 +97,11 @@ class MyQT: public Utils::QT::SimpleQT ...@@ -97,11 +97,11 @@ class MyQT: public Utils::QT::SimpleQT
int m_begY; int m_begY;
int clip_id1; int clip_id1;
int clip_id2; int clip_id2;
public: public:
float m_WidthObj; float m_WidthObj;
Geom::Vec3f m_PosObj; Geom::Vec3f m_PosObj;
public: public:
MyQT(): MyQT():
render_volumes(true), render_volumes(true),
......
...@@ -37,16 +37,16 @@ namespace Geometry ...@@ -37,16 +37,16 @@ namespace Geometry
{ {
template <typename PFP> template <typename PFP>
typename PFP::REAL tetrahedronSignedVolume(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position) ; typename PFP::REAL tetrahedronSignedVolume(typename PFP::MAP& map, Dart d, const AttributeHandler<typename PFP::VEC3, VERTEX>& position) ;
template <typename PFP> template <typename PFP>
typename PFP::REAL tetrahedronVolume(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position) ; typename PFP::REAL tetrahedronVolume(typename PFP::MAP& map, Dart d, const AttributeHandler<typename PFP::VEC3, VERTEX>& position) ;
template <typename PFP> template <typename PFP>
typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position) ; typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Dart d, const AttributeHandler<typename PFP::VEC3, VERTEX>& position) ;
template <typename PFP> template <typename PFP>
typename PFP::REAL totalVolume(typename PFP::MAP& map, const typename PFP::TVEC3& position, const FunctorSelect& select = allDarts) ; typename PFP::REAL totalVolume(typename PFP::MAP& map, const AttributeHandler<typename PFP::VEC3, VERTEX>& position, const FunctorSelect& select = allDarts) ;
} // namespace Geometry } // namespace Geometry
......
...@@ -36,7 +36,7 @@ namespace Geometry ...@@ -36,7 +36,7 @@ namespace Geometry
{ {
template <typename PFP> template <typename PFP>
typename PFP::REAL tetrahedronSignedVolume(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position) typename PFP::REAL tetrahedronSignedVolume(typename PFP::MAP& map, Dart d, const AttributeHandler<typename PFP::VEC3, VERTEX>& position)
{ {
typename PFP::VEC3 p1 = position[d] ; typename PFP::VEC3 p1 = position[d] ;
typename PFP::VEC3 p2 = position[map.phi1(d)] ; typename PFP::VEC3 p2 = position[map.phi1(d)] ;
...@@ -47,7 +47,7 @@ typename PFP::REAL tetrahedronSignedVolume(typename PFP::MAP& map, Dart d, const ...@@ -47,7 +47,7 @@ typename PFP::REAL tetrahedronSignedVolume(typename PFP::MAP& map, Dart d, const
} }
template <typename PFP> template <typename PFP>
typename PFP::REAL tetrahedronVolume(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position) typename PFP::REAL tetrahedronVolume(typename PFP::MAP& map, Dart d, const AttributeHandler<typename PFP::VEC3, VERTEX>& position)
{ {
typename PFP::VEC3 p1 = position[d] ; typename PFP::VEC3 p1 = position[d] ;
typename PFP::VEC3 p2 = position[map.phi1(d)] ; typename PFP::VEC3 p2 = position[map.phi1(d)] ;
...@@ -58,7 +58,7 @@ typename PFP::REAL tetrahedronVolume(typename PFP::MAP& map, Dart d, const typen ...@@ -58,7 +58,7 @@ typename PFP::REAL tetrahedronVolume(typename PFP::MAP& map, Dart d, const typen
} }
template <typename PFP> template <typename PFP>
typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position) typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Dart d, const AttributeHandler<typename PFP::VEC3, VERTEX>& position)
{ {
typedef typename PFP::VEC3 VEC3; typedef typename PFP::VEC3 VEC3;
...@@ -115,7 +115,7 @@ typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Dart d, const ...@@ -115,7 +115,7 @@ typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Dart d, const
} }
template <typename PFP> template <typename PFP>
float totalVolume(typename PFP::MAP& map, const typename PFP::TVEC3& position, const FunctorSelect& select) float totalVolume(typename PFP::MAP& map, const AttributeHandler<typename PFP::VEC3, VERTEX>& position, const FunctorSelect& select)
{ {
typename PFP::REAL vol = 0 ; typename PFP::REAL vol = 0 ;
TraversorW<typename PFP::MAP> t(map, select) ; TraversorW<typename PFP::MAP> t(map, select) ;
......
...@@ -39,7 +39,7 @@ template <typename T, unsigned int ORBIT> ...@@ -39,7 +39,7 @@ template <typename T, unsigned int ORBIT>
AttributeHandler_IHM<T, ORBIT> ImplicitHierarchicalMap::addAttribute(const std::string& nameAttr) AttributeHandler_IHM<T, ORBIT> ImplicitHierarchicalMap::addAttribute(const std::string& nameAttr)
{ {
bool addNextLevelCell = false ; bool addNextLevelCell = false ;
if(!isOrbitEmbedded(ORBIT)) if(!isOrbitEmbedded<ORBIT>())
addNextLevelCell = true ; addNextLevelCell = true ;
AttributeHandler<T, ORBIT> h = Map2::addAttribute<T, ORBIT>(nameAttr) ; AttributeHandler<T, ORBIT> h = Map2::addAttribute<T, ORBIT>(nameAttr) ;
...@@ -254,7 +254,7 @@ inline bool ImplicitHierarchicalMap::foreach_dart_of_cc(Dart d, FunctorType& f, ...@@ -254,7 +254,7 @@ inline bool ImplicitHierarchicalMap::foreach_dart_of_cc(Dart d, FunctorType& f,
inline void ImplicitHierarchicalMap::splitFace(Dart d, Dart e) inline void ImplicitHierarchicalMap::splitFace(Dart d, Dart e)
{ {
EmbeddedMap2::splitFace(d, e) ; EmbeddedMap2::splitFace(d, e) ;
if(isOrbitEmbedded(FACE)) if(isOrbitEmbedded<FACE>())
{ {
unsigned int cur = m_curLevel ; unsigned int cur = m_curLevel ;
m_curLevel = m_maxLevel ; m_curLevel = m_maxLevel ;
......
...@@ -32,14 +32,14 @@ namespace IHM ...@@ -32,14 +32,14 @@ namespace IHM
{ {
/*************************************************** /***************************************************
* ATTRIBUTES MANAGEMENT * * ATTRIBUTES MANAGEMENT *
***************************************************/ ***************************************************/
template <typename T, unsigned int ORBIT> template <typename T, unsigned int ORBIT>
AttributeHandler_IHM<T, ORBIT> ImplicitHierarchicalMap3::addAttribute(const std::string& nameAttr) AttributeHandler_IHM<T, ORBIT> ImplicitHierarchicalMap3::addAttribute(const std::string& nameAttr)
{ {
bool addNextLevelCell = false ; bool addNextLevelCell = false ;
if(!isOrbitEmbedded(ORBIT)) if(!isOrbitEmbedded<ORBIT>())
addNextLevelCell = true ; addNextLevelCell = true ;
AttributeHandler<T, ORBIT> h = Map3::addAttribute<T, ORBIT>(nameAttr) ; AttributeHandler<T, ORBIT> h = Map3::addAttribute<T, ORBIT>(nameAttr) ;
......
...@@ -179,21 +179,21 @@ bool importMeshSToV(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts, float d ...@@ -179,21 +179,21 @@ bool importMeshSToV(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts, float d
if(backEdgesBuffer[em] == EMBNULL) if(backEdgesBuffer[em] == EMBNULL)
{ {
unsigned int emn = map.template newCell<VERTEX>(); unsigned int emn = map.template newCell<VERTEX>();
map.copyCell<VERTEX>(emn, em); map.template copyCell<VERTEX>(emn, em);
backEdgesBuffer[em] = emn; backEdgesBuffer[em] = emn;
position[emn] += typename PFP::VEC3(0,0,dist); position[emn] += typename PFP::VEC3(0,0,dist);
} }
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, em); FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, em);
//foreach_dart_of_orbit_in_parent<typename PFP::MAP>(&map, VERTEX, d, fsetemb) ; //foreach_dart_of_orbit_in_parent<typename PFP::MAP>(&map, VERTEX, d, fsetemb) ;
map.foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb); map.template foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb);
//Embed the other base face //Embed the other base face
Dart d2 = map.phi1(map.phi1(map.phi2(d))); Dart d2 = map.phi1(map.phi1(map.phi2(d)));
unsigned int em2 = backEdgesBuffer[em]; unsigned int em2 = backEdgesBuffer[em];
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb2(map, em2); FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb2(map, em2);
//foreach_dart_of_orbit_in_parent<typename PFP::MAP>(&map, VERTEX, d2, fsetemb2) ; //foreach_dart_of_orbit_in_parent<typename PFP::MAP>(&map, VERTEX, d2, fsetemb2) ;
map.foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d2, fsetemb2); map.template foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d2, fsetemb2);
m.mark(d) ; // mark on the fly to unmark on second loop m.mark(d) ; // mark on the fly to unmark on second loop
vecDartsPerVertex[em].push_back(d); // store incident darts for fast adjacency reconstruction vecDartsPerVertex[em].push_back(d); // store incident darts for fast adjacency reconstruction
...@@ -212,11 +212,11 @@ bool importMeshSToV(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts, float d ...@@ -212,11 +212,11 @@ bool importMeshSToV(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts, float d
// darts incident to end vertex of edge // darts incident to end vertex of edge
std::vector<Dart>& vec = vecDartsPerVertex[map.phi1(d)]; std::vector<Dart>& vec = vecDartsPerVertex[map.phi1(d)];
unsigned int embd = map.getEmbedding<VERTEX>(d); unsigned int embd = map.template getEmbedding<VERTEX>(d);
Dart good_dart = NIL; Dart good_dart = NIL;
for (typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it) for (typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it)
{ {
if (map.getEmbedding<VERTEX>(map.phi1(*it)) == embd) if (map.template getEmbedding<VERTEX>(map.phi1(*it)) == embd)
good_dart = *it; good_dart = *it;
} }
......
...@@ -129,8 +129,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector< ...@@ -129,8 +129,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
for(unsigned int j = 0 ; j < 3 ; ++j) for(unsigned int j = 0 ; j < 3 ; ++j)
{ {
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[2-j]]); FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[2-j]]);
map.foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb); map.template foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb);
//store darts per vertices to optimize reconstruction //store darts per vertices to optimize reconstruction
Dart dd = d; Dart dd = d;
...@@ -148,8 +147,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector< ...@@ -148,8 +147,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
d = map.phi_1(map.phi2(d)); d = map.phi_1(map.phi2(d));
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[3]]); FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, verticesID[pt[3]]);
map.foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb); map.template foreach_dart_of_orbit<VERTEX + PFP::MAP::IN_PARENT>(d, fsetemb);
//store darts per vertices to optimize reconstruction //store darts per vertices to optimize reconstruction
Dart dd = d; Dart dd = d;
...@@ -174,9 +172,9 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector< ...@@ -174,9 +172,9 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
Dart good_dart = NIL; Dart good_dart = NIL;
for(typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it) for(typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it)
{ {
if(map.getEmbedding<VERTEX>(map.phi1(*it)) == map.getEmbedding<VERTEX>(d) && if(map.template getEmbedding<VERTEX>(map.phi1(*it)) == map.template getEmbedding<VERTEX>(d) &&
map.getEmbedding<VERTEX>(map.phi_1(*it)) == map.getEmbedding<VERTEX>(map.phi_1(d)) /*&& map.template getEmbedding<VERTEX>(map.phi_1(*it)) == map.template getEmbedding<VERTEX>(map.phi_1(d)) /*&&
map.getEmbedding<VERTEX>(*it) == map.getEmbedding<VERTEX>(map.phi1(d)) */) map.template getEmbedding<VERTEX>(*it) == map.template getEmbedding<VERTEX>(map.phi1(d)) */)
{ {
good_dart = *it ; good_dart = *it ;
} }
...@@ -185,7 +183,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector< ...@@ -185,7 +183,7 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
if (good_dart != NIL) if (good_dart != NIL)
{ {
map.sewVolumes(d, good_dart, false); map.sewVolumes(d, good_dart, false);
m.unmarkOrbit<FACE>(d); m.template unmarkOrbit<FACE>(d);
} }
else else
{ {
......
...@@ -51,10 +51,10 @@ template <typename PFP> ...@@ -51,10 +51,10 @@ template <typename PFP>
class Primitive3D class Primitive3D
{ {
typedef typename PFP::MAP MAP; typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 EMB; typedef typename PFP::VEC3 VEC3;
public: public:
enum {NONE,HEXAGRID}; enum {NONE, HEXAGRID};
protected: protected:
/** /**
...@@ -62,8 +62,8 @@ protected: ...@@ -62,8 +62,8 @@ protected:
*/ */
MAP& m_map; MAP& m_map;
AttributeHandler<VEC3, VERTEX>& m_positions;
typename PFP::TVEC3& m_positions;
/** /**
* Reference dart of primitive * Reference dart of primitive
*/ */
...@@ -110,21 +110,22 @@ public: ...@@ -110,21 +110,22 @@ public:
* Constructor * Constructor
* @param map the map in which we want to work * @param map the map in which we want to work
*/ */
Primitive3D(MAP& map, typename PFP::TVEC3& position): Primitive3D(MAP& map, AttributeHandler<VEC3, VERTEX>& position):
m_map(map), m_map(map),
m_positions(position), m_positions(position),
m_kind(NONE), m_kind(NONE),
m_nx(-1), m_ny(-1), m_nz(-1) {} m_nx(-1), m_ny(-1), m_nz(-1)
{}
/** /**
* get the table of darts (one per vertex) * get the table of darts (one per vertex)
*/ */
const std::vector<Dart>& getVertexDarts() { return m_tableVertDarts;} const std::vector<Dart>& getVertexDarts() { return m_tableVertDarts; }
/* /*
* get the reference dart * get the reference dart
*/ */
Dart getDart() { return m_dart;} Dart getDart() { return m_dart; }
/** /**
* transform the primitive with transformation matrice * transform the primitive with transformation matrice
...@@ -182,6 +183,6 @@ public: ...@@ -182,6 +183,6 @@ public:
} // namespace CGoGN } // namespace CGoGN
#include "primitives3d.hpp" #include "Algo/Modelisation/primitives3d.hpp"
#endif #endif
...@@ -206,7 +206,7 @@ void Primitive3D<PFP>::embedHexaGrid(float x, float y, float z) ...@@ -206,7 +206,7 @@ void Primitive3D<PFP>::embedHexaGrid(float x, float y, float z)
typename PFP::VEC3 pos(-x/2.0f + dx*float(k), -y/2.0f + dy*float(j), -z/2.0f + dz*float(i)); typename PFP::VEC3 pos(-x/2.0f + dx*float(k), -y/2.0f + dy*float(j), -z/2.0f + dz*float(i));
Dart d = m_tableVertDarts[ i*nbs+j*(m_nx+1)+k ]; Dart d = m_tableVertDarts[ i*nbs+j*(m_nx+1)+k ];
m_map.embedNewCell<VERTEX>(d); m_map.template embedNewCell<VERTEX>(d);
m_positions[d] = pos; m_positions[d] = pos;
} }
} }
......
...@@ -382,14 +382,14 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec ...@@ -382,14 +382,14 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
Dart dit2 = vd2[i]; Dart dit2 = vd2[i];
// embed the vertex embedded from the origin volume to the new darts // embed the vertex embedded from the origin volume to the new darts
if(map.isOrbitEmbedded(VERTEX)) if(map.isOrbitEmbedded<VERTEX>())
{ {
map.copyDartEmbedding<VERTEX>(map.phi2(dit), map.phi1(dit)); map.copyDartEmbedding<VERTEX>(map.phi2(dit), map.phi1(dit));
map.copyDartEmbedding<VERTEX>(map.phi2(dit2), map.phi1(dit2)); map.copyDartEmbedding<VERTEX>(map.phi2(dit2), map.phi1(dit2));
} }
// embed the edge embedded from the origin volume to the new darts // embed the edge embedded from the origin volume to the new darts
if(map.isOrbitEmbedded(EDGE)) if(map.isOrbitEmbedded<EDGE>())
{ {
unsigned int eEmb = map.getEmbedding<EDGE>(dit) ; unsigned int eEmb = map.getEmbedding<EDGE>(dit) ;
map.setDartEmbedding<EDGE>(map.phi2(dit), eEmb); map.setDartEmbedding<EDGE>(map.phi2(dit), eEmb);
...@@ -397,7 +397,7 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec ...@@ -397,7 +397,7 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
} }
// embed the volume embedded from the origin volume to the new darts // embed the volume embedded from the origin volume to the new darts
if(map.isOrbitEmbedded(VOLUME)) if(map.isOrbitEmbedded<VOLUME>())
{ {
map.copyDartEmbedding<VOLUME>(map.phi2(dit), dit); map.copyDartEmbedding<VOLUME>(map.phi2(dit), dit);
map.copyDartEmbedding<VOLUME>(map.phi2(dit2), dit2); map.copyDartEmbedding<VOLUME>(map.phi2(dit2), dit2);
...@@ -412,7 +412,7 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec ...@@ -412,7 +412,7 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
Dart next = map.phi1(map.phi1(dd)) ; Dart next = map.phi1(map.phi1(dd)) ;
map.PFP::MAP::ParentMap::splitFace(dd, next); map.PFP::MAP::ParentMap::splitFace(dd, next);
if (map.isOrbitEmbedded(VERTEX)) if (map.isOrbitEmbedded<VERTEX>())
{ {
map.copyDartEmbedding<VERTEX>(map.phi_1(next), dd) ; map.copyDartEmbedding<VERTEX>(map.phi_1(next), dd) ;
map.copyDartEmbedding<VERTEX>(map.phi_1(dd), next) ; map.copyDartEmbedding<VERTEX>(map.phi_1(dd), next) ;
...@@ -428,7 +428,7 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec ...@@ -428,7 +428,7 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
// Dart tmp = map.phi1(ne) ; // Dart tmp = map.phi1(ne) ;
// map.PFP::MAP::ParentMap::splitFace(tmp, dd); // map.PFP::MAP::ParentMap::splitFace(tmp, dd);
// //
// if (map.isOrbitEmbedded(VERTEX)) // if (map.isOrbitEmbedded<VERTEX>())
// { // {
// map.copyDartEmbedding<VERTEX>(map.phi_1(dd), tmp) ; // map.copyDartEmbedding<VERTEX>(map.phi_1(dd), tmp) ;
// map.copyDartEmbedding<VERTEX>(map.phi_1(tmp), dd) ; // map.copyDartEmbedding<VERTEX>(map.phi_1(tmp), dd) ;
......
...@@ -110,7 +110,7 @@ void unlinkFromEdge(typename PFP::MAP& map, Dart d) ...@@ -110,7 +110,7 @@ void unlinkFromEdge(typename PFP::MAP& map, Dart d)
{ {
Dart d3 = map.phi3(d); Dart d3 = map.phi3(d);
// if(map.isOrbitEmbedded(VERTEX)) // if(map.isOrbitEmbedded<VERTEX>())
// { // {
// //Si la face n'est pas libre en phi2 // //Si la face n'est pas libre en phi2
// if(map.phi2(d) != d && map.phi2(d3) != d3) // if(map.phi2(d) != d && map.phi2(d3) != d3)
......
...@@ -77,15 +77,13 @@ protected: ...@@ -77,15 +77,13 @@ protected:
Geom::Vec3f m_globalColor; Geom::Vec3f m_globalColor;
public: public:
/** /**
* Constructor * Constructor
* @param withColorPerFace affect a color per face * @param withColorPerFace affect a color per face
* @param withExplodeFace shrinj each face * @param withExplodeFace shrinj each face
*/ */
ExplodeVolumeRender(bool withColorPerFace=false, bool withExplodeFace=false) ; ExplodeVolumeRender(bool withColorPerFace = false, bool withExplodeFace = false) ;
/** /**
* Destructor * Destructor
...@@ -109,17 +107,17 @@ public: ...@@ -109,17 +107,17 @@ public:
* @param good selector * @param good selector
*/ */
template<typename PFP> template<typename PFP>
void updateData(typename PFP::MAP& map, typename PFP::TVEC3& positions, const FunctorSelect& good = allDarts) ; void updateData(typename PFP::MAP& map, const AttributeHandler<typename PFP::VEC3, VERTEX>& positions, const FunctorSelect& good = allDarts) ;
/** /**
* update all drawing buffers * update all drawing buffers
* @param map the map * @param map the map
* @param positions attribute of position vertices * @param positions attribute of position vertices
* @param colorPerFace attribute of color (per face) * @param colorPerFace attribute of color (per face)
* @param good selector * @param good selector
*/ */
template<typename PFP> template<typename PFP>
void updateData(typename PFP::MAP& map, typename PFP::TVEC3& positions, typename PFP::TVEC3& colorPerFace, const FunctorSelect& good = allDarts) ; void updateData(typename PFP::MAP& map, const AttributeHandler<typename PFP::VEC3, VERTEX>& positions, const AttributeHandler<typename PFP::VEC3, VOLUME>& colorPerFace, const FunctorSelect& good = allDarts) ;
/** /**
* draw edges * draw edges
......
...@@ -76,7 +76,7 @@ inline ExplodeVolumeRender::~ExplodeVolumeRender() ...@@ -76,7 +76,7 @@ inline ExplodeVolumeRender::~ExplodeVolumeRender()
} }