mirror of https://github.com/CGAL/cgal
Rename class graphic buffer
This commit is contained in:
parent
fe92449d00
commit
8f29e4d323
|
|
@ -14,7 +14,7 @@
|
|||
#ifndef CGAL_DRAW_FACE_GRAPH_H
|
||||
#define CGAL_DRAW_FACE_GRAPH_H
|
||||
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Dynamic_property_map.h>
|
||||
#include <CGAL/Random.h>
|
||||
|
|
@ -26,7 +26,7 @@ namespace draw_function_for_FG {
|
|||
|
||||
template <typename BufferType=float, typename FG, typename DrawingFunctor>
|
||||
void compute_elements(const FG &fg,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer,
|
||||
const DrawingFunctor &m_drawing_functor)
|
||||
{
|
||||
using Point=typename boost::property_map_value<FG, CGAL::vertex_point_t>::type;
|
||||
|
|
@ -120,7 +120,7 @@ void compute_elements(const FG &fg,
|
|||
|
||||
template <typename BufferType=float, class FG, class DrawingFunctor>
|
||||
void add_in_graphic_buffer_for_fg(const FG &fg,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer,
|
||||
const DrawingFunctor &drawing_functor)
|
||||
{
|
||||
draw_function_for_FG::compute_elements(fg, graphic_buffer, drawing_functor);
|
||||
|
|
@ -128,7 +128,7 @@ void add_in_graphic_buffer_for_fg(const FG &fg,
|
|||
|
||||
template <typename BufferType=float, class FG>
|
||||
void add_in_graphic_buffer_for_fg(const FG &fg,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer)
|
||||
{
|
||||
Drawing_functor<FG,
|
||||
typename boost::graph_traits<FG>::vertex_descriptor,
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ int main(void)
|
|||
for(Pwn& it: points)
|
||||
{ point_set.insert(it.first); }
|
||||
|
||||
CGAL::Graphic_buffer<float> graphic_buffer;
|
||||
CGAL::Graphic_storage<float> graphic_buffer;
|
||||
CGAL::add_in_graphic_buffer(point_set, graphic_buffer, Drawing_functor_green_points());
|
||||
CGAL::add_in_graphic_buffer(output_mesh, graphic_buffer);
|
||||
CGAL::draw_buffer(graphic_buffer);
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ int main(int argc, char* argv[])
|
|||
{ faces_size[fd]=CGAL::Polygon_mesh_processing::face_area(fd, sm); }
|
||||
|
||||
Drawing_functor_small_faces df(sm);
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
|
||||
add_in_graphic_buffer(sm, buffer, df);
|
||||
CGAL::QApplication_and_basic_viewer app(buffer, "Small faces");
|
||||
|
|
|
|||
|
|
@ -56,14 +56,14 @@ inline CGAL::IO::Color get_random_color(CGAL::Random& random)
|
|||
// This class is responsible for dealing with available CGAL data structures and
|
||||
// handling buffers.
|
||||
template <typename BufferType = float>
|
||||
class Graphic_buffer
|
||||
class Graphic_storage
|
||||
{
|
||||
public:
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel;
|
||||
typedef Local_kernel::Point_3 Local_point;
|
||||
typedef Local_kernel::Vector_3 Local_vector;
|
||||
|
||||
Graphic_buffer()
|
||||
Graphic_storage()
|
||||
: m_buffer_for_mono_points(&arrays[POS_MONO_POINTS], nullptr,
|
||||
&m_bounding_box, nullptr, nullptr, nullptr),
|
||||
m_buffer_for_colored_points(&arrays[POS_COLORED_POINTS], nullptr,
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
#include <cfloat>
|
||||
|
||||
#include <CGAL/Basic_shaders.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Qt/CreateOpenGLContext.h>
|
||||
#include <CGAL/Qt/constraint.h>
|
||||
#include <CGAL/assertions.h>
|
||||
|
|
@ -69,11 +69,11 @@ public:
|
|||
typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel;
|
||||
typedef Local_kernel::Point_3 Local_point;
|
||||
typedef Local_kernel::Vector_3 Local_vector;
|
||||
using GB=Graphic_buffer<BufferType>;
|
||||
using GB=Graphic_storage<BufferType>;
|
||||
|
||||
// Constructor/Destructor
|
||||
Basic_viewer_qt(QWidget* parent,
|
||||
Graphic_buffer<BufferType>& buf,
|
||||
Graphic_storage<BufferType>& buf,
|
||||
const char* title="",
|
||||
bool draw_vertices=false,
|
||||
bool draw_edges=true,
|
||||
|
|
@ -365,7 +365,7 @@ public:
|
|||
void face_end()
|
||||
{ gBuffer.face_end(); }
|
||||
|
||||
Graphic_buffer<float>& get_graphic_buffer()
|
||||
Graphic_storage<float>& get_graphic_buffer()
|
||||
{ return gBuffer; }
|
||||
|
||||
virtual void redraw()
|
||||
|
|
@ -1593,7 +1593,7 @@ public:
|
|||
std::function<bool(QKeyEvent *, CGAL::Basic_viewer_qt<float> *)> on_key_pressed;
|
||||
|
||||
protected:
|
||||
Graphic_buffer<BufferType>& gBuffer;
|
||||
Graphic_storage<BufferType>& gBuffer;
|
||||
|
||||
bool m_draw_vertices;
|
||||
bool m_draw_edges;
|
||||
|
|
@ -1667,7 +1667,7 @@ protected:
|
|||
};
|
||||
|
||||
template <typename BufferType=float>
|
||||
void draw_buffer(Graphic_buffer<BufferType>& graphic_buffer,
|
||||
void draw_buffer(Graphic_storage<BufferType>& graphic_buffer,
|
||||
const char *title="CGAL Basic Viewer")
|
||||
{
|
||||
#if defined(CGAL_TEST_SUITE)
|
||||
|
|
@ -1692,7 +1692,7 @@ void draw_buffer(Graphic_buffer<BufferType>& graphic_buffer,
|
|||
}
|
||||
|
||||
// template <typename BufferType = float>
|
||||
// void draw_buffer(Graphic_buffer<BufferType> &graphic_buffer,
|
||||
// void draw_buffer(Graphic_storage<BufferType> &graphic_buffer,
|
||||
// const std::function<bool(QKeyEvent *, CGAL::Basic_viewer_qt<float> *)>& onPress,
|
||||
// const char *title="CGAL Basic Viewer")
|
||||
// {
|
||||
|
|
@ -1722,7 +1722,7 @@ template <typename BufferType=float>
|
|||
class QApplication_and_basic_viewer
|
||||
{
|
||||
public:
|
||||
QApplication_and_basic_viewer(CGAL::Graphic_buffer<BufferType>& buffer,
|
||||
QApplication_and_basic_viewer(CGAL::Graphic_storage<BufferType>& buffer,
|
||||
const char* title="CGAL Basic Viewer"):
|
||||
m_application(nullptr),
|
||||
m_basic_viewer(nullptr),
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ private:
|
|||
Dart_const_descriptor,
|
||||
Dart_const_descriptor,
|
||||
Dart_const_descriptor> m_drawing_functor;
|
||||
CGAL::Graphic_buffer<float> m_graphic_buffer;
|
||||
CGAL::Graphic_storage<float> m_graphic_buffer;
|
||||
Scene* scene;
|
||||
bool m_previous_scene_empty;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#define CGAL_DRAW_LCC_H
|
||||
|
||||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Linear_cell_complex_base.h>
|
||||
#include <CGAL/Linear_cell_complex_operations.h>
|
||||
|
|
@ -61,7 +61,7 @@ template <typename BufferType=float, class LCC, class DrawingFunctorLCC>
|
|||
void compute_face(const LCC& lcc,
|
||||
typename LCC::Dart_const_handle dh,
|
||||
typename LCC::Dart_const_handle voldh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctorLCC& drawing_functor)
|
||||
{
|
||||
if (!drawing_functor.are_faces_enabled() ||
|
||||
|
|
@ -105,7 +105,7 @@ void compute_face(const LCC& lcc,
|
|||
template <typename BufferType=float, class LCC, class DrawingFunctor>
|
||||
void compute_edge(const LCC& lcc,
|
||||
typename LCC::Dart_const_handle dh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if (!drawing_functor.are_edges_enabled() ||
|
||||
|
|
@ -129,7 +129,7 @@ void compute_edge(const LCC& lcc,
|
|||
template <typename BufferType=float, class LCC, class DrawingFunctorLCC>
|
||||
void compute_vertex(const LCC& lcc,
|
||||
typename LCC::Dart_const_handle dh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctorLCC& drawing_functor)
|
||||
{
|
||||
if (!drawing_functor.are_vertices_enabled() ||
|
||||
|
|
@ -147,7 +147,7 @@ void compute_vertex(const LCC& lcc,
|
|||
|
||||
template <typename BufferType=float, class LCC, class DrawingFunctor>
|
||||
void compute_elements(const LCC& lcc,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
typename LCC::size_type markvolumes = lcc.get_new_mark();
|
||||
|
|
@ -240,7 +240,7 @@ template<unsigned int d_, unsigned int ambient_dim, class Traits_,
|
|||
class Refs, class Storage_,
|
||||
typename BufferType=float, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const CGAL_LCC_TYPE& alcc,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
draw_function_for_lcc::compute_elements(static_cast<const Refs&>(alcc),
|
||||
|
|
@ -254,7 +254,7 @@ template<unsigned int d_, unsigned int ambient_dim, class Traits_,
|
|||
template <unsigned int, class, class, class, class> class Map,
|
||||
class Refs, class Storage_, typename BufferType=float>
|
||||
void add_in_graphic_buffer(const CGAL_LCC_TYPE& alcc,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer)
|
||||
{
|
||||
CGAL::Drawing_functor_with_volume<CGAL_LCC_TYPE,
|
||||
typename CGAL_LCC_TYPE::Dart_const_handle,
|
||||
|
|
@ -288,7 +288,7 @@ template<unsigned int d_, unsigned int ambient_dim, class Traits_,
|
|||
void draw(const CGAL_LCC_TYPE& alcc, const DrawingFunctor& drawing_functor,
|
||||
const char *title="LCC Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(alcc, buffer, drawing_functor);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -300,7 +300,7 @@ template<unsigned int d_, unsigned int ambient_dim, class Traits_,
|
|||
class Refs, class Storage_>
|
||||
void draw(const CGAL_LCC_TYPE& alcc, const char *title="LCC Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(alcc, buffer);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include <CGAL/license/Nef_3.h>
|
||||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Nef_polyhedron_3.h>
|
||||
#include <CGAL/Nef_3/SNC_iteration.h>
|
||||
|
|
@ -95,7 +95,7 @@ class Nef_Visitor {
|
|||
|
||||
public:
|
||||
Nef_Visitor(const Nef_Polyhedron&_nef,
|
||||
CGAL::Graphic_buffer<BufferType>& _graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& _graphic_buffer,
|
||||
const DrawingFunctor&_drawing_functor) :
|
||||
n_faces(0), n_edges(0),
|
||||
nef(_nef),
|
||||
|
|
@ -204,14 +204,14 @@ public:
|
|||
protected:
|
||||
std::unordered_map<Halffacet_const_handle, bool> facets_done;
|
||||
std::unordered_map<Halfedge_const_handle, bool> edges_done;
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer;
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer;
|
||||
const DrawingFunctor& drawing_functor;
|
||||
const Nef_Polyhedron& nef;
|
||||
};
|
||||
|
||||
template <typename BufferType=float, class Nef_Polyhedron, class DrawingFunctor>
|
||||
void compute_elements(const Nef_Polyhedron &nef,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer,
|
||||
const DrawingFunctor &drawing_functor)
|
||||
{
|
||||
|
||||
|
|
@ -240,7 +240,7 @@ void compute_elements(const Nef_Polyhedron &nef,
|
|||
template <typename Kernel_, typename Items_, typename Mark_,
|
||||
typename BufferType=float, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const CGAL_NEF3_TYPE &anef,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer,
|
||||
const DrawingFunctor &drawing_functor)
|
||||
{
|
||||
draw_function_for_nef_polyhedron::compute_elements(anef,
|
||||
|
|
@ -251,7 +251,7 @@ void add_in_graphic_buffer(const CGAL_NEF3_TYPE &anef,
|
|||
template <typename Kernel_, typename Items_, typename Mark_,
|
||||
typename BufferType=float>
|
||||
void add_in_graphic_buffer(const CGAL_NEF3_TYPE &anef,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer)
|
||||
{
|
||||
// Default functor; user can add his own functor.
|
||||
Drawing_functor<CGAL_NEF3_TYPE,
|
||||
|
|
@ -286,7 +286,7 @@ void draw(const CGAL_NEF3_TYPE &anef,
|
|||
const DrawingFunctor &drawing_functor,
|
||||
const char *title="Nef Polyhedron Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer(anef, buffer, drawing_functor);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -296,7 +296,7 @@ template <typename Kernel_, typename Items_, typename Mark_,
|
|||
void draw(const CGAL_NEF3_TYPE &anef,
|
||||
const char *title="Nef Polyhedron Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer(anef, buffer);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <CGAL/license/Periodic_2_triangulation_2.h>
|
||||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Periodic_2_triangulation_2.h>
|
||||
|
|
@ -69,7 +69,7 @@ namespace draw_function_for_P2T2
|
|||
template <typename BufferType=float, class P2T2, class DrawingFunctor>
|
||||
void compute_vertex(const P2T2 &p2t2,
|
||||
typename P2T2::Periodic_point_iterator pi,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
// Construct the point in 9-sheeted covering space and add to viewer
|
||||
|
|
@ -86,7 +86,7 @@ void compute_vertex(const P2T2 &p2t2,
|
|||
template <typename BufferType=float, class P2T2, class DrawingFunctor>
|
||||
void compute_edge(const P2T2 &p2t2,
|
||||
typename P2T2::Periodic_segment_iterator si,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if(!drawing_functor.draw_edge(p2t2, si))
|
||||
|
|
@ -104,7 +104,7 @@ void compute_edge(const P2T2 &p2t2,
|
|||
template <typename BufferType=float, class P2T2, class DrawingFunctor>
|
||||
void compute_face(const P2T2 &p2t2,
|
||||
typename P2T2::Periodic_triangle_iterator ti,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if(!drawing_functor.draw_face(p2t2, ti))
|
||||
|
|
@ -126,7 +126,7 @@ void compute_face(const P2T2 &p2t2,
|
|||
|
||||
template <typename BufferType=float, class P2T2, class DrawingFunctor>
|
||||
void compute_domain(const P2T2& p2t2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
|
||||
|
|
@ -155,7 +155,7 @@ void compute_domain(const P2T2& p2t2,
|
|||
|
||||
template <typename BufferType=float, class P2T2, class DrawingFunctor>
|
||||
void compute_elements(const P2T2& p2t2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
// Get the display type, iterate through periodic elements according
|
||||
|
|
@ -198,7 +198,7 @@ void compute_elements(const P2T2& p2t2,
|
|||
|
||||
template <typename BufferType=float, class Gt, class Tds, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const CGAL_P2T2_TYPE& p2t2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
draw_function_for_P2T2::compute_elements(p2t2, graphic_buffer, drawing_functor);
|
||||
|
|
@ -206,7 +206,7 @@ void add_in_graphic_buffer(const CGAL_P2T2_TYPE& p2t2,
|
|||
|
||||
template <typename BufferType=float, class Gt, class Tds>
|
||||
void add_in_graphic_buffer(const CGAL_P2T2_TYPE& p2t2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer)
|
||||
{
|
||||
CGAL::Drawing_functor_periodic_2_triangulation_2
|
||||
<CGAL_P2T2_TYPE,
|
||||
|
|
@ -225,7 +225,7 @@ void draw(const CGAL_P2T2_TYPE& ap2t2,
|
|||
const DrawingFunctor& drawing_functor,
|
||||
const char* title="2D Periodic Triangulation Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer(ap2t2, buffer, drawing_functor);
|
||||
draw_buffer(buffer);
|
||||
}
|
||||
|
|
@ -234,7 +234,7 @@ template<class Gt, class Tds, class BufferType=float>
|
|||
void draw(const CGAL_P2T2_TYPE& ap2t2,
|
||||
const char* title="2D Periodic Triangulation Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
CGAL::Drawing_functor_periodic_2_triangulation_2
|
||||
<CGAL_P2T2_TYPE,
|
||||
typename CGAL_P2T2_TYPE::Periodic_point_iterator,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include <CGAL/license/Point_set_3.h>
|
||||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Point_set_3.h>
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ namespace draw_function_for_PointSet {
|
|||
|
||||
template <typename BufferType=float, class PointSet, class DrawingFunctor>
|
||||
void compute_elements(const PointSet& pointset,
|
||||
Graphic_buffer<BufferType>& graphic_buffer,
|
||||
Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if (!drawing_functor.are_vertices_enabled())
|
||||
|
|
@ -70,7 +70,7 @@ void compute_elements(const PointSet& pointset,
|
|||
|
||||
template <class P, class V, typename BufferType=float, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const Point_set_3<P, V>& apointset,
|
||||
Graphic_buffer<BufferType>& graphic_buffer,
|
||||
Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
draw_function_for_PointSet::compute_elements(apointset,
|
||||
|
|
@ -80,7 +80,7 @@ void add_in_graphic_buffer(const Point_set_3<P, V>& apointset,
|
|||
|
||||
template <class P, class V, typename BufferType=float>
|
||||
void add_in_graphic_buffer(const Point_set_3<P, V>& apointset,
|
||||
Graphic_buffer<BufferType>& graphic_buffer)
|
||||
Graphic_storage<BufferType>& graphic_buffer)
|
||||
{
|
||||
CGAL::Drawing_functor<Point_set_3<P, V>,
|
||||
typename Point_set_3<P, V>::const_iterator,
|
||||
|
|
@ -96,7 +96,7 @@ void draw(const Point_set_3<P, V>& apointset,
|
|||
const DrawingFunctor& drawing_functor,
|
||||
const char *title="Point_set_3 Basic Viewer")
|
||||
{
|
||||
Graphic_buffer<float> buffer;
|
||||
Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(apointset, buffer, drawing_functor);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@ template <class P, class V>
|
|||
void draw(const Point_set_3<P, V>& apointset,
|
||||
const char *title="Point_set_3 Basic Viewer")
|
||||
{
|
||||
Graphic_buffer<float> buffer;
|
||||
Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(apointset, buffer);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#define CGAL_DRAW_POLYGON_2_H
|
||||
|
||||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Polygon_2.h>
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ namespace draw_function_for_p2 {
|
|||
|
||||
template <typename BufferType=float, class P2, class DrawingFunctor>
|
||||
void compute_elements(const P2& p2,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if (p2.is_empty())
|
||||
|
|
@ -103,13 +103,13 @@ void compute_elements(const P2& p2,
|
|||
|
||||
template<typename BufferType=float, class T, class C, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const CGAL_P2_TYPE& ap2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawingfunctor)
|
||||
{ draw_function_for_p2::compute_elements(ap2, graphic_buffer, drawingfunctor); }
|
||||
|
||||
template<typename BufferType=float, class T, class C>
|
||||
void add_in_graphic_buffer(const CGAL_P2_TYPE& ap2,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer)
|
||||
{
|
||||
CGAL::Drawing_functor<CGAL_P2_TYPE,
|
||||
typename CGAL_P2_TYPE::Vertex_const_iterator,
|
||||
|
|
@ -126,7 +126,7 @@ template <class T, class C>
|
|||
void draw(const CGAL_P2_TYPE &ap2,
|
||||
const char *title="Polygon_2 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(ap2, buffer);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -136,7 +136,7 @@ void draw(const CGAL_P2_TYPE &ap2,
|
|||
const DrawingFunctor& drawingfunctor,
|
||||
const char *title="Polygon_2 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(ap2, buffer, drawingfunctor);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#define CGAL_DRAW_POLYGON_WITH_HOLES_2_H
|
||||
|
||||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Polygon_with_holes_2.h>
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ namespace draw_function_for_ph2_with_holes {
|
|||
template <typename BufferType=float, class P2, class DrawingFunctor>
|
||||
void compute_one_loop_elements(const P2& ap2,
|
||||
const typename P2::General_polygon_2& aloop,
|
||||
Graphic_buffer<BufferType> &graphic_buffer,
|
||||
Graphic_storage<BufferType> &graphic_buffer,
|
||||
bool hole,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
|
|
@ -92,7 +92,7 @@ void compute_one_loop_elements(const P2& ap2,
|
|||
}
|
||||
|
||||
template <typename BufferType=float, class P2, class DrawingFunctor>
|
||||
void compute_elements(const P2& p2, Graphic_buffer<BufferType> &graphic_buffer,
|
||||
void compute_elements(const P2& p2, Graphic_storage<BufferType> &graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if (p2.outer_boundary().is_empty()) return;
|
||||
|
|
@ -128,7 +128,7 @@ void compute_elements(const P2& p2, Graphic_buffer<BufferType> &graphic_buffer,
|
|||
|
||||
template <class T, class C, typename BufferType=float, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const CGAL_P2_WITH_HOLES_TYPE& p2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor &drawing_functor)
|
||||
{
|
||||
draw_function_for_ph2_with_holes::compute_elements(p2, graphic_buffer,
|
||||
|
|
@ -137,7 +137,7 @@ void add_in_graphic_buffer(const CGAL_P2_WITH_HOLES_TYPE& p2,
|
|||
|
||||
template <class T, class C, typename BufferType=float>
|
||||
void add_in_graphic_buffer(const CGAL_P2_WITH_HOLES_TYPE& p2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer)
|
||||
{
|
||||
Drawing_functor<CGAL_P2_WITH_HOLES_TYPE,
|
||||
typename CGAL_P2_WITH_HOLES_TYPE::General_polygon_2::Vertex_const_iterator,
|
||||
|
|
@ -154,7 +154,7 @@ template<class T, class C, typename BufferType=float, class DrawingFunctor>
|
|||
void draw(const CGAL_P2_WITH_HOLES_TYPE& ap2, const DrawingFunctor &drawing_functor,
|
||||
const char* title="Polygon with Holes Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer(ap2, buffer, drawing_functor);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -163,7 +163,7 @@ template<class T, class C, typename BufferType=float>
|
|||
void draw(const CGAL_P2_WITH_HOLES_TYPE& ap2,
|
||||
const char* title="Polygon with Holes Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer(ap2, buffer);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#define CGAL_DRAW_POLYHEDRON_H
|
||||
|
||||
#include <CGAL/license/Polyhedron.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Polyhedron_3.h>
|
||||
#include <CGAL/draw_face_graph.h>
|
||||
|
|
@ -35,7 +35,7 @@ template<class PolyhedronTraits_3,
|
|||
typename BufferType=float,
|
||||
class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const CGAL_POLY_TYPE& apoly,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer,
|
||||
const DrawingFunctor &drawing_functor)
|
||||
{ add_in_graphic_buffer_for_fg(apoly, graphic_buffer, drawing_functor); }
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ template<class PolyhedronTraits_3,
|
|||
class Alloc,
|
||||
typename BufferType=float>
|
||||
void add_in_graphic_buffer(const CGAL_POLY_TYPE& apoly,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer)
|
||||
{ add_in_graphic_buffer_for_fg(apoly, graphic_buffer); }
|
||||
|
||||
// Specialization of draw function: require Qt and the CGAL basic viewer.
|
||||
|
|
@ -61,7 +61,7 @@ template<class PolyhedronTraits_3,
|
|||
void draw(const CGAL_POLY_TYPE& apoly,
|
||||
const char* title="Polyhedron Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer_for_fg(apoly, buffer);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ void draw(const CGAL_POLY_TYPE& apoly,
|
|||
const DrawingFunctor &drawing_functor,
|
||||
const char* title="Polyhedron Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer_for_fg(apoly, buffer, drawing_functor);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <CGAL/license/Straight_skeleton_2.h>
|
||||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Straight_skeleton_2.h>
|
||||
#include <sstream>
|
||||
|
|
@ -26,7 +26,7 @@ namespace draw_function_for_ss2 {
|
|||
|
||||
template <typename BufferType=float, class SS2, class DrawingFunctor>
|
||||
void compute_edge(const SS2& ss2, typename SS2::Halfedge_const_handle eh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if (!drawing_functor.draw_edge(ss2, eh))
|
||||
|
|
@ -48,7 +48,7 @@ void compute_edge(const SS2& ss2, typename SS2::Halfedge_const_handle eh,
|
|||
template<typename BufferType=float, class SS2, class DrawingFunctor>
|
||||
void print_halfedge_labels(const SS2& ss2,
|
||||
typename SS2::Halfedge_const_handle h,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
// TODO? a functor different from draw_edge to allow to show only some labels ??
|
||||
|
|
@ -67,7 +67,7 @@ void print_halfedge_labels(const SS2& ss2,
|
|||
|
||||
template <typename BufferType = float, class SS2, class DrawingFunctor>
|
||||
void compute_vertex(const SS2& ss2, typename SS2::Vertex_const_handle vh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if (!drawing_functor.draw_vertex(ss2, vh))
|
||||
|
|
@ -84,7 +84,7 @@ void compute_vertex(const SS2& ss2, typename SS2::Vertex_const_handle vh,
|
|||
template <typename BufferType=float, class SS2, class DrawingFunctor>
|
||||
void print_vertex_label(const SS2& ss2,
|
||||
typename SS2::Vertex_const_handle vh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
// TODO? a functor different from draw_vertex to allow to show only some labels ??
|
||||
|
|
@ -98,7 +98,7 @@ void print_vertex_label(const SS2& ss2,
|
|||
|
||||
template <typename BufferType=float, class SS2, class DrawingFunctor>
|
||||
void compute_elements(const SS2& ss2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if (!drawing_functor.are_edges_enabled())
|
||||
|
|
@ -131,7 +131,7 @@ void compute_elements(const SS2& ss2,
|
|||
|
||||
template <typename BufferType=float, class K, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const CGAL_SS_TYPE &ass2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
draw_function_for_ss2::compute_elements(ass2, graphic_buffer,
|
||||
|
|
@ -140,7 +140,7 @@ void add_in_graphic_buffer(const CGAL_SS_TYPE &ass2,
|
|||
|
||||
template <typename BufferType=float, class K>
|
||||
void add_in_graphic_buffer(const CGAL_SS_TYPE& ass2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer)
|
||||
{
|
||||
Drawing_functor<CGAL_SS_TYPE,
|
||||
typename CGAL_SS_TYPE::Vertex_const_handle,
|
||||
|
|
@ -186,7 +186,7 @@ template <class K, class DrawingFunctor>
|
|||
void draw(const CGAL_SS_TYPE &ass2, const DrawingFunctor &drawingfunctor,
|
||||
const char *title="Straight Skeleton Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(ass2, buffer, drawingfunctor);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ template <class K>
|
|||
void draw(const CGAL_SS_TYPE &ass2,
|
||||
const char *title="Straight Skeleton Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(ass2, buffer);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ void draw(const SM& asm);
|
|||
#else // DOXYGEN_RUNNING
|
||||
|
||||
#include <CGAL/license/Surface_mesh.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Surface_mesh.h>
|
||||
#include <CGAL/draw_face_graph.h>
|
||||
|
|
@ -41,13 +41,13 @@ namespace CGAL
|
|||
|
||||
template<class K, typename BufferType=float, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const Surface_mesh<K>& amesh,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer,
|
||||
const DrawingFunctor &drawing_functor)
|
||||
{ add_in_graphic_buffer_for_fg(amesh, graphic_buffer, drawing_functor); }
|
||||
|
||||
template<class K, typename BufferType=float>
|
||||
void add_in_graphic_buffer(const Surface_mesh<K>& amesh,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer)
|
||||
{ add_in_graphic_buffer_for_fg(amesh, graphic_buffer); }
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
|
|
@ -57,7 +57,7 @@ template<class K, typename BufferType=float>
|
|||
void draw(const Surface_mesh<K>& amesh,
|
||||
const char* title="Surface_mesh Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer_for_fg(amesh, buffer);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ void draw(const Surface_mesh<K>& amesh,
|
|||
const DrawingFunctor &drawing_functor,
|
||||
const char* title="Surface_mesh Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer_for_fg(amesh, buffer, drawing_functor);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include <CGAL/license/Surface_mesh_topology.h>
|
||||
|
||||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
|
||||
#include <iostream>
|
||||
|
|
@ -145,7 +145,7 @@ template <typename Mesh, typename BufferType=float, class DrawingFunctor>
|
|||
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,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if(!drawing_functor.draw_face(lcc, dh))
|
||||
|
|
@ -193,7 +193,7 @@ 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,
|
||||
typename Get_map<Mesh, Mesh>::type::size_type m_amark,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
DrawingFunctor& drawing_functor,
|
||||
bool draw_marked_darts=true)
|
||||
{
|
||||
|
|
@ -224,7 +224,7 @@ 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,
|
||||
const CGAL::IO::Color& color,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer)
|
||||
{
|
||||
typedef typename Get_map<Mesh, Mesh>::type LCC;
|
||||
typedef typename LCC::Dart_const_descriptor Dart_const_descriptor;
|
||||
|
|
@ -241,7 +241,7 @@ void compute_edge(const Mesh &mesh,
|
|||
template <typename Mesh, typename BufferType = float>
|
||||
void compute_vertex(const Mesh &mesh,
|
||||
typename Get_map<Mesh, Mesh>::type::Dart_const_descriptor dh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
DrawingFunctor& drawing_functor)
|
||||
{
|
||||
typedef typename CGAL::Get_traits<Mesh>::Kernel Kernel;
|
||||
|
|
@ -253,7 +253,7 @@ void compute_vertex(const Mesh &mesh,
|
|||
template <typename Mesh, typename BufferType = float>
|
||||
void compute_path(const Mesh &mesh,
|
||||
const typename Get_map<Mesh, Mesh>::storage_type& lcc,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer,
|
||||
const std::vector<Surface_mesh_topology::Path_on_surface<Mesh>>* m_paths,
|
||||
std::size_t i,
|
||||
typename Get_map<Mesh, Mesh>::type::size_type amark)
|
||||
|
|
@ -282,7 +282,7 @@ void compute_path(const Mesh &mesh,
|
|||
|
||||
template <class Mesh, class DrawingFunctor, typename BufferType = float>
|
||||
void compute_elements(const Mesh &mesh,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer,
|
||||
const DrawingFunctor &m_drawing_functor,
|
||||
const std::vector<Surface_mesh_topology::Path_on_surface<Mesh>>* m_paths,
|
||||
typename Get_map<Mesh, Mesh>::type::size_type amark)
|
||||
|
|
@ -371,7 +371,7 @@ void compute_elements(const Mesh &mesh,
|
|||
|
||||
template <typename BufferType=float, class Mesh, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const Mesh& mesh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const std::vector<Surface_mesh_topology::Path_on_surface<Mesh>>* paths,
|
||||
const DrawingFunctor& drawing_functor,
|
||||
typename Get_map<Mesh, Mesh>::type::size_type amark=
|
||||
|
|
@ -385,7 +385,7 @@ void add_in_graphic_buffer(const Mesh& mesh,
|
|||
|
||||
template <typename BufferType = float, class Mesh>
|
||||
void add_in_graphic_buffer(const Mesh& mesh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const std::vector<Surface_mesh_topology::Path_on_surface<Mesh>>* paths,
|
||||
typename Get_map<Mesh, Mesh>::type::size_type amark=
|
||||
typename Get_map<Mesh, Mesh>::type::INVALID_MARK)
|
||||
|
|
@ -409,7 +409,7 @@ void draw(const Mesh& mesh,
|
|||
(std::numeric_limits<typename Get_map<Mesh, Mesh>::type::size_type>::max)(),
|
||||
const char* title="Mesh Viewer With Path")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer(mesh, buffer, &paths, amark);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -422,7 +422,7 @@ void draw(const Mesh& mesh,
|
|||
(std::numeric_limits<typename Get_map<Mesh, Mesh>::type::size_type>::max)(),
|
||||
const char* title="Mesh Viewer With Path")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer(mesh, buffer, drawing_functor, &paths, amark);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -435,7 +435,7 @@ void draw(const Mesh& mesh,
|
|||
const char* title="Mesh Viewer With Path")
|
||||
{
|
||||
std::vector<Surface_mesh_topology::Path_on_surface<Mesh>> paths=l;
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer(mesh, buffer, &paths, amark);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ struct Polygon_triangulation_drawing_functor :
|
|||
template <class K, class TDS, typename Itag,
|
||||
typename BufferType=float, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const CGAL_CT2_TYPE& ct2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
draw_function_for_t2::compute_elements(ct2, graphic_buffer, drawing_functor);
|
||||
|
|
@ -74,7 +74,7 @@ template <class K, class TDS, typename Itag, class DrawingFunctor>
|
|||
void draw(const CGAL_CT2_TYPE &ct2, const DrawingFunctor &drawingfunctor,
|
||||
const char *title="Constrained Triangulation_2 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(ct2, buffer, drawingfunctor);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <CGAL/license/Triangulation_2.h>
|
||||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Triangulation_2.h>
|
||||
#include <CGAL/Random.h>
|
||||
|
|
@ -27,7 +27,7 @@ namespace draw_function_for_t2 {
|
|||
template <typename BufferType=float, class T2, class DrawingFunctor>
|
||||
void compute_face(const T2& t2,
|
||||
typename T2::Finite_faces_iterator fh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if (!drawing_functor.draw_face(t2, fh))
|
||||
|
|
@ -47,7 +47,7 @@ void compute_face(const T2& t2,
|
|||
|
||||
template <typename BufferType=float, class T2, class DrawingFunctor>
|
||||
void compute_edge(const T2& t2, typename T2::Finite_edges_iterator eh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if (!drawing_functor.draw_edge(t2, eh))
|
||||
|
|
@ -70,7 +70,7 @@ void compute_edge(const T2& t2, typename T2::Finite_edges_iterator eh,
|
|||
|
||||
template <typename BufferType=float, class T2, class DrawingFunctor>
|
||||
void compute_vertex(const T2& t2, typename T2::Vertex_handle vh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if (!drawing_functor.draw_vertex(t2, vh))
|
||||
|
|
@ -88,7 +88,7 @@ void compute_vertex(const T2& t2, typename T2::Vertex_handle vh,
|
|||
|
||||
template <typename BufferType=float, class T2, class DrawingFunctor>
|
||||
void compute_elements(const T2& t2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if (drawing_functor.are_faces_enabled())
|
||||
|
|
@ -119,7 +119,7 @@ void compute_elements(const T2& t2,
|
|||
|
||||
template <class Gt, class Tds, typename BufferType=float, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const CGAL_T2_TYPE& at2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
draw_function_for_t2::compute_elements(at2, graphic_buffer, drawing_functor);
|
||||
|
|
@ -127,9 +127,9 @@ void add_in_graphic_buffer(const CGAL_T2_TYPE& at2,
|
|||
|
||||
template <class Gt, class Tds, typename BufferType=float>
|
||||
void add_in_graphic_buffer(const CGAL_T2_TYPE& at2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer)
|
||||
{
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
Drawing_functor<CGAL_T2_TYPE,
|
||||
typename CGAL_T2_TYPE::Vertex_handle,
|
||||
typename CGAL_T2_TYPE::Finite_edges_iterator,
|
||||
|
|
@ -157,7 +157,7 @@ template <class Gt, class Tds, class DrawingFunctor>
|
|||
void draw(const CGAL_T2_TYPE &at2, const DrawingFunctor &drawingfunctor,
|
||||
const char *title="Triangulation_2 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(at2, buffer, drawingfunctor);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -166,7 +166,7 @@ template <class Gt, class Tds>
|
|||
void draw(const CGAL_T2_TYPE& at2,
|
||||
const char *title="Triangulation_2 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(at2, buffer);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <CGAL/license/Triangulation_3.h>
|
||||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Random.h>
|
||||
#include <CGAL/Triangulation_3.h>
|
||||
|
|
@ -28,7 +28,7 @@ namespace draw_function_for_t3
|
|||
template <typename BufferType=float, class T3, class DrawingFunctor>
|
||||
void compute_face(typename T3::Finite_facets_iterator fh,
|
||||
const DrawingFunctor& drawing_functor,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer, const T3 *t3)
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer, const T3 *t3)
|
||||
{
|
||||
if(!drawing_functor.draw_face(*t3, fh))
|
||||
{ return; }
|
||||
|
|
@ -50,7 +50,7 @@ void compute_face(typename T3::Finite_facets_iterator fh,
|
|||
|
||||
template <typename BufferType=float, class T3, class DrawingFunctor>
|
||||
void compute_edge(typename T3::Finite_edges_iterator eh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor, const T3* t3)
|
||||
{
|
||||
if(!drawing_functor.draw_edge(*t3, eh))
|
||||
|
|
@ -70,7 +70,7 @@ void compute_edge(typename T3::Finite_edges_iterator eh,
|
|||
|
||||
template <typename BufferType=float, class T3, class DrawingFunctor>
|
||||
void compute_vertex(typename T3::Vertex_handle vh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor, const T3* t3)
|
||||
{
|
||||
if(!drawing_functor.draw_vertex(*t3, vh))
|
||||
|
|
@ -86,7 +86,7 @@ void compute_vertex(typename T3::Vertex_handle vh,
|
|||
|
||||
template <typename BufferType=float, class T3, class DrawingFunctor>
|
||||
void compute_elements(const T3* t3,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if (drawing_functor.are_faces_enabled())
|
||||
|
|
@ -118,7 +118,7 @@ void compute_elements(const T3* t3,
|
|||
template <class Gt, class Tds, class Lock_data_structure,
|
||||
typename BufferType=float, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const CGAL_T3_TYPE& at3,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
draw_function_for_t3::compute_elements(&at3, graphic_buffer, drawing_functor);
|
||||
|
|
@ -127,7 +127,7 @@ void add_in_graphic_buffer(const CGAL_T3_TYPE& at3,
|
|||
template <class Gt, class Tds, class Lock_data_structure,
|
||||
typename BufferType=float>
|
||||
void add_in_graphic_buffer(const CGAL_T3_TYPE& at3,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer)
|
||||
{
|
||||
CGAL::Drawing_functor<CGAL_T3_TYPE,
|
||||
typename CGAL_T3_TYPE::Vertex_handle,
|
||||
|
|
@ -161,7 +161,7 @@ template<class Gt, class Tds, class Lock_data_structure, class DrawingFunctor>
|
|||
void draw(const CGAL_T3_TYPE &at3, const DrawingFunctor &drawingfunctor,
|
||||
const char *title="T3 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(at3, buffer, drawingfunctor);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -169,7 +169,7 @@ void draw(const CGAL_T3_TYPE &at3, const DrawingFunctor &drawingfunctor,
|
|||
template <class Gt, class Tds, class Lock_data_structure>
|
||||
void draw(const CGAL_T3_TYPE &at3, const char *title="T3 Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<float> buffer;
|
||||
CGAL::Graphic_storage<float> buffer;
|
||||
add_in_graphic_buffer(at3, buffer);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <CGAL/license/Voronoi_diagram_2.h>
|
||||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||
#include <CGAL/Graphic_buffer.h>
|
||||
#include <CGAL/Graphic_storage.h>
|
||||
#include <CGAL/Drawing_functor.h>
|
||||
#include <CGAL/Triangulation_utils_2.h>
|
||||
#include <CGAL/Voronoi_diagram_2.h>
|
||||
|
|
@ -72,7 +72,7 @@ typedef Local_kernel::Vector_3 Local_vector;
|
|||
template <typename BufferType=float, class V2, class DrawingFunctor>
|
||||
void compute_vertex(const V2& v2,
|
||||
typename V2::Vertex_iterator vh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if(!drawing_functor.draw_vertex(v2, vh))
|
||||
|
|
@ -87,14 +87,14 @@ void compute_vertex(const V2& v2,
|
|||
template <typename BufferType=float, class V2, class DrawingFunctor>
|
||||
void compute_dual_vertex(const V2& /*v2*/,
|
||||
typename V2::Delaunay_graph::Finite_vertices_iterator vi,
|
||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType> &graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{ graphic_buffer.add_point(vi->point(), drawing_functor.dual_vertex_color); }
|
||||
|
||||
template <typename BufferType=float, class V2, class DrawingFunctor>
|
||||
void add_segments_and_update_bounding_box(const V2& v2,
|
||||
typename V2::Halfedge_iterator he,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
DrawingFunctor& drawing_functor)
|
||||
{
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
|
||||
|
|
@ -224,7 +224,7 @@ Local_kernel::Point_2 get_second_point(typename V2::Halfedge_handle ray,
|
|||
template <typename BufferType=float, class V2, class DrawingFunctor>
|
||||
void compute_rays_and_bisectors(const V2&,
|
||||
typename V2::Halfedge_iterator he,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
|
||||
|
|
@ -254,7 +254,7 @@ void compute_rays_and_bisectors(const V2&,
|
|||
template <typename BufferType=float, class V2, class DrawingFunctor>
|
||||
void compute_face(const V2& v2,
|
||||
typename V2::Face_iterator fh,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& m_drawing_functor)
|
||||
{
|
||||
if(fh->is_unbounded() || !m_drawing_functor.draw_face(v2, fh))
|
||||
|
|
@ -288,7 +288,7 @@ void compute_face(const V2& v2,
|
|||
|
||||
template <typename BufferType=float, class V2, class DrawingFunctor>
|
||||
void compute_elements(const V2& v2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& drawing_functor)
|
||||
{
|
||||
if(drawing_functor.are_vertices_enabled())
|
||||
|
|
@ -338,7 +338,7 @@ void compute_elements(const V2& v2,
|
|||
template <class DG, class AT, class AP,
|
||||
typename BufferType=float, class DrawingFunctor>
|
||||
void add_in_graphic_buffer(const CGAL_VORONOI_TYPE &v2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer,
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer,
|
||||
const DrawingFunctor& m_drawing_functor)
|
||||
{
|
||||
draw_function_for_v2::compute_elements(v2, graphic_buffer, m_drawing_functor);
|
||||
|
|
@ -346,7 +346,7 @@ void add_in_graphic_buffer(const CGAL_VORONOI_TYPE &v2,
|
|||
|
||||
template <class DG, class AT, class AP, typename BufferType=float>
|
||||
void add_in_graphic_buffer(const CGAL_VORONOI_TYPE& v2,
|
||||
CGAL::Graphic_buffer<BufferType>& graphic_buffer)
|
||||
CGAL::Graphic_storage<BufferType>& graphic_buffer)
|
||||
{
|
||||
// Default functor; user can add his own functor.
|
||||
CGAL::Drawing_functor_voronoi<CGAL_VORONOI_TYPE,
|
||||
|
|
@ -367,7 +367,7 @@ void draw(const CGAL_VORONOI_TYPE& av2,
|
|||
const DrawingFunctor& drawing_functor,
|
||||
const char *title="2D Voronoi Diagram Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
add_in_graphic_buffer(av2, buffer, drawing_functor);
|
||||
draw_buffer(buffer, title);
|
||||
}
|
||||
|
|
@ -376,7 +376,7 @@ template<class DG, class AT, class AP, typename BufferType=float>
|
|||
void draw(const CGAL_VORONOI_TYPE& av2,
|
||||
const char *title="2D Voronoi Diagram Basic Viewer")
|
||||
{
|
||||
CGAL::Graphic_buffer<BufferType> buffer;
|
||||
CGAL::Graphic_storage<BufferType> buffer;
|
||||
|
||||
CGAL::Drawing_functor_voronoi<CGAL_VORONOI_TYPE,
|
||||
typename CGAL_VORONOI_TYPE::Vertex_iterator,
|
||||
|
|
|
|||
Loading…
Reference in New Issue