2023-12-13 00:40:16 -05:00
|
|
|
#include "Game/Camera/CameraContext.hpp"
|
2021-12-16 21:41:03 +01:00
|
|
|
|
|
|
|
|
CameraContext::CameraContext() : NameObj("カメラコンテキスト") {
|
|
|
|
|
initParams();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CameraContext::~CameraContext() {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2022-08-10 01:18:49 -04:00
|
|
|
const TPos3f *CameraContext::getViewMtx() const {
|
2021-12-16 21:41:03 +01:00
|
|
|
return &mView;
|
|
|
|
|
}
|
|
|
|
|
|
2022-08-10 01:18:49 -04:00
|
|
|
const TPos3f *CameraContext::getInvViewMtx() const {
|
2021-12-16 21:41:03 +01:00
|
|
|
return &mViewInv;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CameraContext::setNearZ(float near) {
|
|
|
|
|
mNearZ = near;
|
|
|
|
|
updateProjectionMtx();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CameraContext::setFovy(float fovy) {
|
|
|
|
|
mFovy = fovy;
|
|
|
|
|
updateProjectionMtx();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CameraContext::setShakeOffset(float x, float y) {
|
|
|
|
|
mShakeOffsetX = x;
|
|
|
|
|
mShakeOffsetY = y;
|
|
|
|
|
|
|
|
|
|
updateProjectionMtx();
|
|
|
|
|
}
|