gucoordinates
Camera.hpp
Go to the documentation of this file.
1/*
2 * Camera.hpp
3 * guvision_utils
4 *
5 * Created by Callum McColl on 19/06/2020.
6 * Copyright © 2020 Callum McColl. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * 2. Redistributions in binary form must reproduce the above
16 * copyright notice, this list of conditions and the following
17 * disclaimer in the documentation and/or other materials
18 * provided with the distribution.
19 *
20 * 3. All advertising materials mentioning features or use of this
21 * software must display the following acknowledgement:
22 *
23 * This product includes software developed by Callum McColl.
24 *
25 * 4. Neither the name of the author nor the names of contributors
26 * may be used to endorse or promote products derived from this
27 * software without specific prior written permission.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
33 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
34 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
35 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
36 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
37 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
38 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
39 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 *
41 * -----------------------------------------------------------------------
42 * This program is free software; you can redistribute it and/or
43 * modify it under the above terms or under the terms of the GNU
44 * General Public License as published by the Free Software Foundation;
45 * either version 2 of the License, or (at your option) any later version.
46 *
47 * This program is distributed in the hope that it will be useful,
48 * but WITHOUT ANY WARRANTY; without even the implied warranty of
49 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50 * GNU General Public License for more details.
51 *
52 * You should have received a copy of the GNU General Public License
53 * along with this program; if not, see http://www.gnu.org/licenses/
54 * or write to the Free Software Foundation, Inc., 51 Franklin Street,
55 * Fifth Floor, Boston, MA 02110-1301, USA.
56 *
57 */
58
59#ifndef CAMERA_HPP
60#define CAMERA_HPP
61
62#include "camera.h"
63#include <cstdlib>
64#include <gu_util.h>
65
66namespace GU {
67
68 struct Camera: public gu_camera {
69
70 Camera() NOEXCEPT;
71 Camera(centimetres_d, centimetres_d, degrees_d, degrees_d, degrees_d) NOEXCEPT;
72 Camera(const Camera& other) NOEXCEPT;
73 Camera(const gu_camera& other) NOEXCEPT;
74#if __cplusplus >= 201103L
75#pragma clang diagnostic push
76#pragma clang diagnostic ignored "-Wc++98-compat"
77 Camera(Camera&& other) NOEXCEPT;
78 Camera(gu_camera&& other) NOEXCEPT;
79#pragma clang diagnostic pop
80#endif
81 ~Camera() NOEXCEPT;
82 Camera& operator=(const Camera& other) NOEXCEPT;
83 Camera& operator=(const gu_camera& other) NOEXCEPT;
84#if __cplusplus >= 201103L
85#pragma clang diagnostic push
86#pragma clang diagnostic ignored "-Wc++98-compat"
87 Camera& operator=(Camera&& other) NOEXCEPT;
88 Camera& operator=(gu_camera&& other) NOEXCEPT;
89#pragma clang diagnostic pop
90#endif
91
92 centimetres_d height() const NOEXCEPT;
93 void set_height(const centimetres_d) NOEXCEPT;
94
95 centimetres_d centerOffset() const NOEXCEPT;
96 void set_centerOffset(const centimetres_d) NOEXCEPT;
97
98 degrees_d vDirection() const NOEXCEPT;
99 void set_vDirection(const degrees_d) NOEXCEPT;
100
101 degrees_d vFov() const NOEXCEPT;
102 void set_vFov(const degrees_d) NOEXCEPT;
103
104 degrees_d hFov() const NOEXCEPT;
105 void set_hFov(const degrees_d) NOEXCEPT;
106
107 bool operator ==(const Camera &other) const NOEXCEPT;
108 bool operator !=(const Camera &other) const NOEXCEPT;
109 bool operator ==(const gu_camera &other) const NOEXCEPT;
110 bool operator !=(const gu_camera &other) const NOEXCEPT;
111
112 };
113
114}
115
116#endif /* CAMERA_HPP */
Definition: Camera.hpp:66
degrees_d vDirection() const NOEXCEPT
Definition: CameraCPP.cc:188
void set_hFov(const degrees_d) NOEXCEPT
Definition: CameraCPP.cc:213
void set_centerOffset(const centimetres_d) NOEXCEPT
Definition: CameraCPP.cc:183
centimetres_d height() const NOEXCEPT
Definition: CameraCPP.cc:168
void set_vFov(const degrees_d) NOEXCEPT
Definition: CameraCPP.cc:203
Camera() NOEXCEPT
Definition: CameraCPP.cc:61
bool operator==(const Camera &other) const NOEXCEPT
Definition: CameraCPP.cc:218
void set_height(const centimetres_d) NOEXCEPT
Definition: CameraCPP.cc:173
centimetres_d centerOffset() const NOEXCEPT
Definition: CameraCPP.cc:178
bool operator!=(const Camera &other) const NOEXCEPT
Definition: CameraCPP.cc:223
degrees_d hFov() const NOEXCEPT
Definition: CameraCPP.cc:208
Camera & operator=(const Camera &other) NOEXCEPT
Definition: CameraCPP.cc:112
~Camera() NOEXCEPT
Definition: CameraCPP.cc:110
degrees_d vFov() const NOEXCEPT
Definition: CameraCPP.cc:198
void set_vDirection(const degrees_d) NOEXCEPT
Definition: CameraCPP.cc:193