CARLA
Public Member Functions | Static Public Attributes | Static Private Member Functions | Private Attributes | Friends | List of all members
FRoadMapPixelData Struct Reference

Data stored in a road map pixel. See URoadMap. More...

#include <RoadMap.h>

+ Collaboration diagram for FRoadMapPixelData:

Public Member Functions

FColor EncodeAsColor () const
 
 FRoadMapPixelData (uint16 inValue)
 
FVector GetDirection () const
 Get the road direction at this pixel. More...
 
float GetDirectionAzimuthalAngle () const
 Get the azimuth angle [-PI, PI] of the road direction (in spherical coordinates) at this pixel. More...
 
bool HasDirection () const
 Whether this pixel has a direction defined (e.g. More...
 
bool IsRoad () const
 Whether this pixel lies in-road. More...
 

Static Public Attributes

static constexpr uint16 AngleMask = (0xFFFF >> 2)
 
static constexpr int HasDirectionRow = 14
 
static constexpr int IsRoadRow = 15
 
static constexpr uint16 MaximumEncodedAngle = (1 << 14) - 1
 

Static Private Member Functions

static uint16 Encode (bool IsRoad, bool HasDirection, const FVector &Direction)
 

Private Attributes

uint16 Value
 

Friends

class URoadMap
 

Detailed Description

Data stored in a road map pixel. See URoadMap.

Definition at line 29 of file RoadMap.h.

Constructor & Destructor Documentation

◆ FRoadMapPixelData()

FRoadMapPixelData::FRoadMapPixelData ( uint16  inValue)
inlineexplicit

Definition at line 43 of file RoadMap.h.

Member Function Documentation

◆ Encode()

uint16 FRoadMapPixelData::Encode ( bool  IsRoad,
bool  HasDirection,
const FVector &  Direction 
)
staticprivate

Definition at line 44 of file RoadMap.cpp.

References GetRotatedAzimuthAngle(), HasDirectionRow, IsRoadRow, MaximumEncodedAngle, and carla::traffic_manager::constants::MotionPlan::PI.

Referenced by URoadMap::SetPixelAt().

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

◆ EncodeAsColor()

FColor FRoadMapPixelData::EncodeAsColor ( ) const

Definition at line 52 of file RoadMap.cpp.

References GetDirectionAzimuthalAngle(), HasDirection(), IsRoad(), and carla::traffic_manager::constants::MotionPlan::PI.

+ Here is the call graph for this function:

◆ GetDirection()

FVector FRoadMapPixelData::GetDirection ( ) const
inline

Get the road direction at this pixel.

Undefined if !HasDirection().

Definition at line 72 of file RoadMap.h.

◆ GetDirectionAzimuthalAngle()

float FRoadMapPixelData::GetDirectionAzimuthalAngle ( ) const
inline

Get the azimuth angle [-PI, PI] of the road direction (in spherical coordinates) at this pixel.

Undefined if !HasDirection().

Definition at line 62 of file RoadMap.h.

References carla::traffic_manager::constants::MotionPlan::PI.

Referenced by EncodeAsColor().

+ Here is the caller graph for this function:

◆ HasDirection()

bool FRoadMapPixelData::HasDirection ( ) const
inline

Whether this pixel has a direction defined (e.g.

road intersections are not off-road but neither have defined direction).

Definition at line 53 of file RoadMap.h.

Referenced by EncodeAsColor().

+ Here is the caller graph for this function:

◆ IsRoad()

bool FRoadMapPixelData::IsRoad ( ) const
inline

Whether this pixel lies in-road.

Definition at line 46 of file RoadMap.h.

Referenced by EncodeAsColor().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ URoadMap

friend class URoadMap
friend

Definition at line 31 of file RoadMap.h.

Member Data Documentation

◆ AngleMask

constexpr uint16 FRoadMapPixelData::AngleMask = (0xFFFF >> 2)
static

Definition at line 39 of file RoadMap.h.

◆ HasDirectionRow

constexpr int FRoadMapPixelData::HasDirectionRow = 14
static

Definition at line 35 of file RoadMap.h.

Referenced by Encode().

◆ IsRoadRow

constexpr int FRoadMapPixelData::IsRoadRow = 15
static

Definition at line 33 of file RoadMap.h.

Referenced by Encode().

◆ MaximumEncodedAngle

constexpr uint16 FRoadMapPixelData::MaximumEncodedAngle = (1 << 14) - 1
static

Definition at line 37 of file RoadMap.h.

Referenced by Encode().

◆ Value

uint16 FRoadMapPixelData::Value
private

Definition at line 84 of file RoadMap.h.

Referenced by URoadMap::URoadMap().


The documentation for this struct was generated from the following files: