21 #ifndef SNARK_GRAPHICS_APPLICATIONS_VIEWPOINTS_VIEWER_H_
22 #define SNARK_GRAPHICS_APPLICATIONS_VIEWPOINTS_VIEWER_H_
30 #include <boost/optional.hpp>
31 #include <boost/thread.hpp>
32 #include <snark/graphics/qt3d/view.h>
33 #include "./CameraReader.h"
36 namespace snark {
namespace graphics {
namespace View {
38 class Viewer :
public qt3d::view
42 std::vector< boost::shared_ptr< Reader > > readers;
43 Viewer(
const QColor4ub& background_color,
double fov,
bool z_up,
bool orthographic =
false,
44 boost::optional< comma::csv::options > cameracsv = boost::optional< comma::csv::options >(),
45 boost::optional< Eigen::Vector3d > cameraposition = boost::optional< Eigen::Vector3d >(),
46 boost::optional< Eigen::Vector3d > cameraorientation = boost::optional< Eigen::Vector3d >()
55 void initializeGL( QGLPainter *painter );
56 void paintGL( QGLPainter *painter );
57 void setCameraPosition(
const Eigen::Vector3d& position,
const Eigen::Vector3d& orientation );
61 boost::scoped_ptr< CameraReader > m_cameraReader;
62 boost::optional< Eigen::Vector3d > m_cameraposition;
63 boost::optional< Eigen::Vector3d > m_cameraorientation;