@@ -226,35 +226,38 @@ void View::setLocation( const ViewLocation *location )
226226 the world points are at the requested Z */
227227// -------------------------------------------------------------------------------------------------
228228void View::getScreenCornerWorldPointsAtZ ( Coord3D *topLeft, Coord3D *topRight,
229- Coord3D *bottomLeft , Coord3D *bottomRight ,
229+ Coord3D *bottomRight , Coord3D *bottomLeft ,
230230 Real z )
231231{
232- ICoord2D screenTopLeft, screenTopRight, screenBottomLeft, screenBottomRight;
233- ICoord2D origin;
234- Int viewWidth = getWidth ();
235- Int viewHeight = getHeight ();
236-
237232 // sanity
238- if ( topLeft == nullptr || topRight == nullptr || bottomLeft == nullptr || bottomRight == nullptr )
233+ if ( topLeft == nullptr || topRight == nullptr || bottomRight == nullptr || bottomLeft == nullptr )
239234 return ;
240235
236+ ICoord2D screenTopLeft;
237+ ICoord2D screenTopRight;
238+ ICoord2D screenBottomRight;
239+ ICoord2D screenBottomLeft;
240+ ICoord2D origin;
241+ const Int viewWidth = getWidth ();
242+ const Int viewHeight = getHeight ();
243+
241244 // setup the screen coords for the 4 corners of the viewable display
242245 getOrigin ( &origin.x , &origin.y );
243- screenTopLeft.x = origin.x ; // upper left
244- screenTopLeft.y = origin.y ; // upper left
245- screenTopRight.x = origin.x + viewWidth; // upper right
246- screenTopRight.y = origin.y ; // upper right
247- screenBottomLeft.x = origin.x + viewWidth; // lower right
248- screenBottomLeft.y = origin.y + viewHeight; // lower right
249- screenBottomRight.x = origin.x ; // lower left
250- screenBottomRight.y = origin.y + viewHeight; // lower left
246+
247+ screenTopLeft.x = origin.x ;
248+ screenTopLeft.y = origin.y ;
249+ screenTopRight.x = origin.x + viewWidth;
250+ screenTopRight.y = origin.y ;
251+ screenBottomRight.x = origin.x + viewWidth;
252+ screenBottomRight.y = origin.y + viewHeight;
253+ screenBottomLeft.x = origin.x ;
254+ screenBottomLeft.y = origin.y + viewHeight;
251255
252256 // project
253257 screenToWorldAtZ ( &screenTopLeft, topLeft, z );
254258 screenToWorldAtZ ( &screenTopRight, topRight, z );
255- screenToWorldAtZ ( &screenBottomLeft, bottomLeft, z );
256259 screenToWorldAtZ ( &screenBottomRight, bottomRight, z );
257-
260+ screenToWorldAtZ ( &screenBottomLeft, bottomLeft, z );
258261}
259262
260263// ------------------------------------------------------------------------------------------------
0 commit comments