mirror of https://github.com/CGAL/cgal
add_in_graphics_scene -> add_to_graphics_scene; plus remove template parameter NumberType
This commit is contained in:
parent
1c6b1e4a12
commit
761fde02be
|
|
@ -119,7 +119,7 @@ void compute_elements(const FG &fg,
|
|||
} // draw_function_for_FG
|
||||
|
||||
template <class FG, class GSOptions>
|
||||
void add_in_graphics_scene_for_fg(const FG &fg,
|
||||
void add_to_graphics_scene_for_fg(const FG &fg,
|
||||
CGAL::Graphics_scene &graphics_scene,
|
||||
const GSOptions &gs_options)
|
||||
{
|
||||
|
|
@ -127,7 +127,7 @@ void add_in_graphics_scene_for_fg(const FG &fg,
|
|||
}
|
||||
|
||||
template <class FG>
|
||||
void add_in_graphics_scene_for_fg(const FG &fg,
|
||||
void add_to_graphics_scene_for_fg(const FG &fg,
|
||||
CGAL::Graphics_scene &graphics_scene)
|
||||
{
|
||||
Graphics_scene_options<FG,
|
||||
|
|
@ -150,7 +150,7 @@ void add_in_graphics_scene_for_fg(const FG &fg,
|
|||
return get_random_color(CGAL::get_default_random());
|
||||
};
|
||||
|
||||
add_in_graphics_scene_for_fg(fg, graphics_scene, gs_options);
|
||||
add_to_graphics_scene_for_fg(fg, graphics_scene, gs_options);
|
||||
}
|
||||
|
||||
} // End namespace CGAL
|
||||
|
|
|
|||
|
|
@ -45,15 +45,15 @@ void draw(const PS& aps);
|
|||
namespace CGAL {
|
||||
|
||||
namespace draw_function_for_boolean_set_2 {
|
||||
|
||||
template <typename BufferType=float, typename PS2, class GSOptions>
|
||||
|
||||
template <typename PS2, class GSOptions>
|
||||
void compute_loop(const typename PS2::Polygon_2& p, bool hole,
|
||||
CGAL::Graphics_scene& gs,
|
||||
const GSOptions& gso)
|
||||
{
|
||||
if (hole)
|
||||
{ gs.add_point_in_face(p.vertex(p.size()-1)); }
|
||||
|
||||
|
||||
auto prev = p.vertices_begin();
|
||||
auto it = prev;
|
||||
gs.add_point(*it);
|
||||
|
|
@ -65,22 +65,22 @@ void compute_loop(const typename PS2::Polygon_2& p, bool hole,
|
|||
gs.add_point_in_face(*it); // add point in face
|
||||
prev = it;
|
||||
}
|
||||
|
||||
|
||||
// Add the last segment between the last point and the first one
|
||||
gs.add_segment(*prev, *(p.vertices_begin()));
|
||||
}
|
||||
|
||||
/// Compute the elements of a polygon with holes.
|
||||
template <typename BufferType=float, typename PWH, class GSOptions>
|
||||
template <typename PWH, class GSOptions>
|
||||
void compute_elements(const PWH& pwh,
|
||||
CGAL::Graphics_scene& gs,
|
||||
const GSOptions& gso)
|
||||
{
|
||||
if (!gso.draw_unbounded() && pwh.outer_boundary().is_empty()) return;
|
||||
|
||||
|
||||
CGAL::IO::Color c(75,160,255);
|
||||
gs.face_begin(c);
|
||||
|
||||
|
||||
const typename PWH::Point_2* point_in_face;
|
||||
if (pwh.outer_boundary().is_empty())
|
||||
{
|
||||
|
|
@ -104,12 +104,12 @@ void compute_elements(const PWH& pwh,
|
|||
compute_loop(*it, true, gs);
|
||||
gs.add_point_in_face(*point_in_face);
|
||||
}
|
||||
|
||||
|
||||
gs.face_end();
|
||||
}
|
||||
|
||||
|
||||
} // End namespace draw_function_for_boolean_set_2
|
||||
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
||||
template <typename PolygonSet_2, class GSOptions>
|
||||
|
|
@ -218,7 +218,7 @@ void draw(const CGAL::Polygon_set_2<T, C, D>& ps,
|
|||
bool cgal_test_suite = qEnvironmentVariableIsSet("CGAL_TEST_SUITE");
|
||||
#endif
|
||||
|
||||
if (! cgal_test_suite)
|
||||
if (! cgal_test_suite)
|
||||
{
|
||||
using Ps = CGAL::Polygon_set_2<T, C, D>;
|
||||
using Viewer = Polygon_set_2_basic_viewer_qt<Ps>;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5
|
|||
Add in the given graphics scene the elements of alcc.
|
||||
|
||||
\tparam LCC a model of the `LinearCellComplex` concept.
|
||||
\tparam BufferType the number type used for point coordinates: `float` by default.
|
||||
\tparam GSOptions a class having the same methods than `Graphics_scene_options`: `Graphics_scene_options` by default.
|
||||
|
||||
\param alcc the linear cell complex to draw.
|
||||
|
|
@ -29,8 +28,8 @@ Add in the given graphics scene the elements of alcc.
|
|||
\param gs_options graphics scene options.
|
||||
|
||||
*/
|
||||
template<class LCC, class BufferType, class GSOptions>
|
||||
void add_in_graphics_scene(const LCC& alcc, CGAL::Graphics_scene& graphics_scene,
|
||||
template<class LCC, class GSOptions>
|
||||
void add_to_graphics_scene(const LCC& alcc, CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options=GSOptions());
|
||||
|
||||
} /* namespace CGAL */
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ struct LCC_geom_utils<LCC, Local_kernel, 2>
|
|||
}
|
||||
};
|
||||
|
||||
template <typename BufferType=float, class LCC, class GSOptionsLCC>
|
||||
template <class LCC, class GSOptionsLCC>
|
||||
void compute_face(const LCC& lcc,
|
||||
typename LCC::Dart_const_handle dh,
|
||||
typename LCC::Dart_const_handle voldh,
|
||||
|
|
@ -102,7 +102,7 @@ void compute_face(const LCC& lcc,
|
|||
graphics_scene.face_end();
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class LCC, class GSOptions>
|
||||
template <class LCC, class GSOptions>
|
||||
void compute_edge(const LCC& lcc,
|
||||
typename LCC::Dart_const_handle dh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -126,7 +126,7 @@ void compute_edge(const LCC& lcc,
|
|||
}
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class LCC, class GSOptionsLCC>
|
||||
template <class LCC, class GSOptionsLCC>
|
||||
void compute_vertex(const LCC& lcc,
|
||||
typename LCC::Dart_const_handle dh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -145,7 +145,7 @@ void compute_vertex(const LCC& lcc,
|
|||
{ graphics_scene.add_point(lcc.point(dh)); }
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class LCC, class GSOptions>
|
||||
template <class LCC, class GSOptions>
|
||||
void compute_elements(const LCC& lcc,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
|
|
@ -232,14 +232,14 @@ void compute_elements(const LCC& lcc,
|
|||
CGAL::Linear_cell_complex_base<d_, ambient_dim, Traits_, Items_, Alloc_, \
|
||||
Map, Refs, Storage_>
|
||||
|
||||
// add_in_graphics_scene: to add a LCC in the given graphic buffer, with a
|
||||
// add_to_graphics_scene: to add a LCC in the given graphic buffer, with a
|
||||
// graphics scene options.
|
||||
template<unsigned int d_, unsigned int ambient_dim, class Traits_,
|
||||
class Items_, class Alloc_,
|
||||
template <unsigned int, class, class, class, class> class Map,
|
||||
class Refs, class Storage_,
|
||||
typename BufferType=float, class GSOptions>
|
||||
void add_in_graphics_scene(const CGAL_LCC_TYPE& alcc,
|
||||
class GSOptions>
|
||||
void add_to_graphics_scene(const CGAL_LCC_TYPE& alcc,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
{
|
||||
|
|
@ -247,13 +247,13 @@ void add_in_graphics_scene(const CGAL_LCC_TYPE& alcc,
|
|||
graphics_scene, gs_options);
|
||||
}
|
||||
|
||||
// add_in_graphics_scene: to add a LCC in the given graphic buffer, without a
|
||||
// add_to_graphics_scene: to add a LCC in the given graphic buffer, without a
|
||||
// graphics scene options. Use default drawing values.
|
||||
template<unsigned int d_, unsigned int ambient_dim, class Traits_,
|
||||
class Items_, class Alloc_,
|
||||
template <unsigned int, class, class, class, class> class Map,
|
||||
class Refs, class Storage_, typename BufferType=float>
|
||||
void add_in_graphics_scene(const CGAL_LCC_TYPE& alcc,
|
||||
class Refs, class Storage_>
|
||||
void add_to_graphics_scene(const CGAL_LCC_TYPE& alcc,
|
||||
CGAL::Graphics_scene& graphics_scene)
|
||||
{
|
||||
CGAL::Graphics_scene_options<CGAL_LCC_TYPE,
|
||||
|
|
@ -274,7 +274,7 @@ void add_in_graphics_scene(const CGAL_LCC_TYPE& alcc,
|
|||
return get_random_color(random);
|
||||
};
|
||||
|
||||
add_in_graphics_scene(alcc, graphics_scene, gs_options);
|
||||
add_to_graphics_scene(alcc, graphics_scene, gs_options);
|
||||
}
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
|
@ -289,7 +289,7 @@ void draw(const CGAL_LCC_TYPE& alcc, const GSOptions& gs_options,
|
|||
const char *title="LCC Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(alcc, buffer, gs_options);
|
||||
add_to_graphics_scene(alcc, buffer, gs_options);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
@ -301,7 +301,7 @@ template<unsigned int d_, unsigned int ambient_dim, class Traits_,
|
|||
void draw(const CGAL_LCC_TYPE& alcc, const char *title="LCC Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(alcc, buffer);
|
||||
add_to_graphics_scene(alcc, buffer);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ Local_vector get_vertex_normal(typename Nef_Polyhedron::Vertex_const_handle vh)
|
|||
}
|
||||
|
||||
// Visitor class to iterate through shell objects
|
||||
template <typename Nef_Polyhedron, typename GSOptions, typename BufferType = float>
|
||||
template <typename Nef_Polyhedron, typename GSOptions>
|
||||
class Nef_Visitor {
|
||||
|
||||
typedef typename Nef_Polyhedron::Halfedge_const_handle Halfedge_const_handle;
|
||||
|
|
@ -212,7 +212,7 @@ protected:
|
|||
const Nef_Polyhedron& nef;
|
||||
};
|
||||
|
||||
template <typename BufferType=float, class Nef_Polyhedron, class GSOptions>
|
||||
template <class Nef_Polyhedron, class GSOptions>
|
||||
void compute_elements(const Nef_Polyhedron &nef,
|
||||
CGAL::Graphics_scene &graphics_scene,
|
||||
const GSOptions &gs_options)
|
||||
|
|
@ -223,7 +223,7 @@ void compute_elements(const Nef_Polyhedron &nef,
|
|||
typedef typename Nef_Polyhedron::SFace_const_handle SFace_const_handle;
|
||||
|
||||
Volume_const_iterator c;
|
||||
Nef_Visitor<Nef_Polyhedron, GSOptions, BufferType>
|
||||
Nef_Visitor<Nef_Polyhedron, GSOptions>
|
||||
V(nef, graphics_scene, gs_options);
|
||||
CGAL_forall_volumes(c, nef)
|
||||
{
|
||||
|
|
@ -239,10 +239,10 @@ void compute_elements(const Nef_Polyhedron &nef,
|
|||
|
||||
#define CGAL_NEF3_TYPE Nef_polyhedron_3<Kernel_, Items_, Mark_>
|
||||
|
||||
// add_in_graphics_scene
|
||||
// add_to_graphics_scene
|
||||
template <typename Kernel_, typename Items_, typename Mark_,
|
||||
typename BufferType=float, class GSOptions>
|
||||
void add_in_graphics_scene(const CGAL_NEF3_TYPE &anef,
|
||||
class GSOptions>
|
||||
void add_to_graphics_scene(const CGAL_NEF3_TYPE &anef,
|
||||
CGAL::Graphics_scene &graphics_scene,
|
||||
const GSOptions &gs_options)
|
||||
{
|
||||
|
|
@ -251,9 +251,8 @@ void add_in_graphics_scene(const CGAL_NEF3_TYPE &anef,
|
|||
gs_options);
|
||||
}
|
||||
|
||||
template <typename Kernel_, typename Items_, typename Mark_,
|
||||
typename BufferType=float>
|
||||
void add_in_graphics_scene(const CGAL_NEF3_TYPE &anef,
|
||||
template <typename Kernel_, typename Items_, typename Mark_>
|
||||
void add_to_graphics_scene(const CGAL_NEF3_TYPE &anef,
|
||||
CGAL::Graphics_scene &graphics_scene)
|
||||
{
|
||||
// Default graphics view options.
|
||||
|
|
@ -277,30 +276,29 @@ void add_in_graphics_scene(const CGAL_NEF3_TYPE &anef,
|
|||
return get_random_color(random);
|
||||
};
|
||||
|
||||
add_in_graphics_scene(anef, graphics_scene, gs_options);
|
||||
add_to_graphics_scene(anef, graphics_scene, gs_options);
|
||||
}
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
||||
// Specialization of draw function
|
||||
template <typename Kernel_, typename Items_, typename Mark_,
|
||||
typename BufferType=float, class GSOptions>
|
||||
class GSOptions>
|
||||
void draw(const CGAL_NEF3_TYPE &anef,
|
||||
const GSOptions &gs_options,
|
||||
const char *title="Nef Polyhedron Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(anef, buffer, gs_options);
|
||||
add_to_graphics_scene(anef, buffer, gs_options);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
template <typename Kernel_, typename Items_, typename Mark_,
|
||||
typename BufferType=float>
|
||||
template <typename Kernel_, typename Items_, typename Mark_>
|
||||
void draw(const CGAL_NEF3_TYPE &anef,
|
||||
const char *title="Nef Polyhedron Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(anef, buffer);
|
||||
add_to_graphics_scene(anef, buffer);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ protected:
|
|||
namespace draw_function_for_P2T2
|
||||
{
|
||||
|
||||
template <typename BufferType=float, class P2T2, class GSOptions>
|
||||
template <class P2T2, class GSOptions>
|
||||
void compute_vertex(const P2T2 &p2t2,
|
||||
typename P2T2::Periodic_point_iterator pi,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -83,7 +83,7 @@ void compute_vertex(const P2T2 &p2t2,
|
|||
{ graphics_scene.add_point(p2t2.point(*pi)); }
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class P2T2, class GSOptions>
|
||||
template <class P2T2, class GSOptions>
|
||||
void compute_edge(const P2T2 &p2t2,
|
||||
typename P2T2::Periodic_segment_iterator si,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -101,7 +101,7 @@ void compute_edge(const P2T2 &p2t2,
|
|||
{ graphics_scene.add_segment(s[0], s[1]); }
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class P2T2, class GSOptions>
|
||||
template <class P2T2, class GSOptions>
|
||||
void compute_face(const P2T2 &p2t2,
|
||||
typename P2T2::Periodic_triangle_iterator ti,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -124,7 +124,7 @@ void compute_face(const P2T2 &p2t2,
|
|||
graphics_scene.face_end();
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class P2T2, class GSOptions>
|
||||
template <class P2T2, class GSOptions>
|
||||
void compute_domain(const P2T2& p2t2,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
|
|
@ -153,7 +153,7 @@ void compute_domain(const P2T2& p2t2,
|
|||
}
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class P2T2, class GSOptions>
|
||||
template <class P2T2, class GSOptions>
|
||||
void compute_elements(const P2T2& p2t2,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
|
|
@ -196,16 +196,16 @@ void compute_elements(const P2T2& p2t2,
|
|||
|
||||
#define CGAL_P2T2_TYPE CGAL::Periodic_2_triangulation_2<Gt, Tds >
|
||||
|
||||
template <typename BufferType=float, class Gt, class Tds, class GSOptions>
|
||||
void add_in_graphics_scene(const CGAL_P2T2_TYPE& p2t2,
|
||||
template <class Gt, class Tds, class GSOptions>
|
||||
void add_to_graphics_scene(const CGAL_P2T2_TYPE& p2t2,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
{
|
||||
draw_function_for_P2T2::compute_elements(p2t2, graphics_scene, gs_options);
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class Gt, class Tds>
|
||||
void add_in_graphics_scene(const CGAL_P2T2_TYPE& p2t2,
|
||||
template <class Gt, class Tds>
|
||||
void add_to_graphics_scene(const CGAL_P2T2_TYPE& p2t2,
|
||||
CGAL::Graphics_scene& graphics_scene)
|
||||
{
|
||||
CGAL::Graphics_scene_options_periodic_2_triangulation_2
|
||||
|
|
@ -214,23 +214,23 @@ void add_in_graphics_scene(const CGAL_P2T2_TYPE& p2t2,
|
|||
typename CGAL_P2T2_TYPE::Periodic_segment_iterator,
|
||||
typename CGAL_P2T2_TYPE::Periodic_triangle_iterator> gs_options;
|
||||
|
||||
add_in_graphics_scene(p2t2, graphics_scene, gs_options);
|
||||
add_to_graphics_scene(p2t2, graphics_scene, gs_options);
|
||||
}
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
||||
// Specialization of draw function
|
||||
template<class Gt, class Tds, class BufferType=float, class GSOptions>
|
||||
template<class Gt, class Tds, class GSOptions>
|
||||
void draw(const CGAL_P2T2_TYPE& ap2t2,
|
||||
const GSOptions& gs_options,
|
||||
const char* title="2D Periodic Triangulation Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(ap2t2, buffer, gs_options);
|
||||
add_to_graphics_scene(ap2t2, buffer, gs_options);
|
||||
draw_graphics_scene(buffer);
|
||||
}
|
||||
|
||||
template<class Gt, class Tds, class BufferType=float>
|
||||
template<class Gt, class Tds>
|
||||
void draw(const CGAL_P2T2_TYPE& ap2t2,
|
||||
const char* title="2D Periodic Triangulation Viewer")
|
||||
{
|
||||
|
|
@ -241,7 +241,7 @@ void draw(const CGAL_P2T2_TYPE& ap2t2,
|
|||
typename CGAL_P2T2_TYPE::Periodic_segment_iterator,
|
||||
typename CGAL_P2T2_TYPE::Periodic_triangle_iterator> gs_options;
|
||||
|
||||
add_in_graphics_scene(ap2t2, buffer, gs_options);
|
||||
add_to_graphics_scene(ap2t2, buffer, gs_options);
|
||||
QApplication_and_basic_viewer app(buffer, title);
|
||||
if(app)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ void compute_elements(const PointSet& pointset,
|
|||
} // namespace draw_function_for_PointSet
|
||||
|
||||
template <class P, class V, class GSOptions>
|
||||
void add_in_graphics_scene(const Point_set_3<P, V>& apointset,
|
||||
void add_to_graphics_scene(const Point_set_3<P, V>& apointset,
|
||||
Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
{
|
||||
|
|
@ -79,13 +79,13 @@ void add_in_graphics_scene(const Point_set_3<P, V>& apointset,
|
|||
}
|
||||
|
||||
template <class P, class V>
|
||||
void add_in_graphics_scene(const Point_set_3<P, V>& apointset,
|
||||
void add_to_graphics_scene(const Point_set_3<P, V>& apointset,
|
||||
Graphics_scene& graphics_scene)
|
||||
{
|
||||
CGAL::Graphics_scene_options<Point_set_3<P, V>,
|
||||
typename Point_set_3<P, V>::const_iterator,
|
||||
int, int> gs_options;
|
||||
add_in_graphics_scene(apointset, graphics_scene, gs_options);
|
||||
add_to_graphics_scene(apointset, graphics_scene, gs_options);
|
||||
}
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
|
@ -97,7 +97,7 @@ void draw(const Point_set_3<P, V>& apointset,
|
|||
const char *title="Point_set_3 Basic Viewer")
|
||||
{
|
||||
Graphics_scene buffer;
|
||||
add_in_graphics_scene(apointset, buffer, gs_options);
|
||||
add_to_graphics_scene(apointset, buffer, gs_options);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ void draw(const Point_set_3<P, V>& apointset,
|
|||
const char *title="Point_set_3 Basic Viewer")
|
||||
{
|
||||
Graphics_scene buffer;
|
||||
add_in_graphics_scene(apointset, buffer);
|
||||
add_to_graphics_scene(apointset, buffer);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace CGAL {
|
|||
|
||||
namespace draw_function_for_p2 {
|
||||
|
||||
template <typename BufferType=float, class P2, class GSOptions>
|
||||
template <class P2, class GSOptions>
|
||||
void compute_elements(const P2& p2,
|
||||
CGAL::Graphics_scene &graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
|
|
@ -99,16 +99,16 @@ void compute_elements(const P2& p2,
|
|||
|
||||
#define CGAL_P2_TYPE CGAL::Polygon_2<T, C>
|
||||
|
||||
// Specializations of add_in_graphics_scene function
|
||||
// Specializations of add_to_graphics_scene function
|
||||
|
||||
template<typename BufferType=float, class T, class C, class GSOptions>
|
||||
void add_in_graphics_scene(const CGAL_P2_TYPE& ap2,
|
||||
template<class T, class C, class GSOptions>
|
||||
void add_to_graphics_scene(const CGAL_P2_TYPE& ap2,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
{ draw_function_for_p2::compute_elements(ap2, graphics_scene, gs_options); }
|
||||
|
||||
template<typename BufferType=float, class T, class C>
|
||||
void add_in_graphics_scene(const CGAL_P2_TYPE& ap2,
|
||||
template<class T, class C>
|
||||
void add_to_graphics_scene(const CGAL_P2_TYPE& ap2,
|
||||
CGAL::Graphics_scene &graphics_scene)
|
||||
{
|
||||
CGAL::Graphics_scene_options<CGAL_P2_TYPE,
|
||||
|
|
@ -127,7 +127,7 @@ void draw(const CGAL_P2_TYPE &ap2,
|
|||
const char *title="Polygon_2 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(ap2, buffer);
|
||||
add_to_graphics_scene(ap2, buffer);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ void draw(const CGAL_P2_TYPE &ap2,
|
|||
const char *title="Polygon_2 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(ap2, buffer, gs_options);
|
||||
add_to_graphics_scene(ap2, buffer, gs_options);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace CGAL
|
|||
|
||||
namespace draw_function_for_ph2_with_holes {
|
||||
|
||||
template <typename BufferType=float, class P2, class GSOptions>
|
||||
template <class P2, class GSOptions>
|
||||
void compute_one_loop_elements(const P2& ap2,
|
||||
const typename P2::General_polygon_2& aloop,
|
||||
Graphics_scene &graphics_scene,
|
||||
|
|
@ -97,7 +97,7 @@ void compute_one_loop_elements(const P2& ap2,
|
|||
{ graphics_scene.add_segment(*prev, *(aloop.vertices_begin())); }
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class P2, class GSOptions>
|
||||
template <class P2, class GSOptions>
|
||||
void compute_elements(const P2& p2, Graphics_scene &graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
{
|
||||
|
|
@ -111,13 +111,13 @@ void compute_elements(const P2& p2, Graphics_scene &graphics_scene,
|
|||
{ graphics_scene.face_begin(); }
|
||||
}
|
||||
|
||||
compute_one_loop_elements<BufferType, P2>(p2, p2.outer_boundary(), graphics_scene,
|
||||
false, gs_options);
|
||||
compute_one_loop_elements<P2>(p2, p2.outer_boundary(), graphics_scene,
|
||||
false, gs_options);
|
||||
|
||||
for (typename P2::Hole_const_iterator it=p2.holes_begin(); it!=p2.holes_end(); ++it)
|
||||
{
|
||||
compute_one_loop_elements<BufferType, P2>(p2, *it, graphics_scene,
|
||||
true, gs_options);
|
||||
compute_one_loop_elements<P2>(p2, *it, graphics_scene,
|
||||
true, gs_options);
|
||||
if (gs_options.are_faces_enabled())
|
||||
{ graphics_scene.add_point_in_face(p2.outer_boundary().vertex
|
||||
(p2.outer_boundary().size()-1));
|
||||
|
|
@ -132,8 +132,8 @@ void compute_elements(const P2& p2, Graphics_scene &graphics_scene,
|
|||
|
||||
#define CGAL_P2_WITH_HOLES_TYPE CGAL::Polygon_with_holes_2<T, C>
|
||||
|
||||
template <class T, class C, typename BufferType=float, class GSOptions>
|
||||
void add_in_graphics_scene(const CGAL_P2_WITH_HOLES_TYPE& p2,
|
||||
template <class T, class C, class GSOptions>
|
||||
void add_to_graphics_scene(const CGAL_P2_WITH_HOLES_TYPE& p2,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions &gs_options)
|
||||
{
|
||||
|
|
@ -141,8 +141,8 @@ void add_in_graphics_scene(const CGAL_P2_WITH_HOLES_TYPE& p2,
|
|||
gs_options);
|
||||
}
|
||||
|
||||
template <class T, class C, typename BufferType=float>
|
||||
void add_in_graphics_scene(const CGAL_P2_WITH_HOLES_TYPE& p2,
|
||||
template <class T, class C>
|
||||
void add_to_graphics_scene(const CGAL_P2_WITH_HOLES_TYPE& p2,
|
||||
CGAL::Graphics_scene& graphics_scene)
|
||||
{
|
||||
Graphics_scene_options<CGAL_P2_WITH_HOLES_TYPE,
|
||||
|
|
@ -150,27 +150,27 @@ void add_in_graphics_scene(const CGAL_P2_WITH_HOLES_TYPE& p2,
|
|||
typename CGAL_P2_WITH_HOLES_TYPE::General_polygon_2::Vertex_const_iterator,
|
||||
void*> gs_options;
|
||||
|
||||
add_in_graphics_scene(p2, graphics_scene, gs_options);
|
||||
add_to_graphics_scene(p2, graphics_scene, gs_options);
|
||||
}
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
||||
// Specialization of draw function.
|
||||
template<class T, class C, typename BufferType=float, class GSOptions>
|
||||
template<class T, class C, class GSOptions>
|
||||
void draw(const CGAL_P2_WITH_HOLES_TYPE& ap2, const GSOptions &gs_options,
|
||||
const char* title="Polygon with Holes Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(ap2, buffer, gs_options);
|
||||
add_to_graphics_scene(ap2, buffer, gs_options);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
template<class T, class C, typename BufferType=float>
|
||||
template<class T, class C>
|
||||
void draw(const CGAL_P2_WITH_HOLES_TYPE& ap2,
|
||||
const char* title="Polygon with Holes Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(ap2, buffer);
|
||||
add_to_graphics_scene(ap2, buffer);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,26 +26,26 @@ namespace CGAL
|
|||
#define CGAL_POLY_TYPE CGAL::Polyhedron_3 \
|
||||
<PolyhedronTraits_3, PolyhedronItems_3, T_HDS, Alloc>
|
||||
|
||||
// Specialization of add_in_graphics_scene function.
|
||||
// Specialization of add_to_graphics_scene function.
|
||||
template<class PolyhedronTraits_3,
|
||||
class PolyhedronItems_3,
|
||||
template < class T, class I, class A>
|
||||
class T_HDS,
|
||||
class Alloc,
|
||||
class GSOptions>
|
||||
void add_in_graphics_scene(const CGAL_POLY_TYPE& apoly,
|
||||
void add_to_graphics_scene(const CGAL_POLY_TYPE& apoly,
|
||||
CGAL::Graphics_scene &graphics_scene,
|
||||
const GSOptions &gs_options)
|
||||
{ add_in_graphics_scene_for_fg(apoly, graphics_scene, gs_options); }
|
||||
{ add_to_graphics_scene_for_fg(apoly, graphics_scene, gs_options); }
|
||||
|
||||
template<class PolyhedronTraits_3,
|
||||
class PolyhedronItems_3,
|
||||
template < class T, class I, class A>
|
||||
class T_HDS,
|
||||
class Alloc>
|
||||
void add_in_graphics_scene(const CGAL_POLY_TYPE& apoly,
|
||||
void add_to_graphics_scene(const CGAL_POLY_TYPE& apoly,
|
||||
CGAL::Graphics_scene &graphics_scene)
|
||||
{ add_in_graphics_scene_for_fg(apoly, graphics_scene); }
|
||||
{ add_to_graphics_scene_for_fg(apoly, graphics_scene); }
|
||||
|
||||
// Specialization of draw function: require Qt and the CGAL basic viewer.
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
|
@ -59,7 +59,7 @@ void draw(const CGAL_POLY_TYPE& apoly,
|
|||
const char* title="Polyhedron Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene_for_fg(apoly, buffer);
|
||||
add_to_graphics_scene_for_fg(apoly, buffer);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ void draw(const CGAL_POLY_TYPE& apoly,
|
|||
const char* title="Polyhedron Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene_for_fg(apoly, buffer, gs_options);
|
||||
add_to_graphics_scene_for_fg(apoly, buffer, gs_options);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
#endif // CGAL_USE_BASIC_VIEWER
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace CGAL {
|
|||
|
||||
namespace draw_function_for_ss2 {
|
||||
|
||||
template <typename BufferType=float, class SS2, class GSOptions>
|
||||
template <class SS2, class GSOptions>
|
||||
void compute_edge(const SS2& ss2, typename SS2::Halfedge_const_handle eh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
|
|
@ -45,7 +45,7 @@ void compute_edge(const SS2& ss2, typename SS2::Halfedge_const_handle eh,
|
|||
}
|
||||
}
|
||||
|
||||
template<typename BufferType=float, class SS2, class GSOptions>
|
||||
template<class SS2, class GSOptions>
|
||||
void print_halfedge_labels(const SS2& ss2,
|
||||
typename SS2::Halfedge_const_handle h,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -65,7 +65,7 @@ void print_halfedge_labels(const SS2& ss2,
|
|||
label.str());
|
||||
}
|
||||
|
||||
template <typename BufferType = float, class SS2, class GSOptions>
|
||||
template <class SS2, class GSOptions>
|
||||
void compute_vertex(const SS2& ss2, typename SS2::Vertex_const_handle vh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
|
|
@ -81,7 +81,7 @@ void compute_vertex(const SS2& ss2, typename SS2::Vertex_const_handle vh,
|
|||
{ graphics_scene.add_point(vh->point()); }
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class SS2, class GSOptions>
|
||||
template <class SS2, class GSOptions>
|
||||
void print_vertex_label(const SS2& ss2,
|
||||
typename SS2::Vertex_const_handle vh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -96,7 +96,7 @@ void print_vertex_label(const SS2& ss2,
|
|||
graphics_scene.add_text(vh->point(), label.str());
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class SS2, class GSOptions>
|
||||
template <class SS2, class GSOptions>
|
||||
void compute_elements(const SS2& ss2,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
|
|
@ -129,8 +129,8 @@ void compute_elements(const SS2& ss2,
|
|||
|
||||
#define CGAL_SS_TYPE CGAL::Straight_skeleton_2<K>
|
||||
|
||||
template <typename BufferType=float, class K, class GSOptions>
|
||||
void add_in_graphics_scene(const CGAL_SS_TYPE &ass2,
|
||||
template <class K, class GSOptions>
|
||||
void add_to_graphics_scene(const CGAL_SS_TYPE &ass2,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
{
|
||||
|
|
@ -138,8 +138,8 @@ void add_in_graphics_scene(const CGAL_SS_TYPE &ass2,
|
|||
gs_options);
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class K>
|
||||
void add_in_graphics_scene(const CGAL_SS_TYPE& ass2,
|
||||
template <class K>
|
||||
void add_to_graphics_scene(const CGAL_SS_TYPE& ass2,
|
||||
CGAL::Graphics_scene& graphics_scene)
|
||||
{
|
||||
Graphics_scene_options<CGAL_SS_TYPE,
|
||||
|
|
@ -176,7 +176,7 @@ void add_in_graphics_scene(const CGAL_SS_TYPE& ass2,
|
|||
return CGAL::IO::Color(10, 180, 10); // green, but not flashy
|
||||
};
|
||||
|
||||
add_in_graphics_scene(ass2, graphics_scene, drawingFunctor);
|
||||
add_to_graphics_scene(ass2, graphics_scene, drawingFunctor);
|
||||
}
|
||||
|
||||
// Specialization of draw function.
|
||||
|
|
@ -187,7 +187,7 @@ void draw(const CGAL_SS_TYPE &ass2, const GSOptions &gs_options,
|
|||
const char *title="Straight Skeleton Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(ass2, buffer, gs_options);
|
||||
add_to_graphics_scene(ass2, buffer, gs_options);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ void draw(const CGAL_SS_TYPE &ass2,
|
|||
const char *title="Straight Skeleton Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(ass2, buffer);
|
||||
add_to_graphics_scene(ass2, buffer);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -95,15 +95,15 @@ private:
|
|||
};
|
||||
|
||||
template<class K, class GSOptions>
|
||||
void add_in_graphics_scene(const Surface_mesh<K>& amesh,
|
||||
void add_to_graphics_scene(const Surface_mesh<K>& amesh,
|
||||
CGAL::Graphics_scene &graphics_scene,
|
||||
const GSOptions &gs_options)
|
||||
{ add_in_graphics_scene_for_fg(amesh, graphics_scene, gs_options); }
|
||||
{ add_to_graphics_scene_for_fg(amesh, graphics_scene, gs_options); }
|
||||
|
||||
template<class K>
|
||||
void add_in_graphics_scene(const Surface_mesh<K>& amesh,
|
||||
void add_to_graphics_scene(const Surface_mesh<K>& amesh,
|
||||
CGAL::Graphics_scene &graphics_scene)
|
||||
{ add_in_graphics_scene_for_fg(amesh, graphics_scene,
|
||||
{ add_to_graphics_scene_for_fg(amesh, graphics_scene,
|
||||
Graphics_scene_options_surface_mesh<K>(amesh)); }
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
|
@ -114,7 +114,7 @@ void draw(const Surface_mesh<K>& amesh,
|
|||
const char* title="Surface_mesh Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(amesh, buffer);
|
||||
add_to_graphics_scene(amesh, buffer);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ void draw(const Surface_mesh<K>& amesh,
|
|||
const char* title="Surface_mesh Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(amesh, buffer, gs_options);
|
||||
add_to_graphics_scene(amesh, buffer, gs_options);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ const typename CGAL::Get_traits<Mesh>::Point& get_point
|
|||
return CGAL::Get_traits<Mesh>::get_point(mesh, dh);
|
||||
}
|
||||
|
||||
template <typename Mesh, typename BufferType=float, class GSOptions>
|
||||
template <typename Mesh, class GSOptions>
|
||||
void compute_face(const Mesh& mesh,
|
||||
const typename Get_map<Mesh, Mesh>::storage_type& lcc,
|
||||
typename Get_map<Mesh, Mesh>::type::Dart_const_descriptor dh,
|
||||
|
|
@ -188,7 +188,7 @@ void compute_face(const Mesh& mesh,
|
|||
graphics_scene.face_end();
|
||||
}
|
||||
|
||||
template <typename Mesh, typename BufferType=float, class GSOptions>
|
||||
template <typename Mesh, class GSOptions>
|
||||
void compute_edge(const Mesh &mesh,
|
||||
const typename Get_map<Mesh, Mesh>::storage_type& lcc,
|
||||
typename Get_map<Mesh, Mesh>::type::Dart_const_descriptor dh,
|
||||
|
|
@ -219,7 +219,7 @@ void compute_edge(const Mesh &mesh,
|
|||
}
|
||||
}
|
||||
|
||||
template <typename Mesh, typename BufferType = float>
|
||||
template <typename Mesh>
|
||||
void compute_edge(const Mesh &mesh,
|
||||
const typename Get_map<Mesh, Mesh>::storage_type& lcc,
|
||||
typename Get_map<Mesh, Mesh>::type::Dart_const_descriptor dh,
|
||||
|
|
@ -238,7 +238,7 @@ void compute_edge(const Mesh &mesh,
|
|||
{ graphics_scene.add_segment(p1, get_point(mesh, d2), color); }
|
||||
}
|
||||
|
||||
template <typename Mesh, typename BufferType = float>
|
||||
template <typename Mesh>
|
||||
void compute_vertex(const Mesh &mesh,
|
||||
typename Get_map<Mesh, Mesh>::type::Dart_const_descriptor dh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -250,7 +250,7 @@ void compute_vertex(const Mesh &mesh,
|
|||
graphics_scene.add_point(get_point(mesh, dh));
|
||||
}
|
||||
|
||||
template <typename Mesh, typename BufferType = float>
|
||||
template <typename Mesh>
|
||||
void compute_path(const Mesh &mesh,
|
||||
const typename Get_map<Mesh, Mesh>::storage_type& lcc,
|
||||
CGAL::Graphics_scene &graphics_scene,
|
||||
|
|
@ -280,7 +280,7 @@ void compute_path(const Mesh &mesh,
|
|||
}
|
||||
}
|
||||
|
||||
template <class Mesh, class GSOptions, typename BufferType = float>
|
||||
template <class Mesh, class GSOptions>
|
||||
void compute_elements(const Mesh &mesh,
|
||||
CGAL::Graphics_scene &graphics_scene,
|
||||
const GSOptions &m_gs_options,
|
||||
|
|
@ -311,19 +311,19 @@ void compute_elements(const Mesh &mesh,
|
|||
if (m_current_dart!=lcc.darts().end())
|
||||
{ // We want to draw only one dart
|
||||
Dart_const_descriptor selected_dart=m_current_dart; //lcc.dart_handle(m_current_dart);
|
||||
compute_edge<Mesh, BufferType>(selected_dart, CGAL::IO::Color(255,0,0), mesh, graphics_scene, lcc);
|
||||
compute_edge<Mesh>(selected_dart, CGAL::IO::Color(255,0,0), mesh, graphics_scene, lcc);
|
||||
lcc.template mark_cell<1>(selected_dart, markedges);
|
||||
compute_vertex<Mesh, BufferType>(selected_dart, mesh, graphics_scene);
|
||||
compute_vertex<Mesh>(selected_dart, mesh, graphics_scene);
|
||||
|
||||
if ( !m_nofaces )
|
||||
{ compute_face<Mesh, BufferType>(selected_dart, mesh, graphics_scene, lcc); }
|
||||
{ compute_face<Mesh>(selected_dart, mesh, graphics_scene, lcc); }
|
||||
|
||||
for (typename LCC::Dart_range::const_iterator it=lcc.darts().begin(),
|
||||
itend=lcc.darts().end(); it!=itend; ++it )
|
||||
{
|
||||
if ( !lcc.is_marked(it, markedges) )
|
||||
{
|
||||
compute_edge<Mesh, BufferType>(it, mesh, graphics_scene, lcc, m_amark, m_draw_marked_darts);
|
||||
compute_edge<Mesh>(it, mesh, graphics_scene, lcc, m_amark, m_draw_marked_darts);
|
||||
lcc.template mark_cell<1>(it, markedges);
|
||||
}
|
||||
}
|
||||
|
|
@ -333,10 +333,10 @@ void compute_elements(const Mesh &mesh,
|
|||
if (m_current_path==m_paths->size())
|
||||
{
|
||||
for (std::size_t i=0; i<m_paths->size(); ++i)
|
||||
{ compute_path<Mesh, BufferType>(i, markedges, mesh, graphics_scene, m_paths, lcc); }
|
||||
{ compute_path<Mesh>(i, markedges, mesh, graphics_scene, m_paths, lcc); }
|
||||
}
|
||||
else if (m_current_path!=m_paths->size()+1)
|
||||
{ compute_path<Mesh, BufferType>(m_current_path, markedges, mesh, graphics_scene, m_paths, lcc); }
|
||||
{ compute_path<Mesh>(m_current_path, markedges, mesh, graphics_scene, m_paths, lcc); }
|
||||
|
||||
for (typename LCC::Dart_range::const_iterator it=lcc.darts().begin(),
|
||||
itend=lcc.darts().end(); it!=itend; ++it )
|
||||
|
|
@ -344,19 +344,19 @@ void compute_elements(const Mesh &mesh,
|
|||
if (!m_nofaces && !lcc.is_marked(it, markfaces) &&
|
||||
!lcc.is_perforated(it) && lcc.is_marked(it, m_oriented_mark))
|
||||
{
|
||||
compute_face<Mesh, BufferType>(it, mesh, graphics_scene, lcc);
|
||||
compute_face<Mesh>(it, mesh, graphics_scene, lcc);
|
||||
lcc.template mark_cell<2>(it, markfaces);
|
||||
}
|
||||
|
||||
if ( !lcc.is_marked(it, markedges) )
|
||||
{
|
||||
compute_edge<Mesh, BufferType>(it, mesh, graphics_scene, lcc, m_amark, m_draw_marked_darts);
|
||||
compute_edge<Mesh>(it, mesh, graphics_scene, lcc, m_amark, m_draw_marked_darts);
|
||||
lcc.template mark_cell<1>(it, markedges);
|
||||
}
|
||||
|
||||
if ( !lcc.is_marked(it, markvertices) )
|
||||
{
|
||||
compute_vertex<Mesh, BufferType>(it, mesh, graphics_scene);
|
||||
compute_vertex<Mesh>(it, mesh, graphics_scene);
|
||||
lcc.template mark_cell<0>(it, markvertices);
|
||||
}
|
||||
}
|
||||
|
|
@ -369,8 +369,8 @@ void compute_elements(const Mesh &mesh,
|
|||
|
||||
} // namespace draw_function_for_face_graph_with_paths
|
||||
|
||||
template <typename BufferType=float, class Mesh, class GSOptions>
|
||||
void add_in_graphics_scene(const Mesh& mesh,
|
||||
template <class Mesh, class GSOptions>
|
||||
void add_to_graphics_scene(const Mesh& mesh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const std::vector<Surface_mesh_topology::Path_on_surface<Mesh>>* paths,
|
||||
const GSOptions& gs_options,
|
||||
|
|
@ -383,8 +383,8 @@ void add_in_graphics_scene(const Mesh& mesh,
|
|||
paths, amark);
|
||||
}
|
||||
|
||||
template <typename BufferType = float, class Mesh>
|
||||
void add_in_graphics_scene(const Mesh& mesh,
|
||||
template <class Mesh>
|
||||
void add_to_graphics_scene(const Mesh& mesh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const std::vector<Surface_mesh_topology::Path_on_surface<Mesh>>* paths,
|
||||
typename Get_map<Mesh, Mesh>::type::size_type amark=
|
||||
|
|
@ -397,12 +397,12 @@ void add_in_graphics_scene(const Mesh& mesh,
|
|||
typename Get_map<Mesh, Mesh>::type::Dart_const_descriptor /*fh*/>
|
||||
gs_options;
|
||||
|
||||
add_in_graphics_scene(mesh, graphics_scene, gs_options, paths, amark);
|
||||
add_to_graphics_scene(mesh, graphics_scene, gs_options, paths, amark);
|
||||
}
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
||||
template<typename Mesh, typename BufferType=float>
|
||||
template<typename Mesh>
|
||||
void draw(const Mesh& mesh,
|
||||
const std::vector<Surface_mesh_topology::Path_on_surface<Mesh> >& paths,
|
||||
typename Get_map<Mesh, Mesh>::type::size_type amark=
|
||||
|
|
@ -410,11 +410,11 @@ void draw(const Mesh& mesh,
|
|||
const char* title="Mesh Viewer With Path")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(mesh, buffer, &paths, amark);
|
||||
add_to_graphics_scene(mesh, buffer, &paths, amark);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
template<typename Mesh, typename GSOptions, typename BufferType=float>
|
||||
template<typename Mesh, typename GSOptions>
|
||||
void draw(const Mesh& mesh,
|
||||
const std::vector<Surface_mesh_topology::Path_on_surface<Mesh> >& paths,
|
||||
const GSOptions& gs_options,
|
||||
|
|
@ -423,11 +423,11 @@ void draw(const Mesh& mesh,
|
|||
const char* title="Mesh Viewer With Path")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(mesh, buffer, gs_options, &paths, amark);
|
||||
add_to_graphics_scene(mesh, buffer, gs_options, &paths, amark);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
template<class Mesh, typename BufferType=float >
|
||||
template<class Mesh>
|
||||
void draw(const Mesh& mesh,
|
||||
std::initializer_list<Surface_mesh_topology::Path_on_surface<Mesh>> l,
|
||||
typename Get_map<Mesh, Mesh>::type::size_type amark=
|
||||
|
|
@ -436,7 +436,7 @@ void draw(const Mesh& mesh,
|
|||
{
|
||||
std::vector<Surface_mesh_topology::Path_on_surface<Mesh>> paths=l;
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(mesh, buffer, &paths, amark);
|
||||
add_to_graphics_scene(mesh, buffer, &paths, amark);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
@ -447,7 +447,7 @@ void draw(const Mesh& mesh,
|
|||
namespace CGAL
|
||||
{
|
||||
|
||||
template<class Mesh, typename BufferType=float>
|
||||
template<class Mesh>
|
||||
void draw(const Mesh&,
|
||||
const std::vector<Surface_mesh_topology::Path_on_surface<Mesh> >&,
|
||||
typename Get_map<Mesh, Mesh>::type::size_type=
|
||||
|
|
@ -457,7 +457,7 @@ namespace CGAL
|
|||
std::cerr<<"Impossible to draw, CGAL_USE_BASIC_VIEWER is not defined."<<std::endl;
|
||||
}
|
||||
|
||||
template<class Mesh, typename GSOptions, typename BufferType=float>
|
||||
template<class Mesh, typename GSOptions>
|
||||
void draw(const Mesh&,
|
||||
const std::vector<Surface_mesh_topology::Path_on_surface<Mesh> >&,
|
||||
const GSOptions&,
|
||||
|
|
@ -468,7 +468,7 @@ namespace CGAL
|
|||
std::cerr<<"Impossible to draw, CGAL_USE_BASIC_VIEWER is not defined."<<std::endl;
|
||||
}
|
||||
|
||||
template<class Mesh, typename BufferType=float>
|
||||
template<class Mesh>
|
||||
void draw(const Mesh&,
|
||||
std::initializer_list<Surface_mesh_topology::Path_on_surface<Mesh>>,
|
||||
const char* ="",
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ namespace CGAL
|
|||
// Specialization of draw function.
|
||||
#define CGAL_T2_TYPE CGAL::Constrained_triangulation_2<Gt, Tds, Itag>
|
||||
|
||||
template <class Gt, class Tds, class Itag, class InDomainPmap, typename BufferType=float>
|
||||
void add_in_graphics_scene(const CGAL_T2_TYPE& at2, InDomainPmap ipm,
|
||||
template <class Gt, class Tds, class Itag, class InDomainPmap>
|
||||
void add_to_graphics_scene(const CGAL_T2_TYPE& at2, InDomainPmap ipm,
|
||||
CGAL::Graphics_scene& graphics_scene)
|
||||
{
|
||||
using BASET2=CGAL::Triangulation_2<Gt, Tds>;
|
||||
|
|
@ -54,15 +54,15 @@ void add_in_graphics_scene(const CGAL_T2_TYPE& at2, InDomainPmap ipm,
|
|||
[&ipm](const BASET2&, typename CGAL_T2_TYPE::Finite_faces_iterator fh) -> CGAL::IO::Color
|
||||
{ return get(ipm, fh)? CGAL::IO::yellow() : CGAL::IO::white(); };
|
||||
|
||||
add_in_graphics_scene(at2, graphics_scene, drawingFunctor);
|
||||
add_to_graphics_scene(at2, graphics_scene, drawingFunctor);
|
||||
}
|
||||
|
||||
template <class Gt, class Tds, class Itag, typename BufferType=float>
|
||||
void add_in_graphics_scene(const CGAL_T2_TYPE& at2,
|
||||
template <class Gt, class Tds, class Itag>
|
||||
void add_to_graphics_scene(const CGAL_T2_TYPE& at2,
|
||||
CGAL::Graphics_scene& graphics_scene)
|
||||
{
|
||||
internal::In_domain<CGAL_T2_TYPE> in_domain;
|
||||
add_in_graphics_scene(at2, in_domain, graphics_scene);
|
||||
add_to_graphics_scene(at2, in_domain, graphics_scene);
|
||||
}
|
||||
|
||||
template<class Gt, class Tds, class Itag, class InDomainPmap>
|
||||
|
|
@ -70,7 +70,7 @@ void draw(const CGAL_T2_TYPE& at2, InDomainPmap ipm,
|
|||
const char *title="Constrained Triangulation_2 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(at2, ipm, buffer);
|
||||
add_to_graphics_scene(at2, ipm, buffer);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace CGAL {
|
|||
|
||||
namespace draw_function_for_t2 {
|
||||
|
||||
template <typename BufferType=float, class T2, class GSOptions>
|
||||
template <class T2, class GSOptions>
|
||||
void compute_face(const T2& t2,
|
||||
typename T2::Finite_faces_iterator fh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -45,7 +45,7 @@ void compute_face(const T2& t2,
|
|||
graphics_scene.face_end();
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class T2, class GSOptions>
|
||||
template <class T2, class GSOptions>
|
||||
void compute_edge(const T2& t2, typename T2::Finite_edges_iterator eh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
|
|
@ -68,7 +68,7 @@ void compute_edge(const T2& t2, typename T2::Finite_edges_iterator eh,
|
|||
}
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class T2, class GSOptions>
|
||||
template <class T2, class GSOptions>
|
||||
void compute_vertex(const T2& t2, typename T2::Vertex_handle vh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
|
|
@ -86,7 +86,7 @@ void compute_vertex(const T2& t2, typename T2::Vertex_handle vh,
|
|||
}
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class T2, class GSOptions>
|
||||
template <class T2, class GSOptions>
|
||||
void compute_elements(const T2& t2,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
|
|
@ -117,8 +117,8 @@ void compute_elements(const T2& t2,
|
|||
|
||||
#define CGAL_T2_TYPE CGAL::Triangulation_2<Gt, Tds>
|
||||
|
||||
template<class Gt, class Tds, typename BufferType=float>
|
||||
void add_in_graphics_scene(const CGAL_T2_TYPE& at2,
|
||||
template<class Gt, class Tds>
|
||||
void add_to_graphics_scene(const CGAL_T2_TYPE& at2,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const CGAL::Graphics_scene_options<T2,
|
||||
typename T2::Vertex_handle,
|
||||
|
|
@ -128,8 +128,8 @@ void add_in_graphics_scene(const CGAL_T2_TYPE& at2,
|
|||
draw_function_for_t2::compute_elements(at2, graphics_scene, gs_options);
|
||||
}
|
||||
|
||||
template <class Gt, class Tds, typename BufferType=float>
|
||||
void add_in_graphics_scene(const CGAL_T2_TYPE& at2,
|
||||
template <class Gt, class Tds>
|
||||
void add_to_graphics_scene(const CGAL_T2_TYPE& at2,
|
||||
CGAL::Graphics_scene& graphics_scene)
|
||||
{
|
||||
Graphics_scene_options<CGAL_T2_TYPE,
|
||||
|
|
@ -149,7 +149,7 @@ void add_in_graphics_scene(const CGAL_T2_TYPE& at2,
|
|||
return get_random_color(random);
|
||||
};
|
||||
|
||||
add_in_graphics_scene(at2, graphics_scene, drawingFunctor);
|
||||
add_to_graphics_scene(at2, graphics_scene, drawingFunctor);
|
||||
}
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
|
@ -160,7 +160,7 @@ void draw(const CGAL_T2_TYPE &at2, const GSOptions &gs_options,
|
|||
const char *title="Triangulation_2 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(at2, buffer, gs_options);
|
||||
add_to_graphics_scene(at2, buffer, gs_options);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ void draw(const CGAL_T2_TYPE& at2,
|
|||
const char *title="Triangulation_2 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(at2, buffer);
|
||||
add_to_graphics_scene(at2, buffer);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace CGAL {
|
|||
namespace draw_function_for_t3
|
||||
{
|
||||
|
||||
template <typename BufferType=float, class T3, class GSOptions>
|
||||
template <class T3, class GSOptions>
|
||||
void compute_face(typename T3::Finite_facets_iterator fh,
|
||||
const GSOptions& gs_options,
|
||||
CGAL::Graphics_scene& graphics_scene, const T3 *t3)
|
||||
|
|
@ -48,7 +48,7 @@ void compute_face(typename T3::Finite_facets_iterator fh,
|
|||
graphics_scene.face_end();
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class T3, class GSOptions>
|
||||
template <class T3, class GSOptions>
|
||||
void compute_edge(typename T3::Finite_edges_iterator eh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options, const T3* t3)
|
||||
|
|
@ -68,7 +68,7 @@ void compute_edge(typename T3::Finite_edges_iterator eh,
|
|||
}
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class T3, class GSOptions>
|
||||
template <class T3, class GSOptions>
|
||||
void compute_vertex(typename T3::Vertex_handle vh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options, const T3* t3)
|
||||
|
|
@ -84,7 +84,7 @@ void compute_vertex(typename T3::Vertex_handle vh,
|
|||
{ graphics_scene.add_point(vh->point()); }
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class T3, class GSOptions>
|
||||
template <class T3, class GSOptions>
|
||||
void compute_elements(const T3* t3,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
|
|
@ -116,17 +116,16 @@ void compute_elements(const T3* t3,
|
|||
#define CGAL_T3_TYPE CGAL::Triangulation_3<Gt, Tds, Lock_data_structure>
|
||||
|
||||
template <class Gt, class Tds, class Lock_data_structure,
|
||||
typename BufferType=float, class GSOptions>
|
||||
void add_in_graphics_scene(const CGAL_T3_TYPE& at3,
|
||||
class GSOptions>
|
||||
void add_to_graphics_scene(const CGAL_T3_TYPE& at3,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
{
|
||||
draw_function_for_t3::compute_elements(&at3, graphics_scene, gs_options);
|
||||
}
|
||||
|
||||
template <class Gt, class Tds, class Lock_data_structure,
|
||||
typename BufferType=float>
|
||||
void add_in_graphics_scene(const CGAL_T3_TYPE& at3,
|
||||
template <class Gt, class Tds, class Lock_data_structure>
|
||||
void add_to_graphics_scene(const CGAL_T3_TYPE& at3,
|
||||
CGAL::Graphics_scene& graphics_scene)
|
||||
{
|
||||
CGAL::Graphics_scene_options<CGAL_T3_TYPE,
|
||||
|
|
@ -151,7 +150,7 @@ void add_in_graphics_scene(const CGAL_T3_TYPE& at3,
|
|||
return get_random_color(random);
|
||||
};
|
||||
|
||||
add_in_graphics_scene(at3, graphics_scene, gs_options);
|
||||
add_to_graphics_scene(at3, graphics_scene, gs_options);
|
||||
}
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
|
@ -162,7 +161,7 @@ void draw(const CGAL_T3_TYPE &at3, const GSOptions &gs_options,
|
|||
const char *title="T3 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(at3, buffer, gs_options);
|
||||
add_to_graphics_scene(at3, buffer, gs_options);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +169,7 @@ template <class Gt, class Tds, class Lock_data_structure>
|
|||
void draw(const CGAL_T3_TYPE &at3, const char *title="T3 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(at3, buffer);
|
||||
add_to_graphics_scene(at3, buffer);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel;
|
|||
typedef Local_kernel::Point_3 Local_point;
|
||||
typedef Local_kernel::Vector_3 Local_vector;
|
||||
|
||||
template <typename BufferType=float, class V2, class GSOptions>
|
||||
template <class V2, class GSOptions>
|
||||
void compute_vertex(const V2& v2,
|
||||
typename V2::Vertex_iterator vh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -84,14 +84,14 @@ void compute_vertex(const V2& v2,
|
|||
{ graphics_scene.add_point(vh->point()); }
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class V2, class GSOptions>
|
||||
template <class V2, class GSOptions>
|
||||
void compute_dual_vertex(const V2& /*v2*/,
|
||||
typename V2::Delaunay_graph::Finite_vertices_iterator vi,
|
||||
CGAL::Graphics_scene &graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
{ graphics_scene.add_point(vi->point(), gs_options.dual_vertex_color); }
|
||||
|
||||
template <typename BufferType=float, class V2, class GSOptions>
|
||||
template <class V2, class GSOptions>
|
||||
void add_segments_and_update_bounding_box(const V2& v2,
|
||||
typename V2::Halfedge_iterator he,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -221,7 +221,7 @@ Local_kernel::Point_2 get_second_point(typename V2::Halfedge_handle ray,
|
|||
}
|
||||
|
||||
// Halfedge_const_handle
|
||||
template <typename BufferType=float, class V2, class GSOptions>
|
||||
template <class V2, class GSOptions>
|
||||
void compute_rays_and_bisectors(const V2&,
|
||||
typename V2::Halfedge_iterator he,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -251,7 +251,7 @@ void compute_rays_and_bisectors(const V2&,
|
|||
}
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class V2, class GSOptions>
|
||||
template <class V2, class GSOptions>
|
||||
void compute_face(const V2& v2,
|
||||
typename V2::Face_iterator fh,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
|
|
@ -286,7 +286,7 @@ void compute_face(const V2& v2,
|
|||
// }
|
||||
}
|
||||
|
||||
template <typename BufferType=float, class V2, class GSOptions>
|
||||
template <class V2, class GSOptions>
|
||||
void compute_elements(const V2& v2,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& gs_options)
|
||||
|
|
@ -335,17 +335,16 @@ void compute_elements(const V2& v2,
|
|||
|
||||
#define CGAL_VORONOI_TYPE CGAL::Voronoi_diagram_2 <DG, AT, AP>
|
||||
|
||||
template <class DG, class AT, class AP,
|
||||
typename BufferType=float, class GSOptions>
|
||||
void add_in_graphics_scene(const CGAL_VORONOI_TYPE &v2,
|
||||
template <class DG, class AT, class AP, class GSOptions>
|
||||
void add_to_graphics_scene(const CGAL_VORONOI_TYPE &v2,
|
||||
CGAL::Graphics_scene& graphics_scene,
|
||||
const GSOptions& m_gs_options)
|
||||
{
|
||||
draw_function_for_v2::compute_elements(v2, graphics_scene, m_gs_options);
|
||||
}
|
||||
|
||||
template <class DG, class AT, class AP, typename BufferType=float>
|
||||
void add_in_graphics_scene(const CGAL_VORONOI_TYPE& v2,
|
||||
template <class DG, class AT, class AP>
|
||||
void add_to_graphics_scene(const CGAL_VORONOI_TYPE& v2,
|
||||
CGAL::Graphics_scene& graphics_scene)
|
||||
{
|
||||
// Default graphics view options.
|
||||
|
|
@ -355,24 +354,23 @@ void add_in_graphics_scene(const CGAL_VORONOI_TYPE& v2,
|
|||
typename CGAL_VORONOI_TYPE::Face_iterator>
|
||||
gs_options;
|
||||
|
||||
add_in_graphics_scene(v2, graphics_scene, gs_options);
|
||||
add_to_graphics_scene(v2, graphics_scene, gs_options);
|
||||
}
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
||||
// Specialization of draw function.
|
||||
template<class DG, class AT, class AP,
|
||||
typename BufferType=float, class GSOptions>
|
||||
template<class DG, class AT, class AP, class GSOptions>
|
||||
void draw(const CGAL_VORONOI_TYPE& av2,
|
||||
const GSOptions& gs_options,
|
||||
const char *title="2D Voronoi Diagram Basic Viewer")
|
||||
{
|
||||
CGAL::Graphics_scene buffer;
|
||||
add_in_graphics_scene(av2, buffer, gs_options);
|
||||
add_to_graphics_scene(av2, buffer, gs_options);
|
||||
draw_graphics_scene(buffer, title);
|
||||
}
|
||||
|
||||
template<class DG, class AT, class AP, typename BufferType=float>
|
||||
template<class DG, class AT, class AP>
|
||||
void draw(const CGAL_VORONOI_TYPE& av2,
|
||||
const char *title="2D Voronoi Diagram Basic Viewer")
|
||||
{
|
||||
|
|
@ -384,7 +382,7 @@ void draw(const CGAL_VORONOI_TYPE& av2,
|
|||
typename CGAL_VORONOI_TYPE::Face_iterator>
|
||||
gs_options;
|
||||
|
||||
add_in_graphics_scene(av2, buffer, gs_options);
|
||||
add_to_graphics_scene(av2, buffer, gs_options);
|
||||
|
||||
QApplication_and_basic_viewer app(buffer, title);
|
||||
if(app)
|
||||
|
|
|
|||
Loading…
Reference in New Issue