#include <Scan.hpp>
Public Types | |
typedef PointList::const_iterator | const_iterator |
typedef const ScanPoint & | const_reference |
Type of a const reference to an element. | |
typedef PointList::iterator | iterator |
typedef std::vector< ScanPoint > | PointList |
typedef ScanPoint & | reference |
enum | ScanFlags { FlagVehicleCoordinates = 0x00000800 } |
typedef std::vector< ScannerInfo > | ScannerInfoVector |
typedef PointList::size_type | size_type |
Public Member Functions | |
void | addCartesianOffset (double offsetX, double offsetY, double offsetZ) |
ScanPoint & | addNewPoint () |
void | addPolarOffset (double distOffset, double hAngleOffset, double vAngleOffset) |
reference | at (size_type n) |
const_reference | at (size_type n) const |
Returns the n-th scan point (read only) with range checking. | |
const_iterator | begin () const |
iterator | begin () |
size_type | capacity () const |
void | clear () |
Resets all members of this object. | |
void | clearLabelFlag (Scan::ScanFlags scanFlag) |
Scan & | copy (const Scan &) |
bool | empty () const |
const_iterator | end () const |
iterator | end () |
UINT32 | getFlags () const |
UINT16 | getNumPoints () const |
const ScanPoint & | getPoint (UINT16 n) const |
ScanPoint & | getPoint (UINT16 n) |
const PointList & | getPointList () const |
PointList & | getPointList () |
PointList::const_iterator | getPointListBegin () const |
PointList::iterator | getPointListBegin () |
PointList::const_iterator | getPointListEnd () const |
PointList::iterator | getPointListEnd () |
const ScannerInfo * | getScannerInfoByDeviceId (UINT8 id) const |
const ScannerInfoVector & | getScannerInfos () const |
ScannerInfoVector & | getScannerInfos () |
UINT16 | getScanNumber () const |
UINT32 | getTotalObjectSize () |
virtual const UINT32 | getUsedMemory () const |
Scan & | operator= (const Scan &) |
reference | operator[] (size_type n) |
const_reference | operator[] (size_type n) const |
void | reserve (size_type new_capacity) |
Allocates memory for a total of new_capacity points. | |
void | resize (size_type new_size, const ScanPoint &default_point=ScanPoint()) |
Resizes the scan to the specified number of points. | |
Scan (size_type maxPoints=5280) | |
Scan (const Scan &) | |
void | setFlags (UINT32 val) |
void | setScannerInfos (const ScannerInfoVector &v) |
void | setScanNumber (UINT16 val) |
void | setVehicleCoordinates (bool inVehicleCoordinates) |
Set whether the scanpoints are given in vehicle coordinates. | |
size_type | size () const |
void | sort () |
bool | transformToVehicleCoordinates () |
Transforms this scan (i.e. the scan points) to the vehicle coordinates. | |
bool | transformToVehicleCoordinatesUnsorted () |
Transforms this scan (i.e. the scan points) to the vehicle coordinates. | |
~Scan () | |
Default destructor. | |
Protected Attributes | |
UINT32 | m_flags |
PointList | m_points |
ScannerInfoVector | m_scannerInfos |
The ScannerInfo collection. | |
UINT16 | m_scanNumber |
Private Attributes | |
bool | m_beVerbose |
typedef PointList::const_iterator datatypes::Scan::const_iterator |
typedef const ScanPoint& datatypes::Scan::const_reference |
typedef PointList::iterator datatypes::Scan::iterator |
typedef std::vector<ScanPoint> datatypes::Scan::PointList |
typedef ScanPoint& datatypes::Scan::reference |
typedef std::vector<ScannerInfo> datatypes::Scan::ScannerInfoVector |
typedef PointList::size_type datatypes::Scan::size_type |
datatypes::Scan::Scan | ( | size_type | maxPoints = 5280 | ) |
datatypes::Scan::Scan | ( | const Scan & | other | ) |
void datatypes::Scan::addCartesianOffset | ( | double | offsetX, |
double | offsetY, | ||
double | offsetZ | ||
) |
void datatypes::Scan::addPolarOffset | ( | double | distOffset, |
double | hAngleOffset, | ||
double | vAngleOffset | ||
) |
reference datatypes::Scan::at | ( | size_type | n | ) | [inline] |
const_reference datatypes::Scan::at | ( | size_type | n | ) | const [inline] |
const_iterator datatypes::Scan::begin | ( | ) | const [inline] |
iterator datatypes::Scan::begin | ( | ) | [inline] |
size_type datatypes::Scan::capacity | ( | ) | const [inline] |
void datatypes::Scan::clear | ( | ) |
void datatypes::Scan::clearLabelFlag | ( | Scan::ScanFlags | scanFlag | ) |
Scan & datatypes::Scan::copy | ( | const Scan & | other | ) |
bool datatypes::Scan::empty | ( | ) | const [inline] |
const_iterator datatypes::Scan::end | ( | ) | const [inline] |
iterator datatypes::Scan::end | ( | ) | [inline] |
UINT32 datatypes::Scan::getFlags | ( | ) | const [inline] |
UINT16 datatypes::Scan::getNumPoints | ( | ) | const [inline] |
const ScanPoint& datatypes::Scan::getPoint | ( | UINT16 | n | ) | const [inline] |
ScanPoint& datatypes::Scan::getPoint | ( | UINT16 | n | ) | [inline] |
const PointList& datatypes::Scan::getPointList | ( | ) | const [inline] |
PointList& datatypes::Scan::getPointList | ( | ) | [inline] |
PointList::const_iterator datatypes::Scan::getPointListBegin | ( | ) | const [inline] |
PointList::iterator datatypes::Scan::getPointListBegin | ( | ) | [inline] |
PointList::const_iterator datatypes::Scan::getPointListEnd | ( | ) | const [inline] |
PointList::iterator datatypes::Scan::getPointListEnd | ( | ) | [inline] |
const ScannerInfo * datatypes::Scan::getScannerInfoByDeviceId | ( | UINT8 | id | ) | const |
const ScannerInfoVector& datatypes::Scan::getScannerInfos | ( | ) | const [inline] |
UINT16 datatypes::Scan::getScanNumber | ( | ) | const [inline] |
const UINT32 datatypes::Scan::getUsedMemory | ( | ) | const [virtual] |
Implements datatypes::BasicData.
const_reference datatypes::Scan::operator[] | ( | size_type | n | ) | const [inline] |
void datatypes::Scan::reserve | ( | size_type | new_capacity | ) |
Allocates memory for a total of new_capacity points.
A Scan must not hold more than 0xFFFF scan points (65536 in decimal), which is the maximum number an UINT16 can hold. If the new_capacity
is larger than this value (65536), a std::out_of_range exception will be thrown.
(Naming scheme according to std::vector.)
void datatypes::Scan::resize | ( | size_type | new_size, |
const ScanPoint & | default_point = ScanPoint() |
||
) |
Resizes the scan to the specified number of points.
new_size | Number of points the scan should contain. |
default_point | Data with which new elements should be populated. |
This function will resize the Scan to the specified number of scan points. If the number is smaller than the scan's current size the scan is truncated, otherwise the scan is extended and new elements are populated with given data.
A Scan must not hold more than 0xFFFF scan points (65536 in decimal), which is the maximum number an UINT16 can hold. If the new_capacity
is larger than this value (65536), a std::out_of_range exception will be thrown.
(Naming scheme according to std::vector.)
void datatypes::Scan::setFlags | ( | UINT32 | val | ) | [inline] |
void datatypes::Scan::setScannerInfos | ( | const ScannerInfoVector & | v | ) |
void datatypes::Scan::setScanNumber | ( | UINT16 | val | ) | [inline] |
void datatypes::Scan::setVehicleCoordinates | ( | bool | inVehicleCoordinates | ) |
size_type datatypes::Scan::size | ( | ) | const [inline] |
void datatypes::Scan::sort | ( | ) |
Transforms this scan (i.e. the scan points) to the vehicle coordinates.
Note: This operation also calls sort(), so that the transformed scan is sorted by angle as well. (Previously, it was not sorted, but apparently everyone who used this needed the sorting and it got forgotten too often.) For transformation without sorting, use transformToVehicleCoordinatesUnsorted().
Transforms this scan (i.e. the scan points) to the vehicle coordinates.
This method does not sort the resulting scan. Use transformToVehicleCoordinates() if transformation with additional sorting is needed.
bool datatypes::Scan::m_beVerbose [private] |
UINT32 datatypes::Scan::m_flags [protected] |
PointList datatypes::Scan::m_points [protected] |
ScannerInfoVector datatypes::Scan::m_scannerInfos [protected] |
The ScannerInfo collection.
UINT16 datatypes::Scan::m_scanNumber [protected] |