Error in build didn't see gBuffer, and add_in_graphic_buffer_lcc

This commit is contained in:
Mostafa-ashraf19 2022-09-10 21:19:17 +02:00
parent ca7ae5f878
commit 382aa602d7
2 changed files with 14 additions and 11 deletions

View File

@ -16,17 +16,16 @@
#include <CGAL/Qt/vec.h>
Viewer::Viewer(QWidget *parent)
// TODO: add a new constructor that does not take graphic buffer.
: Base(parent, ""), m_drawing_functor(MyDrawingFunctorLCC()),
m_nofaces(false), m_random_face_color(false),
: Base(parent, ""), m_drawing_functor_(MyDrawingFunctorLCC()),
m_nofaces_(false), m_random_face_color_(false),
m_previous_scene_empty(true) {}
void Viewer::setScene(Scene *scene_, bool doredraw) {
scene = scene_;
if (scene->lcc != nullptr) {
compute_elements(gBuffer, scene->lcc, m_drawing_functor, m_nofaces,
m_random_face_color);
CGAL::add_in_graphic_buffer_lcc(gBuffer, m_drawing_functor_, scene->lcc, m_nofaces_,
m_random_face_color_);
}
if (doredraw) {
@ -35,8 +34,9 @@ void Viewer::setScene(Scene *scene_, bool doredraw) {
}
void Viewer::sceneChanged() {
compute_elements(gBuffer, scene->lcc, m_drawing_functor, m_nofaces,
m_random_face_color);
CGAL::add_in_graphic_buffer_lcc(gBuffer, m_drawing_functor_, scene->lcc,
m_nofaces_, m_random_face_color_);
this->camera()->setSceneBoundingBox(
CGAL::qglviewer::Vec(gBuffer.get_bounding_box().xmin(),

View File

@ -16,7 +16,10 @@
#include "typedefs.h"
#include <CGAL/draw_linear_cell_complex_function.h>
// QUESTION: When I added this line compiler tell me "No such file or directory!" how?
// #include <CGAL/draw_linear_cell_complex_function.h>
#include <CGAL/draw_linear_cell_complex.h>
#include <CGAL/Qt/Basic_viewer_qt.h>
// Functor used by SimpleLCCViewerQt to colorize of not elements.
@ -107,7 +110,7 @@ struct MyDrawingFunctorLCC
};
class Viewer : public Basic_viewer_qt
class Viewer : public CGAL::Basic_viewer_qt
{
Q_OBJECT
@ -123,8 +126,8 @@ public Q_SLOTS:
void sceneChanged();
private:
const DrawingFunctorLCC &m_drawing_functor;
bool m_nofaces, m_random_face_color;
const MyDrawingFunctorLCC &m_drawing_functor_;
bool m_nofaces_, m_random_face_color_;
Scene* scene;
bool m_previous_scene_empty;
};