levelz-cpp 0.2.0
Loading...
Searching...
No Matches
LevelZ::CoordinateMatrix2D Struct Reference

#include <matrix.hpp>

Inheritance diagram for LevelZ::CoordinateMatrix2D:
LevelZ::CoordinateMatrix

Public Member Functions

 CoordinateMatrix2D (int x, int y, LevelZ::Coordinate2D start)
 
 CoordinateMatrix2D (int minX, int maxX, int minY, int maxY, LevelZ::Coordinate2D start)
 
std::vector< LevelZ::Coordinate2DgetCoordinates () const
 
std::vector< LevelZ::Coordinate2D >::const_iterator begin () const
 
std::vector< LevelZ::Coordinate2D >::const_iterator end () const
 
bool operator== (const CoordinateMatrix2D &other) const
 
bool operator!= (const CoordinateMatrix2D &other) const
 
std::string to_string () const
 
- Public Member Functions inherited from LevelZ::CoordinateMatrix

Static Public Member Functions

static LevelZ::CoordinateMatrix2D from_string (const std::string &str)
 

Public Attributes

int minX
 
int maxX
 
int minY
 
int maxY
 
LevelZ::Coordinate2D start
 

Detailed Description

Represents a 2D matrix of coordinates.

Constructor & Destructor Documentation

◆ CoordinateMatrix2D() [1/2]

LevelZ::CoordinateMatrix2D::CoordinateMatrix2D ( int x,
int y,
LevelZ::Coordinate2D start )
inline

Constructs a new CoordinateMatrix2D object with the minimum coordinates at 0.

Parameters
xThe maximum x coordinate of the matrix.
yThe maximum y coordinate of the matrix.
startThe starting coordinate of the matrix.

◆ CoordinateMatrix2D() [2/2]

LevelZ::CoordinateMatrix2D::CoordinateMatrix2D ( int minX,
int maxX,
int minY,
int maxY,
LevelZ::Coordinate2D start )
inline

Constructs a new CoordinateMatrix2D object with the specified minimum and maximum coordinates.

Parameters
minXThe minimum x coordinate of the matrix.
maxXThe maximum x coordinate of the matrix.
minYThe minimum y coordinate of the matrix.
maxYThe maximum y coordinate of the matrix.
startThe starting coordinate of the matrix.

Member Function Documentation

◆ from_string()

static LevelZ::CoordinateMatrix2D LevelZ::CoordinateMatrix2D::from_string ( const std::string & str)
inlinestatic

Converts a string to a 2D coordinate matrix.

Parameters
strThe string to convert.
Returns
The 2D coordinate matrix.

◆ getCoordinates()

std::vector< LevelZ::Coordinate2D > LevelZ::CoordinateMatrix2D::getCoordinates ( ) const
inline

Gets the coordinates in the matrix.

Returns
The coordinates in the matrix.

◆ operator!=()

bool LevelZ::CoordinateMatrix2D::operator!= ( const CoordinateMatrix2D & other) const
inline

Checks if two 2D coordinate matrices are not equal.

Parameters
otherThe other coordinate matrix to compare to.
Returns
true if the coordinate matrices are not equal, false otherwise.

◆ operator==()

bool LevelZ::CoordinateMatrix2D::operator== ( const CoordinateMatrix2D & other) const
inline

Checks if two 2D coordinate matrices are equal.

Parameters
otherThe other coordinate matrix to compare to.
Returns
true if the coordinate matrices are equal, false otherwise.

◆ to_string()

std::string LevelZ::CoordinateMatrix2D::to_string ( ) const
inlinevirtual

Converts this coordinate matrix to a string.

Returns
The string representation of the coordinate.

Implements LevelZ::CoordinateMatrix.

Member Data Documentation

◆ maxX

int LevelZ::CoordinateMatrix2D::maxX

The maximum x coordinate of the matrix.

◆ maxY

int LevelZ::CoordinateMatrix2D::maxY

The maximum y coordinate of the matrix.

◆ minX

int LevelZ::CoordinateMatrix2D::minX

The minimum x coordinate of the matrix.

◆ minY

int LevelZ::CoordinateMatrix2D::minY

The minimum y coordinate of the matrix.

◆ start

LevelZ::Coordinate2D LevelZ::CoordinateMatrix2D::start

The starting coordinate of the matrix.


The documentation for this struct was generated from the following file: