CARLA
Loading...
Searching...
No Matches
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
10
11namespace carla {
12namespace 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.
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
This file contains definitions of common data structures used in traffic manager.
Angular velocity in degrees per second.
constexpr AngularVelocity(const Vector3D &v)
constexpr AngularVelocity(float ix, float iy, float iz)
FVector ToFVectorDegPerSecond() const
Return this AngularVelocity as an Unreal FVector in degrees per second.
AngularVelocity(const FVector &v_deg_per_s)
Build an AngularVelocity (deg/s) from an Unreal FVector already expressed in degrees per second.