FrustumVisual.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2025 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#ifndef GZ_RENDERING_FRUSTUMVISUAL_HH_
18#define GZ_RENDERING_FRUSTUMVISUAL_HH_
19
20#include <gz/math/Angle.hh>
21#include <gz/math/Plane.hh>
22#include <gz/math/Pose3.hh>
23#include <gz/utils/ImplPtr.hh>
24#include "gz/rendering/config.hh"
28
29namespace gz
30{
31 namespace rendering
32 {
33 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
34 //
56
59 class GZ_RENDERING_VISIBLE FrustumVisual : public virtual Visual
60 {
68 protected: FrustumVisual();
69
71 public: virtual ~FrustumVisual();
72
74 public: virtual void Update() = 0;
75
80 public: virtual double NearClipPlane() const = 0;
81
86 public: virtual void SetNearClipPlane(double _near) = 0;
87
92 public: virtual double FarClipPlane() const = 0;
93
98 public: virtual void SetFarClipPlane(double _far) = 0;
99
105 public: virtual gz::math::Angle HFOV() const = 0;
106
112 public: virtual void SetHFOV(const gz::math::Angle &_hfov) = 0;
113
118 public: virtual double AspectRatio() const = 0;
119
124 public: virtual void SetAspectRatio(double _aspectRatio) = 0;
125
129 public: virtual gz::math::Planed Plane(
130 const FrustumVisualPlane _plane) const = 0;
131
134 private: void ComputePlanes();
135 };
136 }
137 }
138}
139#endif