prime/include/Kyoto/Math/CMatrix3f.hpp

35 lines
811 B
C++
Raw Normal View History

#ifndef _CMATRIX3F
#define _CMATRIX3F
#include "types.h"
#include "Kyoto/Math/CVector3f.hpp"
class CMatrix3f {
2022-10-05 16:28:37 +00:00
static const CMatrix3f sIdentity;
public:
2022-10-05 16:28:37 +00:00
CMatrix3f(const CMatrix3f&);
2022-10-05 17:24:06 +00:00
const CMatrix3f& operator=(const CMatrix3f& other);
2022-10-05 17:24:06 +00:00
static const CMatrix3f& Identity() { return sIdentity; }
CMatrix3f Orthonormalized() const;
2022-11-14 13:37:44 +00:00
// TODO: names/check
inline const CVector3f& GetRow(EDimX dim) const { return m0; }
inline const CVector3f& GetRow(EDimY dim) const { return m1; }
inline const CVector3f& GetRow(EDimZ dim) const { return m2; }
2022-11-26 13:51:04 +00:00
inline CVector3f GetColumn(EDimY dim) const { return CVector3f(m0.GetY(), m1.GetY(), m2.GetY()); }
private:
// TODO maybe individual floats
CVector3f m0;
CVector3f m1;
CVector3f m2;
};
CHECK_SIZEOF(CMatrix3f, 0x24);
#endif // _CMATRIX3F