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

Room configuration information. More...

#include <Room.h>

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

List of all members.

Public Member Functions

void addSurface (const Surface &surface)
 Surface adder.
const SurfacefindClosestSurface (const geometry::Position &position) const
 Closest Surface finder (immutable).
SurfacefindClosestSurface (const geometry::Position &position)
 Closest Surface finder.
size_t findClosestSurfaceIndex (const geometry::Position &position) const
 Closest Surface index finder.
const SurfacefindSurface (const std::string &name) const
 Surface finder (immutable).
SurfacefindSurface (const std::string &name)
 Surface finder.
size_t getNumSurfaces () const
 Surfaces size accessor.
const SurfacegetSurface (const size_t index) const
 Surface value accessor (immutable).
SurfacegetSurface (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< Surfacesurfaces_

Detailed Description

Room configuration information.

A room consists of a series of surfaces.

Definition at line 37 of file Room.h.


Constructor & Destructor Documentation

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.

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

Definition at line 18 of file Room.cpp.


Member Function Documentation

void Room::addSurface ( const Surface surface)

Surface adder.

Add the Surface to this Room.

Parameters:
SurfaceThe new Surface to add.

Definition at line 62 of file Room.cpp.

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.

Parameters:
positionThe Position to find the closest Surface to (in the room's fixed frame).
Returns:
The closest Surface.
Exceptions:
std::out_of_rangeThrown if no Surfaces exist in the Room.

Definition at line 122 of file Room.cpp.

Closest Surface finder.

Find the closest surface to the given Position in the room's fixed frame.

Parameters:
positionThe Position to find the closest Surface to (in the room's fixed frame).
Returns:
The closest Surface.
Exceptions:
std::out_of_rangeThrown if no Surfaces exist in the Room.

Definition at line 127 of file Room.cpp.

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.

Parameters:
positionThe position (in reference to the world's frame) to find the closest Surface to.
Returns:
The index of the closest Surface.
Exceptions:
std::out_of_rangeThrown if no Surface exists.

Definition at line 132 of file Room.cpp.

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.

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

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.

Parameters:
nameThe name or alias of the Surface to find.
Exceptions:
std::out_of_rangeThrown if no Surface with the given name exists.
size_t Room::getNumSurfaces ( ) const

Surfaces size accessor.

Get the number of surfaces of this Room.

Returns:
The number of surfaces of this Room.

Definition at line 33 of file Room.cpp.

const Surface & Room::getSurface ( const size_t  index) const

Surface value accessor (immutable).

Get the Surface of this Room at the given index.

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

Definition at line 38 of file Room.cpp.

Surface & Room::getSurface ( const size_t  index)

Surface value accessor.

Get the Surface of this Room at the given index.

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

Definition at line 50 of file Room.cpp.

const vector< Surface > & Room::getSurfaces ( ) const

Surfaces value accessor (immutable).

Get the surfaces of this Room.

Returns:
The surfaces.

Definition at line 23 of file Room.cpp.

vector< Surface > & Room::getSurfaces ( )

Surfaces value accessor.

Get the surfaces of this Room.

Returns:
The surfaces.

Definition at line 28 of file Room.cpp.

void Room::removeSurface ( const size_t  index)

Surface remover.

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

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

Definition at line 67 of file Room.cpp.

bool Room::surfaceExists ( const std::string &  name) const

Check for the existence of a Surface.

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

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

Definition at line 79 of file Room.cpp.


Member Data Documentation

List of surfaces.

Definition at line 190 of file Room.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