prime/include/MetroidPrime/CSimpleShadow.hpp

42 lines
995 B
C++
Raw Permalink Normal View History

#ifndef _CSIMPLESHADOW
#define _CSIMPLESHADOW
2022-08-16 02:14:28 +00:00
#include "types.h"
2022-11-17 04:56:21 +00:00
#include "Kyoto/Math/CTransform4f.hpp"
#include "Kyoto/TToken.hpp"
2022-08-16 02:14:28 +00:00
class CAABox;
class CStateManager;
2022-11-17 04:56:21 +00:00
class CTexture;
2022-08-16 02:14:28 +00:00
class CSimpleShadow {
public:
2022-11-17 04:56:21 +00:00
CSimpleShadow(float scale, float userAlpha, float maxObjHeight, float displacement);
void Calculate(const CAABox& bounds, const CTransform4f& xf, const CStateManager& mgr);
void Render(const CTexture* tex) const;
2022-08-16 02:14:28 +00:00
const CTransform4f& GetTransform() const;
2022-11-17 04:56:21 +00:00
void SetUserAlpha(float);
float GetMaxObjectHeight() const;
void SetAlwaysCalculateRadius(bool);
CAABox GetBounds() const;
2022-08-16 02:14:28 +00:00
CAABox GetMaxShadowBox(const CAABox& bounds) const;
bool Valid() const;
private:
2022-11-17 04:56:21 +00:00
CTransform4f x0_xf;
float x30_scale;
float x34_radius;
float x38_userAlpha;
float x3c_heightAlpha;
float x40_maxObjHeight;
float x44_displacement;
bool x48_24_collision : 1;
bool x48_25_alwaysCalculateRadius : 1;
bool x48_26_radiusCalculated : 1;
2022-08-16 02:14:28 +00:00
};
#endif // _CSIMPLESHADOW