Commit a505d87d authored by Sylvain Thery's avatar Sylvain Thery

remove use of generic map in MC

parent 6fc41d35
......@@ -65,10 +65,10 @@ QT4_WRAP_CPP( volumeExplorer_moc ../volumeExplorer.h )
add_executable( volumeExplorerD ../volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc})
target_link_libraries( volumeExplorerD ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
#QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui )
#QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h )
#add_executable( mcmeshD ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} )
#target_link_libraries( mcmeshD ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui )
QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h )
add_executable( mcmeshD ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} )
target_link_libraries( mcmeshD ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( concave_rendering_moc ../concave_rendering.h )
add_executable( concave_renderingD ../concave_rendering.cpp ${concave_rendering_moc} ${concave_rendering_ui} )
......
......@@ -62,10 +62,10 @@ QT4_WRAP_CPP( volumeExplorer_moc ../volumeExplorer.h )
add_executable( volumeExplorer ../volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc} )
target_link_libraries( volumeExplorer ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
#QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui )
#QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h )
#add_executable( mcmesh ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} )
#target_link_libraries( mcmesh ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui )
QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h )
add_executable( mcmesh ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} )
target_link_libraries( mcmesh ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( concave_rendering_moc ../concave_rendering.h )
add_executable( concave_rendering ../concave_rendering.cpp ${concave_rendering_moc} ${concave_rendering_ui} )
......
......@@ -119,7 +119,7 @@ Dart MarchingCube<DataType, Windowing, PFP>::createTriEmb(unsigned int e1, unsi
{
L_DART d = m_map->newFace(3,false);
FunctorSetEmb<GenericMap, VERTEX> fsetemb(*m_map, e1);
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(*m_map, e1);
m_map->template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
d = m_map->phi1(d);
fsetemb.changeEmb(e2);
......@@ -167,7 +167,6 @@ void MarchingCube<DataType, Windowing, PFP>::simpleMeshing()
int lTy = m_Image->getWidthY();
int lTz = m_Image->getWidthZ();
/* gmtl::Vec3i orig = m_Image->getOrigin();*/
int lTxm = lTx - 1 ;
int lTym = lTy - 1;
......
......@@ -200,13 +200,7 @@ protected:
void setNeighbour(L_DART d1, L_DART d2);
L_DART createTriEmb(unsigned int e1, unsigned int e2, unsigned int e3) {
L_DART d = m_map->newFace(3);
m_map->setSingleVertexEmb(d,e1); d = m_map->phi1(d);
m_map->setSingleVertexEmb(d,e2); d = m_map->phi1(d);
m_map->setSingleVertexEmb(d,e3); d = m_map->phi1(d);
return d;
}
L_DART createTriEmb(unsigned int e1, unsigned int e2, unsigned int e3);
public:
/**
......
......@@ -103,6 +103,25 @@ void MarchingCubeGen<DataType, ImgT, Windowing, PFP>::deleteMesh()
}
}
template< typename DataType, typename ImgT, template < typename D2 > class Windowing, typename PFP >
Dart MarchingCube<DataType, ImgT, Windowing, PFP>::createTriEmb(unsigned int e1, unsigned int e2, unsigned int e3)
{
L_DART d = m_map->newFace(3,false);
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(*m_map, e1);
m_map->template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
d = m_map->phi1(d);
fsetemb.changeEmb(e2);
m_map->template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
d = m_map->phi1(d);
fsetemb.changeEmb(e3);
m_map->template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
d = m_map->phi1(d);
return d;
}
template< typename DataType, typename ImgT, template < typename D2 > class Windowing, class PFP >
void MarchingCubeGen<DataType, ImgT, Windowing, PFP>::simpleMeshing()
{
......
......@@ -67,6 +67,24 @@ typedef FalsePtr<GLenum*> CGoGNGLenumTable;
#endif
#ifdef MAC_OSX
inline void glCheckErrors()
{
GLenum glError = glGetError();
if (glError != GL_NO_ERROR)
CGoGNerr<<"GL error: " << glError << CGoGNendl;
}
inline void glCheckErrors(const std::string& message)
{
GLenum glError = glGetError();
if (glError != GL_NO_ERROR)
CGoGNerr<< message <<" : " << glError << CGoGNendl;
}
#else
inline void glCheckErrors()
{
GLenum glError = glGetError();
......@@ -80,6 +98,8 @@ inline void glCheckErrors(const std::string& message)
if (glError != GL_NO_ERROR)
CGoGNerr<< message <<" : " << gluErrorString(glError) << CGoGNendl;
}
#endif
}
......
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