Gazebo Rendering
API Reference
10.1.0
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
src
gz-rendering
include
gz
rendering
Utils.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2019 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_UTILS_HH_
18
#define GZ_RENDERING_UTILS_HH_
19
20
#include <vector>
21
#include <memory>
22
23
#include <
gz/math/Helpers.hh
>
24
#include <
gz/math/AxisAlignedBox.hh
>
25
#include <
gz/math/Vector2.hh
>
26
#include <
gz/math/Vector3.hh
>
27
#include <
gz/math/Pose3.hh
>
28
29
#include "
gz/rendering/Camera.hh
"
30
#include "gz/rendering/config.hh"
31
#include "gz/rendering/Export.hh"
32
#include "
gz/rendering/GraphicsAPI.hh
"
33
#include "
gz/rendering/RayQuery.hh
"
34
#include "
gz/rendering/Image.hh
"
35
#include "
gz/rendering/PixelBuffer.hh
"
36
37
38
namespace
gz
39
{
41
namespace
rendering
42
{
43
// Inline bracket to help doxygen filtering.
44
inline
namespace
GZ_RENDERING_VERSION_NAMESPACE {
45
//
53
GZ_RENDERING_VISIBLE
54
math::Vector3d
screenToScene
(
55
const
math::Vector2i
&_screenPos,
56
const
CameraPtr
&_camera,
57
const
RayQueryPtr
&_rayQuery,
58
float
_maxDistance = 10.0);
59
68
GZ_RENDERING_VISIBLE
69
math::Vector3d
screenToScene
(
70
const
math::Vector2i
&_screenPos,
71
const
CameraPtr
&_camera,
72
const
RayQueryPtr
&_rayQuery,
73
RayQueryResult
&_rayResult,
74
float
_maxDistance = 10.0);
75
83
GZ_RENDERING_VISIBLE
84
math::Vector3d
screenToPlane
(
85
const
math::Vector2i
&_screenPos,
86
const
CameraPtr
&_camera,
87
const
RayQueryPtr
&_rayQuery,
88
const
float
_offset = 0.0);
89
94
GZ_RENDERING_VISIBLE
95
float
screenScalingFactor
();
96
102
GZ_RENDERING_VISIBLE
103
gz::math::AxisAlignedBox
transformAxisAlignedBox
(
104
const
gz::math::AxisAlignedBox
&_box,
105
const
gz::math::Pose3d
&_pose);
106
116
GZ_RENDERING_VISIBLE
117
gz::math::Matrix3d
projectionToCameraIntrinsic
(
118
const
gz::math::Matrix4d
&_projectionMatrix,
119
double
_width,
double
_height);
120
125
GZ_RENDERING_VISIBLE
126
Image
convertRGBToBayer
(
const
Image
&_image,
PixelFormat
_bayerFormat);
127
137
GZ_RENDERING_VISIBLE
138
bool
convertRGBToBayer
(
const
Image
&_image,
const
PixelBuffer
&_bayer);
139
143
GZ_RENDERING_VISIBLE
144
GraphicsAPI
defaultGraphicsAPI
();
145
}
146
}
147
}
148
#endif