Graphics/ViewerData: Add near and far plane

This commit is contained in:
SirLynix
2023-09-05 22:34:00 +02:00
committed by Jérôme Leclercq
parent 2a3da7384d
commit 929b599337
9 changed files with 39 additions and 3 deletions

View File

@@ -12,6 +12,11 @@ namespace Nz
return m_eyePosition;
}
inline float ViewerInstance::GetFarPlane() const
{
return m_farPlane;
}
inline const Matrix4f& ViewerInstance::GetInvProjectionMatrix() const
{
return m_invProjectionMatrix;
@@ -27,6 +32,11 @@ namespace Nz
return m_invViewProjMatrix;
}
inline float ViewerInstance::GetNearPlane() const
{
return m_nearPlane;
}
inline const Matrix4f& ViewerInstance::GetProjectionMatrix() const
{
return m_projectionMatrix;
@@ -64,6 +74,14 @@ namespace Nz
InvalidateData();
}
inline void ViewerInstance::UpdateNearFarPlanes(float nearPlane, float farPlane)
{
m_farPlane = farPlane;
m_nearPlane = nearPlane;
InvalidateData();
}
inline void ViewerInstance::UpdateProjectionMatrix(const Matrix4f& projectionMatrix)
{
m_projectionMatrix = projectionMatrix;