diff options
author | aap <aap@papnet.eu> | 2020-08-07 10:18:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-07 10:18:35 +0200 |
commit | 40185161b83091e79455acf6fe82f070e26c6662 (patch) | |
tree | 87ae90e9dc46c746d0a4819286ce1b965c3f91fa /src/math | |
parent | Merge pull request #668 from majesticCoding/miami (diff) | |
parent | Update CutsceneShadow.h (diff) | |
download | re3-40185161b83091e79455acf6fe82f070e26c6662.tar re3-40185161b83091e79455acf6fe82f070e26c6662.tar.gz re3-40185161b83091e79455acf6fe82f070e26c6662.tar.bz2 re3-40185161b83091e79455acf6fe82f070e26c6662.tar.lz re3-40185161b83091e79455acf6fe82f070e26c6662.tar.xz re3-40185161b83091e79455acf6fe82f070e26c6662.tar.zst re3-40185161b83091e79455acf6fe82f070e26c6662.zip |
Diffstat (limited to 'src/math')
-rw-r--r-- | src/math/Matrix.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/math/Matrix.h b/src/math/Matrix.h index 2d721e93..da20ea18 100644 --- a/src/math/Matrix.h +++ b/src/math/Matrix.h @@ -29,6 +29,15 @@ public: if(m_hasRwMatrix && m_attachment) RwMatrixDestroy(m_attachment); } +#ifdef RWCORE_H + operator RwMatrix (void) const { + return m_matrix; + } + + operator RwMatrix *(void) { + return &m_matrix; + } +#endif void Attach(RwMatrix *matrix, bool owner = false){ #ifdef FIX_BUGS if(m_attachment && m_hasRwMatrix) @@ -240,6 +249,15 @@ public: void CopyOnlyMatrix(CMatrix *other){ m_matrix = other->m_matrix; } + void CopyRwMatrix(RwMatrix *matrix){ + m_matrix = *matrix; + } + + void CopyToRwMatrix(RwMatrix *matrix){ + *matrix = m_matrix; + RwMatrixUpdate(matrix); + } + void SetUnity(void) { m_matrix.right.x = 1.0f; m_matrix.right.y = 0.0f; |