mirror of
https://github.com/leozide/leocad
synced 2025-01-28 19:58:12 +01:00
Replaced matrix inverses with faster ones.
This commit is contained in:
parent
0596ad829f
commit
84cdf1a030
2 changed files with 4 additions and 4 deletions
|
@ -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));
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue