|
CARLA
|
A rigid transform in CARLA's / Unreal's left-handed frame: x forward, y right, z up, metres, with a Rotation in degrees. More...
#include <Transform.h>
Public Member Functions | |
| Vector3D | GetForwardVector () const |
| std::array< float, 16 > | GetInverseMatrix () const |
| Computes the 4-matrix form of the inverse transformation. | |
| std::array< float, 16 > | GetMatrix () const |
| Computes the 4-matrix form of the transformation. | |
| Vector3D | GetRightVector () const |
| Vector3D | GetUpVector () const |
| void | InverseTransformPoint (Vector3D &in_point) const |
| Applies the inverse of this transformation to in_point. | |
| MSGPACK_DEFINE_ARRAY (location, rotation) | |
| operator FTransform () const | |
| bool | operator!= (const Transform &rhs) const |
| bool | operator== (const Transform &rhs) const |
| constexpr RightHandedTransform | ToRightHanded () const |
| This transform expressed in a right-handed, x-forward / y-**left** / z-up frame (ROS REP-103 "FLU"). | |
| Transform ()=default | |
| Transform (const FTransform &transform) | |
| Transform (const Location &in_location) | |
| constexpr | Transform (const Location &in_location, const Rotation &in_rotation) |
| void | TransformPoint (Vector3D &in_point) const |
| Applies this transformation to in_point (first translation then rotation). | |
| void | TransformVector (Vector3D &in_vector) const |
| Applies this transformation to in_vector (rotation only). | |
Static Public Member Functions | |
| static constexpr Transform | FromRightHanded (const RightHandedTransform &rhs) |
| Inverse of ToRightHanded(): reads a right-handed (FLU) pose back into CARLA's left-handed frame. | |
Public Attributes | |
| Location | location |
| Rotation | rotation |
A rigid transform in CARLA's / Unreal's left-handed frame: x forward, y right, z up, metres, with a Rotation in degrees.
GetMatrix(), GetForwardVector() and friends are all in that frame – they are not "uncorrected" right-handed math and must not be flipped. To hand a pose to a ROS / REP-103 consumer, convert explicitly with ToRightHanded(); see RightHandedTransform and Docs/coordinate_conventions.md.
Definition at line 32 of file geom/Transform.h.
|
default |
Referenced by ACarlaGameModeBase::GenerateSpawnPoints().
|
inline |
Definition at line 51 of file geom/Transform.h.
|
inlineconstexpr |
Definition at line 55 of file geom/Transform.h.
|
inline |
Definition at line 195 of file geom/Transform.h.
|
inlinestaticconstexpr |
Inverse of ToRightHanded(): reads a right-handed (FLU) pose back into CARLA's left-handed frame.
The mapping is an involution.
Definition at line 171 of file geom/Transform.h.
Referenced by TEST().
|
inline |
Definition at line 63 of file geom/Transform.h.
Referenced by FCarlaServer::FPimpl::BindActions().
|
inline |
Computes the 4-matrix form of the inverse transformation.
Rows are the transpose of the forward rotation; translation component pulled from InverseTransformPoint(origin) to keep both helpers consistent.
Definition at line 128 of file geom/Transform.h.
|
inline |
Computes the 4-matrix form of the transformation.
Sign convention matches Rotation::RotateVector and the engine: +pitch puts +sin(pitch) on row 2 column 0 (forward axis tilts up), +roll puts -cos(pitch) * sin(roll) on row 2 column 1 (right axis tilts down). Verified against rendered camera frames on UE5.8 (2026-08-27).
Definition at line 103 of file geom/Transform.h.
|
inline |
Definition at line 67 of file geom/Transform.h.
|
inline |
Definition at line 71 of file geom/Transform.h.
|
inline |
Applies the inverse of this transformation to in_point.
Definition at line 91 of file geom/Transform.h.
|
inline |
Definition at line 198 of file geom/Transform.h.
|
inline |
Definition at line 185 of file geom/Transform.h.
|
inline |
Definition at line 181 of file geom/Transform.h.
|
inlineconstexpr |
This transform expressed in a right-handed, x-forward / y-**left** / z-up frame (ROS REP-103 "FLU").
location becomes (x, -y, z) and rotation becomes (roll, -pitch, -yaw); equivalently the pose matrix becomes S * GetMatrix() * S with S = diag(1, -1, 1, 1).
Definition at line 163 of file geom/Transform.h.
|
inline |
Applies this transformation to in_point (first translation then rotation).
Definition at line 76 of file geom/Transform.h.
|
inline |
Applies this transformation to in_vector (rotation only).
Definition at line 84 of file geom/Transform.h.
Definition at line 39 of file geom/Transform.h.
Definition at line 41 of file geom/Transform.h.