Public Member Functions | Private Attributes
rail::spatial_temporal_learning::worldlib::world::Surface Class Reference

Surface configuration information. More...

#include <Surface.h>

Inheritance diagram for rail::spatial_temporal_learning::worldlib::world::Surface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void addPlacementSurface (const PlacementSurface &placement_surface)
 PlacementSurface adder.
void addPointOfInterest (const PointOfInterest &poi)
 PointOfInterest adder.
const PlacementSurfacefindClosestPlacementSurface (const geometry::Position &position) const
 Closest PlacementSurface finder (immutable).
PlacementSurfacefindClosestPlacementSurface (const geometry::Position &position)
 Closest PlacementSurface finder.
size_t findClosestPlacementSurfaceIndex (const geometry::Position &position) const
 Closest PlacementSurface index finder.
const PlacementSurfacefindPlacementSurface (const std::string &name) const
 PlacementSurface finder (immutable).
PlacementSurfacefindPlacementSurface (const std::string &name)
 PlacementSurface finder.
const PointOfInterestfindPointOfInterest (const std::string &name) const
 PointOfInterest finder (immutable).
PointOfInterestfindPointOfInterest (const std::string &name)
 PointOfInterest finder.
size_t getNumPlacementSurfaces () const
 Placement surfaces size accessor.
size_t getNumPointsOfInterest () const
 Points of interest size accessor.
const PlacementSurfacegetPlacementSurface (const size_t index) const
 PlacementSurface value accessor (immutable).
PlacementSurfacegetPlacementSurface (const size_t index)
 PlacementSurface value accessor.
const std::vector
< PlacementSurface > & 
getPlacementSurfaces () const
 Placement surfaces value accessor (immutable).
std::vector< PlacementSurface > & getPlacementSurfaces ()
 Placement surfaces value accessor.
const PointOfInterestgetPointOfInterest (const size_t index) const
 Points of interest value accessor (immutable).
PointOfInterestgetPointOfInterest (const size_t index)
 Points of interest value accessor.
const std::vector
< PointOfInterest > & 
getPointsOfInterest () const
 Points of interest value accessor (immutable).
std::vector< PointOfInterest > & getPointsOfInterest ()
 Points of interest value accessor.
bool placementSurfaceExists (const std::string &name) const
 Check for the existence of a PlacementSurface.
bool pointOfInterestExists (const std::string &name) const
 Check for the existence of a PointOfInterest.
void removePlacementSurface (const size_t index)
 PlacementSurface remover.
void removePointOfInterest (const size_t index)
 PointOfInterest remover.
 Surface (const std::string &name="", const std::string &frame_id="", const geometry::Pose &pose=geometry::Pose(), const double width=0, const double depth=0, const double height=0)
 Create a new Surface.

Private Attributes

std::vector< PlacementSurfaceplacement_surfaces_
std::vector< PointOfInterestpois_

Detailed Description

Surface configuration information.

A surface consists of a name with associated placement frames and points of interest.

Definition at line 34 of file Surface.h.


Constructor & Destructor Documentation

Surface::Surface ( const std::string &  name = "",
const std::string &  frame_id = "",
const geometry::Pose pose = geometry::Pose(),
const double  width = 0,
const double  depth = 0,
const double  height = 0 
)

Create a new Surface.

Create a new empty Surface with the given name, frame ID, Pose (in reference to the room's frame ID) and dimensions.

Parameters:
nameThe name of the Surface (defaults to the empty string).
frame_idThe frame ID of the Surface (defaults to the empty string).
poseThe Pose of the Surface with respect to the Room (defaults to 0 Pose).
widthThe width of the Surface (along the x-axis) (defaults to 0).
depthThe width of the Surface (along the y-axis) (defaults to 0).
heightThe height of the Surface (along the z-axis) (defaults to 0).

Definition at line 18 of file Surface.cpp.


Member Function Documentation

void Surface::addPlacementSurface ( const PlacementSurface placement_surface)

PlacementSurface adder.

Add the PlacementSurface to this Surface.

Parameters:
PlacementSurfaceThe new PlacementSurface to add.

Definition at line 62 of file Surface.cpp.

PointOfInterest adder.

Add the PointOfInterest to this Surface.

Parameters:
poiThe new PointOfInterest to add.

Definition at line 196 of file Surface.cpp.

Closest PlacementSurface finder (immutable).

Find the closest PlacementSurface to the given Position. If no placement surfaces exist, an exception is thrown.

Parameters:
positionThe position (in reference to the surface's frame) to find the closest PlacementSurface to.
Exceptions:
std::out_of_rangeThrown if no placement surfaces exist.

Definition at line 122 of file Surface.cpp.

Closest PlacementSurface finder.

Find the closest PlacementSurface to the given Position. If no placement surfaces exist, an exception is thrown.

Parameters:
positionThe position (in reference to the surface's frame) to find the closest PlacementSurface to.
Exceptions:
std::out_of_rangeThrown if no placement surfaces exist.

Definition at line 127 of file Surface.cpp.

Closest PlacementSurface index finder.

Find the closest PlacementSurface index to the given Position. If no placement surfaces exist, an exception is thrown.

Parameters:
positionThe position (in reference to the surface's frame) to find the closest PlacementSurface to.
Returns:
The index of the closest PlacementSurface.
Exceptions:
std::out_of_rangeThrown if no placement surfaces exist.

Definition at line 132 of file Surface.cpp.

PlacementSurface finder (immutable).

Find a PlacementSurface with the given name. This will also check the aliases. Case is not important. If multiple placement surfaces exist with the given name, the first placement surface is returned.

Parameters:
nameThe name or alias of the PlacementSurface to find.
Exceptions:
std::out_of_rangeThrown if no PlacementSurface with the given name exists.

PlacementSurface finder.

Find a PlacementSurface with the given name. This will also check the aliases. Case is not important. If multiple placement surfaces exist with the given name, the first placement surface is returned.

Parameters:
nameThe name or alias of the PlacementSurface to find.
Exceptions:
std::out_of_rangeThrown if no PlacementSurface with the given name exists.

PointOfInterest finder (immutable).

Find a PointOfInterest with the given name. This will also check the aliases. Case is not important. If multiple points of interest exist with the given name, the first PointOfInterest is returned.

Parameters:
nameThe name or alias of the PointOfInterest to find.
Exceptions:
std::out_of_rangeThrown if no PointOfInterest with the given name exists.

PointOfInterest finder.

Find a PointOfInterest with the given name. This will also check the aliases. Case is not important. If multiple points of interest exist with the given name, the first PointOfInterest is returned.

Parameters:
nameThe name or alias of the PointOfInterest to find.
Exceptions:
std::out_of_rangeThrown if no PointOfInterest with the given name exists.

Placement surfaces size accessor.

Get the number of placement surfaces of this Surface.

Returns:
The number of placement surfaces of this Surface.

Definition at line 33 of file Surface.cpp.

Points of interest size accessor.

Get the number of points of interest of this Surface.

Returns:
The number of points of interest of this Surface.

Definition at line 167 of file Surface.cpp.

const PlacementSurface & Surface::getPlacementSurface ( const size_t  index) const

PlacementSurface value accessor (immutable).

Get the PlacementSurface of this Surface at the given index.

Parameters:
iThe index of the PlacementSurface to get.
Returns:
The PlacementSurface at the given index.
Exceptions:
std::out_of_rangeThrown if the PlacementSurface at the given index does not exist.

Definition at line 38 of file Surface.cpp.

PlacementSurface value accessor.

Get the PlacementSurface of this Surface at the given index.

Parameters:
iThe index of the PlacementSurface to get.
Returns:
The PlacementSurface at the given index.
Exceptions:
std::out_of_rangeThrown if the PlacementSurface at the given index does not exist.

Definition at line 50 of file Surface.cpp.

const vector< PlacementSurface > & Surface::getPlacementSurfaces ( ) const

Placement surfaces value accessor (immutable).

Get the placement surfaces of this Surface.

Returns:
The placement surfaces.

Definition at line 23 of file Surface.cpp.

Placement surfaces value accessor.

Get the placement surfaces of this Surface.

Returns:
The placement surfaces.

Definition at line 28 of file Surface.cpp.

const PointOfInterest & Surface::getPointOfInterest ( const size_t  index) const

Points of interest value accessor (immutable).

Get the PointOfInterest of this Surface at the given index.

Parameters:
iThe index of the PointOfInterest to get.
Returns:
The PointOfInterest at the given index.
Exceptions:
std::out_of_rangeThrown if the PointOfInterest at the given index does not exist.

Definition at line 172 of file Surface.cpp.

PointOfInterest & Surface::getPointOfInterest ( const size_t  index)

Points of interest value accessor.

Get the PointOfInterest of this Surface at the given index.

Parameters:
iThe index of the PointOfInterest to get.
Returns:
The PointOfInterest at the given index.
Exceptions:
std::out_of_rangeThrown if the PointOfInterest at the given index does not exist.

Definition at line 184 of file Surface.cpp.

const vector< PointOfInterest > & Surface::getPointsOfInterest ( ) const

Points of interest value accessor (immutable).

Get the points of interest of this Surface.

Returns:
The points of interest.

Definition at line 157 of file Surface.cpp.

Points of interest value accessor.

Get the points of interest of this Surface.

Returns:
The points of interest.

Definition at line 162 of file Surface.cpp.

bool Surface::placementSurfaceExists ( const std::string &  name) const

Check for the existence of a PlacementSurface.

Check for the existence of a PlacementSurface in the Surface. This will also check the aliases.Case is not important.

Parameters:
nameThe name or alias of the PlacementSurface to find.
Exceptions:
std::out_of_rangeThrown if no PlacementSurface with the given name exists.

Definition at line 79 of file Surface.cpp.

bool Surface::pointOfInterestExists ( const std::string &  name) const

Check for the existence of a PointOfInterest.

Check for the existence of a PointOfInterest in the Surface. This will also check the aliases. Case is not important.

Parameters:
nameThe name or alias of the PointOfInterest to find.
Exceptions:
std::out_of_rangeThrown if no PointOfInterest with the given name exists.

Definition at line 213 of file Surface.cpp.

void Surface::removePlacementSurface ( const size_t  index)

PlacementSurface remover.

Remove the PlacementSurface at the given index. An invalid index results in no effect.

Parameters:
iThe index of the PlacementSurface to remove.
Exceptions:
std::out_of_rangeThrown if the PlacementSurface at the given index does not exist.

Definition at line 67 of file Surface.cpp.

void Surface::removePointOfInterest ( const size_t  index)

PointOfInterest remover.

Remove the PointOfInterest at the given index. An invalid index results in no effect.

Parameters:
iThe index of the PointOfInterest to remove.
Exceptions:
std::out_of_rangeThrown if the PointOfInterest at the given index does not exist.

Definition at line 201 of file Surface.cpp.


Member Data Documentation

List of placement surfaces.

Definition at line 289 of file Surface.h.

List of points of interest.

Definition at line 291 of file Surface.h.


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


worldlib
Author(s): Russell Toris
autogenerated on Fri Feb 12 2016 00:24:19