Refactored UpdateProjectionMatrix(), SetTargetState() now launches the transition
This commit is contained in:
@@ -23,18 +23,19 @@ namespace OpenVulkano::Scene
|
||||
void MorphableCamera::UpdateProjectionMatrix()
|
||||
{
|
||||
PerspectiveCamera::UpdateProjectionMatrix();
|
||||
float aspectH = m_aspect;
|
||||
float aspectV = 1;
|
||||
if (m_morphState == 0) { UpdateViewProjectionMatrix(); }
|
||||
else if (m_morphState == 1)
|
||||
if (m_morphState != 0)
|
||||
{
|
||||
m_projection = Math::Utils::orthoRH_ZO(-aspectH, aspectH, -aspectV, aspectV, m_nearPlane, m_farPlane);
|
||||
UpdateViewProjectionMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_orthoMatrix = Math::Utils::orthoRH_ZO(-aspectH, aspectH, -aspectV, aspectV, m_nearPlane, m_farPlane);
|
||||
m_projection = BlendMatrices(m_projection, m_orthoMatrix, m_morphState);
|
||||
float aspectH = m_aspect;
|
||||
float aspectV = 1;
|
||||
if (m_morphState == 1)
|
||||
{
|
||||
m_projection = Math::Utils::orthoRH_ZO(-aspectH, aspectH, -aspectV, aspectV, m_nearPlane, m_farPlane);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_orthoMatrix = Math::Utils::orthoRH_ZO(-aspectH, aspectH, -aspectV, aspectV, m_nearPlane, m_farPlane);
|
||||
m_projection = BlendMatrices(m_projection, m_orthoMatrix, m_morphState);
|
||||
}
|
||||
UpdateViewProjectionMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user