SPAOP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | List of all members
wonder::Room Class Reference

A class containing the wonder-specific information about a room (name and vertices). More...

#include <Room.h>

Classes

struct  Vertex
 A struct describing a vertex with its three coordinates. More...
 

Public Member Functions

 Room (const std::string &name="", int nOfVertices=0)
 Constructor. More...
 
virtual ~Room ()
 Destructor. More...
 
const std::string & getName () const
 The name of the room as provided by cWONDER. More...
 
int getNumberOfVertices () const
 Returns the number of vertices of the room. More...
 
const VertexgetVertex (int vertexNo) const
 Returns a reference to a Vertex of the Room. More...
 
void setVertex (int vertexNo, const Vertex vertex)
 Updates a vertex of the room. More...
 

Detailed Description

A class containing the wonder-specific information about a room (name and vertices).

(Within WONDER, the "room" is actually a description of the positioning of the WFS speaker array.)

Constructor & Destructor Documentation

wonder::Room::Room ( const std::string &  name = "",
int  nOfVertices = 0 
)

Constructor.

Parameters
nameThe name of the room.
nOfVerticesThe number of vertices.
wonder::Room::~Room ( )
virtual

Destructor.

Member Function Documentation

const std::string & wonder::Room::getName ( ) const

The name of the room as provided by cWONDER.

(cWONDER reads it from a config file.)

int wonder::Room::getNumberOfVertices ( ) const

Returns the number of vertices of the room.

const Room::Vertex & wonder::Room::getVertex ( int  vertexNo) const

Returns a reference to a Vertex of the Room.

Parameters
vertexNoAn index within [0, numberOfVertices-1].
Returns
The vertex indicated by vertexNo. If vertexNo is < 0, vertex number 0 will be returned. If vertexNo is >= numberOfVerices, vertex number numberOfVertices-1 will be returned.
void wonder::Room::setVertex ( int  vertexNo,
const Vertex  vertex 
)

Updates a vertex of the room.

Parameters
vertexNoAn index within [0, numberOfVertices-1]. If vertexNo is not within that interval, nothing will be changed.
vertexA Vertex with the new coordinates of vertex number vertexNo.