refactor using pimpl and fix test

This commit is contained in:
AndreaRigoni
2026-03-25 16:18:07 +00:00
parent a467b7385b
commit 7d4acaef6d
17 changed files with 479 additions and 412 deletions

View File

@@ -1,44 +1,17 @@
/*//////////////////////////////////////////////////////////////////////////////
// CMT Cosmic Muon Tomography project //////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Copyright (c) 2014, Universita' degli Studi di Padova, INFN sez. di Padova
All rights reserved
Authors: Andrea Rigoni Garola < andrea.rigoni@pd.infn.it >
------------------------------------------------------------------
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library.
//////////////////////////////////////////////////////////////////////////////*/
#ifndef ULIBVTKVIEWER_H
#define ULIBVTKVIEWER_H
#include <iostream>
#include "vtkViewport.h"
class vtkRenderWindow;
class vtkRenderWindowInteractor;
class vtkRenderer;
class vtkCameraOrientationWidget;
namespace uLib {
namespace Vtk {
// template <class T> class Tie {
// public:
// void DoAction() {
// std::cout << "Tie::DoAction -> generic Tie does nothing\n";
// }
// };
struct ViewerData;
class Viewer : public Viewport {
@@ -49,9 +22,9 @@ public:
// Render scene
virtual void Render() override;
static vtkSmartPointer<vtkCameraOrientationWidget>
static vtkCameraOrientationWidget *
MakeCameraOrientationWidget(vtkRenderWindowInteractor *interactor,
vtkRenderer *renderer);
vtkRenderer *renderer);
void Start();
@@ -65,15 +38,9 @@ private:
void SetupGridButton();
void UpdateGridButtonPosition();
vtkRenderWindow *m_RenderWindow;
vtkSmartPointer<class vtkButtonWidget> m_GridButton;
struct ViewerData *d;
};
// template <> class Tie<Viewer> {
// public:
// void DoAction() { std::cout << " VIEWER TIE !!! \n"; }
// };
} // namespace Vtk
} // namespace uLib