mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-09 12:37:18 -04:00
fix TPosition3.h (#2919)
This commit is contained in:
@@ -53,7 +53,7 @@ struct SMatrix33C {
|
||||
|
||||
template <typename T>
|
||||
struct TMatrix34 : public T {
|
||||
void identity() { MTXIdentity(data); }
|
||||
void identity() { MTXIdentity(this->data); }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@@ -62,15 +62,15 @@ struct TRotation3 : public T {};
|
||||
template<typename T>
|
||||
struct TRotation3<SMatrix33C<T> > : public SMatrix33C<T> {
|
||||
inline void getEulerXYZ(TVec3<T>* param_1) const {
|
||||
if (at(2, 0) - TUtil<T>::one() >= -TUtil<T>::epsilon()) {
|
||||
param_1->set(TUtil<T>::atan2(-at(0, 1), at(1, 1)), -TUtil<T>::halfPI(), 0.0);
|
||||
if (this->at(2, 0) - TUtil<T>::one() >= -TUtil<T>::epsilon()) {
|
||||
param_1->set(TUtil<T>::atan2(-this->at(0, 1), this->at(1, 1)), -TUtil<T>::halfPI(), 0.0);
|
||||
} else {
|
||||
if (at(2, 0) + TUtil<T>::one() <= TUtil<T>::epsilon()) {
|
||||
param_1->set(TUtil<T>::atan2(at(0, 1), at(1, 1)), TUtil<T>::halfPI(), 0.0);
|
||||
if (this->at(2, 0) + TUtil<T>::one() <= TUtil<T>::epsilon()) {
|
||||
param_1->set(TUtil<T>::atan2(this->at(0, 1), this->at(1, 1)), TUtil<T>::halfPI(), 0.0);
|
||||
} else {
|
||||
param_1->x = TUtil<T>::atan2(at(2, 1), at(2, 2));
|
||||
param_1->z = TUtil<T>::atan2(at(1, 0), at(0, 0));
|
||||
param_1->y = TUtil<T>::asin(-at(2, 0));
|
||||
param_1->x = TUtil<T>::atan2(this->at(2, 1), this->at(2, 2));
|
||||
param_1->z = TUtil<T>::atan2(this->at(1, 0), this->at(0, 0));
|
||||
param_1->y = TUtil<T>::asin(-this->at(2, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef D_DEBUG_PAD_H
|
||||
#define D_DEBUG_PAD_H
|
||||
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
|
||||
class dDebugPad_c {
|
||||
public:
|
||||
dDebugPad_c();
|
||||
|
||||
bool Active();
|
||||
bool Update();
|
||||
bool Report(int, int, JUtility::TColor, const char*, ...);
|
||||
bool Enable(s32);
|
||||
bool Trigger();
|
||||
|
||||
/* 0x0 */ u8 mIsActive;
|
||||
/* 0x1 */ u8 mTrigger;
|
||||
/* 0x4 */ s32 mMode;
|
||||
};
|
||||
|
||||
extern dDebugPad_c dDebugPad;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user