metaforce/Runtime/Graphics/CDrawable.hpp

28 lines
856 B
C++
Raw Permalink Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-06-28 18:54:55 +00:00
#include "Runtime/GCNTypes.hpp"
#include <zeus/CAABox.hpp>
2016-06-28 18:54:55 +00:00
2021-04-10 08:42:06 +00:00
namespace metaforce {
2018-12-08 05:30:43 +00:00
enum class EDrawableType : u16 { WorldSurface, Particle, Actor, SimpleShadow, Decal };
class CDrawable {
EDrawableType x0_type;
u16 x2_extraSort;
void* x4_data;
2018-12-08 05:30:43 +00:00
zeus::CAABox x8_aabb;
float x20_viewDist;
2016-06-28 18:54:55 +00:00
public:
CDrawable(EDrawableType dtype, u16 extraSort, float planeDot, const zeus::CAABox& aabb, void* data)
2018-12-08 05:30:43 +00:00
: x0_type(dtype), x2_extraSort(extraSort), x4_data(data), x8_aabb(aabb), x20_viewDist(planeDot) {}
2016-06-28 18:54:55 +00:00
2018-12-08 05:30:43 +00:00
EDrawableType GetType() const { return x0_type; }
const zeus::CAABox& GetBounds() const { return x8_aabb; }
float GetDistance() const { return x20_viewDist; }
void* GetData() { return x4_data; }
2018-12-08 05:30:43 +00:00
const void* GetData() const { return x4_data; }
u16 GetExtraSort() const { return x2_extraSort; }
2016-06-28 18:54:55 +00:00
};
2021-04-10 08:42:06 +00:00
} // namespace metaforce