prime/include/Kyoto/Math/CPlane.hpp

29 lines
765 B
C++
Raw Normal View History

#ifndef _CPLANE
#define _CPLANE
#include "types.h"
2022-10-03 02:55:05 +00:00
#include "Kyoto/Math/CUnitVector3f.hpp"
#include "Kyoto/Math/CVector3f.hpp"
class CPlane {
public:
CPlane(const CVector3f&, const CUnitVector3f&); // TODO weak
2022-10-09 23:05:06 +00:00
CPlane(float constant, const CUnitVector3f& normal) : x0_normal(normal), xc_constant(constant) {}
CPlane(const CVector3f&, const CVector3f&, const CVector3f&);
// TODO
const CUnitVector3f& GetNormal() const { return x0_normal; }
float GetConstant() const { return xc_constant; }
// GetHeight__6CPlaneCFRC9CVector3f
// IsFacing__6CPlaneCFRC9CVector3f
2022-10-03 02:55:05 +00:00
float ClipLineSegment(const CVector3f& start, const CVector3f& end) const;
private:
CUnitVector3f x0_normal;
float xc_constant;
};
CHECK_SIZEOF(CPlane, 0x10)
#endif // _CPLANE