#include <Surface.h>
Public Member Functions | |
void | addAlias (const std::string &alias) |
Alias adder. | |
void | addPlacementSurface (const PlacementSurface &placement_surface) |
Placement surface adder. | |
void | addPointOfInterest (const PointOfInterest &point_of_interest) |
Point of interest adder. | |
const std::string & | getAlias (const size_t index) const |
Alias value accessor. | |
const std::vector< std::string > & | getAliases () const |
Aliases value accessor. | |
const std::string & | getFrameID () const |
Frame ID value accessor. | |
double | getHeight () const |
Height value accessor. | |
const std::string & | getName () const |
Name value accessor. | |
size_t | getNumAliases () const |
Aliases size accessor. | |
size_t | getNumPlacementSurfaces () const |
Placement surfaces size accessor. | |
size_t | getNumPointsOfInterest () const |
Point of interests size accessor. | |
const PlacementSurface & | getPlacementSurface (const size_t index) const |
Placement surface value accessor. | |
const std::vector < PlacementSurface > & | getPlacementSurfaces () const |
Placement surfaces value accessor. | |
const PointOfInterest & | getPointOfInterest (const size_t index) const |
Point of interest value accessor. | |
const std::vector < PointOfInterest > & | getPointsOfInterest () const |
Points of interest value accessor. | |
double | getWidth () const |
Width value accessor. | |
void | removeAlias (const size_t index) |
Alias remover. | |
void | removePlacementSurface (const size_t index) |
Placement surface remover. | |
void | removePointOfInterest (const size_t index) |
Point of interest remover. | |
void | setFrameID (const std::string &frame_id) |
Frame ID value mutator. | |
void | setHeight (const double height) |
Height value mutator. | |
void | setName (const std::string &name) |
Name value mutator. | |
void | setWidth (const double width) |
Width value mutator. | |
Surface (const std::string &name="", const std::string &frame_id="", const double width=0, const double height=0) | |
Create a new Surface. | |
Private Attributes | |
std::vector< std::string > | aliases_ |
std::string | frame_id_ |
double | height_ |
std::string | name_ |
std::vector< PlacementSurface > | placement_surfaces_ |
std::vector< PointOfInterest > | pois_ |
double | width_ |
Surface::Surface | ( | const std::string & | name = "" , |
const std::string & | frame_id = "" , |
||
const double | width = 0 , |
||
const double | height = 0 |
||
) |
Create a new Surface.
Create a new Surface with the given name and frame ID. POI and placement surface lists are empty.
name | The name of the surface (defaults to the empty string). |
frame_id | The frame ID of the surface (defaults to the empty string). |
width | The width of the surface along the X axis (defaults to 0). |
height | The height of the surface along the Y axis (defaults to 0). |
Definition at line 17 of file Surface.cpp.
void Surface::addAlias | ( | const std::string & | alias | ) |
Alias adder.
Add the alias to this Surface.
alias | The new alias to add. |
Definition at line 165 of file Surface.cpp.
void Surface::addPlacementSurface | ( | const PlacementSurface & | placement_surface | ) |
Placement surface adder.
Add the placement surface to this Surface.
placement_surface | The new placement surface to add. |
Definition at line 87 of file Surface.cpp.
void Surface::addPointOfInterest | ( | const PointOfInterest & | point_of_interest | ) |
Point of interest adder.
Add the Point of interest to this Surface.
point_of_interest | The new point of interest to add. |
Definition at line 126 of file Surface.cpp.
const std::string & Surface::getAlias | ( | const size_t | index | ) | const |
Alias value accessor.
Get the alias of this Surface at the given index.
i | The index of the alias to get. |
std::out_of_range | Thrown if the alias at the given index does not exist. |
Definition at line 153 of file Surface.cpp.
const std::vector< std::string > & Surface::getAliases | ( | ) | const |
Aliases value accessor.
Get the aliases of this Surface.
Definition at line 143 of file Surface.cpp.
const string & Surface::getFrameID | ( | ) | const |
Frame ID value accessor.
Get the frame ID value of this Surface.
Definition at line 34 of file Surface.cpp.
double Surface::getHeight | ( | ) | const |
Height value accessor.
Get the height value of this Surface.
Definition at line 54 of file Surface.cpp.
const string & Surface::getName | ( | ) | const |
Name value accessor.
Get the name value of this Surface.
Definition at line 24 of file Surface.cpp.
size_t Surface::getNumAliases | ( | ) | const |
Aliases size accessor.
Get the number of aliases of this Surface.
Definition at line 148 of file Surface.cpp.
size_t Surface::getNumPlacementSurfaces | ( | ) | const |
Placement surfaces size accessor.
Get the number of placement surfaces of this Surface.
Definition at line 70 of file Surface.cpp.
size_t Surface::getNumPointsOfInterest | ( | ) | const |
Point of interests size accessor.
Get the number of points of interest of this Surface.
Definition at line 109 of file Surface.cpp.
const PlacementSurface & Surface::getPlacementSurface | ( | const size_t | index | ) | const |
Placement surface value accessor.
Get the placement surface of this Surface at the given index.
i | The index of the PlacementSurface to get. |
std::out_of_range | Thrown if the placement surface at the given index does not exist. |
Definition at line 75 of file Surface.cpp.
const vector< PlacementSurface > & Surface::getPlacementSurfaces | ( | ) | const |
Placement surfaces value accessor.
Get the placement surfaces of this Surface.
Definition at line 65 of file Surface.cpp.
const PointOfInterest & Surface::getPointOfInterest | ( | const size_t | index | ) | const |
Point of interest value accessor.
Get the Point of interest of this Surface at the given index.
i | The index of the point of interest to get. |
std::out_of_range | Thrown if the Point of interest at the given index does not exist. |
Definition at line 114 of file Surface.cpp.
const std::vector< PointOfInterest > & Surface::getPointsOfInterest | ( | ) | const |
Points of interest value accessor.
Get the points of interest of this Surface.
Definition at line 104 of file Surface.cpp.
double Surface::getWidth | ( | ) | const |
Width value accessor.
Get the width value of this Surface.
Definition at line 44 of file Surface.cpp.
void Surface::removeAlias | ( | const size_t | index | ) |
Alias remover.
Remove the alias at the given index. An invalid index results in no effect.
i | The index of the alias to remove. |
std::out_of_range | Thrown if the alias at the given index does not exist. |
Definition at line 170 of file Surface.cpp.
void Surface::removePlacementSurface | ( | const size_t | index | ) |
Placement surface remover.
Remove the placement surface at the given index. An invalid index results in no effect.
i | The index of the placement surface to remove. |
std::out_of_range | Thrown if the placement surface at the given index does not exist. |
Definition at line 92 of file Surface.cpp.
void Surface::removePointOfInterest | ( | const size_t | index | ) |
Point of interest remover.
Remove the point of interest at the given index. An invalid index results in no effect.
i | The index of the point of interest to remove. |
std::out_of_range | Thrown if the point of interest at the given index does not exist. |
Definition at line 131 of file Surface.cpp.
void Surface::setFrameID | ( | const std::string & | frame_id | ) |
Frame ID value mutator.
Set the frame ID value of this Surface.
frame_id | The new frame ID value. |
Definition at line 39 of file Surface.cpp.
void Surface::setHeight | ( | const double | height | ) |
Height value mutator.
Set the height value of this Surface.
height | The new height value. |
Definition at line 60 of file Surface.cpp.
void Surface::setName | ( | const std::string & | name | ) |
Name value mutator.
Set the name value of this Surface.
name | The new name value. |
Definition at line 29 of file Surface.cpp.
void Surface::setWidth | ( | const double | width | ) |
Width value mutator.
Set the width value of this Surface.
width | The new width value. |
Definition at line 49 of file Surface.cpp.
std::vector<std::string> rail::interactive_world::Surface::aliases_ [private] |
std::string rail::interactive_world::Surface::frame_id_ [private] |
double rail::interactive_world::Surface::height_ [private] |
std::string rail::interactive_world::Surface::name_ [private] |
std::vector<PlacementSurface> rail::interactive_world::Surface::placement_surfaces_ [private] |
std::vector<PointOfInterest> rail::interactive_world::Surface::pois_ [private] |
double rail::interactive_world::Surface::width_ [private] |