16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 00:09:19 +02:00

feature: camera zoom

This commit is contained in:
tmj-fstate
2017-02-19 16:24:10 +01:00
parent 7e0aeb1bfa
commit 8ae135375e
7 changed files with 68 additions and 33 deletions

View File

@@ -555,7 +555,7 @@ void TGroundNode::RenderDL()
return smTerrain->RenderDL();
}
// if (pTriGroup) if (pTriGroup!=this) return; //wyświetla go inny obiekt
double mgn = SquareMagnitude(pCenter - Global::pCameraPosition);
double mgn = SquareMagnitude(pCenter - Global::pCameraPosition) / Global::ZoomFactor;
if ((mgn > fSquareRadius) || (mgn < fSquareMinRadius)) // McZapkie-070602: nie rysuj odleglych
// obiektow ale sprawdzaj wyzwalacz
// zdarzen
@@ -615,7 +615,7 @@ void TGroundNode::RenderAlphaDL()
// i jezeli tak to odpowiedni GL_GREATER w przeciwnym wypadku standardowy 0.04
// if (pTriGroup) if (pTriGroup!=this) return; //wyświetla go inny obiekt
double mgn = SquareMagnitude(pCenter - Global::pCameraPosition);
double mgn = SquareMagnitude(pCenter - Global::pCameraPosition) / Global::ZoomFactor;
float r, g, b;
if (mgn < fSquareMinRadius)
return;