Gazebo Rendering

API Reference

9.0.0~pre2
BaseProjector.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 Open Source Robotics Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18#ifndef GZ_RENDERING_BASE_BASEPROJECTOR_HH_
19#define GZ_RENDERING_BASE_BASEPROJECTOR_HH_
20
21#include <string>
25
26namespace gz
27{
28 namespace rendering
29 {
30 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
31 //
32 /* \class BaseProjector BaseProjector.hh \
33 * gz/rendering/base/BaseProjector.hh
34 */
36 template <class T>
38 public virtual Projector,
39 public virtual T
40 {
42 protected: BaseProjector();
43
45 public: virtual ~BaseProjector();
46
47 // Documentation inherited
48 public: virtual double FarClipPlane() const override;
49
50 // Documentation inherited
51 public: virtual void SetFarClipPlane(double _far) override;
52
53 // Documentation inherited
54 public: virtual double NearClipPlane() const override;
55
56 // Documentation inherited
57 public: virtual void SetNearClipPlane(double _near) override;
58
59 // Documentation inherited
60 public: virtual math::Angle HFOV() const override;
61
62 // Documentation inherited
63 public: virtual void SetHFOV(const math::Angle &_hfov) override;
64
65 // Documentation inherited
66 public: virtual std::string Texture() const override;
67
68 // Documentation inherited
69 public: void SetTexture(const std::string &_texture) override;
70
71 // Documentation inherited
72 public: bool IsEnabled() const override;
73
74 // Documentation inherited
75 public: void SetEnabled(bool _enabled) override;
76
78 protected: double nearClip = 0.1;
79
81 protected: double farClip = 10.0;
82
84 protected: math::Angle hfov = math::Angle(0.785398);
85
88
90 protected: bool enabled = false;
91
93 private: friend class BaseScene;
94 };
95
97 template <class T>
101
103 template <class T>
107
109 template <class T>
111 {
112 return this->farClip;
113 }
114
116 template <class T>
118 {
119 this->farClip = _far;
120 }
121
123 template <class T>
125 {
126 return this->nearClip;
127 }
128
130 template <class T>
132 {
133 this->nearClip = _near;
134 }
135
137 template <class T>
139 {
140 return this->hfov;
141 }
142
144 template <class T>
146 {
147 this->hfov = _hfov;
148 }
149
151 template <class T>
153 {
154 return this->textureName;
155 }
156
158 template <class T>
160 {
161 this->textureName = _texture;
162 }
163
165 template <class T>
167 {
168 return this->enabled;
169 }
170
172 template <class T>
174 {
175 this->enabled = _enabled;
176 }
177 }
178 }
179}
180#endif