resetting state

This commit is contained in:
2025-04-25 23:52:10 +03:00
parent 94b1453cae
commit d7f1f49165

View File

@@ -62,31 +62,37 @@ namespace omath::projection
void SetFieldOfView(const FieldOfView& fov) void SetFieldOfView(const FieldOfView& fov)
{ {
m_fieldOfView = fov; m_fieldOfView = fov;
m_viewProjectionMatrix = std::nullopt;
} }
void SetNearPlane(const float near) void SetNearPlane(const float near)
{ {
m_nearPlaneDistance = near; m_nearPlaneDistance = near;
m_viewProjectionMatrix = std::nullopt;
} }
void SetFarPlane(const float far) void SetFarPlane(const float far)
{ {
m_farPlaneDistance = far; m_farPlaneDistance = far;
m_viewProjectionMatrix = std::nullopt;
} }
void SetViewAngles(const ViewAnglesType& viewAngles) void SetViewAngles(const ViewAnglesType& viewAngles)
{ {
m_viewAngles = viewAngles; m_viewAngles = viewAngles;
m_viewProjectionMatrix = std::nullopt;
} }
void SetOrigin(const Vector3<float>& origin) void SetOrigin(const Vector3<float>& origin)
{ {
m_origin = origin; m_origin = origin;
m_viewProjectionMatrix = std::nullopt;
} }
void SetViewPort(const ViewPort& viewPort) void SetViewPort(const ViewPort& viewPort)
{ {
m_viewPort = viewPort; m_viewPort = viewPort;
m_viewProjectionMatrix = std::nullopt;
} }
[[nodiscard]] const FieldOfView& GetFieldOfView() const [[nodiscard]] const FieldOfView& GetFieldOfView() const