Replaced matrix inverses with faster ones.

This commit is contained in:
leo 2012-06-13 02:41:16 +00:00
parent 0596ad829f
commit 84cdf1a030
2 changed files with 4 additions and 4 deletions

View file

@ -519,7 +519,7 @@ void Camera::UpdateBoundingBox()
lcVector3 FrontVector(mPosition - mTargetPosition);
float len = FrontVector.Length();
lcMatrix44 Mat = lcMatrix44Inverse(mWorldView);
lcMatrix44 Mat = lcMatrix44AffineInverse(mWorldView);
Mat.SetTranslation(mPosition);
BoundingBoxCalculate((Matrix*)&Mat);
@ -655,7 +655,7 @@ void Camera::Render(float fLineWidth)
glPushMatrix ();
lcMatrix44 ViewWorld = lcMatrix44Inverse(mWorldView);
lcMatrix44 ViewWorld = lcMatrix44AffineInverse(mWorldView);
glMultMatrixf(ViewWorld);
lcMatrix44 InvProjection = lcMatrix44Inverse(lcMatrix44Perspective(m_fovy, 1.33f, 0.01f, len));

View file

@ -2329,7 +2329,7 @@ void Project::RenderOverlays(View* view)
}
}
lcMatrix44 Mat = lcMatrix44Inverse(Cam->mWorldView);
lcMatrix44 Mat = lcMatrix44AffineInverse(Cam->mWorldView);
Mat.SetTranslation(m_OverlayCenter);
// Draw the circles.
@ -7165,7 +7165,7 @@ bool Project::OnKeyDown(char nKey, bool bControl, bool bShift)
if (camera->IsSide ())
{
lcMatrix44 mat = lcMatrix44Inverse(camera->mWorldView);
lcMatrix44 mat = lcMatrix44AffineInverse(camera->mWorldView);
switch (nKey)
{