Surface configuration information. More...
#include <Surface.h>
Public Member Functions | |
void | addPlacementSurface (const PlacementSurface &placement_surface) |
PlacementSurface adder. | |
void | addPointOfInterest (const PointOfInterest &poi) |
PointOfInterest adder. | |
const PlacementSurface & | findClosestPlacementSurface (const geometry::Position &position) const |
Closest PlacementSurface finder (immutable). | |
PlacementSurface & | findClosestPlacementSurface (const geometry::Position &position) |
Closest PlacementSurface finder. | |
size_t | findClosestPlacementSurfaceIndex (const geometry::Position &position) const |
Closest PlacementSurface index finder. | |
const PlacementSurface & | findPlacementSurface (const std::string &name) const |
PlacementSurface finder (immutable). | |
PlacementSurface & | findPlacementSurface (const std::string &name) |
PlacementSurface finder. | |
const PointOfInterest & | findPointOfInterest (const std::string &name) const |
PointOfInterest finder (immutable). | |
PointOfInterest & | findPointOfInterest (const std::string &name) |
PointOfInterest finder. | |
size_t | getNumPlacementSurfaces () const |
Placement surfaces size accessor. | |
size_t | getNumPointsOfInterest () const |
Points of interest size accessor. | |
const PlacementSurface & | getPlacementSurface (const size_t index) const |
PlacementSurface value accessor (immutable). | |
PlacementSurface & | getPlacementSurface (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 PointOfInterest & | getPointOfInterest (const size_t index) const |
Points of interest value accessor (immutable). | |
PointOfInterest & | getPointOfInterest (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< PlacementSurface > | placement_surfaces_ |
std::vector< PointOfInterest > | pois_ |
Surface configuration information.
A surface consists of a name with associated placement frames and points of interest.
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.
name | The name of the Surface (defaults to the empty string). |
frame_id | The frame ID of the Surface (defaults to the empty string). |
pose | The Pose of the Surface with respect to the Room (defaults to 0 Pose). |
width | The width of the Surface (along the x-axis) (defaults to 0). |
depth | The width of the Surface (along the y-axis) (defaults to 0). |
height | The height of the Surface (along the z-axis) (defaults to 0). |
Definition at line 18 of file Surface.cpp.
void Surface::addPlacementSurface | ( | const PlacementSurface & | placement_surface | ) |
PlacementSurface adder.
Add the PlacementSurface to this Surface.
PlacementSurface | The new PlacementSurface to add. |
Definition at line 62 of file Surface.cpp.
void Surface::addPointOfInterest | ( | const PointOfInterest & | poi | ) |
PointOfInterest adder.
Add the PointOfInterest to this Surface.
poi | The new PointOfInterest to add. |
Definition at line 196 of file Surface.cpp.
const PlacementSurface & Surface::findClosestPlacementSurface | ( | const geometry::Position & | position | ) | const |
Closest PlacementSurface finder (immutable).
Find the closest PlacementSurface to the given Position. If no placement surfaces exist, an exception is thrown.
position | The position (in reference to the surface's frame) to find the closest PlacementSurface to. |
std::out_of_range | Thrown if no placement surfaces exist. |
Definition at line 122 of file Surface.cpp.
PlacementSurface & Surface::findClosestPlacementSurface | ( | const geometry::Position & | position | ) |
Closest PlacementSurface finder.
Find the closest PlacementSurface to the given Position. If no placement surfaces exist, an exception is thrown.
position | The position (in reference to the surface's frame) to find the closest PlacementSurface to. |
std::out_of_range | Thrown if no placement surfaces exist. |
Definition at line 127 of file Surface.cpp.
size_t Surface::findClosestPlacementSurfaceIndex | ( | const geometry::Position & | position | ) | const |
Closest PlacementSurface index finder.
Find the closest PlacementSurface index to the given Position. If no placement surfaces exist, an exception is thrown.
position | The position (in reference to the surface's frame) to find the closest PlacementSurface to. |
std::out_of_range | Thrown if no placement surfaces exist. |
Definition at line 132 of file Surface.cpp.
const PlacementSurface& rail::spatial_temporal_learning::worldlib::world::Surface::findPlacementSurface | ( | const std::string & | name | ) | const |
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.
name | The name or alias of the PlacementSurface to find. |
std::out_of_range | Thrown if no PlacementSurface with the given name exists. |
PlacementSurface& rail::spatial_temporal_learning::worldlib::world::Surface::findPlacementSurface | ( | const std::string & | name | ) |
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.
name | The name or alias of the PlacementSurface to find. |
std::out_of_range | Thrown if no PlacementSurface with the given name exists. |
const PointOfInterest& rail::spatial_temporal_learning::worldlib::world::Surface::findPointOfInterest | ( | const std::string & | name | ) | const |
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.
name | The name or alias of the PointOfInterest to find. |
std::out_of_range | Thrown if no PointOfInterest with the given name exists. |
PointOfInterest& rail::spatial_temporal_learning::worldlib::world::Surface::findPointOfInterest | ( | const std::string & | name | ) |
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.
name | The name or alias of the PointOfInterest to find. |
std::out_of_range | Thrown if no PointOfInterest with the given name exists. |
size_t Surface::getNumPlacementSurfaces | ( | ) | const |
Placement surfaces size accessor.
Get the number of placement surfaces of this Surface.
Definition at line 33 of file Surface.cpp.
size_t Surface::getNumPointsOfInterest | ( | ) | const |
Points of interest size accessor.
Get 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.
i | The index of the PlacementSurface to get. |
std::out_of_range | Thrown if the PlacementSurface at the given index does not exist. |
Definition at line 38 of file Surface.cpp.
PlacementSurface & Surface::getPlacementSurface | ( | const size_t | index | ) |
PlacementSurface value accessor.
Get the PlacementSurface of this Surface at the given index.
i | The index of the PlacementSurface to get. |
std::out_of_range | Thrown 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.
Definition at line 23 of file Surface.cpp.
vector< PlacementSurface > & Surface::getPlacementSurfaces | ( | ) |
Placement surfaces value accessor.
Get the placement surfaces of this Surface.
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.
i | The index of the PointOfInterest to get. |
std::out_of_range | Thrown 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.
i | The index of the PointOfInterest to get. |
std::out_of_range | Thrown 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.
Definition at line 157 of file Surface.cpp.
vector< PointOfInterest > & Surface::getPointsOfInterest | ( | ) |
Points of interest value accessor.
Get the points of interest of this Surface.
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.
name | The name or alias of the PlacementSurface to find. |
std::out_of_range | Thrown 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.
name | The name or alias of the PointOfInterest to find. |
std::out_of_range | Thrown 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.
i | The index of the PlacementSurface to remove. |
std::out_of_range | Thrown 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.
i | The index of the PointOfInterest to remove. |
std::out_of_range | Thrown if the PointOfInterest at the given index does not exist. |
Definition at line 201 of file Surface.cpp.
std::vector<PlacementSurface> rail::spatial_temporal_learning::worldlib::world::Surface::placement_surfaces_ [private] |
std::vector<PointOfInterest> rail::spatial_temporal_learning::worldlib::world::Surface::pois_ [private] |