mirror of https://github.com/CGAL/cgal
Specialization of draw() function for P2T2, can be called together with another viewer now.
This commit is contained in:
parent
8c2f10fec6
commit
1565773fda
|
|
@ -250,16 +250,20 @@ protected:
|
||||||
bool m_domain;
|
bool m_domain;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class P2T2, class ColorFunctor>
|
// Specialization of draw function
|
||||||
void draw(const P2T2& ap2t2,
|
#define CGAL_P2T2_TYPE CGAL::Periodic_2_triangulation_2 \
|
||||||
const char* title,
|
<Gt, Tds >
|
||||||
bool nofill,
|
|
||||||
const ColorFunctor& fcolor)
|
template < class Gt,
|
||||||
|
class Tds >
|
||||||
|
void draw(const CGAL_P2T2_TYPE& ap2t2,
|
||||||
|
const char* title = "2D Periodic Triangulation Viewer",
|
||||||
|
bool nofill = false)
|
||||||
{
|
{
|
||||||
#if defined(CGAL_TEST_SUITE)
|
#if defined(CGAL_TEST_SUITE)
|
||||||
bool cgal_test_suite=true;
|
bool cgal_test_suite=true;
|
||||||
#else
|
#else
|
||||||
bool cgal_test_suite=false;
|
bool cgal_test_suite=qEnvironmentVariableIsSet("CGAL_TEST_SUITE");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!cgal_test_suite)
|
if (!cgal_test_suite)
|
||||||
|
|
@ -267,31 +271,15 @@ void draw(const P2T2& ap2t2,
|
||||||
int argc=1;
|
int argc=1;
|
||||||
const char* argv[2]={"p2t2_viewer","\0"};
|
const char* argv[2]={"p2t2_viewer","\0"};
|
||||||
QApplication app(argc,const_cast<char**>(argv));
|
QApplication app(argc,const_cast<char**>(argv));
|
||||||
SimplePeriodic2Triangulation2ViewerQt<P2T2, ColorFunctor> mainwindow(app.activeWindow(),
|
DefaultColorFunctorP2T2 fcolor;
|
||||||
ap2t2,
|
SimplePeriodic2Triangulation2ViewerQt<CGAL_P2T2_TYPE,
|
||||||
title,
|
DefaultColorFunctorP2T2>
|
||||||
nofill,
|
mainwindow(app.activeWindow(), ap2t2, title, nofill, fcolor);
|
||||||
fcolor);
|
|
||||||
mainwindow.show();
|
mainwindow.show();
|
||||||
app.exec();
|
app.exec();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class P2T2>
|
|
||||||
void draw(const P2T2& ap2t2, const char* title, bool nofill)
|
|
||||||
{
|
|
||||||
DefaultColorFunctorP2T2 c;
|
|
||||||
draw(ap2t2, title, nofill, c);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class P2T2>
|
|
||||||
void draw(const P2T2& ap2t2, const char* title)
|
|
||||||
{ draw(ap2t2, title, false); }
|
|
||||||
|
|
||||||
template<class P2T2>
|
|
||||||
void draw(const P2T2& ap2t2)
|
|
||||||
{ draw(ap2t2, "Basic 2D Periodic Triangulation Viewer"); }
|
|
||||||
|
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif // CGAL_USE_BASIC_VIEWER
|
#endif // CGAL_USE_BASIC_VIEWER
|
||||||
|
|
|
||||||
|
|
@ -337,32 +337,6 @@ void draw(const CGAL_VORONOI_TYPE &av2,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//template <class V2>
|
|
||||||
//void draw(const V2 &av2, const char *title, bool nofill,
|
|
||||||
// bool draw_voronoi_vertices, bool draw_dual_vertices) {
|
|
||||||
// DefaultColorFunctorV2 c;
|
|
||||||
// draw(av2, title, nofill, draw_voronoi_vertices, draw_dual_vertices, c);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//template <class V2>
|
|
||||||
//void draw(const V2 &av2, const char *title, bool nofill,
|
|
||||||
// bool draw_voronoi_vertices) {
|
|
||||||
// DefaultColorFunctorV2 c;
|
|
||||||
// draw(av2, title, nofill, draw_voronoi_vertices, true);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//template <class V2> void draw(const V2 &av2, const char *title, bool nofill) {
|
|
||||||
// draw(av2, title, nofill, true);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//template <class V2> void draw(const V2 &av2, const char *title) {
|
|
||||||
// draw(av2, title, false);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//template <class V2> void draw(const V2 &av2) {
|
|
||||||
// draw(av2, "Basic Voronoi Diagram Viewer");
|
|
||||||
//}
|
|
||||||
|
|
||||||
} // End namespace CGAL
|
} // End namespace CGAL
|
||||||
|
|
||||||
#endif // CGAL_USE_BASIC_VIEWER
|
#endif // CGAL_USE_BASIC_VIEWER
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue