30 lines
747 B
C++
30 lines
747 B
C++
// Copyright (c) 2024 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include "dawnlibs.hpp"
|
|
|
|
namespace Dawn {
|
|
struct EntityTilePosition {
|
|
int64_t x, y, z;
|
|
|
|
// Overload the equality operator.
|
|
bool operator==(const EntityTilePosition &other) const {
|
|
return this->x == other.x && this->y == other.y && this->z == other.z;
|
|
}
|
|
|
|
// Overload the inequality operator.
|
|
bool operator!=(const EntityTilePosition &other) const {
|
|
return !(*this == other);
|
|
}
|
|
|
|
/**
|
|
* Converts the tile position to a world space position.
|
|
*
|
|
* @return This tile position in world space.
|
|
*/
|
|
const glm::vec3 toWorldSpace();
|
|
};
|
|
} |