CARLA
Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
carla::sensor::data::RadarData Class Reference

#include <RadarData.h>

+ Collaboration diagram for carla::sensor::data::RadarData:

Public Member Functions

size_t GetDetectionCount () const
 Returns the number of current detections. More...
 
RadarDataoperator= (RadarData &&)=default
 
 RadarData ()=default
 
void Reset ()
 Deletes the current detections. More...
 
void SetResolution (uint32_t resolution)
 Set a new resolution for the RadarData. More...
 
void WriteDetection (RadarDetection detection)
 Adds a new detection. More...
 

Static Public Attributes

static constexpr auto detection_size = sizeof(RadarDetection)
 

Private Attributes

std::vector< RadarDetection_detections
 

Friends

class s11n::RadarSerializer
 

Detailed Description

Definition at line 29 of file RadarData.h.

Constructor & Destructor Documentation

◆ RadarData()

carla::sensor::data::RadarData::RadarData ( )
explicitdefault

Member Function Documentation

◆ GetDetectionCount()

size_t carla::sensor::data::RadarData::GetDetectionCount ( ) const
inline

Returns the number of current detections.

Definition at line 53 of file RadarData.h.

◆ operator=()

RadarData& carla::sensor::data::RadarData::operator= ( RadarData &&  )
default

◆ Reset()

void carla::sensor::data::RadarData::Reset ( void  )
inline

Deletes the current detections.

It doesn't change the resolution nor the allocated memory.

Definition at line 59 of file RadarData.h.

Referenced by ARadar::PostPhysTick().

+ Here is the caller graph for this function:

◆ SetResolution()

void carla::sensor::data::RadarData::SetResolution ( uint32_t  resolution)
inline

Set a new resolution for the RadarData.

Allocates / Deallocates space in memory if needed.

Warning
This is expensive, not to be called each tick!

Definition at line 44 of file RadarData.h.

Referenced by ARadar::SetPointsPerSecond().

+ Here is the caller graph for this function:

◆ WriteDetection()

void carla::sensor::data::RadarData::WriteDetection ( RadarDetection  detection)
inline

Adds a new detection.

Definition at line 64 of file RadarData.h.

Referenced by ARadar::SendLineTraces().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ s11n::RadarSerializer

friend class s11n::RadarSerializer
friend

Definition at line 71 of file RadarData.h.

Member Data Documentation

◆ _detections

std::vector<RadarDetection> carla::sensor::data::RadarData::_detections
private

Definition at line 69 of file RadarData.h.

Referenced by carla::sensor::s11n::RadarSerializer::Serialize().

◆ detection_size

constexpr auto carla::sensor::data::RadarData::detection_size = sizeof(RadarDetection)
static

Definition at line 36 of file RadarData.h.


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