mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
Merge pull request #1352 from Areloch/PVS_Cleanup_807
Unnecessarily repeated expressions
This commit is contained in:
commit
86e0e67496
38 changed files with 465 additions and 371 deletions
|
|
@ -450,10 +450,11 @@ void ForestSelectionTool::onRender2D()
|
|||
F32 hscale = wwidth * 2 / F32(mEditor->getWidth());
|
||||
F32 vscale = wheight * 2 / F32(mEditor->getHeight());
|
||||
|
||||
F32 left = (mDragRect.point.x - mEditor->getPosition().x) * hscale - wwidth;
|
||||
F32 right = (mDragRect.point.x - mEditor->getPosition().x + mDragRect.extent.x) * hscale - wwidth;
|
||||
F32 top = wheight - vscale * (mDragRect.point.y - mEditor->getPosition().y);
|
||||
F32 bottom = wheight - vscale * (mDragRect.point.y - mEditor->getPosition().y + mDragRect.extent.y);
|
||||
Point2I editorPosition = mEditor->getPosition();
|
||||
F32 left = (mDragRect.point.x - editorPosition.x) * hscale - wwidth;
|
||||
F32 right = (mDragRect.point.x - editorPosition.x + mDragRect.extent.x) * hscale - wwidth;
|
||||
F32 top = wheight - vscale * (mDragRect.point.y - editorPosition.y);
|
||||
F32 bottom = wheight - vscale * (mDragRect.point.y - editorPosition.y + mDragRect.extent.y);
|
||||
gDragFrustum.set(lastCameraQuery.ortho, left, right, top, bottom, lastCameraQuery.nearPlane, lastCameraQuery.farPlane, lastCameraQuery.cameraMatrix );
|
||||
|
||||
mForest->getData()->getItems( gDragFrustum, &mDragSelection );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue