Room configuration information. More...
#include <Room.h>
Public Member Functions | |
void | addSurface (const Surface &surface) |
Surface adder. | |
const Surface & | findClosestSurface (const geometry::Position &position) const |
Closest Surface finder (immutable). | |
Surface & | findClosestSurface (const geometry::Position &position) |
Closest Surface finder. | |
size_t | findClosestSurfaceIndex (const geometry::Position &position) const |
Closest Surface index finder. | |
const Surface & | findSurface (const std::string &name) const |
Surface finder (immutable). | |
Surface & | findSurface (const std::string &name) |
Surface finder. | |
size_t | getNumSurfaces () const |
Surfaces size accessor. | |
const Surface & | getSurface (const size_t index) const |
Surface value accessor (immutable). | |
Surface & | getSurface (const size_t index) |
Surface value accessor. | |
const std::vector< Surface > & | getSurfaces () const |
Surfaces value accessor (immutable). | |
std::vector< Surface > & | getSurfaces () |
Surfaces value accessor. | |
void | removeSurface (const size_t index) |
Surface remover. | |
Room (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 Room. | |
bool | surfaceExists (const std::string &name) const |
Check for the existence of a Surface. | |
Private Attributes | |
std::vector< Surface > | surfaces_ |
Room configuration information.
A room consists of a series of surfaces.
Room::Room | ( | 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 Room.
Create a new empty Room with the given name, frame ID, Pose (in reference to the World frame ID) and dimensions.
name | The name of the Room (defaults to the empty string). |
frame_id | The frame ID of the Room (defaults to the empty string). |
pose | The Pose of the Room with respect to the World (defaults to 0 Pose). |
width | The width of the Room (along the x-axis) (defaults to 0). |
depth | The width of the Room (along the y-axis) (defaults to 0). |
height | The height of the Room (along the z-axis) (defaults to 0). |
void Room::addSurface | ( | const Surface & | surface | ) |
const Surface & Room::findClosestSurface | ( | const geometry::Position & | position | ) | const |
Closest Surface finder (immutable).
Find the closest surface to the given Position in the room's fixed frame.
position | The Position to find the closest Surface to (in the room's fixed frame). |
std::out_of_range | Thrown if no Surfaces exist in the Room. |
Surface & Room::findClosestSurface | ( | const geometry::Position & | position | ) |
size_t Room::findClosestSurfaceIndex | ( | const geometry::Position & | position | ) | const |
Closest Surface index finder.
Find the closest Surface index to the given Position. If no Surface exists, an exception is thrown.
position | The position (in reference to the world's frame) to find the closest Surface to. |
std::out_of_range | Thrown if no Surface exists. |
const Surface& rail::spatial_temporal_learning::worldlib::world::Room::findSurface | ( | const std::string & | name | ) | const |
Surface finder (immutable).
Find a Surface with the given name. This will also check the aliases. Case is not important. If multiple Surface exist with the given name, the first Surface is returned.
name | The name or alias of the Surface to find. |
std::out_of_range | Thrown if no Surface with the given name exists. |
Surface& rail::spatial_temporal_learning::worldlib::world::Room::findSurface | ( | const std::string & | name | ) |
Surface finder.
Find a Surface with the given name. This will also check the aliases. Case is not important. If multiple Surface exist with the given name, the first Surface is returned.
name | The name or alias of the Surface to find. |
std::out_of_range | Thrown if no Surface with the given name exists. |
size_t Room::getNumSurfaces | ( | ) | const |
const Surface & Room::getSurface | ( | const size_t | index | ) | const |
Surface & Room::getSurface | ( | const size_t | index | ) |
const vector< Surface > & Room::getSurfaces | ( | ) | const |
vector< Surface > & Room::getSurfaces | ( | ) |
void Room::removeSurface | ( | const size_t | index | ) |
bool Room::surfaceExists | ( | const std::string & | name | ) | const |
std::vector<Surface> rail::spatial_temporal_learning::worldlib::world::Room::surfaces_ [private] |