+void XY_Centralize(){
+ if ( g_pParentWnd->CurrentStyle() == MainFrame::eSplit || g_pParentWnd->CurrentStyle() == MainFrame::eFloating ) {
+ // centralize all
+ XY_Split_Centralize();
+ return;
+ }
+
+ XYWnd* xywnd = g_pParentWnd->GetXYWnd();
+ XYWnd_Centralize( xywnd );
+}
+
+
+
+void GetSelectionBbox( AABB& bounds ){
+ if ( GlobalSelectionSystem().countSelected() != 0 ) {
+ Scene_BoundsSelected( GlobalSceneGraph(), bounds );
+ }
+ else
+ {
+ bounds = AABB( Camera_getOrigin( *g_pParentWnd->GetCamWnd() ), Vector3( 128.f, 128.f, 128.f ) );
+ }
+}
+
+void XYWnd_Focus( XYWnd* xywnd ){
+ AABB bounds;
+ GetSelectionBbox( bounds );
+ xywnd->FocusOnBounds( bounds );
+}
+
+void XY_Split_Focus(){
+ AABB bounds;
+ GetSelectionBbox( bounds );
+ if ( g_pParentWnd->GetXYWnd() ) {
+ g_pParentWnd->GetXYWnd()->FocusOnBounds( bounds );
+ }
+ if ( g_pParentWnd->GetXZWnd() ) {
+ g_pParentWnd->GetXZWnd()->FocusOnBounds( bounds );
+ }
+ if ( g_pParentWnd->GetYZWnd() ) {
+ g_pParentWnd->GetYZWnd()->FocusOnBounds( bounds );
+ }
+}
+