Class Pos

Class Documentation

class Pos

This file defines the members and methods implemented as part of the Pos class.

This class represents a point in a 3D integer lattice.

Public Functions

int getX()

Get the X coordinate of this object.

Returns:

int The x coordinate

int getY()

Get the Y coordinate of this object.

Returns:

int The y coordinate

int getZ()

Get the Z coordinate of this object.

Returns:

int The z coordinate

void setX(int x)

Set the x value of this Pos object.

Parameters:

x – The value x is to be set to

void setY(int y)

Set the y value of this Pos object.

Parameters:

y – The value y is to be set to

void setZ(int z)

Set the z value of this Pos object.

Parameters:

z – The value z is to be set to

void shiftX(int shift)

Shift the x value by a given amount.

Parameters:

shift – The amount to shift by which may be positive or negative

void shiftY(int shift)

Shift the y value by a given amount.

Parameters:

shift – The amount to shift by which may be positive or negative

void shiftZ(int shift)

Shift the z value by a given amount.

Parameters:

shift – The amount to shift by which may be positive or negative

void shift(int shiftX, int shiftY, int shiftZ)

Shift the x,y and z values by given amounts.

Parameters:
  • shiftX – The amount to shift x by which may be positive or negative

  • shiftY – The amount to shift x by which may be positive or negative

  • shiftZ – The amount to shift x by which may be positive or negative

virtual nlohmann::json toSemanticMapJSON()

Gets the JSON representation of the various fields and values stored in an instance.

Returns:

nlohmann::json The JSON representation

Pos(int x, int y, int z)

Construct a new Pos object.

Parameters:
  • x – The x coordinate

  • y – The y coordinate

  • z – The z coordinate

~Pos()

Construct a new Pos object as a copy of the given Pos object.

Destroy the Pos object

Parameters:

other – The object whose fields are to be copied