Public Types | Public Member Functions | Protected Attributes | Private Attributes
datatypes::Scan Class Reference

#include <Scan.hpp>

Inheritance diagram for datatypes::Scan:
Inheritance graph
[legend]

List of all members.

Public Types

typedef PointList::const_iterator const_iterator
typedef const ScanPointconst_reference
 Type of a const reference to an element.
typedef PointList::iterator iterator
typedef std::vector< ScanPointPointList
typedef ScanPointreference
enum  ScanFlags { FlagVehicleCoordinates = 0x00000800 }
typedef std::vector< ScannerInfoScannerInfoVector
typedef PointList::size_type size_type

Public Member Functions

void addCartesianOffset (double offsetX, double offsetY, double offsetZ)
ScanPointaddNewPoint ()
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)
Scancopy (const Scan &)
bool empty () const
const_iterator end () const
iterator end ()
UINT32 getFlags () const
UINT16 getNumPoints () const
const ScanPointgetPoint (UINT16 n) const
ScanPointgetPoint (UINT16 n)
const PointListgetPointList () const
PointListgetPointList ()
PointList::const_iterator getPointListBegin () const
PointList::iterator getPointListBegin ()
PointList::const_iterator getPointListEnd () const
PointList::iterator getPointListEnd ()
const ScannerInfogetScannerInfoByDeviceId (UINT8 id) const
const ScannerInfoVectorgetScannerInfos () const
ScannerInfoVectorgetScannerInfos ()
UINT16 getScanNumber () const
UINT32 getTotalObjectSize ()
virtual const UINT32 getUsedMemory () const
Scanoperator= (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

Detailed Description

Definition at line 24 of file Scan.hpp.


Member Typedef Documentation

typedef PointList::const_iterator datatypes::Scan::const_iterator

Definition at line 43 of file Scan.hpp.

Type of a const reference to an element.

Definition at line 37 of file Scan.hpp.

typedef PointList::iterator datatypes::Scan::iterator

Definition at line 46 of file Scan.hpp.

typedef std::vector<ScanPoint> datatypes::Scan::PointList

Definition at line 28 of file Scan.hpp.

Definition at line 34 of file Scan.hpp.

Definition at line 31 of file Scan.hpp.

typedef PointList::size_type datatypes::Scan::size_type

Definition at line 40 of file Scan.hpp.


Member Enumeration Documentation

Enumerator:
FlagVehicleCoordinates 

Bit 11: Scanpoint coordinate system; 0 = scanner coordinates, 1 = vehicle / reference coordinates.

Definition at line 49 of file Scan.hpp.


Constructor & Destructor Documentation

datatypes::Scan::Scan ( size_type  maxPoints = 5280)

Definition at line 26 of file Scan.cpp.

datatypes::Scan::Scan ( const Scan other)

Copy constructor. Copies the given right hand side object into this object. An alias for copy().

Definition at line 37 of file Scan.cpp.

Default destructor.

Definition at line 145 of file Scan.cpp.


Member Function Documentation

void datatypes::Scan::addCartesianOffset ( double  offsetX,
double  offsetY,
double  offsetZ 
)

Definition at line 200 of file Scan.cpp.

The new point is added to the list of scan points and the number of scan points is increased.

Definition at line 173 of file Scan.cpp.

void datatypes::Scan::addPolarOffset ( double  distOffset,
double  hAngleOffset,
double  vAngleOffset 
)

Definition at line 206 of file Scan.cpp.

Definition at line 239 of file Scan.hpp.

Returns the n-th scan point (read only) with range checking.

Definition at line 242 of file Scan.hpp.

Definition at line 221 of file Scan.hpp.

Definition at line 224 of file Scan.hpp.

Definition at line 137 of file Scan.hpp.

Resets all members of this object.

Definition at line 133 of file Scan.cpp.

Definition at line 373 of file Scan.cpp.

Scan & datatypes::Scan::copy ( const Scan other)

Definition at line 52 of file Scan.cpp.

bool datatypes::Scan::empty ( ) const [inline]

Definition at line 113 of file Scan.hpp.

Definition at line 227 of file Scan.hpp.

Definition at line 230 of file Scan.hpp.

UINT32 datatypes::Scan::getFlags ( ) const [inline]

Definition at line 168 of file Scan.hpp.

Definition at line 107 of file Scan.hpp.

const ScanPoint& datatypes::Scan::getPoint ( UINT16  n) const [inline]

Definition at line 245 of file Scan.hpp.

Definition at line 247 of file Scan.hpp.

const PointList& datatypes::Scan::getPointList ( ) const [inline]

Definition at line 205 of file Scan.hpp.

Definition at line 207 of file Scan.hpp.

PointList::const_iterator datatypes::Scan::getPointListBegin ( ) const [inline]

Definition at line 210 of file Scan.hpp.

PointList::iterator datatypes::Scan::getPointListBegin ( ) [inline]

Definition at line 212 of file Scan.hpp.

PointList::const_iterator datatypes::Scan::getPointListEnd ( ) const [inline]

Definition at line 215 of file Scan.hpp.

PointList::iterator datatypes::Scan::getPointListEnd ( ) [inline]

Definition at line 218 of file Scan.hpp.

Definition at line 360 of file Scan.cpp.

Definition at line 261 of file Scan.hpp.

Definition at line 355 of file Scan.cpp.

Definition at line 153 of file Scan.hpp.

Definition at line 86 of file Scan.cpp.

const UINT32 datatypes::Scan::getUsedMemory ( ) const [virtual]

Implements datatypes::BasicData.

Definition at line 44 of file Scan.cpp.

Scan & datatypes::Scan::operator= ( const Scan other)

Definition at line 97 of file Scan.cpp.

reference datatypes::Scan::operator[] ( size_type  n) [inline]

Definition at line 233 of file Scan.hpp.

const_reference datatypes::Scan::operator[] ( size_type  n) const [inline]

Definition at line 236 of file Scan.hpp.

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.)

Definition at line 159 of file Scan.cpp.

void datatypes::Scan::resize ( size_type  new_size,
const ScanPoint default_point = ScanPoint() 
)

Resizes the scan to the specified number of points.

Parameters:
new_sizeNumber of points the scan should contain.
default_pointData 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.)

Definition at line 149 of file Scan.cpp.

void datatypes::Scan::setFlags ( UINT32  val) [inline]

Definition at line 183 of file Scan.hpp.

Definition at line 212 of file Scan.cpp.

void datatypes::Scan::setScanNumber ( UINT16  val) [inline]

Definition at line 156 of file Scan.hpp.

void datatypes::Scan::setVehicleCoordinates ( bool  inVehicleCoordinates)

Set whether the scanpoints are given in vehicle coordinates.

Definition at line 179 of file Scan.cpp.

size_type datatypes::Scan::size ( ) const [inline]

Definition at line 110 of file Scan.hpp.

Definition at line 195 of file Scan.cpp.

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().

Returns:
True if the scan has been converted successfully. False if no conversion has been done, which could be caused by missing ScannerInfo information.

Definition at line 343 of file Scan.cpp.

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.

Returns:
True if the scan has been converted successfully. False if no conversion has been done, which could be caused by missing ScannerInfo information.

Definition at line 299 of file Scan.cpp.


Member Data Documentation

Definition at line 321 of file Scan.hpp.

Definition at line 60 of file Scan.hpp.

Definition at line 70 of file Scan.hpp.

The ScannerInfo collection.

Definition at line 73 of file Scan.hpp.

Definition at line 63 of file Scan.hpp.


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


libsick_ldmrs
Author(s): SICK AG , Martin Günther , Jochen Sprickerhof
autogenerated on Wed Jun 14 2017 04:04:51