CARLA
Public Member Functions | Public Attributes | List of all members
carla::geom::Transform Class Reference

#include <Transform.h>

+ Collaboration diagram for carla::geom::Transform:

Public Member Functions

Vector3D GetForwardVector () const
 
std::array< float, 16 > GetInverseMatrix () const
 Computes the 4-matrix form of the inverse transformation. More...
 
std::array< float, 16 > GetMatrix () const
 Computes the 4-matrix form of the transformation. More...
 
Vector3D GetRightVector () const
 
Vector3D GetUpVector () const
 
void InverseTransformPoint (Vector3D &in_point) const
 Applies the inverse of this transformation to in_point. More...
 
 MSGPACK_DEFINE_ARRAY (location, rotation)
 
bool operator!= (const Transform &rhs) const
 
bool operator== (const Transform &rhs) const
 
 Transform ()=default
 
 Transform (const Location &in_location)
 
 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). More...
 
void TransformVector (Vector3D &in_vector) const
 Applies this transformation to in_vector (rotation only). More...
 

Public Attributes

Location location
 
Rotation rotation
 

Detailed Description

Definition at line 23 of file geom/Transform.h.

Constructor & Destructor Documentation

◆ Transform() [1/3]

carla::geom::Transform::Transform ( )
default

Referenced by operator!=().

+ Here is the caller graph for this function:

◆ Transform() [2/3]

carla::geom::Transform::Transform ( const Location in_location)
inline

Definition at line 42 of file geom/Transform.h.

◆ Transform() [3/3]

carla::geom::Transform::Transform ( const Location in_location,
const Rotation in_rotation 
)
inline

Definition at line 46 of file geom/Transform.h.

Member Function Documentation

◆ GetForwardVector()

Vector3D carla::geom::Transform::GetForwardVector ( ) const
inline

Definition at line 54 of file geom/Transform.h.

References carla::geom::Rotation::GetForwardVector().

Referenced by carla::road::Map::CreateRtree(), carla::client::TrafficLight::GetStopWaypoints(), and carla::traffic_manager::MotionPlanStage::Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetInverseMatrix()

std::array<float, 16> carla::geom::Transform::GetInverseMatrix ( ) const
inline

Computes the 4-matrix form of the inverse transformation.

Definition at line 113 of file geom/Transform.h.

References InverseTransformPoint(), carla::geom::Rotation::pitch, carla::geom::Rotation::roll, carla::geom::Math::ToRadians(), carla::geom::Vector3D::x, carla::geom::Vector3D::y, carla::geom::Rotation::yaw, and carla::geom::Vector3D::z.

+ Here is the call graph for this function:

◆ GetMatrix()

std::array<float, 16> carla::geom::Transform::GetMatrix ( ) const
inline

Computes the 4-matrix form of the transformation.

Definition at line 90 of file geom/Transform.h.

References carla::geom::Rotation::pitch, carla::geom::Rotation::roll, carla::geom::Math::ToRadians(), carla::geom::Vector3D::x, carla::geom::Vector3D::y, carla::geom::Rotation::yaw, and carla::geom::Vector3D::z.

+ Here is the call graph for this function:

◆ GetRightVector()

Vector3D carla::geom::Transform::GetRightVector ( ) const
inline

Definition at line 58 of file geom/Transform.h.

References carla::geom::Rotation::GetRightVector().

+ Here is the call graph for this function:

◆ GetUpVector()

Vector3D carla::geom::Transform::GetUpVector ( ) const
inline

Definition at line 62 of file geom/Transform.h.

References carla::geom::Rotation::GetUpVector().

+ Here is the call graph for this function:

◆ InverseTransformPoint()

void carla::geom::Transform::InverseTransformPoint ( Vector3D in_point) const
inline

Applies the inverse of this transformation to in_point.

Definition at line 82 of file geom/Transform.h.

References carla::geom::Rotation::InverseRotateVector(), and location.

Referenced by carla::geom::BoundingBox::Contains(), GetInverseMatrix(), and TEST().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MSGPACK_DEFINE_ARRAY()

carla::geom::Transform::MSGPACK_DEFINE_ARRAY ( location  ,
rotation   
)

◆ operator!=()

bool carla::geom::Transform::operator!= ( const Transform rhs) const
inline

Definition at line 146 of file geom/Transform.h.

References Transform().

+ Here is the call graph for this function:

◆ operator==()

bool carla::geom::Transform::operator== ( const Transform rhs) const
inline

Definition at line 142 of file geom/Transform.h.

References location, and rotation.

◆ TransformPoint()

void carla::geom::Transform::TransformPoint ( Vector3D in_point) const
inline

Applies this transformation to in_point (first translation then rotation).

Definition at line 67 of file geom/Transform.h.

References location, and carla::geom::Rotation::RotateVector().

Referenced by carla::road::Map::GetAllCrosswalkZones(), carla::client::TrafficLight::GetStopWaypoints(), carla::geom::BoundingBox::GetWorldVertices(), and TEST().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TransformVector()

void carla::geom::Transform::TransformVector ( Vector3D in_vector) const
inline

Applies this transformation to in_vector (rotation only).

Definition at line 75 of file geom/Transform.h.

References carla::geom::Rotation::RotateVector().

+ Here is the call graph for this function:

Member Data Documentation

◆ location

Location carla::geom::Transform::location

◆ rotation

Rotation carla::geom::Transform::rotation

The documentation for this class was generated from the following file: