39 inline
TExtent2(T width, T height) noexcept : width(width), height(height) {}
42 explicit inline TExtent2(
TExtent2<TT> other) noexcept : width(
static_cast<T
>(other.width)), height(
static_cast<T
>(other.height)) {}
45 extern template struct CE_SCRIPT_EXPORT(name =
"Extent2Float") TExtent2<
float>;
96 : width(
static_cast<T>(other.width)), height(
static_cast<T>(other.height)), depth(
static_cast<T>(other.depth)) {}
103 extern template struct CE_SCRIPT_EXPORT(name =
"Extent3Float") TExtent3<
float>;
169 return TExtent3<T>{lhs.
width + rhs.width, lhs.height + rhs.height, lhs.depth + rhs.depth};
177 return TExtent3<T>{lhs.
width - rhs.width, lhs.height - rhs.height, lhs.depth - rhs.depth};
183 return (lhs.width == rhs.width && lhs.height == rhs.height);
193 return (lhs.width == rhs.width && lhs.height == rhs.height && lhs.depth == rhs.depth);
202template<
typename T>
struct std::hash<CeresEngine::Math::TExtent2<T>> {
203 using Type = CeresEngine::Math::TExtent2<T>;
204 constexpr size_t operator()(
const Type& obj)
const {
return CeresEngine::hash(obj.width, obj.height); }
208 using Type = CeresEngine::Math::TExtent3<T>;
209 constexpr size_t operator()(
const Type& obj)
const {
return CeresEngine::hash(obj.width, obj.height, obj.depth); }
#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
Definition Application.hpp:19
std::uint64_t UInt64
Definition DataTypes.hpp:26
bool operator!=(const ShortAllocator< T, N, A1 > &x, const ShortAllocator< U, M, A2 > &y) noexcept
Definition Allocator.hpp:416
std::int32_t Int32
Definition DataTypes.hpp:21
std::uint16_t UInt16
Definition DataTypes.hpp:20
ButtonSet operator-(const ButtonSet &set, const Button button)
Removes a button from a set.
Definition Input.hpp:270
std::uint8_t UInt8
Definition DataTypes.hpp:17
bool operator==(const ShortAllocator< T, N, A1 > &x, const ShortAllocator< U, M, A2 > &y) noexcept
Definition Allocator.hpp:411
std::int64_t Int64
Definition DataTypes.hpp:24
std::uint32_t UInt32
Definition DataTypes.hpp:23
BasicString< T, CharTraits, RawAllocator > operator+(const BasicString< T, CharTraits, RawAllocator > &lhs, const T *rhs)
Definition String.hpp:119
std::int8_t Int8
Definition DataTypes.hpp:15
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
std::int16_t Int16
Definition DataTypes.hpp:18
constexpr TExtent2< T > & operator/=(TExtent2< T > &lhs, T rhs) noexcept
Returns the division of left hand side extent 'lhs' and the right hand side extent 'rhs'.
Definition Extent.hpp:158
constexpr TExtent2< T > & operator*=(TExtent2< T > &lhs, T rhs) noexcept
Returns the multiplication of left hand side extent 'lhs' and the right hand side extent 'rhs'.
Definition Extent.hpp:151
2-Dimensional extent structure.
Definition Extent.hpp:22
T width
Extent X axis, i.e. width.
Definition Extent.hpp:25
TExtent2(TExtent2< TT > other) noexcept
Definition Extent.hpp:42
3-Dimensional extent structure.
Definition Extent.hpp:68
TExtent3(TExtent2< TT > other, T depth) noexcept
Definition Extent.hpp:99
TExtent3(TExtent3< TT > other) noexcept
Definition Extent.hpp:95
T width
Extent X axis, i.e. width.
Definition Extent.hpp:71