add global scale matrix
Conflicts: chart2/source/view/main/GL3DRenderer.cxx Change-Id: I23b9929dd3f0f1b0a070091ed9c1fe920edfcbf9
This commit is contained in:
parent
4444e6cf79
commit
f4436dcb95
@ -1279,7 +1279,7 @@ void OpenGL3DRenderer::RenderExtrudeFlatSurface(const Extrude3DInfo& extrude3D,
|
|||||||
extrude3D.zTransform};
|
extrude3D.zTransform};
|
||||||
glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z));
|
glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z));
|
||||||
glm::mat4 flatScale = glm::scale(glm::vec3(xyScale, xyScale, xyScale));
|
glm::mat4 flatScale = glm::scale(glm::vec3(xyScale, xyScale, xyScale));
|
||||||
m_Model = aTranslationMatrix * extrude3D.rotation * flatScale;
|
m_Model = m_GlobalScaleMatrix * aTranslationMatrix * extrude3D.rotation * flatScale;
|
||||||
if(!mbPickingMode)
|
if(!mbPickingMode)
|
||||||
{
|
{
|
||||||
glm::mat3 normalMatrix(m_Model);
|
glm::mat3 normalMatrix(m_Model);
|
||||||
@ -1952,6 +1952,7 @@ void OpenGL3DRenderer::GetBatchMiddleInfo(const Extrude3DInfo &extrude3D)
|
|||||||
glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z));
|
glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z));
|
||||||
m_Model = aTranslationMatrix * extrude3D.rotation * scale;
|
m_Model = aTranslationMatrix * extrude3D.rotation * scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Model = m_GlobalScaleMatrix * m_Model;
|
m_Model = m_GlobalScaleMatrix * m_Model;
|
||||||
glm::mat3 normalMatrix(m_Model);
|
glm::mat3 normalMatrix(m_Model);
|
||||||
glm::mat3 normalInverseTranspos = glm::inverseTranspose(normalMatrix);
|
glm::mat3 normalInverseTranspos = glm::inverseTranspose(normalMatrix);
|
||||||
@ -1987,6 +1988,7 @@ void OpenGL3DRenderer::GetBatchTopAndFlatInfo(const Extrude3DInfo &extrude3D)
|
|||||||
glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z));
|
glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z));
|
||||||
m_Model = aTranslationMatrix * extrude3D.rotation * topTrans * topScale * orgTrans;
|
m_Model = aTranslationMatrix * extrude3D.rotation * topTrans * topScale * orgTrans;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Model = m_GlobalScaleMatrix * m_Model;
|
m_Model = m_GlobalScaleMatrix * m_Model;
|
||||||
glm::mat3 normalMatrix(m_Model);
|
glm::mat3 normalMatrix(m_Model);
|
||||||
glm::mat3 normalInverseTranspos = glm::inverseTranspose(normalMatrix);
|
glm::mat3 normalInverseTranspos = glm::inverseTranspose(normalMatrix);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user