mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Optimise some matrix operations, based on patch from ortalo.
Fixes #750. This was SVN commit r9141.
This commit is contained in:
@@ -189,9 +189,7 @@ void CCamera::BuildCameraRay(int px, int py, CVector3D& origin, CVector3D& dir)
|
||||
|
||||
void CCamera::GetScreenCoordinates(const CVector3D& world, float& x, float& y) const
|
||||
{
|
||||
CMatrix3D transform;
|
||||
m_Orientation.GetInverse(transform);
|
||||
transform.Concatenate(m_ProjMat);
|
||||
CMatrix3D transform = m_ProjMat * m_Orientation.GetInverse();
|
||||
|
||||
CVector4D screenspace = transform.Transform(CVector4D(world.X, world.Y, world.Z, 1.0f));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user