2018-10-06 20:42:33 -07:00
|
|
|
#pragma once
|
2016-04-26 03:40:56 -07:00
|
|
|
|
2019-09-27 19:53:03 -07:00
|
|
|
#include "Runtime/RetroTypes.hpp"
|
2016-04-26 03:40:56 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2018-12-07 21:30:43 -08:00
|
|
|
class CCollisionEdge {
|
|
|
|
u16 x0_index1 = -1;
|
|
|
|
u16 x2_index2 = -1;
|
|
|
|
|
2016-04-26 03:40:56 -07:00
|
|
|
public:
|
2020-04-05 03:44:47 -07:00
|
|
|
constexpr CCollisionEdge() noexcept = default;
|
2020-03-30 20:52:22 -07:00
|
|
|
explicit CCollisionEdge(CInputStream&);
|
2020-04-05 03:44:47 -07:00
|
|
|
constexpr CCollisionEdge(u16 v0, u16 v1) noexcept : x0_index1(v0), x2_index2(v1) {}
|
2016-04-26 03:40:56 -07:00
|
|
|
|
2020-04-05 03:44:47 -07:00
|
|
|
[[nodiscard]] constexpr u16 GetVertIndex1() const noexcept { return x0_index1; }
|
|
|
|
[[nodiscard]] constexpr u16 GetVertIndex2() const noexcept { return x2_index2; }
|
2017-02-27 23:31:14 -08:00
|
|
|
|
2020-04-05 03:44:47 -07:00
|
|
|
constexpr void swapBig() noexcept {
|
2022-02-15 21:21:24 -08:00
|
|
|
x0_index1 = SBig(x0_index1);
|
|
|
|
x2_index2 = SBig(x2_index2);
|
2018-12-07 21:30:43 -08:00
|
|
|
}
|
2016-04-26 03:40:56 -07:00
|
|
|
};
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|