CARLA
Loading...
Searching...
No Matches
FRoadMapPixelData Struct Reference

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

#include <RoadMap.h>

Public Member Functions

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

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 33 of file RoadMap.h.

Constructor & Destructor Documentation

◆ FRoadMapPixelData()

FRoadMapPixelData::FRoadMapPixelData ( uint16 inValue)
inlineexplicit

Definition at line 47 of file RoadMap.h.

References Value.

Referenced by URoadMap::GetDataAt(), and URoadMap::SaveAsPNG().

Member Function Documentation

◆ Encode()

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

◆ EncodeAsColor()

FColor FRoadMapPixelData::EncodeAsColor ( ) const

Definition at line 52 of file RoadMap.cpp.

References GetDirectionAzimuthalAngle(), HasDirection(), and IsRoad().

◆ GetDirection()

FVector FRoadMapPixelData::GetDirection ( ) const
inline

Get the road direction at this pixel.

Undefined if !HasDirection().

Definition at line 76 of file RoadMap.h.

References GetDirectionAzimuthalAngle().

◆ 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 66 of file RoadMap.h.

References AngleMask, MaximumEncodedAngle, and Value.

Referenced by EncodeAsColor(), and GetDirection().

◆ 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 57 of file RoadMap.h.

References HasDirectionRow, and Value.

Referenced by Encode(), and EncodeAsColor().

◆ IsRoad()

bool FRoadMapPixelData::IsRoad ( ) const
inline

Whether this pixel lies in-road.

Definition at line 50 of file RoadMap.h.

References IsRoadRow, and Value.

Referenced by Encode(), and EncodeAsColor().

◆ URoadMap

friend class URoadMap
friend

Definition at line 35 of file RoadMap.h.

References URoadMap.

Referenced by URoadMap.

Member Data Documentation

◆ AngleMask

uint16 FRoadMapPixelData::AngleMask = (0xFFFF >> 2)
staticconstexpr

Definition at line 43 of file RoadMap.h.

Referenced by GetDirectionAzimuthalAngle().

◆ HasDirectionRow

int FRoadMapPixelData::HasDirectionRow = 14
staticconstexpr

Definition at line 39 of file RoadMap.h.

Referenced by Encode(), and HasDirection().

◆ IsRoadRow

int FRoadMapPixelData::IsRoadRow = 15
staticconstexpr

Definition at line 37 of file RoadMap.h.

Referenced by Encode(), and IsRoad().

◆ MaximumEncodedAngle

uint16 FRoadMapPixelData::MaximumEncodedAngle = (1 << 14) - 1
staticconstexpr

Definition at line 41 of file RoadMap.h.

Referenced by Encode(), and GetDirectionAzimuthalAngle().

◆ Value

uint16 FRoadMapPixelData::Value
private

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