Open3D (C++ API)  0.15.1
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-2021 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>
31
33
34namespace open3d {
35namespace visualization {
36
38public:
39 typedef Eigen::Matrix<double, 17, 4, Eigen::RowMajor> Matrix17x4d;
40 typedef Eigen::Matrix<double, 17, 1> Vector17d;
41 typedef Eigen::aligned_allocator<Matrix17x4d> Matrix17x4d_allocator;
42
43public:
45 : field_of_view_(0),
46 zoom_(0),
47 lookat_(0, 0, 0),
48 up_(0, 0, 0),
49 front_(0, 0, 0),
50 boundingbox_min_(0, 0, 0),
51 boundingbox_max_(0, 0, 0) {}
52 ~ViewParameters() override {}
53
54public:
56 void ConvertFromVector17d(const Vector17d &v);
57 bool ConvertToJsonValue(Json::Value &value) const override;
58 bool ConvertFromJsonValue(const Json::Value &value) override;
59
60public:
62 double zoom_;
63 Eigen::Vector3d lookat_;
64 Eigen::Vector3d up_;
65 Eigen::Vector3d front_;
66 Eigen::Vector3d boundingbox_min_;
67 Eigen::Vector3d boundingbox_max_;
68};
69
70} // namespace visualization
71} // namespace open3d
Definition: IJsonConvertible.h:57
Definition: ViewParameters.h:37
Eigen::Matrix< double, 17, 4, Eigen::RowMajor > Matrix17x4d
Definition: ViewParameters.h:39
ViewParameters()
Definition: ViewParameters.h:44
Eigen::Vector3d up_
Definition: ViewParameters.h:64
double zoom_
Definition: ViewParameters.h:62
Vector17d ConvertToVector17d()
Definition: ViewParameters.cpp:38
bool ConvertToJsonValue(Json::Value &value) const override
Definition: ViewParameters.cpp:60
Eigen::Vector3d boundingbox_min_
Definition: ViewParameters.h:66
void ConvertFromVector17d(const Vector17d &v)
Definition: ViewParameters.cpp:50
Eigen::Vector3d lookat_
Definition: ViewParameters.h:63
Eigen::aligned_allocator< Matrix17x4d > Matrix17x4d_allocator
Definition: ViewParameters.h:41
double field_of_view_
Definition: ViewParameters.h:61
Eigen::Vector3d front_
Definition: ViewParameters.h:65
Eigen::Vector3d boundingbox_max_
Definition: ViewParameters.h:67
bool ConvertFromJsonValue(const Json::Value &value) override
Definition: ViewParameters.cpp:81
Eigen::Matrix< double, 17, 1 > Vector17d
Definition: ViewParameters.h:40
~ViewParameters() override
Definition: ViewParameters.h:52
Definition: PinholeCameraIntrinsic.cpp:35