You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Gems/Terrain/Code/Source/TerrainRenderer/Aabb2i.h

39 lines
1.0 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <TerrainRenderer/Vector2i.h>
#include <AzCore/std/limits.h>
namespace Terrain
{
class Aabb2i
{
public:
Aabb2i() = default;
Aabb2i(const Vector2i& min, const Vector2i& max);
Aabb2i operator+(const Vector2i& offset) const;
Aabb2i& operator+=(const Vector2i& offset);
Aabb2i operator-(const Vector2i& offset) const;
Aabb2i& operator-=(const Vector2i& offset);
bool operator==(const Aabb2i& other) const;
bool operator!=(const Aabb2i& other) const;
Aabb2i GetClamped(Aabb2i rhs) const;
bool IsValid() const;
Vector2i m_min{AZStd::numeric_limits<int32_t>::min(), AZStd::numeric_limits<int32_t>::min()};
Vector2i m_max{AZStd::numeric_limits<int32_t>::max(), AZStd::numeric_limits<int32_t>::max()};
};
}