Helios++
Helios software for LiDAR simulations
MeasurementsBuffer Class Reference

Class abstracting a buffer of measurements. More...

#include <MeasurementsBuffer.h>

Collaboration diagram for MeasurementsBuffer:

Public Member Functions

 MeasurementsBuffer (const MeasurementsBuffer &mb)
 
void add (Measurement m)
 Add a measurement to the buffer. More...
 
Measurement getEntryAt (int index)
 Get the measurement at given index. More...
 
int getLastRecordedPointIndex ()
 Get index of last insertion. More...
 
int getSize ()
 Obtain the size of the buffer. More...
 

Public Attributes

int nextInsertIndex = 1
 Index of next insertion.
 
Measurement buffer [MEASUREMENTS_BUFFER_SIZE]
 Memory for the buffer.
 

Static Private Attributes

static const int MEASUREMENTS_BUFFER_SIZE = 100000
 Size (in number of elements) of measurements buffer.
 

Detailed Description

Class abstracting a buffer of measurements.

See also
Measurement

Member Function Documentation

◆ add()

void MeasurementsBuffer::add ( Measurement  m)

Add a measurement to the buffer.

Parameters
mMeasurement to be added to the buffer

◆ getEntryAt()

Measurement MeasurementsBuffer::getEntryAt ( int  index)

Get the measurement at given index.

Parameters
indexIndex of measurement to obtain
Returns
Measurement at given index

◆ getLastRecordedPointIndex()

int MeasurementsBuffer::getLastRecordedPointIndex ( )

Get index of last insertion.

Returns
Index of last insertion

◆ getSize()

int MeasurementsBuffer::getSize ( )

Obtain the size of the buffer.

Returns
Size of the buffer

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