| 1 | #include <gfx/seadProjection.h> |
|---|---|
| 2 | |
| 3 | namespace sead |
| 4 | { |
| 5 | void Projection::updateMatrixImpl_() const |
| 6 | { |
| 7 | if (mDirty) |
| 8 | { |
| 9 | doUpdateMatrix(mtx: const_cast<Matrix44f*>(&mMatrix)); |
| 10 | mDirty = false; |
| 11 | |
| 12 | mDeviceDirty = true; |
| 13 | doUpdateDeviceMatrix(const_cast<Matrix44f*>(&mDeviceMatrix), mMatrix, mDevicePosture); |
| 14 | mDeviceDirty = false; |
| 15 | } |
| 16 | |
| 17 | else if (mDeviceDirty) |
| 18 | { |
| 19 | doUpdateDeviceMatrix(const_cast<Matrix44f*>(&mDeviceMatrix), mMatrix, mDevicePosture); |
| 20 | mDeviceDirty = false; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | const Matrix44f& Projection::getDeviceProjectionMatrix() const |
| 25 | { |
| 26 | updateMatrixImpl_(); |
| 27 | return mDeviceMatrix; |
| 28 | } |
| 29 | |
| 30 | } // namespace sead |
| 31 |