2016-08-31 00:33:59 +00:00
|
|
|
#ifndef __URDE_CSIMPLESHADOW_HPP__
|
|
|
|
#define __URDE_CSIMPLESHADOW_HPP__
|
|
|
|
|
2018-02-05 06:56:09 +00:00
|
|
|
#include "zeus/CAABox.hpp"
|
|
|
|
#include "Graphics/Shaders/CTexturedQuadFilter.hpp"
|
|
|
|
|
2016-08-31 00:33:59 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
2017-03-04 04:31:08 +00:00
|
|
|
class CTexture;
|
2018-02-05 06:56:09 +00:00
|
|
|
class CStateManager;
|
2017-03-04 04:31:08 +00:00
|
|
|
|
2016-08-31 00:33:59 +00:00
|
|
|
class CSimpleShadow
|
|
|
|
{
|
2018-02-05 06:56:09 +00:00
|
|
|
zeus::CTransform x0_xf;
|
|
|
|
float x30_scale;
|
|
|
|
float x34_radius = 1.f;
|
|
|
|
float x38_userAlpha;
|
|
|
|
float x3c_heightAlpha = 1.f;
|
|
|
|
float x40_maxObjHeight;
|
|
|
|
float x44_displacement;
|
|
|
|
bool x48_24_collision : 1;
|
|
|
|
bool x48_25_alwaysCalculateRadius : 1;
|
|
|
|
bool x48_26_radiusCalculated : 1;
|
|
|
|
mutable std::experimental::optional<CTexturedQuadFilter> m_filter;
|
2016-08-31 00:33:59 +00:00
|
|
|
public:
|
2018-02-05 06:56:09 +00:00
|
|
|
CSimpleShadow(float scale, float userAlpha, float maxObjHeight, float displacement);
|
|
|
|
bool Valid() const { return x48_24_collision; }
|
|
|
|
zeus::CAABox GetMaxShadowBox(const zeus::CAABox& aabb) const;
|
|
|
|
zeus::CAABox GetBounds() const;
|
|
|
|
float GetMaxObjectHeight() const { return x40_maxObjHeight; }
|
|
|
|
void SetUserAlpha(float a) { x38_userAlpha = a; }
|
|
|
|
const zeus::CTransform& GetTransform() const { return x0_xf; }
|
|
|
|
void Render(const TLockedToken<CTexture>& tex) const;
|
|
|
|
void Calculate(const zeus::CAABox& aabb, const zeus::CTransform& xf, const CStateManager& mgr);
|
2016-08-31 00:33:59 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CSIMPLESHADOW_HPP__
|