metaforce/Runtime/Collision/CRayCastResult.hpp

52 lines
1.2 KiB
C++
Raw Normal View History

2016-04-22 20:22:45 +00:00
#ifndef __URDE_CRAYCASTRESULT_HPP__
#define __URDE_CRAYCASTRESULT_HPP__
#include "CMaterialList.hpp"
#include "zeus/zeus.hpp"
namespace urde
{
class CRayCastResult
{
public:
2016-04-27 02:41:00 +00:00
enum class EInvalid : u8
2016-04-22 20:22:45 +00:00
{
2016-04-27 02:41:00 +00:00
Invalid,
Valid
2016-04-22 20:22:45 +00:00
};
private:
2016-04-27 02:41:00 +00:00
float x0_time;
zeus::CVector3f x4_point;
zeus::CPlane x10_plane;
EInvalid x20_invalid = EInvalid::Invalid;
/*u32 x24_; */
2016-04-22 20:22:45 +00:00
CMaterialList x28_material;
public:
2016-05-21 03:02:09 +00:00
CRayCastResult() = default;
2016-04-27 02:41:00 +00:00
CRayCastResult(const CRayCastResult& other, EInvalid invalid)
: x0_time(other.x0_time),
x4_point(other.x4_point),
x10_plane(other.x10_plane),
x20_invalid(invalid),
x28_material(other.x28_material)
{
}
2016-04-27 00:26:02 +00:00
CRayCastResult(float, const zeus::CVector3f&, const zeus::CPlane& plane, const CMaterialList& matList)
2016-04-22 20:22:45 +00:00
: x28_material(matList)
{}
2016-04-27 00:26:02 +00:00
void MakeInvalid();
2016-04-27 02:41:00 +00:00
2016-04-27 00:26:02 +00:00
bool IsInvalid() const;
2016-04-27 02:41:00 +00:00
2016-04-27 00:26:02 +00:00
float GetTime() const;
const zeus::CVector3f& GetPoint() const;
const zeus::CPlane& GetPlane() const;
const CMaterialList& GetMaterial() const;
void Transform(const zeus::CTransform&);
2016-04-22 20:22:45 +00:00
};
}
#endif // __URDE_CRAYCASTRESULT_HPP__