ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ViewParameters.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <IJsonConvertible.h>
11 
12 #include <Eigen/Core>
13 #include <Eigen/StdVector>
14 
15 namespace cloudViewer {
16 namespace visualization {
18 public:
19  typedef Eigen::Matrix<double, 17, 4, Eigen::RowMajor> Matrix17x4d;
20  typedef Eigen::Matrix<double, 17, 1> Vector17d;
21  typedef Eigen::aligned_allocator<Matrix17x4d> Matrix17x4d_allocator;
22 
23 public:
25  : field_of_view_(0),
26  zoom_(0),
27  lookat_(0, 0, 0),
28  up_(0, 0, 0),
29  front_(0, 0, 0),
30  boundingbox_min_(0, 0, 0),
31  boundingbox_max_(0, 0, 0) {}
32  ~ViewParameters() override {}
33 
34 public:
36  void ConvertFromVector17d(const Vector17d &v);
37  bool ConvertToJsonValue(Json::Value &value) const override;
38  bool ConvertFromJsonValue(const Json::Value &value) override;
39 
40 public:
42  double zoom_;
43  Eigen::Vector3d lookat_;
44  Eigen::Vector3d up_;
45  Eigen::Vector3d front_;
46  Eigen::Vector3d boundingbox_min_;
47  Eigen::Vector3d boundingbox_max_;
48 };
49 
50 } // namespace visualization
51 } // namespace cloudViewer
void ConvertFromVector17d(const Vector17d &v)
Eigen::Matrix< double, 17, 4, Eigen::RowMajor > Matrix17x4d
Eigen::aligned_allocator< Matrix17x4d > Matrix17x4d_allocator
bool ConvertToJsonValue(Json::Value &value) const override
Eigen::Matrix< double, 17, 1 > Vector17d
bool ConvertFromJsonValue(const Json::Value &value) override
Generic file read and write utility for python interface.