Public Member Functions | Private Attributes
rail::interactive_world::World Class Reference

World configuration information. More...

#include <World.h>

List of all members.

Public Member Functions

void addRoom (const Room &room)
 Room adder.
std::vector< const Surface * > findSurfaces (const std::string &name)
 Surface finder.
size_t getNumRooms () const
 Rooms size accessor.
const RoomgetRoom (const size_t index) const
 Room pose value accessor.
const std::vector< Room > & getRooms () const
 Rooms value accessor.
void removeRoom (const size_t index)
 Room remover.
 World ()
 Create a new World.

Private Attributes

std::vector< Roomrooms_

Detailed Description

World configuration information.

A world consists of a series of rooms and surfaces. Surfaces can have points of interest as well.

Definition at line 29 of file World.h.


Constructor & Destructor Documentation

Create a new World.

Creates a new empty world.

Definition at line 18 of file World.cpp.


Member Function Documentation

void World::addRoom ( const Room room)

Room adder.

Add the room to this World.

Parameters:
roomThe new room to add.

Definition at line 44 of file World.cpp.

vector< const Surface * > World::findSurfaces ( const std::string &  name)

Surface finder.

Find all surfaces in the world with the given name (or alias).

Parameters:
nameThe name (or alias) of the surface to search for.
Returns:
A vector of references to the surfaces in the world that were found.

Definition at line 61 of file World.cpp.

size_t World::getNumRooms ( ) const

Rooms size accessor.

Get the number of rooms of this World.

Returns:
The number of rooms of this World.

Definition at line 27 of file World.cpp.

const Room & World::getRoom ( const size_t  index) const

Room pose value accessor.

Get the room of this World at the given index.

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

Definition at line 32 of file World.cpp.

const vector< Room > & World::getRooms ( ) const

Rooms value accessor.

Get the rooms of this World.

Returns:
The rooms.

Definition at line 22 of file World.cpp.

void World::removeRoom ( const size_t  index)

Room remover.

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

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

Definition at line 49 of file World.cpp.


Member Data Documentation

Room information for the world.

Definition at line 99 of file World.h.


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


interactive_world_tools
Author(s): Russell Toris
autogenerated on Thu Jun 6 2019 21:34:15