prime/include/Kyoto/Math/CSphere.hpp

24 lines
505 B
C++
Raw Normal View History

#ifndef _CSPHERE
#define _CSPHERE
#include "types.h"
2022-10-05 23:45:48 +00:00
#include "Kyoto/Math/CUnitVector3f.hpp"
#include "Kyoto/Math/CVector3f.hpp"
class CSphere {
public:
2022-12-31 22:07:51 +00:00
CSphere(const CVector3f& pos, float radius) : x0_center(pos), xc_radius(radius) {}
2022-12-31 22:07:51 +00:00
CVector3f GetCenter() const { return x0_center; }
float GetRadius() const { return xc_radius; }
2022-10-05 23:45:48 +00:00
CUnitVector3f GetSurfaceNormal(const CVector3f& v) const;
private:
2022-12-31 22:07:51 +00:00
CVector3f x0_center;
float xc_radius;
};
CHECK_SIZEOF(CSphere, 0x10)
#endif // _CSPHERE