2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-06-24 20:09:38 +00:00
|
|
|
|
2020-04-06 09:54:21 +00:00
|
|
|
#include <array>
|
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include "Runtime/GCNTypes.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CPlane.hpp>
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2016-06-24 20:09:38 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2018-12-08 05:30:43 +00:00
|
|
|
class CCollisionSurface {
|
2020-04-06 10:02:49 +00:00
|
|
|
public:
|
|
|
|
using Vertices = std::array<zeus::CVector3f, 3>;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Vertices x0_data;
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 x24_flags;
|
|
|
|
|
2016-06-24 20:09:38 +00:00
|
|
|
public:
|
2020-04-06 09:54:21 +00:00
|
|
|
CCollisionSurface(const zeus::CVector3f& a, const zeus::CVector3f& b, const zeus::CVector3f& c, u32 flags);
|
2016-06-24 20:09:38 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
zeus::CVector3f GetNormal() const;
|
2020-04-06 09:54:21 +00:00
|
|
|
const zeus::CVector3f& GetVert(s32 idx) const { return x0_data[idx]; }
|
2020-04-06 10:02:49 +00:00
|
|
|
const Vertices& GetVerts() const { return x0_data; }
|
2018-12-08 05:30:43 +00:00
|
|
|
zeus::CPlane GetPlane() const;
|
|
|
|
u32 GetSurfaceFlags() const { return x24_flags; }
|
2016-06-24 20:09:38 +00:00
|
|
|
};
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|