mirror of https://github.com/CGAL/cgal
spaces
This commit is contained in:
parent
331bc5c305
commit
744986f2a1
|
|
@ -3,7 +3,7 @@ namespace CGAL {
|
||||||
|
|
||||||
\mainpage User Manual
|
\mainpage User Manual
|
||||||
\anchor Chapter_CGAL_Basic_viewers
|
\anchor Chapter_CGAL_Basic_viewers
|
||||||
\anchor
|
\anchor
|
||||||
\cgalAutoToc
|
\cgalAutoToc
|
||||||
\author Guillaume Damiand, Mostafa Ashraf
|
\author Guillaume Damiand, Mostafa Ashraf
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ public:
|
||||||
if (m_flat_normal_buffer!=nullptr) { m_flat_normal_buffer->clear(); }
|
if (m_flat_normal_buffer!=nullptr) { m_flat_normal_buffer->clear(); }
|
||||||
if (m_gouraud_normal_buffer!=nullptr) { m_gouraud_normal_buffer->clear(); }
|
if (m_gouraud_normal_buffer!=nullptr) { m_gouraud_normal_buffer->clear(); }
|
||||||
if (m_bb!=nullptr) { (*m_bb)=CGAL::Bbox_3(); }
|
if (m_bb!=nullptr) { (*m_bb)=CGAL::Bbox_3(); }
|
||||||
|
|
||||||
m_zero_x=true;
|
m_zero_x=true;
|
||||||
m_zero_y=true;
|
m_zero_y=true;
|
||||||
m_zero_z=true;
|
m_zero_z=true;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
#include <CGAL/Qt/vec.h>
|
#include <CGAL/Qt/vec.h>
|
||||||
|
|
||||||
Viewer::Viewer(QWidget *parent)
|
Viewer::Viewer(QWidget *parent)
|
||||||
: Base(parent, m_graphic_buffer, ""),
|
: Base(parent, m_graphic_buffer, ""),
|
||||||
m_previous_scene_empty(true)
|
m_previous_scene_empty(true)
|
||||||
{
|
{
|
||||||
m_drawing_functor.volume_color=[](const LCC & alcc,
|
m_drawing_functor.volume_color=[](const LCC & alcc,
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ enum Display_type
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename BufferType = float, class P2T2>
|
template <typename BufferType = float, class P2T2>
|
||||||
void compute_vertex(typename P2T2::Periodic_point_iterator pi, const P2T2 &p2t2,
|
void compute_vertex(typename P2T2::Periodic_point_iterator pi, const P2T2 &p2t2,
|
||||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer)
|
CGAL::Graphic_buffer<BufferType> &graphic_buffer)
|
||||||
{
|
{
|
||||||
// Construct the point in 9-sheeted covering space and add to viewer
|
// Construct the point in 9-sheeted covering space and add to viewer
|
||||||
|
|
@ -46,7 +46,7 @@ void compute_vertex(typename P2T2::Periodic_point_iterator pi, const P2T2 &p2t2,
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename BufferType = float, class P2T2>
|
template <typename BufferType = float, class P2T2>
|
||||||
void compute_edge(typename P2T2::Periodic_segment_iterator si, const P2T2 &p2t2,
|
void compute_edge(typename P2T2::Periodic_segment_iterator si, const P2T2 &p2t2,
|
||||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer)
|
CGAL::Graphic_buffer<BufferType> &graphic_buffer)
|
||||||
{
|
{
|
||||||
typedef typename P2T2::Segment Segment;
|
typedef typename P2T2::Segment Segment;
|
||||||
|
|
@ -57,8 +57,8 @@ void compute_edge(typename P2T2::Periodic_segment_iterator si, const P2T2 &p2t2,
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename BufferType = float, class P2T2, class DrawingFunctor>
|
template <typename BufferType = float, class P2T2, class DrawingFunctor>
|
||||||
void compute_face(typename P2T2::Periodic_triangle_iterator ti, const P2T2 &p2t2,
|
void compute_face(typename P2T2::Periodic_triangle_iterator ti, const P2T2 &p2t2,
|
||||||
CGAL::Graphic_buffer<BufferType> &graphic_buffer,
|
CGAL::Graphic_buffer<BufferType> &graphic_buffer,
|
||||||
const DrawingFunctor &m_drawing_functor)
|
const DrawingFunctor &m_drawing_functor)
|
||||||
{
|
{
|
||||||
typedef typename P2T2::Triangle Triangle;
|
typedef typename P2T2::Triangle Triangle;
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ namespace draw_function_for_ph2_with_holes {
|
||||||
template <typename BufferType = float, class P2>
|
template <typename BufferType = float, class P2>
|
||||||
void compute_one_loop_elements(const typename P2::General_polygon_2& p, Graphic_buffer<BufferType> &graphic_buffer, bool hole)
|
void compute_one_loop_elements(const typename P2::General_polygon_2& p, Graphic_buffer<BufferType> &graphic_buffer, bool hole)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (hole)
|
if (hole)
|
||||||
{ graphic_buffer.add_point_in_face(p.vertex(p.size()-1)); }
|
{ graphic_buffer.add_point_in_face(p.vertex(p.size()-1)); }
|
||||||
|
|
||||||
|
|
@ -73,7 +73,7 @@ void compute_one_loop_elements(const typename P2::General_polygon_2& p, Graphic_
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename BufferType = float, class P2, class DrawingFunctor>
|
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_buffer<BufferType> &graphic_buffer,
|
||||||
const DrawingFunctor &m_drawing_functor)
|
const DrawingFunctor &m_drawing_functor)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
|
||||||
namespace draw_function_for_lcc
|
namespace draw_function_for_lcc
|
||||||
{
|
{
|
||||||
// We need to re-use the namespace draw_function_for_lcc because we want to specialize
|
// We need to re-use the namespace draw_function_for_lcc because we want to specialize
|
||||||
|
|
@ -98,14 +98,14 @@ struct LCC_geom_utils<CGAL::Face_graph_wrapper<Mesh>, Local_kernel, 3>
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace draw_function_for_lcc
|
} // namespace draw_function_for_lcc
|
||||||
|
|
||||||
namespace draw_function_for_face_graph_with_paths
|
namespace draw_function_for_face_graph_with_paths
|
||||||
{
|
{
|
||||||
|
|
||||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel;
|
typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel;
|
||||||
typedef Local_kernel::Point_3 Local_point;
|
typedef Local_kernel::Point_3 Local_point;
|
||||||
typedef Local_kernel::Vector_3 Local_vector;
|
typedef Local_kernel::Vector_3 Local_vector;
|
||||||
|
|
||||||
// Destructor.
|
// Destructor.
|
||||||
// lcc.free_mark(m_oriented_mark);
|
// lcc.free_mark(m_oriented_mark);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ void compute_elements(const T3 *t3, CGAL::Graphic_buffer<BufferType> &graphic_bu
|
||||||
compute_vertex(it, graphic_buffer, drawing_functor, t3);
|
compute_vertex(it, graphic_buffer, drawing_functor, t3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace draw_function_for_t3
|
} // namespace draw_function_for_t3
|
||||||
|
|
||||||
template <typename BufferType = float, class T3, class DrawingFunctor>
|
template <typename BufferType = float, class T3, class DrawingFunctor>
|
||||||
|
|
@ -149,10 +149,10 @@ void add_in_graphic_buffer(const T3 &at3,
|
||||||
|
|
||||||
CGAL::Random random((unsigned int)((std::size_t)(&*(fh->first)) +
|
CGAL::Random random((unsigned int)((std::size_t)(&*(fh->first)) +
|
||||||
(std::size_t)(fh->second)));
|
(std::size_t)(fh->second)));
|
||||||
|
|
||||||
return get_random_color(random);
|
return get_random_color(random);
|
||||||
};
|
};
|
||||||
|
|
||||||
add_in_graphic_buffer(at3, graphic_buffer, drawing_functor);
|
add_in_graphic_buffer(at3, graphic_buffer, drawing_functor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue