Class Pos

Class Documentation

class Pos

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

This class represents a 3D coordinate

Public Functions

int getX()

Get the X coordinate of this object.

Return

int The x coordinate

int getY()

Get the Y coordinate of this object.

Return

int The y coordinate

int getZ()

Get the Z coordinate of this object.

Return

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

nlohmann::json toSemanticMapJSON()

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

Return

nlohmann::json The JSON representation

Pos()

Construct a new Pos object.

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(const Pos &other)

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

Parameters
  • other: The object whose fields are to be copied

~Pos()

Destroy the Pos object.