metaforce/Runtime/Graphics/CDrawable.hpp

36 lines
841 B
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-06-28 18:54:55 +00:00
#include "GCNTypes.hpp"
#include "zeus/CAABox.hpp"
namespace urde
{
2016-07-25 22:52:02 +00:00
enum class EDrawableType : u16
2016-06-28 18:54:55 +00:00
{
2016-08-03 21:53:03 +00:00
WorldSurface,
2016-07-21 02:03:24 +00:00
Particle,
2016-07-26 02:43:55 +00:00
UnsortedCallback,
SortedCallback,
Decal
2016-06-28 18:54:55 +00:00
};
class CDrawable
{
2016-07-25 22:52:02 +00:00
EDrawableType x0_type;
u16 x2_extraSort;
const void* x4_data;
zeus::CAABox x8_aabb;
float x20_viewDist;
2016-06-28 18:54:55 +00:00
public:
2016-07-25 22:52:02 +00:00
CDrawable(EDrawableType dtype, u16 extraSort, float planeDot, const zeus::CAABox& aabb, const void* data)
: x0_type(dtype), x2_extraSort(extraSort), x4_data(data), x8_aabb(aabb), x20_viewDist(planeDot) {}
2016-06-28 18:54:55 +00:00
2016-07-25 22:52:02 +00:00
EDrawableType GetType() const {return x0_type;}
const zeus::CAABox& GetBounds() const {return x8_aabb;}
float GetDistance() const {return x20_viewDist;}
const void* GetData() const {return x4_data;}
u16 GetExtraSort() const {return x2_extraSort;}
2016-06-28 18:54:55 +00:00
};
}