2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CMRAY
|
|
|
|
#define _CMRAY
|
2022-10-06 15:36:33 +00:00
|
|
|
|
|
|
|
#include "Kyoto/Math/CVector3f.hpp"
|
|
|
|
|
|
|
|
class CTransform4f;
|
|
|
|
class CMRay {
|
|
|
|
public:
|
|
|
|
CMRay(const CVector3f& start, const CVector3f& end, float, float);
|
|
|
|
CMRay(const CVector3f& start, const CVector3f& end, float);
|
|
|
|
CMRay GetInvUnscaledTransformRay(const CTransform4f&) const;
|
|
|
|
|
2023-01-10 06:51:58 +00:00
|
|
|
const CVector3f& GetStart() const { return mStart; }
|
|
|
|
const CVector3f& GetNormal() const { return mEnd; }
|
|
|
|
const CVector3f& GetDelta() const { return mDelta; }
|
|
|
|
const CVector3f& GetDirection() const { return mDir; }
|
|
|
|
|
2022-10-06 15:36:33 +00:00
|
|
|
private:
|
|
|
|
CVector3f mStart;
|
|
|
|
CVector3f mEnd;
|
|
|
|
CVector3f mDelta;
|
|
|
|
float mLength;
|
|
|
|
float mInvLength;
|
|
|
|
CVector3f mDir;
|
|
|
|
};
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CMRAY
|