![]() |
MineLink
|
A utility class to access blocks individually. More...
#include <blockmodel.h>
Public Member Functions | |
double | X () const |
Retrieves the \(x\) coordinate of the block. More... | |
double | Y () const |
Retrieves the \(y\) coordinate of the block. More... | |
double | Z () const |
Retrieves the \(z\) coordinate of the block. More... | |
double | GetX () const |
Retrieves the \(x\) coordinate of the block. More... | |
double | GetY () const |
Retrieves the \(y\) coordinate of the block. More... | |
double | GetZ () const |
Retrieves the \(z\) coordinate of the block. More... | |
double | GetValue (const string &column) const |
Retrieves the value of an attribute of the block. More... | |
void | SetValue (const string &column, const double &value) |
Sets the value of an attribute of the block. More... | |
delphos::Coordinates | GetCoordinates () const |
Retrieves the coordinates of the block. More... | |
double | operator[] (const string &column) const |
Retrieves the value of an attribute of the block. More... | |
delphos::BlockIndexType | Index () const |
Retrieves the index (position) of the block in the BlockModel. More... | |
delphos::BlockIndexType | GetIndex () const |
Retrieves the index (position) of the block in the block model. More... | |
![]() | |
BlockModelEntity (delphos::BlockModel &bm) | |
Creates a new block instance associated to a given block model. More... | |
delphos::BlockModel & | GetBlockModel () |
Retrieves the block model to which the entity is associated. More... | |
const delphos::BlockModel & | GetBlockModel () const |
Retrieves the block model to which the entity is associated. More... | |
Friends | |
class | BlockModel |
A utility class to access blocks individually.
This class allows to treat blocks individually, useful for syntax simplicity.
Coordinates delphos::Block::GetCoordinates | ( | ) | const |
Retrieves the coordinates of the block.
BlockIndexType delphos::Block::GetIndex | ( | ) | const |
Retrieves the index (position) of the block in the block model.
double delphos::Block::GetValue | ( | const string & | column | ) | const |
Retrieves the value of an attribute of the block.
column | The name of the attribute to be retrieved. |
If the aatribute column is not found, an exception is thrown.
double delphos::Block::GetX | ( | ) | const |
Retrieves the \(x\) coordinate of the block.
double delphos::Block::GetY | ( | ) | const |
Retrieves the \(y\) coordinate of the block.
double delphos::Block::GetZ | ( | ) | const |
Retrieves the \(z\) coordinate of the block.
BlockIndexType delphos::Block::Index | ( | ) | const |
Retrieves the index (position) of the block in the BlockModel.
double delphos::Block::operator[] | ( | const string & | column | ) | const |
Retrieves the value of an attribute of the block.
column | The name of the attribute to be retrieved. |
This is a shortcut for Block::GetValue(const string & column)
void delphos::Block::SetValue | ( | const string & | column, |
const double & | value | ||
) |
Sets the value of an attribute of the block.
column | The name of the attribute to be set. |
value | The new value for the attribute. |
If the attribute column is not found, an exception is thrown.
double delphos::Block::X | ( | ) | const |
Retrieves the \(x\) coordinate of the block.
double delphos::Block::Y | ( | ) | const |
Retrieves the \(y\) coordinate of the block.
double delphos::Block::Z | ( | ) | const |
Retrieves the \(z\) coordinate of the block.