metaforce/Runtime/Collision/CCollisionEdge.hpp

24 lines
628 B
C++
Raw Normal View History

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