gucoordinates
CameraPivot.hpp
Go to the documentation of this file.
1/*
2 * CameraPivot.hpp
3 * gucoordinates
4 *
5 * Created by Callum McColl on 20/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 ROBOT_HPP
60#define ROBOT_HPP
61
62#include "camera_pivot.h"
63#include "Camera.hpp"
64
65#include <cstdlib>
66#include <gu_util.h>
67
68namespace GU {
69
71
72 CameraPivot() NOEXCEPT;
73 CameraPivot(const degrees_d, const degrees_d, const centimetres_d, const gu_camera[GU_CAMERA_PIVOT_NUM_CAMERAS], int) NOEXCEPT;
74 CameraPivot(const CameraPivot& other) NOEXCEPT;
75 CameraPivot(const gu_camera_pivot& other) NOEXCEPT;
76#if __cplusplus >= 201103L
77#pragma clang diagnostic push
78#pragma clang diagnostic ignored "-Wc++98-compat"
79 CameraPivot(CameraPivot&& other) NOEXCEPT;
80 CameraPivot(gu_camera_pivot&& other) NOEXCEPT;
81#pragma clang diagnostic pop
82#endif
83 ~CameraPivot() NOEXCEPT;
84 CameraPivot& operator=(const CameraPivot& other) NOEXCEPT;
85 CameraPivot& operator=(const gu_camera_pivot& other) NOEXCEPT;
86#if __cplusplus >= 201103L
87#pragma clang diagnostic push
88#pragma clang diagnostic ignored "-Wc++98-compat"
89 CameraPivot& operator=(CameraPivot&& other) NOEXCEPT;
90 CameraPivot& operator=(gu_camera_pivot&& other) NOEXCEPT;
91#pragma clang diagnostic pop
92#endif
93
94 degrees_d pitch() const NOEXCEPT;
95 void set_pitch(const degrees_d) NOEXCEPT;
96
97 degrees_d yaw() const NOEXCEPT;
98 void set_yaw(const degrees_d) NOEXCEPT;
99
100 centimetres_d height() const NOEXCEPT;
101 void set_height(const centimetres_d) NOEXCEPT;
102
103 const gu_camera * cameras() const NOEXCEPT;
105
106 Camera camera(const int) const NOEXCEPT;
107 void set_camera(const int, const Camera) NOEXCEPT;
108
109 int numCameras() const NOEXCEPT;
110 void set_numCameras(const int) NOEXCEPT;
111
112 bool operator ==(const CameraPivot &other) const NOEXCEPT;
113 bool operator !=(const CameraPivot &other) const NOEXCEPT;
114 bool operator ==(const gu_camera_pivot &other) const NOEXCEPT;
115 bool operator !=(const gu_camera_pivot &other) const NOEXCEPT;
116
117 };
118
119}
120
121#endif /* ROBOT_HPP */
#define GU_CAMERA_PIVOT_NUM_CAMERAS
Definition: camera_pivot.h:74
Definition: Camera.hpp:66
const gu_camera * cameras() const NOEXCEPT
Definition: CameraPivot.cc:202
void set_yaw(const degrees_d) NOEXCEPT
Definition: CameraPivot.cc:186
int numCameras() const NOEXCEPT
Definition: CameraPivot.cc:222
void set_camera(const int, const Camera) NOEXCEPT
Definition: CameraPivot.cc:217
void set_pitch(const degrees_d) NOEXCEPT
Definition: CameraPivot.cc:176
bool operator!=(const CameraPivot &other) const NOEXCEPT
Definition: CameraPivot.cc:237
void set_height(const centimetres_d) NOEXCEPT
Definition: CameraPivot.cc:197
degrees_d yaw() const NOEXCEPT
Definition: CameraPivot.cc:181
void set_numCameras(const int) NOEXCEPT
Definition: CameraPivot.cc:227
degrees_d pitch() const NOEXCEPT
Definition: CameraPivot.cc:171
bool operator==(const CameraPivot &other) const NOEXCEPT
Definition: CameraPivot.cc:232
Camera camera(const int) const NOEXCEPT
Definition: CameraPivot.cc:212
void set_cameras(const gu_camera[2]) NOEXCEPT
Definition: CameraPivot.cc:207
~CameraPivot() NOEXCEPT
Definition: CameraPivot.cc:113
centimetres_d height() const NOEXCEPT
Definition: CameraPivot.cc:192
CameraPivot() NOEXCEPT
Definition: CameraPivot.cc:64
CameraPivot & operator=(const CameraPivot &other) NOEXCEPT
Definition: CameraPivot.cc:115
A gu_camera_pivot represents the pivot point which a gu_camera is attached to.
Definition: camera_pivot.h:87