CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
LibCarla
source
carla
geom
AngularVelocity.h
Go to the documentation of this file.
1
// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma
2
// de Barcelona (UAB).
3
//
4
// This work is licensed under the terms of the MIT license.
5
// For a copy, see <https://opensource.org/licenses/MIT>.
6
7
#pragma once
8
9
#include "
carla/geom/Vector3D.h
"
10
11
namespace
carla
{
12
namespace
geom
{
13
14
/// Angular velocity in degrees per second. Inherits `Vector3D` storage and
15
/// arithmetic and carries unit semantics so consumers do not silently mix
16
/// `deg/s` and `rad/s` payloads at API boundaries.
17
struct
AngularVelocity
:
Vector3D
{
18
19
AngularVelocity
() =
default
;
20
21
constexpr
AngularVelocity
(
float
ix,
float
iy,
float
iz)
22
:
Vector3D
(ix, iy, iz) {
23
}
24
25
explicit
constexpr
AngularVelocity
(
const
Vector3D
&v)
26
:
Vector3D
(v) {
27
}
28
29
#ifdef LIBCARLA_INCLUDED_FROM_UE4
30
31
/// Build an `AngularVelocity` (deg/s) from an Unreal `FVector` already
32
/// expressed in degrees per second.
33
explicit
AngularVelocity
(
const
FVector &v_deg_per_s)
34
:
Vector3D
(
35
static_cast<float>(v_deg_per_s.X),
36
static_cast<float>(v_deg_per_s.Y),
37
static_cast<float>(v_deg_per_s.Z)) {
38
}
39
40
/// Return this `AngularVelocity` as an Unreal `FVector` in degrees per
41
/// second.
42
FVector
ToFVectorDegPerSecond
()
const
{
43
return
FVector{
x
,
y
,
z
};
44
}
45
46
#endif
// LIBCARLA_INCLUDED_FROM_UE4
47
};
48
49
}
// namespace geom
50
}
// namespace carla
Vector3D.h
carla::geom
Definition
Misc.h:24
carla
This file contains definitions of common data structures used in traffic manager.
Definition
SignComponent.h:21
carla::geom::AngularVelocity::AngularVelocity
constexpr AngularVelocity(const Vector3D &v)
Definition
AngularVelocity.h:25
carla::geom::AngularVelocity::AngularVelocity
constexpr AngularVelocity(float ix, float iy, float iz)
Definition
AngularVelocity.h:21
carla::geom::AngularVelocity::AngularVelocity
AngularVelocity()=default
carla::geom::AngularVelocity::ToFVectorDegPerSecond
FVector ToFVectorDegPerSecond() const
Return this AngularVelocity as an Unreal FVector in degrees per second.
Definition
AngularVelocity.h:42
carla::geom::AngularVelocity::AngularVelocity
AngularVelocity(const FVector &v_deg_per_s)
Build an AngularVelocity (deg/s) from an Unreal FVector already expressed in degrees per second.
Definition
AngularVelocity.h:33
carla::geom::Vector3D::y
float y
Definition
geom/Vector3D.h:27
carla::geom::Vector3D::x
float x
Definition
geom/Vector3D.h:25
carla::geom::Vector3D::z
float z
Definition
geom/Vector3D.h:29
carla::geom::Vector3D::Vector3D
Vector3D()=default
Generated by
1.18.0