Open3D (C++ API)
ViewParameters.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2018 www.open3d.org
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 // IN THE SOFTWARE.
25 // ----------------------------------------------------------------------------
26 
27 #pragma once
28 
29 #include <Eigen/Core>
30 #include <Eigen/StdVector>
32 
33 namespace open3d {
34 namespace visualization {
35 
37 public:
38  typedef Eigen::Matrix<double, 17, 4, Eigen::RowMajor> Matrix17x4d;
39  typedef Eigen::Matrix<double, 17, 1> Vector17d;
40  typedef Eigen::aligned_allocator<Matrix17x4d> Matrix17x4d_allocator;
41 
42 public:
44  ~ViewParameters() override {}
45 
46 public:
47  Vector17d ConvertToVector17d();
48  void ConvertFromVector17d(const Vector17d &v);
49  bool ConvertToJsonValue(Json::Value &value) const override;
50  bool ConvertFromJsonValue(const Json::Value &value) override;
51 
52 public:
54  double zoom_;
55  Eigen::Vector3d lookat_;
56  Eigen::Vector3d up_;
57  Eigen::Vector3d front_;
58  Eigen::Vector3d boundingbox_min_;
59  Eigen::Vector3d boundingbox_max_;
60 };
61 
62 } // namespace visualization
63 } // namespace open3d
double zoom_
Definition: ViewParameters.h:54
ViewParameters()
Definition: ViewParameters.h:43
~ViewParameters() override
Definition: ViewParameters.h:44
Eigen::Matrix< double, 17, 4, Eigen::RowMajor > Matrix17x4d
Definition: ViewParameters.h:38
Vector17d ConvertToVector17d()
Definition: ViewParameters.cpp:36
bool ConvertToJsonValue(Json::Value &value) const override
Definition: ViewParameters.cpp:58
void ConvertFromVector17d(const Vector17d &v)
Definition: ViewParameters.cpp:48
Eigen::aligned_allocator< Matrix17x4d > Matrix17x4d_allocator
Definition: ViewParameters.h:40
Eigen::Vector3d boundingbox_min_
Definition: ViewParameters.h:58
bool ConvertFromJsonValue(const Json::Value &value) override
Definition: ViewParameters.cpp:81
Eigen::Vector3d up_
Definition: ViewParameters.h:56
Eigen::Matrix< double, 17, 1 > Vector17d
Definition: ViewParameters.h:39
Eigen::Vector3d boundingbox_max_
Definition: ViewParameters.h:59
Definition: PinholeCameraIntrinsic.cpp:33
Eigen::Vector3d lookat_
Definition: ViewParameters.h:55
Definition: ViewParameters.h:36
Eigen::Vector3d front_
Definition: ViewParameters.h:57
double field_of_view_
Definition: ViewParameters.h:53
Definition: IJsonConvertible.h:41