Tile Class Reference

#include <Tile.h>

Collaboration diagram for Tile:

List of all members.


Public Member Functions

 Tile ()
 ~Tile ()
Tileclone ()
void setId (unsigned int id)
void setName (std::string name)
void setXSize (int sizeX)
void setZSize (int sizeZ)
void setYRotation (int yRotation)
void setHeight (float height)
void setModel (ModelInterface *mdl)
unsigned int getId ()
std::string getName ()
int getXSize ()
int getZSize ()
int getYRotation ()
float getHeight ()
ModelInterfacegetModel ()
void dump ()

Public Attributes

SceneGraphAttachmentsceneGraphAttachment
 Pointer to data relevant for the SceneGraphInterface.

Private Member Functions

 Tile (Tile *src)

Private Attributes

unsigned int id
 ID of the Tile.
std::string name
 Name of the Tile.
int sizeX
 Horizontal and vertical size and rotation along the y-Axis.
int sizeZ
int yRotation
float height
 Height of the Tile.
ModelInterfacemodel
 Graphical representation of the Tile.

Constructor & Destructor Documentation

Tile::Tile (  ) 

Constructor initializes Tile. The constructor initializes the member variables with default values.

Tile::~Tile (  ) 

Destructor. The destructor checks if the Tile is already removed from the SceneGraphInterface and prints an ERROR-message if not

Tile::Tile ( Tile src  )  [private]

Copy-constructor The copy-constructor initializes the new Tile with the data from the passed Tile. Therefore all member variables are copied and the model is cloned or deep-cloned according to the configuration.

Parameters:
src Tile which should be cloned


Member Function Documentation

Tile * Tile::clone (  ) 

Creates a clone of the current Tile. The method creates and returns a copy of the current Tile. Therefore all member variables are cloned and the model is cloned or deep-cloned according to the configuration.

Returns:
copy of the current Tile

void Tile::dump (  ) 

Prints debugging information about the Tile.

float Tile::getHeight (  ) 

Returns the height of the Tile in world coordinates.

Returns:
height of the Tile in world coordinates

unsigned int Tile::getId (  ) 

Returns the ID of the Tile.

Returns:
id of the tile

ModelInterface * Tile::getModel (  ) 

Returns the graphical representation of the Tile.

Returns:
model of the Tile

std::string Tile::getName (  ) 

Returns the name of the Tile.

Returns:
name of the Tile

int Tile::getXSize (  ) 

Returns the horizontal size of the Tile in world coordinates.

Returns:
horizontal size of the Tile in world coordinates

int Tile::getYRotation (  ) 

Returns the rotation of the Tile along the Y-Axis.

Returns:
rotation of the Tile along the Y-axis in degrees

int Tile::getZSize (  ) 

Returns the vertical size of the Tile in world coordinates.

Returns:
vertical size of the Tile in world coordinates

void Tile::setHeight ( float  height  ) 

Sets the height of the Tile. The method sets the offset of the Tile along the global Y-axis. This can be used to place a Tile in an arbitrary height.

Parameters:
height height of the Tile

void Tile::setId ( unsigned int  id  ) 

Sets the Tile's ID.

Parameters:
id ID of the Tile

void Tile::setModel ( ModelInterface mdl  ) 

Sets the graphical representation of the Tile.

Parameters:
mdl model of the Tile

void Tile::setName ( std::string  name  ) 

Sets the name of the Tile.

Parameters:
name name of the Tile

void Tile::setXSize ( int  sizeX  ) 

Sets the horizontal size of the Tile. The passed size is in world coordinates and not in spacing units. This means that the passed argument must be a multiple of the horizontal spacing defined in the EnvironmentLayout config-file which is parsed by the WorldDatabase.

Parameters:
sizeX horizontal size of Tile in world coordinates

void Tile::setYRotation ( int  yRotation  ) 

Sets the orientation of the tile along Y-axis. The orientation can be used to match the Tile into the Environment. The passed rotation is in degrees and should be either 0, 90, 180 or 270 degrees.

Parameters:
yRotation rotation in degrees along the Y-axis

void Tile::setZSize ( int  sizeZ  ) 

Sets the vertical size of the Tile The passed size is in world coordinates and not in spacing units. This means that the passed argument must be a multiple of the vertical spacing defined in the EnvironmentLayout config-file which is parsed by the WorldDatabase.

Parameters:
sizeZ vertical size of Tile in world coordinates


Member Data Documentation

float Tile::height [private]

Height of the Tile.

unsigned int Tile::id [private]

ID of the Tile.

Graphical representation of the Tile.

std::string Tile::name [private]

Name of the Tile.

int Tile::sizeX [private]

Horizontal and vertical size and rotation along the y-Axis.

int Tile::sizeZ [private]

int Tile::yRotation [private]


The documentation for this class was generated from the following files:
  • src/inVRs/SystemCore/WorldDatabase/Tile.h
  • src/inVRs/SystemCore/WorldDatabase/Tile.cpp

Generated on Wed Oct 20 16:12:01 2010 for inVRs by doxygen 1.5.8