prime/include/MetroidPrime/CAxisAngle.hpp

42 lines
1.1 KiB
C++
Raw Normal View History

#ifndef _CAXISANGLE
#define _CAXISANGLE
#include "types.h"
2022-10-08 17:39:03 +00:00
#include "Kyoto/Math/CUnitVector3f.hpp"
#include "Kyoto/Math/CVector3f.hpp"
#include <math.h>
2022-10-05 17:24:06 +00:00
class CAxisAngle {
2022-10-08 17:39:03 +00:00
static const CAxisAngle sIdentity;
friend CAxisAngle operator+(const CAxisAngle&, const CAxisAngle&);
friend CAxisAngle operator*(const CAxisAngle&, const float&);
friend CAxisAngle operator*(const float&, const CAxisAngle&);
public:
2022-10-08 17:39:03 +00:00
CAxisAngle() : mVector(CVector3f::Zero()) {}
2022-10-05 17:24:06 +00:00
explicit CAxisAngle(const CVector3f& vec);
2022-10-08 17:39:03 +00:00
explicit CAxisAngle(const CUnitVector3f& vec, float);
CAxisAngle(float x, float y, float z) : mVector(x, y, z) {}
2022-10-08 17:39:03 +00:00
void FromVector(const CVector3f& angle);
2022-10-05 23:06:15 +00:00
static const CAxisAngle& Identity();
2022-10-06 20:34:27 +00:00
float GetAngle() const;
const CVector3f& GetVector() const;
2022-10-05 22:50:12 +00:00
2022-10-08 17:39:03 +00:00
const CAxisAngle& operator*=(const float& rhs);
2022-10-05 22:50:12 +00:00
const CAxisAngle& operator+=(const CAxisAngle& rhs);
2022-10-05 17:24:06 +00:00
private:
CVector3f mVector;
};
2022-10-05 16:28:37 +00:00
CAxisAngle operator+(const CAxisAngle& lhs, const CAxisAngle& rhs);
CAxisAngle operator*(const CAxisAngle& lhs, const float& rhs);
2022-10-08 17:39:03 +00:00
CAxisAngle operator*(const float& rhs, const CAxisAngle& lhs);
CHECK_SIZEOF(CAxisAngle, 0xc)
#endif // _CAXISANGLE