فهرست منبع

Refactored and renamed Box, Int2, Rect and FRect

Marko Pintera 12 سال پیش
والد
کامیت
61a6fe1e9d
100فایلهای تغییر یافته به همراه508 افزوده شده و 500 حذف شده
  1. 3 3
      BansheeEngine/Include/BsDrawHelper2D.h
  2. 1 1
      BansheeEngine/Include/BsGUIButtonBase.h
  3. 1 1
      BansheeEngine/Include/BsGUIContextMenu.h
  4. 10 10
      BansheeEngine/Include/BsGUIDropDownBox.h
  5. 16 16
      BansheeEngine/Include/BsGUIElement.h
  6. 5 5
      BansheeEngine/Include/BsGUIElementBase.h
  7. 1 1
      BansheeEngine/Include/BsGUIElementStyle.h
  8. 2 2
      BansheeEngine/Include/BsGUIHelper.h
  9. 9 9
      BansheeEngine/Include/BsGUIInputBox.h
  10. 4 4
      BansheeEngine/Include/BsGUIInputCaret.h
  11. 4 4
      BansheeEngine/Include/BsGUIInputSelection.h
  12. 4 4
      BansheeEngine/Include/BsGUIInputTool.h
  13. 1 1
      BansheeEngine/Include/BsGUILabel.h
  14. 3 3
      BansheeEngine/Include/BsGUILayout.h
  15. 1 1
      BansheeEngine/Include/BsGUILayoutX.h
  16. 1 1
      BansheeEngine/Include/BsGUILayoutY.h
  17. 6 6
      BansheeEngine/Include/BsGUIManager.h
  18. 16 16
      BansheeEngine/Include/BsGUIMouseEvent.h
  19. 2 2
      BansheeEngine/Include/BsGUIScrollArea.h
  20. 1 1
      BansheeEngine/Include/BsGUIScrollBar.h
  21. 2 2
      BansheeEngine/Include/BsGUIScrollBarHandle.h
  22. 2 2
      BansheeEngine/Include/BsGUISpace.h
  23. 1 1
      BansheeEngine/Include/BsGUITextInputEvent.h
  24. 1 1
      BansheeEngine/Include/BsGUITexture.h
  25. 1 1
      BansheeEngine/Include/BsGUIViewport.h
  26. 4 4
      BansheeEngine/Include/BsGUIWidget.h
  27. 7 7
      BansheeEngine/Include/BsSprite.h
  28. 1 1
      BansheeEngine/Include/BsTextSprite.h
  29. 6 6
      BansheeEngine/Source/BsDrawHelper2D.cpp
  30. 1 1
      BansheeEngine/Source/BsDrawHelper3D.cpp
  31. 1 1
      BansheeEngine/Source/BsDrawHelperTemplate.cpp
  32. 1 1
      BansheeEngine/Source/BsGUIArea.cpp
  33. 17 17
      BansheeEngine/Source/BsGUIButtonBase.cpp
  34. 1 1
      BansheeEngine/Source/BsGUIContextMenu.cpp
  35. 6 6
      BansheeEngine/Source/BsGUIDropDownBox.cpp
  36. 14 14
      BansheeEngine/Source/BsGUIElement.cpp
  37. 2 2
      BansheeEngine/Source/BsGUIElementBase.cpp
  38. 5 5
      BansheeEngine/Source/BsGUIHelper.cpp
  39. 31 31
      BansheeEngine/Source/BsGUIInputBox.cpp
  40. 14 14
      BansheeEngine/Source/BsGUIInputCaret.cpp
  41. 18 18
      BansheeEngine/Source/BsGUIInputSelection.cpp
  42. 11 11
      BansheeEngine/Source/BsGUIInputTool.cpp
  43. 1 1
      BansheeEngine/Source/BsGUILabel.cpp
  44. 7 7
      BansheeEngine/Source/BsGUILayoutX.cpp
  45. 7 7
      BansheeEngine/Source/BsGUILayoutY.cpp
  46. 23 23
      BansheeEngine/Source/BsGUIManager.cpp
  47. 23 23
      BansheeEngine/Source/BsGUIMouseEvent.cpp
  48. 10 10
      BansheeEngine/Source/BsGUIScrollArea.cpp
  49. 2 2
      BansheeEngine/Source/BsGUIScrollBar.cpp
  50. 8 8
      BansheeEngine/Source/BsGUIScrollBarHandle.cpp
  51. 3 3
      BansheeEngine/Source/BsGUITexture.cpp
  52. 3 3
      BansheeEngine/Source/BsGUIViewport.cpp
  53. 4 4
      BansheeEngine/Source/BsGUIWidget.cpp
  54. 1 1
      BansheeEngine/Source/BsImageSprite.cpp
  55. 17 17
      BansheeEngine/Source/BsSprite.cpp
  56. 9 9
      BansheeEngine/Source/BsTextSprite.cpp
  57. 1 1
      CamelotClient/Include/BsDockManager.h
  58. 1 1
      CamelotClient/Include/BsGUITabButton.h
  59. 3 3
      CamelotClient/Source/BsDockManager.cpp
  60. 1 1
      CamelotClient/Source/BsEditorWidgetContainer.cpp
  61. 4 4
      CamelotClient/Source/BsGUIMenuBar.cpp
  62. 1 1
      CamelotClient/Source/BsGUITabbedTitleBar.cpp
  63. 8 8
      CamelotClient/Source/BsGUIWindowFrameWidget.cpp
  64. 1 1
      CamelotClient/Source/BsMainEditorWindow.cpp
  65. 2 0
      CamelotCore/CamelotCore.vcxproj
  66. 6 0
      CamelotCore/CamelotCore.vcxproj.filters
  67. 4 4
      CamelotCore/Include/CmInput.h
  68. 2 2
      CamelotCore/Include/CmInputFwd.h
  69. 10 10
      CamelotCore/Include/CmOSInputHandler.h
  70. 3 3
      CamelotCore/Include/CmPixelBuffer.h
  71. 5 5
      CamelotCore/Include/CmPixelData.h
  72. 1 1
      CamelotCore/Include/CmPlatform.h
  73. 1 1
      CamelotCore/Include/CmPlatformWndProc.h
  74. 3 3
      CamelotCore/Include/CmRawInputHandler.h
  75. 3 3
      CamelotCore/Include/CmRenderWindow.h
  76. 1 1
      CamelotCore/Include/CmTextData.h
  77. 5 5
      CamelotCore/Include/CmViewport.h
  78. 13 13
      CamelotCore/Include/Win32/CmPlatformImpl.h
  79. 6 6
      CamelotCore/Include/Win32/CmWin32DropTarget.h
  80. 3 3
      CamelotCore/Source/CmInput.cpp
  81. 5 5
      CamelotCore/Source/CmOSInputHandler.cpp
  82. 2 2
      CamelotCore/Source/CmPixelBuffer.cpp
  83. 1 1
      CamelotCore/Source/CmPixelUtil.cpp
  84. 1 1
      CamelotCore/Source/CmPlatform.cpp
  85. 11 11
      CamelotCore/Source/CmPlatformWndProc.cpp
  86. 9 9
      CamelotCore/Source/Win32/CmPlatformImpl.cpp
  87. 1 1
      CamelotD3D11RenderSystem/Include/CmD3D11Mappings.h
  88. 2 2
      CamelotD3D11RenderSystem/Include/CmD3D11RenderWindow.h
  89. 1 1
      CamelotD3D11RenderSystem/Source/CmD3D11Mappings.cpp
  90. 1 1
      CamelotD3D11RenderSystem/Source/CmD3D11RenderSystem.cpp
  91. 1 1
      CamelotD3D11RenderSystem/Source/CmD3D11RenderUtility.cpp
  92. 4 4
      CamelotD3D11RenderSystem/Source/CmD3D11RenderWindow.cpp
  93. 5 5
      CamelotD3D9Renderer/Include/CmD3D9PixelBuffer.h
  94. 1 1
      CamelotD3D9Renderer/Include/CmD3D9RenderSystem.h
  95. 2 2
      CamelotD3D9Renderer/Include/CmD3D9RenderWindow.h
  96. 4 4
      CamelotD3D9Renderer/Source/CmD3D9PixelBuffer.cpp
  97. 3 3
      CamelotD3D9Renderer/Source/CmD3D9RenderSystem.cpp
  98. 4 4
      CamelotD3D9Renderer/Source/CmD3D9RenderWindow.cpp
  99. 5 5
      CamelotGLRenderer/Include/CmGLPixelBuffer.h
  100. 1 1
      CamelotGLRenderer/Include/CmGLRenderSystem.h

+ 3 - 3
BansheeEngine/Include/BsDrawHelper2D.h

@@ -26,7 +26,7 @@ namespace BansheeEngine
 		 * 			  32bit index buffer
 		 * 			  Enough space for 4 vertices and 6 indices
 		 */
-		void quad(const CM::FRect& area, const CM::MeshDataPtr& meshData, CM::UINT32 vertexOffset, CM::UINT32 indexOffset);
+		void quad(const CM::RectF& area, const CM::MeshDataPtr& meshData, CM::UINT32 vertexOffset, CM::UINT32 indexOffset);
 
 		/**
 		 * @brief	Fills the mesh data with vertices representing a per-pixel line.
@@ -102,7 +102,7 @@ namespace BansheeEngine
 		 */
 		void lineList_AA(const CM::Vector<CM::Vector2>::type& linePoints, float width, float borderWidth, const CM::Color& color, const CM::MeshDataPtr& meshData, CM::UINT32 vertexOffset, CM::UINT32 indexOffset);
 
-		void drawQuad(const HCamera& camera, const CM::FRect& area, const CM::Color& color = CM::Color::White, DebugDrawCoordType coordType = DebugDrawCoordType::Pixel, float timeout = 0.0f);
+		void drawQuad(const HCamera& camera, const CM::RectF& area, const CM::Color& color = CM::Color::White, DebugDrawCoordType coordType = DebugDrawCoordType::Pixel, float timeout = 0.0f);
 		void drawLine_Pixel(const HCamera& camera, const CM::Vector2& a, const CM::Vector2& b, const CM::Color& color = CM::Color::White, 
 			DebugDrawCoordType coordType = DebugDrawCoordType::Pixel, float timeout = 0.0f);
 		void drawLine_AA(const HCamera& camera, const CM::Vector2& a, const CM::Vector2& b, float width, float borderWidth, 
@@ -117,7 +117,7 @@ namespace BansheeEngine
 
 		CM::VertexDataDescPtr mVertexDesc;
 
-		CM::FRect normalizedCoordToClipSpace(const CM::FRect& area) const;
+		CM::RectF normalizedCoordToClipSpace(const CM::RectF& area) const;
 		CM::Vector2 normalizedCoordToClipSpace(const CM::Vector2& pos) const;
 
 	protected:

+ 1 - 1
BansheeEngine/Include/BsGUIButtonBase.h

@@ -69,7 +69,7 @@ namespace BansheeEngine
 
 		virtual bool mouseEvent(const GUIMouseEvent& ev);
 
-		virtual CM::Int2 _getOptimalSize() const;
+		virtual CM::Vector2I _getOptimalSize() const;
 		virtual CM::UINT32 _getRenderElementDepth(CM::UINT32 renderElementIdx) const;
 
 		TEXT_SPRITE_DESC getTextDesc() const;

+ 1 - 1
BansheeEngine/Include/BsGUIContextMenu.h

@@ -11,7 +11,7 @@ namespace BansheeEngine
 		GUIContextMenu();
 		~GUIContextMenu();
 
-		void open(const CM::Int2& position, GUIWidget& widget);
+		void open(const CM::Vector2I& position, GUIWidget& widget);
 
 	private:
 		bool mContextMenuOpen;

+ 10 - 10
BansheeEngine/Include/BsGUIDropDownBox.h

@@ -2,7 +2,7 @@
 
 #include "BsPrerequisites.h"
 #include "BsGUIWidget.h"
-#include "CmInt2.h"
+#include "CmVector2I.h"
 #include <boost/signal.hpp>
 
 namespace BansheeEngine
@@ -65,32 +65,32 @@ namespace BansheeEngine
 		 * 			prefers the top left corner of the box to correspond to the position, but if
 		 * 			other corners offer more space for the contents, those will be used instead.
 		 */
-		static GUIDropDownAreaPlacement aroundPosition(const CM::Int2& position);
+		static GUIDropDownAreaPlacement aroundPosition(const CM::Vector2I& position);
 
 		/**
 		 * @brief	Drop down box will be placed at the specified bounds. Box will be horizontally aligned to the left
 		 * 			of the provided bounds. Vertically system prefers placing the box at the bottom of the bounds, but may choose
 		 * 			to align it with the top of the bounds if it offers more space for the contents.
 		 */
-		static GUIDropDownAreaPlacement aroundBoundsVert(const CM::Rect& bounds);
+		static GUIDropDownAreaPlacement aroundBoundsVert(const CM::RectI& bounds);
 		
 		/**
 		 * @brief	Drop down box will be placed at the specified bounds. Box will be vertically aligned to the top
 		 * 			of the provided bounds. Horizontally system prefers placing the box at the right of the bounds, but may choose
 		 * 			to align it with the left of the bounds if it offers more space for the contents.
 		 */
-		static GUIDropDownAreaPlacement aroundBoundsHorz(const CM::Rect& bounds);
+		static GUIDropDownAreaPlacement aroundBoundsHorz(const CM::RectI& bounds);
 
 		Type getType() const { return mType; }
-		const CM::Rect& getBounds() const { return mBounds; }
-		const CM::Int2& getPosition() const { return mPosition; }
+		const CM::RectI& getBounds() const { return mBounds; }
+		const CM::Vector2I& getPosition() const { return mPosition; }
 
 	private:
 		GUIDropDownAreaPlacement() { }
 
 		Type mType;
-		CM::Rect mBounds;
-		CM::Int2 mPosition;
+		CM::RectI mBounds;
+		CM::Vector2I mPosition;
 	};
 
 	enum class GUIDropDownType
@@ -121,7 +121,7 @@ namespace BansheeEngine
 			CM::UINT32 mPage;
 			CM::INT32 x, y;
 			CM::UINT32 width, height;
-			CM::Rect mAvailableBounds;
+			CM::RectI mAvailableBounds;
 			CM::UINT32 mDepthOffset;
 			bool mOpenedUpward;
 
@@ -139,7 +139,7 @@ namespace BansheeEngine
 			DropDownSubMenu* mSubMenu;
 
 			DropDownSubMenu(GUIDropDownBox* owner, const GUIDropDownAreaPlacement& placement, 
-				const CM::Rect& availableBounds, const GUIDropDownData& dropDownData, GUIDropDownType type, CM::UINT32 depthOffset);
+				const CM::RectI& availableBounds, const GUIDropDownData& dropDownData, GUIDropDownType type, CM::UINT32 depthOffset);
 			~DropDownSubMenu();
 
 			void updateGUIElements();

+ 16 - 16
BansheeEngine/Include/BsGUIElement.h

@@ -3,8 +3,8 @@
 #include "BsPrerequisites.h"
 #include "BsGUIElementBase.h"
 #include "BsGUIOptions.h"
-#include "CmRect.h"
-#include "CmInt2.h"
+#include "CmRectI.h"
+#include "CmVector2I.h"
 
 namespace BansheeEngine
 {
@@ -77,7 +77,7 @@ namespace BansheeEngine
 		/**
 		 * @brief	Gets non-clipped bounds that were assigned to the element by the parent layout.
 		 */
-		CM::Rect getBounds() const;
+		CM::RectI getBounds() const;
 
 		virtual bool mouseEvent(const GUIMouseEvent& ev);
 		virtual bool textInputEvent(const GUITextInputEvent& ev);
@@ -91,25 +91,25 @@ namespace BansheeEngine
 
 		void _setWidgetDepth(CM::UINT8 depth);
 		void _setAreaDepth(CM::UINT16 depth);
-		void _setOffset(const CM::Int2& offset);
+		void _setOffset(const CM::Vector2I& offset);
 		void _setWidth(CM::UINT32 width);
 		void _setHeight(CM::UINT32 height);
-		void _setClipRect(const CM::Rect& clipRect);
+		void _setClipRect(const CM::RectI& clipRect);
 		void _setAcceptsKeyboardFocus(bool acceptsKeyboardFocus) { mAcceptsKeyboardFocus = acceptsKeyboardFocus; }
 		virtual void _setFocus(bool focus) {}
 		virtual void _changeParentWidget(GUIWidget* widget);
 
 		CM::UINT32 _getWidth() const { return mWidth; }
 		CM::UINT32 _getHeight() const { return mHeight; }
-		CM::Int2 _getOffset() const { return mOffset; }
+		CM::Vector2I _getOffset() const { return mOffset; }
 		virtual CM::UINT32 _getRenderElementDepth(CM::UINT32 renderElementIdx) const { return _getDepth(); }
 		Type _getType() const { return GUIElementBase::Type::Element; }
 		bool _isDestroyed() const { return mIsDestroyed; }
 
-		const CM::Rect& _getClippedBounds() const { return mClippedBounds; }
+		const CM::RectI& _getClippedBounds() const { return mClippedBounds; }
 		CM::UINT32 _getDepth() const { return mDepth; }
 		GUIWidget& _getParentWidget() const { return *mParent; }
-		virtual bool _isInBounds(const CM::Int2 position) const;
+		virtual bool _isInBounds(const CM::Vector2I position) const;
 		bool _acceptsKeyboardFocus() const { return mAcceptsKeyboardFocus; }
 
 		virtual GUIContextMenu* getContextMenu() const { return nullptr; }
@@ -118,13 +118,13 @@ namespace BansheeEngine
 		 * @brief	Returns a clip rectangle relative to the element, used for offsetting
 		 * 			the input text.
 		 */
-		virtual CM::Int2 _getTextInputOffset() const { return CM::Int2(); }
+		virtual CM::Vector2I _getTextInputOffset() const { return CM::Vector2I(); }
 
 		/**
 		 * @brief	Returns a clip rectangle relative to the element, used for clipping
 		 * 			the input text.
 		 */
-		virtual CM::Rect _getTextInputRect() const { return CM::Rect(); }
+		virtual CM::RectI _getTextInputRect() const { return CM::RectI(); }
 
 		const GUILayoutOptions& _getLayoutOptions() const { return mLayoutOptions; }
 	protected:
@@ -133,20 +133,20 @@ namespace BansheeEngine
 
 		void setLayoutOptions(const GUILayoutOptions& layoutOptions);
 		
-		CM::Rect getVisibleBounds() const;
-		CM::Rect getContentBounds() const;
-		CM::Rect getContentClipRect() const;
+		CM::RectI getVisibleBounds() const;
+		CM::RectI getContentBounds() const;
+		CM::RectI getContentClipRect() const;
 
 		GUIWidget* mParent;
 		bool mIsDestroyed;
 		GUILayoutOptions mLayoutOptions;
-		CM::Rect mClippedBounds;
+		CM::RectI mClippedBounds;
 
 		bool mAcceptsKeyboardFocus;
 		CM::UINT32 mDepth;
-		CM::Int2 mOffset;
+		CM::Vector2I mOffset;
 		CM::UINT32 mWidth, mHeight;
-		CM::Rect mClipRect;
+		CM::RectI mClipRect;
 		const GUIElementStyle* mStyle;
 	};
 }

+ 5 - 5
BansheeEngine/Include/BsGUIElementBase.h

@@ -3,8 +3,8 @@
 #include "BsPrerequisites.h"
 #include "BsGUIMaterialInfo.h"
 #include "BsGUILayoutOptions.h"
-#include "CmRect.h"
-#include "CmInt2.h"
+#include "CmRectI.h"
+#include "CmVector2I.h"
 
 namespace BansheeEngine
 {
@@ -41,14 +41,14 @@ namespace BansheeEngine
 		 * @brief	Re-arranges the elements to fit the layout. (Internal use only)
 		 */
 		virtual void _updateLayout(CM::INT32 x, CM::INT32 y, CM::UINT32 width, CM::UINT32 height, 
-			CM::Rect clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth);
+			CM::RectI clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth);
 		virtual void _updateOptimalLayoutSizes();
 		virtual void _updateLayoutInternal(CM::INT32 x, CM::INT32 y, CM::UINT32 width, CM::UINT32 height,
-			CM::Rect clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth);
+			CM::RectI clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth);
 
 		void _setParent(GUIElementBase* parent) { mParentElement = parent; }
 
-		virtual CM::Int2 _getOptimalSize() const = 0;
+		virtual CM::Vector2I _getOptimalSize() const = 0;
 		virtual Type _getType() const = 0;
 		GUIElementBase* _getParent() const { return mParentElement; }
 

+ 1 - 1
BansheeEngine/Include/BsGUIElementStyle.h

@@ -3,7 +3,7 @@
 #include "BsPrerequisites.h"
 #include "BsTextSprite.h"
 #include "CmColor.h"
-#include "CmInt2.h"
+#include "CmVector2I.h"
 
 namespace BansheeEngine
 {

+ 2 - 2
BansheeEngine/Include/BsGUIHelper.h

@@ -9,7 +9,7 @@ namespace BansheeEngine
 	class BS_EXPORT GUIHelper
 	{
 	public:
-		static CM::Int2 calcOptimalContentsSize(const GUIContent& content, const GUIElementStyle& style, const GUILayoutOptions& layoutOptions);
-		static CM::Int2 calcOptimalContentsSize(const CM::WString& text, const GUIElementStyle& style, const GUILayoutOptions& layoutOptions);
+		static CM::Vector2I calcOptimalContentsSize(const GUIContent& content, const GUIElementStyle& style, const GUILayoutOptions& layoutOptions);
+		static CM::Vector2I calcOptimalContentsSize(const CM::WString& text, const GUIElementStyle& style, const GUILayoutOptions& layoutOptions);
 	};
 }

+ 9 - 9
BansheeEngine/Include/BsGUIInputBox.h

@@ -48,10 +48,10 @@ namespace BansheeEngine
 		 */
 		virtual void updateClippedBounds();
 
-		virtual CM::Int2 _getOptimalSize() const;
+		virtual CM::Vector2I _getOptimalSize() const;
 
-		virtual CM::Int2 _getTextInputOffset() const;
-		virtual CM::Rect _getTextInputRect() const;
+		virtual CM::Vector2I _getTextInputOffset() const;
+		virtual CM::RectI _getTextInputRect() const;
 
 		virtual CM::UINT32 _getRenderElementDepth(CM::UINT32 renderElementIdx) const;
 		virtual void _setFocus(bool focus);
@@ -62,7 +62,7 @@ namespace BansheeEngine
 		ImageSprite* mImageSprite;
 		TextSprite* mTextSprite;
 		bool mIsMultiline;
-		CM::Int2 mTextOffset;
+		CM::Vector2I mTextOffset;
 		bool mHasFocus;
 
 		IMAGE_SPRITE_DESC mImageDesc;
@@ -81,8 +81,8 @@ namespace BansheeEngine
 		virtual bool commandEvent(const GUICommandEvent& ev);
 
 		Sprite* renderElemToSprite(CM::UINT32 renderElemIdx, CM::UINT32& localRenderElemIdx) const;
-		CM::Int2 renderElemToOffset(CM::UINT32 renderElemIdx) const;
-		CM::Rect renderElemToClipRect(CM::UINT32 renderElemIdx) const;
+		CM::Vector2I renderElemToOffset(CM::UINT32 renderElemIdx) const;
+		CM::RectI renderElemToClipRect(CM::UINT32 renderElemIdx) const;
 
 		void insertString(CM::UINT32 charIdx, const CM::WString& string);
 		void insertChar(CM::UINT32 charIdx, CM::UINT32 charCode);
@@ -100,10 +100,10 @@ namespace BansheeEngine
 		void moveSelectionRight(bool skipNewline);
 
 		void scrollTextToCaret();
-		void clampScrollToBounds(CM::Rect unclippedTextBounds);
+		void clampScrollToBounds(CM::RectI unclippedTextBounds);
 
-		CM::Int2 getTextOffset() const;
-		CM::Rect getTextClipRect() const;
+		CM::Vector2I getTextOffset() const;
+		CM::RectI getTextClipRect() const;
 		TEXT_SPRITE_DESC getTextDesc() const;
 		
 		void cutText();

+ 4 - 4
BansheeEngine/Include/BsGUIInputCaret.h

@@ -19,8 +19,8 @@ namespace BansheeEngine
 		~GUIInputCaret();
 
 		ImageSprite* getSprite() const { return mCaretSprite; }
-		CM::Int2 getSpriteOffset() const;
-		CM::Rect getSpriteClipRect(const CM::Rect& parentClipRect) const;
+		CM::Vector2I getSpriteOffset() const;
+		CM::RectI getSpriteClipRect(const CM::RectI& parentClipRect) const;
 
 		void updateSprite();
 
@@ -30,11 +30,11 @@ namespace BansheeEngine
 		void moveCaretRight();
 		void moveCaretUp();
 		void moveCaretDown();
-		void moveCaretToPos(const CM::Int2& pos);
+		void moveCaretToPos(const CM::Vector2I& pos);
 		void moveCaretToChar(CM::UINT32 charIdx, CaretPos caretPos);
 
 		CM::UINT32 getCharIdxAtCaretPos() const;
-		CM::Int2 getCaretPosition(const CM::Int2& offset) const;
+		CM::Vector2I getCaretPosition(const CM::Vector2I& offset) const;
 		CM::UINT32 getCaretHeight() const;
 
 		bool isCaretAtNewline() const;

+ 4 - 4
BansheeEngine/Include/BsGUIInputSelection.h

@@ -13,8 +13,8 @@ namespace BansheeEngine
 		~GUIInputSelection();
 
 		const CM::Vector<ImageSprite*>::type& getSprites() const { return mSprites; }
-		CM::Int2 GUIInputSelection::getSelectionSpriteOffset(CM::UINT32 spriteIdx) const;
-		CM::Rect GUIInputSelection::getSelectionSpriteClipRect(CM::UINT32 spriteIdx, const CM::Rect& parentClipRect) const;
+		CM::Vector2I GUIInputSelection::getSelectionSpriteOffset(CM::UINT32 spriteIdx) const;
+		CM::RectI GUIInputSelection::getSelectionSpriteClipRect(CM::UINT32 spriteIdx, const CM::RectI& parentClipRect) const;
 		void updateSprite();
 
 		void showSelection(CM::UINT32 anchorCaretPos);
@@ -37,9 +37,9 @@ namespace BansheeEngine
 		CM::UINT32 mSelectionAnchor;
 		CM::UINT32 mSelectionDragAnchor;
 
-		CM::Vector<CM::Rect>::type mSelectionRects;
+		CM::Vector<CM::RectI>::type mSelectionRects;
 		CM::Vector<ImageSprite*>::type mSprites;
 
-		CM::Vector<CM::Rect>::type getSelectionRects() const;
+		CM::Vector<CM::RectI>::type getSelectionRects() const;
 	};
 }

+ 4 - 4
BansheeEngine/Include/BsGUIInputTool.h

@@ -42,14 +42,14 @@ namespace BansheeEngine
 
 		CM::Vector<GUIInputLineDesc>::type mLineDescs;
 
-		CM::Int2 getTextOffset() const;
+		CM::Vector2I getTextOffset() const;
 
 		CM::UINT32 getNumLines() const { return (CM::UINT32)mLineDescs.size(); }
 		const GUIInputLineDesc& getLineDesc(CM::UINT32 lineIdx) const { return mLineDescs.at(lineIdx); }
 		CM::UINT32 getLineForChar(CM::UINT32 charIdx, bool newlineCountsOnNextLine = false) const;
-		CM::Rect getCharRect(CM::UINT32 charIdx) const;
-		CM::Rect getLocalCharRect(CM::UINT32 charIdx) const;
-		CM::INT32 getCharIdxAtPos(const CM::Int2& pos) const;
+		CM::RectI getCharRect(CM::UINT32 charIdx) const;
+		CM::RectI getLocalCharRect(CM::UINT32 charIdx) const;
+		CM::INT32 getCharIdxAtPos(const CM::Vector2I& pos) const;
 
 		/**
 		 * @brief	Gets a character index AFTER the input index. 

+ 1 - 1
BansheeEngine/Include/BsGUILabel.h

@@ -54,7 +54,7 @@ namespace BansheeEngine
 		 */
 		virtual void updateClippedBounds();
 
-		virtual CM::Int2 _getOptimalSize() const;
+		virtual CM::Vector2I _getOptimalSize() const;
 	private:
 		TextSprite* mTextSprite;
 		GUIContent mContent;

+ 3 - 3
BansheeEngine/Include/BsGUILayout.h

@@ -2,7 +2,7 @@
 
 #include "BsPrerequisites.h"
 #include "BsGUIElementBase.h"
-#include "CmInt2.h"
+#include "CmVector2I.h"
 
 namespace BansheeEngine
 {
@@ -33,7 +33,7 @@ namespace BansheeEngine
 		CM::UINT32 getNumChildren() const { return (CM::UINT32)mChildren.size(); }
 		void removeChildAt(CM::UINT32 idx);
 
-		CM::Int2 _getOptimalSize() const { return CM::Int2(mOptimalWidth, mOptimalHeight); }
+		CM::Vector2I _getOptimalSize() const { return CM::Vector2I(mOptimalWidth, mOptimalHeight); }
 		Type _getType() const { return GUIElementBase::Type::Layout; }
 
 		/**
@@ -56,7 +56,7 @@ namespace BansheeEngine
 		 */
 		CM::UINT32 _getActualHeight() const { return mActualHeight; }
 	protected:
-		CM::Vector<CM::Int2>::type mOptimalSizes;
+		CM::Vector<CM::Vector2I>::type mOptimalSizes;
 		CM::UINT32 mOptimalWidth;
 		CM::UINT32 mOptimalHeight;
 

+ 1 - 1
BansheeEngine/Include/BsGUILayoutX.h

@@ -13,6 +13,6 @@ namespace BansheeEngine
 
 		void _updateOptimalLayoutSizes();
 	protected:
-		void _updateLayoutInternal(CM::INT32 x, CM::INT32 y, CM::UINT32 width, CM::UINT32 height, CM::Rect clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth);
+		void _updateLayoutInternal(CM::INT32 x, CM::INT32 y, CM::UINT32 width, CM::UINT32 height, CM::RectI clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth);
 	};
 }

+ 1 - 1
BansheeEngine/Include/BsGUILayoutY.h

@@ -13,6 +13,6 @@ namespace BansheeEngine
 
 		void _updateOptimalLayoutSizes();
 	protected:
-		void _updateLayoutInternal(CM::INT32 x, CM::INT32 y, CM::UINT32 width, CM::UINT32 height, CM::Rect clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth);
+		void _updateLayoutInternal(CM::INT32 x, CM::INT32 y, CM::UINT32 width, CM::UINT32 height, CM::RectI clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth);
 	};
 }

+ 6 - 6
BansheeEngine/Include/BsGUIManager.h

@@ -146,10 +146,10 @@ namespace BansheeEngine
 		GUIInputSelection* mInputSelection;
 
 		bool mSeparateMeshesByWidget;
-		CM::Int2 mLastCursorLocalPos;
+		CM::Vector2I mLastCursorLocalPos;
 
 		DragState mDragState;
-		CM::Int2 mLastCursorClickPos;
+		CM::Vector2I mLastCursorClickPos;
 
 		GUIMouseEvent mMouseEvent;
 		GUITextInputEvent mTextInputEvent;
@@ -190,8 +190,8 @@ namespace BansheeEngine
 		void updateTextSelectionTexture();
 		void processDestroyQueue();
 
-		bool findElementUnderCursor(const CM::Int2& screenMousePos, bool buttonStates[3], bool shift, bool control, bool alt);
-		bool handleCursorOver(GUIWidget* widget, GUIElement* element, const CM::Int2& screenMousePos, 
+		bool findElementUnderCursor(const CM::Vector2I& screenMousePos, bool buttonStates[3], bool shift, bool control, bool alt);
+		bool handleCursorOver(GUIWidget* widget, GUIElement* element, const CM::Vector2I& screenMousePos, 
 			bool buttonStates[3], bool shift, bool control, bool alt);
 
 		void onCursorMoved(const CM::PositionalInputEvent& event);
@@ -209,8 +209,8 @@ namespace BansheeEngine
 		void onMouseLeftWindow(CM::RenderWindow* win);
 
 		GUIMouseButton buttonToGUIButton(CM::PositionalInputEventButton cursorButton) const;
-		CM::Int2 getWidgetRelativePos(const GUIWidget& widget, const CM::Int2& screenPos) const;
-		CM::Int2 windowToBridgedCoords(const GUIWidget& widget, const CM::Int2& windowPos) const;
+		CM::Vector2I getWidgetRelativePos(const GUIWidget& widget, const CM::Vector2I& screenPos) const;
+		CM::Vector2I windowToBridgedCoords(const GUIWidget& widget, const CM::Vector2I& windowPos) const;
 		const CM::RenderWindow* getWidgetWindow(const GUIWidget& widget) const;
 
 		bool sendMouseEvent(GUIWidget* widget, GUIElement* element, const GUIMouseEvent& event);

+ 16 - 16
BansheeEngine/Include/BsGUIMouseEvent.h

@@ -1,7 +1,7 @@
 #pragma once
 
 #include "BsPrerequisites.h"
-#include "CmInt2.h"
+#include "CmVector2I.h"
 
 namespace BansheeEngine
 {
@@ -32,10 +32,10 @@ namespace BansheeEngine
 		GUIMouseEvent();
 		GUIMouseEvent(bool buttonStates[GUIMouseButton::Count], bool shift, bool ctrl, bool alt);
 
-		const CM::Int2& getPosition() const { return mPosition; }
+		const CM::Vector2I& getPosition() const { return mPosition; }
 		GUIMouseEventType getType() const { return mType; }
 		GUIMouseButton getButton() const { return mButton; }
-		CM::Int2 getDragAmount() const { return mDragAmount; }
+		CM::Vector2I getDragAmount() const { return mDragAmount; }
 		float getWheelScrollAmount() const { return mWheelScrollAmount; }
 		bool isButtonDown(GUIMouseButton button) const { return mButtonStates[(int)button]; }
 		GUIElement* getMouseOverElement() const { return mMouseOverElement; }
@@ -49,8 +49,8 @@ namespace BansheeEngine
 		friend class GUIManager;
 
 		bool mButtonStates[GUIMouseButton::Count];
-		CM::Int2 mPosition;
-		CM::Int2 mDragAmount;
+		CM::Vector2I mPosition;
+		CM::Vector2I mDragAmount;
 		float mWheelScrollAmount;
 		GUIMouseEventType mType;
 		GUIMouseButton mButton;
@@ -62,19 +62,19 @@ namespace BansheeEngine
 		bool mCtrl;
 		bool mAlt;
 
-		void setMouseOverData(GUIElement* mouseOverElement, const CM::Int2& position);
-		void setMouseOutData(GUIElement* mouseOverElement, const CM::Int2& position);
-		void setMouseMoveData(GUIElement* mouseOverElement, const CM::Int2& position);
+		void setMouseOverData(GUIElement* mouseOverElement, const CM::Vector2I& position);
+		void setMouseOutData(GUIElement* mouseOverElement, const CM::Vector2I& position);
+		void setMouseMoveData(GUIElement* mouseOverElement, const CM::Vector2I& position);
 		void setMouseWheelScrollData(GUIElement* mouseOverElement, float scrollAmount);
-		void setMouseUpData(GUIElement* mouseOverElement, const CM::Int2& position, GUIMouseButton button);
-		void setMouseDownData(GUIElement* mouseOverElement, const CM::Int2& position, GUIMouseButton button);
-		void setMouseDoubleClickData(GUIElement* mouseOverElement, const CM::Int2& position, GUIMouseButton button);
+		void setMouseUpData(GUIElement* mouseOverElement, const CM::Vector2I& position, GUIMouseButton button);
+		void setMouseDownData(GUIElement* mouseOverElement, const CM::Vector2I& position, GUIMouseButton button);
+		void setMouseDoubleClickData(GUIElement* mouseOverElement, const CM::Vector2I& position, GUIMouseButton button);
 
-		void setMouseDragData(GUIElement* mouseOverElement, const CM::Int2& position, const CM::Int2& dragAmount);
-		void setMouseDragStartData(GUIElement* mouseOverElement, const CM::Int2& position);
-		void setMouseDragEndData(GUIElement* mouseOverElement, const CM::Int2& position);
+		void setMouseDragData(GUIElement* mouseOverElement, const CM::Vector2I& position, const CM::Vector2I& dragAmount);
+		void setMouseDragStartData(GUIElement* mouseOverElement, const CM::Vector2I& position);
+		void setMouseDragEndData(GUIElement* mouseOverElement, const CM::Vector2I& position);
 
-		void setDragAndDropDroppedData(GUIElement* mouseOverElement, const CM::Int2& position, CM::UINT32 dragTypeId, void* dragData);
-		void setDragAndDropDraggedData(GUIElement* mouseOverElement, const CM::Int2& position, CM::UINT32 dragTypeId, void* dragData);
+		void setDragAndDropDroppedData(GUIElement* mouseOverElement, const CM::Vector2I& position, CM::UINT32 dragTypeId, void* dragData);
+		void setDragAndDropDraggedData(GUIElement* mouseOverElement, const CM::Vector2I& position, CM::UINT32 dragTypeId, void* dragData);
 	};
 }

+ 2 - 2
BansheeEngine/Include/BsGUIScrollArea.h

@@ -49,7 +49,7 @@ namespace BansheeEngine
 		 */
 		virtual void updateClippedBounds();
 
-		virtual CM::Int2 _getOptimalSize() const;
+		virtual CM::Vector2I _getOptimalSize() const;
 	private:
 		GUIScrollArea(GUIWidget& parent, const GUIElementStyle* style, const GUILayoutOptions& layoutOptions);
 
@@ -72,7 +72,7 @@ namespace BansheeEngine
 		void vertScrollUpdate(float pct);
 		void horzScrollUpdate(float pct);
 		void _updateLayoutInternal(CM::INT32 x, CM::INT32 y, CM::UINT32 width, CM::UINT32 height,
-			CM::Rect clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth);
+			CM::RectI clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth);
 
 		virtual void _changeParentWidget(GUIWidget* widget);
 	};

+ 1 - 1
BansheeEngine/Include/BsGUIScrollBar.h

@@ -58,7 +58,7 @@ namespace BansheeEngine
 		 */
 		virtual void updateClippedBounds();
 
-		virtual CM::Int2 _getOptimalSize() const;
+		virtual CM::Vector2I _getOptimalSize() const;
 
 		virtual CM::UINT32 _getRenderElementDepth(CM::UINT32 renderElementIdx) const;
 	private:

+ 2 - 2
BansheeEngine/Include/BsGUIScrollBarHandle.h

@@ -59,7 +59,7 @@ namespace BansheeEngine
 		 */
 		virtual void updateClippedBounds();
 
-		virtual CM::Int2 _getOptimalSize() const;
+		virtual CM::Vector2I _getOptimalSize() const;
 	private:
 		ImageSprite* mImageSprite;
 		CM::UINT32 mHandleSize;
@@ -73,6 +73,6 @@ namespace BansheeEngine
 		GUIScrollBarHandle(GUIWidget& parent, bool horizontal, const GUIElementStyle* style, const GUILayoutOptions& layoutOptions);
 
 		virtual bool mouseEvent(const GUIMouseEvent& ev);
-		bool isOnHandle(const CM::Int2& pos) const;
+		bool isOnHandle(const CM::Vector2I& pos) const;
 	};
 }

+ 2 - 2
BansheeEngine/Include/BsGUISpace.h

@@ -15,7 +15,7 @@ namespace BansheeEngine
 		CM::UINT32 getSize() const { return mSize; }
 		Type _getType() const { return GUIElementBase::Type::FixedSpace; }
 
-		virtual CM::Int2 _getOptimalSize() const { return CM::Int2(getSize(), getSize()); }
+		virtual CM::Vector2I _getOptimalSize() const { return CM::Vector2I(getSize(), getSize()); }
 
 	protected:
 		CM::UINT32 mSize;
@@ -28,6 +28,6 @@ namespace BansheeEngine
 
 		Type _getType() const { return GUIElementBase::Type::FlexibleSpace; }
 
-		virtual CM::Int2 _getOptimalSize() const { return CM::Int2(0, 0); }
+		virtual CM::Vector2I _getOptimalSize() const { return CM::Vector2I(0, 0); }
 	};
 }

+ 1 - 1
BansheeEngine/Include/BsGUITextInputEvent.h

@@ -2,7 +2,7 @@
 
 #include "BsPrerequisites.h"
 #include "CmInputFwd.h"
-#include "CmInt2.h"
+#include "CmVector2I.h"
 
 namespace BansheeEngine
 {

+ 1 - 1
BansheeEngine/Include/BsGUITexture.h

@@ -66,6 +66,6 @@ namespace BansheeEngine
 		 */
 		virtual void updateClippedBounds();
 
-		virtual CM::Int2 _getOptimalSize() const;
+		virtual CM::Vector2I _getOptimalSize() const;
 	};
 }

+ 1 - 1
BansheeEngine/Include/BsGUIViewport.h

@@ -58,7 +58,7 @@ namespace BansheeEngine
 		 */
 		virtual void updateRenderElementsInternal();
 
-		virtual CM::Int2 _getOptimalSize() const;
+		virtual CM::Vector2I _getOptimalSize() const;
 
 	private:
 		HCamera mCamera;

+ 4 - 4
BansheeEngine/Include/BsGUIWidget.h

@@ -2,7 +2,7 @@
 
 #include "BsPrerequisites.h"
 #include "CmComponent.h"
-#include "CmRect.h"
+#include "CmRectI.h"
 #include "CmVector3.h"
 #include "CmQuaternion.h"
 #include <boost/signal.hpp>
@@ -20,8 +20,8 @@ namespace BansheeEngine
 		CM::UINT8 getDepth() const { return mDepth; }
 		void setDepth(CM::UINT8 depth) { mDepth = depth; mWidgetIsDirty = true; }
 
-		bool inBounds(const CM::Int2& position) const;
-		const CM::Rect& getBounds() const { return mBounds; }
+		bool inBounds(const CM::Vector2I& position) const;
+		const CM::RectI& getBounds() const { return mBounds; }
 
 		/**
 		 * @brief	Return true if widget or any of its elements are dirty.
@@ -91,7 +91,7 @@ namespace BansheeEngine
 		boost::signals::connection mOwnerTargetResizedConn;
 
 		mutable bool mWidgetIsDirty;
-		mutable CM::Rect mBounds;
+		mutable CM::RectI mBounds;
 		mutable CM::Vector<CM::HMesh>::type mCachedMeshes;
 		mutable CM::Vector<CM::HMaterial>::type mCachedMaterials;
 

+ 7 - 7
BansheeEngine/Include/BsSprite.h

@@ -2,8 +2,8 @@
 
 #include "BsPrerequisites.h"
 #include "BsGUIMaterialInfo.h"
-#include "CmInt2.h"
-#include "CmRect.h"
+#include "CmVector2I.h"
+#include "CmRectI.h"
 
 namespace BansheeEngine
 {
@@ -39,7 +39,7 @@ namespace BansheeEngine
 		Sprite();
 		virtual ~Sprite();
 
-		CM::Rect getBounds(const CM::Int2& offset, const CM::Rect& clipRect) const;
+		CM::RectI getBounds(const CM::Vector2I& offset, const CM::RectI& clipRect) const;
 
 		/**
 		 * @brief	Returns the number of separate render elements in the sprite. Normally this is one, but some sprites
@@ -90,12 +90,12 @@ namespace BansheeEngine
 		 * @param	renderElementIdx	Zero-based index of the render element.
 		 */
 		CM::UINT32 fillBuffer(CM::UINT8* vertices, CM::UINT8* uv, CM::UINT32* indices, CM::UINT32 startingQuad, CM::UINT32 maxNumQuads, 
-			CM::UINT32 vertexStride, CM::UINT32 indexStride, CM::UINT32 renderElementIdx, const CM::Int2& offset, const CM::Rect& clipRect) const;
+			CM::UINT32 vertexStride, CM::UINT32 indexStride, CM::UINT32 renderElementIdx, const CM::Vector2I& offset, const CM::RectI& clipRect) const;
 
-		static void clipToRect(CM::UINT8* vertices, CM::UINT8* uv, CM::UINT32 numQuads, CM::UINT32 vertStride, const CM::Rect& clipRect);
-		static CM::Int2 getAnchorOffset(SpriteAnchor anchor, CM::UINT32 width, CM::UINT32 height);
+		static void clipToRect(CM::UINT8* vertices, CM::UINT8* uv, CM::UINT32 numQuads, CM::UINT32 vertStride, const CM::RectI& clipRect);
+		static CM::Vector2I getAnchorOffset(SpriteAnchor anchor, CM::UINT32 width, CM::UINT32 height);
 	protected:
-		mutable CM::Rect mBounds;
+		mutable CM::RectI mBounds;
 		mutable CM::Vector<SpriteRenderElement>::type mCachedRenderElements;
 
 		void updateBounds() const;

+ 1 - 1
BansheeEngine/Include/BsTextSprite.h

@@ -42,7 +42,7 @@ namespace BansheeEngine
 
 		void update(const TEXT_SPRITE_DESC& desc);
 
-		static CM::Vector<CM::Int2>::type getAlignmentOffsets(const CM::TextData& textData, 
+		static CM::Vector<CM::Vector2I>::type getAlignmentOffsets(const CM::TextData& textData, 
 			CM::UINT32 width, CM::UINT32 height, TextHorzAlign horzAlign, TextVertAlign vertAlign);
 
 		/**

+ 6 - 6
BansheeEngine/Source/BsDrawHelper2D.cpp

@@ -1,5 +1,5 @@
 #include "BsDrawHelper2D.h"
-#include "CmFRect.h"
+#include "CmRectF.h"
 #include "CmMesh.h"
 #include "CmTime.h"
 #include "CmVector2.h"
@@ -25,7 +25,7 @@ namespace BansheeEngine
 		mVertexDesc->addVertElem(VET_COLOR, VES_COLOR);
 	}
 
-	void DrawHelper2D::quad(const CM::FRect& area, const MeshDataPtr& meshData, CM::UINT32 vertexOffset, CM::UINT32 indexOffset)
+	void DrawHelper2D::quad(const CM::RectF& area, const MeshDataPtr& meshData, CM::UINT32 vertexOffset, CM::UINT32 indexOffset)
 	{
 		UINT32* indexData = meshData->getIndices32();
 		UINT8* positionData = meshData->getElementData(VES_POSITION);
@@ -66,7 +66,7 @@ namespace BansheeEngine
 	/* 								2D - DRAW	                     		*/
 	/************************************************************************/
 
-	void DrawHelper2D::drawQuad(const HCamera& camera, const CM::FRect& area, const Color& color, DebugDrawCoordType coordType, float timeout)
+	void DrawHelper2D::drawQuad(const HCamera& camera, const CM::RectF& area, const Color& color, DebugDrawCoordType coordType, float timeout)
 	{
 		const Viewport* viewport = camera->getViewport().get();
 
@@ -78,7 +78,7 @@ namespace BansheeEngine
 
 		MeshDataPtr meshData = cm_shared_ptr<MeshData, ScratchAlloc>(4, 6, mVertexDesc);
 
-		FRect actualArea = area;
+		RectF actualArea = area;
 		if(coordType == DebugDrawCoordType::Normalized)
 			actualArea = normalizedCoordToClipSpace(area);
 
@@ -403,9 +403,9 @@ namespace BansheeEngine
 		}
 	}
 
-	FRect DrawHelper2D::normalizedCoordToClipSpace(const FRect& area) const
+	RectF DrawHelper2D::normalizedCoordToClipSpace(const RectF& area) const
 	{
-		FRect clipSpaceRect;
+		RectF clipSpaceRect;
 		clipSpaceRect.x = area.x * 2.0f - 1.0f;
 		clipSpaceRect.width = area.width * 2.0f;
 		clipSpaceRect.y = -area.y * 2.0f + 1.0f;

+ 1 - 1
BansheeEngine/Source/BsDrawHelper3D.cpp

@@ -1,5 +1,5 @@
 #include "BsDrawHelper3D.h"
-#include "CmFRect.h"
+#include "CmRectF.h"
 #include "CmMesh.h"
 #include "CmTime.h"
 #include "CmVector2.h"

+ 1 - 1
BansheeEngine/Source/BsDrawHelperTemplate.cpp

@@ -1,5 +1,5 @@
 #include "BsDrawHelperTemplate.h"
-#include "CmFRect.h"
+#include "CmRectF.h"
 #include "CmMesh.h"
 #include "CmTime.h"
 #include "CmVector2.h"

+ 1 - 1
BansheeEngine/Source/BsGUIArea.cpp

@@ -130,7 +130,7 @@ namespace BansheeEngine
 	{
 		if(!mIsDisabled && isDirty() && (mWidget != nullptr))
 		{
-			Rect clipRect(mLeft, mTop, mWidth, mHeight);
+			RectI clipRect(mLeft, mTop, mWidth, mHeight);
 			mLayout->_updateLayout(mLeft, mTop, mWidth, mHeight, clipRect, mWidget->getDepth(), mDepth);
 			mIsDirty = false;
 		}

+ 17 - 17
BansheeEngine/Source/BsGUIButtonBase.cpp

@@ -140,7 +140,7 @@ namespace BansheeEngine
 		mClippedBounds = mImageSprite->getBounds(mOffset, mClipRect);
 	}
 
-	Int2 GUIButtonBase::_getOptimalSize() const
+	Vector2I GUIButtonBase::_getOptimalSize() const
 	{
 		UINT32 imageWidth = 0;
 		UINT32 imageHeight = 0;
@@ -150,11 +150,11 @@ namespace BansheeEngine
 			imageHeight = mImageDesc.texture->getTexture()->getHeight();
 		}
 
-		Int2 contentSize = GUIHelper::calcOptimalContentsSize(mContent, *mStyle, _getLayoutOptions());
+		Vector2I contentSize = GUIHelper::calcOptimalContentsSize(mContent, *mStyle, _getLayoutOptions());
 		UINT32 contentWidth = std::max(imageWidth, (UINT32)contentSize.x);
 		UINT32 contentHeight = std::max(imageHeight, (UINT32)contentSize.y);
 
-		return Int2(contentWidth, contentHeight);
+		return Vector2I(contentWidth, contentHeight);
 	}
 
 	UINT32 GUIButtonBase::_getRenderElementDepth(UINT32 renderElementIdx) const
@@ -184,18 +184,18 @@ namespace BansheeEngine
 			return;
 		}
 
-		Rect contentBounds = getContentBounds();
-		Rect contentClipRect = getContentClipRect();
-		Rect textBounds = mTextSprite->getBounds(Int2(), Rect());
+		RectI contentBounds = getContentBounds();
+		RectI contentClipRect = getContentClipRect();
+		RectI textBounds = mTextSprite->getBounds(Vector2I(), RectI());
 
-		Int2 textOffset;
-		Rect textClipRect;
+		Vector2I textOffset;
+		RectI textClipRect;
 
-		Int2 imageOffset;
-		Rect imageClipRect;
+		Vector2I imageOffset;
+		RectI imageClipRect;
 		if(mContentImageSprite != nullptr)
 		{
-			Rect imageBounds = mContentImageSprite->getBounds(Int2(), Rect());
+			RectI imageBounds = mContentImageSprite->getBounds(Vector2I(), RectI());
 			UINT32 freeWidth = (UINT32)std::max(0, contentBounds.width - textBounds.width - imageBounds.width);
 			INT32 imageXOffset = (INT32)(freeWidth / 2);
 
@@ -203,11 +203,11 @@ namespace BansheeEngine
 			{
 				INT32 imageReservedWidth = std::max(0, contentBounds.width - textBounds.width);
 
-				textOffset = Int2(contentBounds.x, contentBounds.y);
+				textOffset = Vector2I(contentBounds.x, contentBounds.y);
 				textClipRect = contentClipRect;
 				textClipRect.width = std::min(contentBounds.width - imageReservedWidth, textClipRect.width);
 
-				imageOffset = Int2(contentBounds.x + textBounds.width + imageXOffset, contentBounds.y);
+				imageOffset = Vector2I(contentBounds.x + textBounds.width + imageXOffset, contentBounds.y);
 				imageClipRect = contentClipRect;
 				imageClipRect.x -= textBounds.width + imageXOffset;
 			}
@@ -215,12 +215,12 @@ namespace BansheeEngine
 			{
 				INT32 imageReservedWidth = imageBounds.width + imageXOffset;
 
-				imageOffset = Int2(contentBounds.x + imageXOffset, contentBounds.y);
+				imageOffset = Vector2I(contentBounds.x + imageXOffset, contentBounds.y);
 				imageClipRect = contentClipRect;
 				imageClipRect.x -= imageXOffset;
 				imageClipRect.width = std::min(imageReservedWidth, imageClipRect.width);
 
-				textOffset = Int2(contentBounds.x + imageReservedWidth, contentBounds.y);
+				textOffset = Vector2I(contentBounds.x + imageReservedWidth, contentBounds.y);
 				textClipRect = contentClipRect;
 				textClipRect.x -= imageReservedWidth;
 			}
@@ -231,7 +231,7 @@ namespace BansheeEngine
 		}
 		else
 		{
-			textOffset = Int2(contentBounds.x, contentBounds.y);
+			textOffset = Vector2I(contentBounds.x, contentBounds.y);
 			textClipRect = contentClipRect;
 		}
 
@@ -293,7 +293,7 @@ namespace BansheeEngine
 		textDesc.font = mStyle->font;
 		textDesc.fontSize = mStyle->fontSize;
 
-		Rect textBounds = getContentBounds();
+		RectI textBounds = getContentBounds();
 
 		textDesc.width = textBounds.width;
 		textDesc.height = textBounds.height;

+ 1 - 1
BansheeEngine/Source/BsGUIContextMenu.cpp

@@ -17,7 +17,7 @@ namespace BansheeEngine
 		close();
 	}
 
-	void GUIContextMenu::open(const Int2& position, GUIWidget& widget)
+	void GUIContextMenu::open(const Vector2I& position, GUIWidget& widget)
 	{
 		GUIDropDownAreaPlacement placement = GUIDropDownAreaPlacement::aroundPosition(position);
 

+ 6 - 6
BansheeEngine/Source/BsGUIDropDownBox.cpp

@@ -45,7 +45,7 @@ namespace BansheeEngine
 		return dataEntry;
 	}
 
-	GUIDropDownAreaPlacement GUIDropDownAreaPlacement::aroundPosition(const CM::Int2& position)
+	GUIDropDownAreaPlacement GUIDropDownAreaPlacement::aroundPosition(const CM::Vector2I& position)
 	{
 		GUIDropDownAreaPlacement instance;
 		instance.mType = Type::Position;
@@ -54,7 +54,7 @@ namespace BansheeEngine
 		return instance;
 	}
 
-	GUIDropDownAreaPlacement GUIDropDownAreaPlacement::aroundBoundsVert(const CM::Rect& bounds)
+	GUIDropDownAreaPlacement GUIDropDownAreaPlacement::aroundBoundsVert(const CM::RectI& bounds)
 	{
 		GUIDropDownAreaPlacement instance;
 		instance.mType = Type::BoundsVert;
@@ -63,7 +63,7 @@ namespace BansheeEngine
 		return instance;
 	}
 		
-	GUIDropDownAreaPlacement GUIDropDownAreaPlacement::aroundBoundsHorz(const CM::Rect& bounds)
+	GUIDropDownAreaPlacement GUIDropDownAreaPlacement::aroundBoundsHorz(const CM::RectI& bounds)
 	{
 		GUIDropDownAreaPlacement instance;
 		instance.mType = Type::BoundsHorz;
@@ -107,7 +107,7 @@ namespace BansheeEngine
 
 		mLocalizedEntryNames = dropDownData.localizedNames;
 
-		Rect availableBounds(target->getX(), target->getY(), target->getWidth(), target->getHeight());
+		RectI availableBounds(target->getX(), target->getY(), target->getWidth(), target->getHeight());
 		mRootMenu = cm_new<DropDownSubMenu>(this, placement, availableBounds, dropDownData, type, 0);
 	}
 
@@ -117,14 +117,14 @@ namespace BansheeEngine
 	}
 
 	GUIDropDownBox::DropDownSubMenu::DropDownSubMenu(GUIDropDownBox* owner, const GUIDropDownAreaPlacement& placement, 
-		const Rect& availableBounds, const GUIDropDownData& dropDownData, GUIDropDownType type, UINT32 depthOffset)
+		const RectI& availableBounds, const GUIDropDownData& dropDownData, GUIDropDownType type, UINT32 depthOffset)
 		:mOwner(owner), mPage(0), mBackgroundFrame(nullptr), mBackgroundArea(nullptr), mContentArea(nullptr), 
 		mContentLayout(nullptr), mScrollUpBtn(nullptr), mScrollDownBtn(nullptr), x(0), y(0), width(0), height(0), 
 		mType(type), mSubMenu(nullptr), mData(dropDownData), mOpenedUpward(false), mDepthOffset(depthOffset)
 	{
 		mAvailableBounds = availableBounds;
 
-		Rect dropDownListBounds = placement.getBounds();
+		RectI dropDownListBounds = placement.getBounds();
 		int potentialLeftStart = 0;
 		int potentialRightStart = 0;
 		int potentialTopStart = 0;

+ 14 - 14
BansheeEngine/Source/BsGUIElement.cpp

@@ -81,7 +81,7 @@ namespace BansheeEngine
 		markMeshAsDirty();
 	}
 
-	void GUIElement::_setOffset(const CM::Int2& offset) 
+	void GUIElement::_setOffset(const CM::Vector2I& offset) 
 	{ 
 		if(mOffset != offset)
 		{
@@ -108,7 +108,7 @@ namespace BansheeEngine
 		mHeight = height;
 	}
 
-	void GUIElement::_setClipRect(const CM::Rect& clipRect) 
+	void GUIElement::_setClipRect(const CM::RectI& clipRect) 
 	{ 
 		if(mClipRect != clipRect)
 		{
@@ -135,14 +135,14 @@ namespace BansheeEngine
 		GUIElementBase::_changeParentWidget(widget);
 	}
 
-	Rect GUIElement::getBounds() const
+	RectI GUIElement::getBounds() const
 	{
-		return Rect(mOffset.x, mOffset.y, mWidth, mHeight);
+		return RectI(mOffset.x, mOffset.y, mWidth, mHeight);
 	}
 
-	Rect GUIElement::getVisibleBounds() const
+	RectI GUIElement::getVisibleBounds() const
 	{
-		Rect bounds = _getClippedBounds();
+		RectI bounds = _getClippedBounds();
 		
 		bounds.x += mStyle->margins.left;
 		bounds.y += mStyle->margins.top;
@@ -152,9 +152,9 @@ namespace BansheeEngine
 		return bounds;
 	}
 
-	Rect GUIElement::getContentBounds() const
+	RectI GUIElement::getContentBounds() const
 	{
-		Rect bounds;
+		RectI bounds;
 
 		bounds.x = mOffset.x + mStyle->margins.left + mStyle->contentOffset.left;
 		bounds.y = mOffset.y + mStyle->margins.top + mStyle->contentOffset.top;
@@ -166,13 +166,13 @@ namespace BansheeEngine
 		return bounds;
 	}
 
-	Rect GUIElement::getContentClipRect() const
+	RectI GUIElement::getContentClipRect() const
 	{
-		Rect contentBounds = getContentBounds();
+		RectI contentBounds = getContentBounds();
 		
 		// Transform into element space so we can clip it using the element clip rectangle
-		Int2 offsetDiff = Int2(contentBounds.x - mOffset.x, contentBounds.y - mOffset.y);
-		Rect contentClipRect(offsetDiff.x, offsetDiff.y, contentBounds.width, contentBounds.height);
+		Vector2I offsetDiff = Vector2I(contentBounds.x - mOffset.x, contentBounds.y - mOffset.y);
+		RectI contentClipRect(offsetDiff.x, offsetDiff.y, contentBounds.width, contentBounds.height);
 		contentClipRect.clip(mClipRect);
 
 		// Transform into content sprite space
@@ -182,9 +182,9 @@ namespace BansheeEngine
 		return contentClipRect;
 	}
 
-	bool GUIElement::_isInBounds(const CM::Int2 position) const
+	bool GUIElement::_isInBounds(const CM::Vector2I position) const
 	{
-		Rect contentBounds = getVisibleBounds();
+		RectI contentBounds = getVisibleBounds();
 
 		return contentBounds.contains(position);
 	}

+ 2 - 2
BansheeEngine/Source/BsGUIElementBase.cpp

@@ -88,7 +88,7 @@ namespace BansheeEngine
 		}
 	}
 
-	void GUIElementBase::_updateLayout(INT32 x, INT32 y, UINT32 width, UINT32 height, Rect clipRect, UINT8 widgetDepth, UINT16 areaDepth)
+	void GUIElementBase::_updateLayout(INT32 x, INT32 y, UINT32 width, UINT32 height, RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth)
 	{
 		_updateOptimalLayoutSizes(); // We calculate optimal sizes of all layouts as a pre-processing step, as they are requested often during update
 		_updateLayoutInternal(x, y, width, height, clipRect, widgetDepth, areaDepth);
@@ -102,7 +102,7 @@ namespace BansheeEngine
 		}
 	}
 
-	void GUIElementBase::_updateLayoutInternal(INT32 x, INT32 y, CM::UINT32 width, CM::UINT32 height, Rect clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth)
+	void GUIElementBase::_updateLayoutInternal(INT32 x, INT32 y, CM::UINT32 width, CM::UINT32 height, RectI clipRect, CM::UINT8 widgetDepth, CM::UINT16 areaDepth)
 	{
 		for(auto& child : mChildren)
 		{

+ 5 - 5
BansheeEngine/Source/BsGUIHelper.cpp

@@ -8,9 +8,9 @@ using namespace CamelotFramework;
 
 namespace BansheeEngine
 {
-	Int2 GUIHelper::calcOptimalContentsSize(const GUIContent& content, const GUIElementStyle& style, const GUILayoutOptions& layoutOptions)
+	Vector2I GUIHelper::calcOptimalContentsSize(const GUIContent& content, const GUIElementStyle& style, const GUILayoutOptions& layoutOptions)
 	{
-		Int2 textContentBounds = calcOptimalContentsSize(content.getText(), style, layoutOptions);
+		Vector2I textContentBounds = calcOptimalContentsSize(content.getText(), style, layoutOptions);
 
 		UINT32 contentWidth = style.margins.left + style.margins.right + style.contentOffset.left + style.contentOffset.right;
 		UINT32 contentHeight = style.margins.top + style.margins.bottom + style.contentOffset.top + style.contentOffset.bottom;
@@ -20,10 +20,10 @@ namespace BansheeEngine
 			contentHeight += content.getImage()->getTexture()->getHeight();
 		}
 
-		return Int2(std::max((UINT32)textContentBounds.x, contentWidth), std::max((UINT32)textContentBounds.y, contentHeight));
+		return Vector2I(std::max((UINT32)textContentBounds.x, contentWidth), std::max((UINT32)textContentBounds.y, contentHeight));
 	}
 
-	CM::Int2 GUIHelper::calcOptimalContentsSize(const WString& text, const GUIElementStyle& style, const GUILayoutOptions& layoutOptions)
+	CM::Vector2I GUIHelper::calcOptimalContentsSize(const WString& text, const GUIElementStyle& style, const GUILayoutOptions& layoutOptions)
 	{
 		UINT32 wordWrapWidth = 0;
 
@@ -43,6 +43,6 @@ namespace BansheeEngine
 		contentWidth += textData.getWidth();
 		contentHeight += textData.getHeight();
 
-		return Int2(contentWidth, contentHeight);
+		return Vector2I(contentWidth, contentHeight);
 	}
 }

+ 31 - 31
BansheeEngine/Source/BsGUIInputBox.cpp

@@ -138,7 +138,7 @@ namespace BansheeEngine
 
 		// When text bounds are reduced the scroll needs to be adjusted so that
 		// input box isn't filled with mostly empty space.
-		clampScrollToBounds(mTextSprite->getBounds(mOffset, Rect()));
+		clampScrollToBounds(mTextSprite->getBounds(mOffset, RectI()));
 
 		GUIElement::updateRenderElementsInternal();
 	}
@@ -199,7 +199,7 @@ namespace BansheeEngine
 		return nullptr;
 	}
 
-	Int2 GUIInputBox::renderElemToOffset(UINT32 renderElemIdx) const
+	Vector2I GUIInputBox::renderElemToOffset(UINT32 renderElemIdx) const
 	{
 		UINT32 oldNumElements = 0;
 		UINT32 newNumElements = oldNumElements + mTextSprite->getNumRenderElements();
@@ -237,10 +237,10 @@ namespace BansheeEngine
 			}
 		}
 
-		return Int2();
+		return Vector2I();
 	}
 
-	Rect GUIInputBox::renderElemToClipRect(UINT32 renderElemIdx) const
+	RectI GUIInputBox::renderElemToClipRect(UINT32 renderElemIdx) const
 	{
 		UINT32 oldNumElements = 0;
 		UINT32 newNumElements = oldNumElements + mTextSprite->getNumRenderElements();
@@ -280,10 +280,10 @@ namespace BansheeEngine
 			}
 		}
 
-		return Rect();
+		return RectI();
 	}
 
-	Int2 GUIInputBox::_getOptimalSize() const
+	Vector2I GUIInputBox::_getOptimalSize() const
 	{
 		UINT32 imageWidth = 0;
 		UINT32 imageHeight = 0;
@@ -293,21 +293,21 @@ namespace BansheeEngine
 			imageHeight = mImageDesc.texture->getTexture()->getHeight();
 		}
 
-		Int2 contentSize = GUIHelper::calcOptimalContentsSize(mText, *mStyle, _getLayoutOptions());
+		Vector2I contentSize = GUIHelper::calcOptimalContentsSize(mText, *mStyle, _getLayoutOptions());
 		UINT32 contentWidth = std::max(imageWidth, (UINT32)contentSize.x);
 		UINT32 contentHeight = std::max(imageHeight, (UINT32)contentSize.y);
 
-		return Int2(contentWidth, contentHeight);
+		return Vector2I(contentWidth, contentHeight);
 	}
 
-	CM::Int2 GUIInputBox::_getTextInputOffset() const
+	CM::Vector2I GUIInputBox::_getTextInputOffset() const
 	{
 		return mTextOffset;	
 	}
 
-	CM::Rect GUIInputBox::_getTextInputRect() const
+	CM::RectI GUIInputBox::_getTextInputRect() const
 	{
-		Rect textBounds = getContentBounds();
+		RectI textBounds = getContentBounds();
 		textBounds.x -= mOffset.x;
 		textBounds.y -= mOffset.y;
 
@@ -334,8 +334,8 @@ namespace BansheeEngine
 	{
 		UINT32 localRenderElementIdx;
 		Sprite* sprite = renderElemToSprite(renderElementIdx, localRenderElementIdx);
-		Int2 offset = renderElemToOffset(renderElementIdx);
-		Rect clipRect = renderElemToClipRect(renderElementIdx);
+		Vector2I offset = renderElemToOffset(renderElementIdx);
+		RectI clipRect = renderElemToClipRect(renderElementIdx);
 
 		sprite->fillBuffer(vertices, uv, indices, startingQuad, maxNumQuads, vertexStride, indexStride, localRenderElementIdx, offset, clipRect);
 	}
@@ -727,7 +727,7 @@ namespace BansheeEngine
 		mCaretShown = true;
 
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
-		Int2 offset = getTextOffset();
+		Vector2I offset = getTextOffset();
 		gGUIManager().getInputCaretTool()->updateText(this, textDesc);
 		markContentAsDirty();
 	}
@@ -742,7 +742,7 @@ namespace BansheeEngine
 	void GUIInputBox::showSelection(CM::UINT32 anchorCaretPos)
 	{
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
-		Int2 offset = getTextOffset();
+		Vector2I offset = getTextOffset();
 		gGUIManager().getInputSelectionTool()->updateText(this, textDesc);
 
 		gGUIManager().getInputSelectionTool()->showSelection(anchorCaretPos);
@@ -761,8 +761,8 @@ namespace BansheeEngine
 	{
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
 
-		Int2 textOffset = getTextOffset();
-		Int2 caretPos = gGUIManager().getInputCaretTool()->getCaretPosition(textOffset);
+		Vector2I textOffset = getTextOffset();
+		Vector2I caretPos = gGUIManager().getInputCaretTool()->getCaretPosition(textOffset);
 		UINT32 caretHeight = gGUIManager().getInputCaretTool()->getCaretHeight();
 		UINT32 caretWidth = 1;
 		INT32 caretRight = caretPos.x + (INT32)caretWidth;
@@ -775,7 +775,7 @@ namespace BansheeEngine
 		INT32 top = textOffset.y - mTextOffset.y;
 		INT32 bottom = top + (INT32)textDesc.height;
 
-		Int2 offset;
+		Vector2I offset;
 		if(caretPos.x < left)
 		{
 			offset.x = left - caretPos.x;
@@ -802,11 +802,11 @@ namespace BansheeEngine
 		markContentAsDirty();
 	}
 
-	void GUIInputBox::clampScrollToBounds(Rect unclippedTextBounds)
+	void GUIInputBox::clampScrollToBounds(RectI unclippedTextBounds)
 	{
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
 
-		Int2 newTextOffset;
+		Vector2I newTextOffset;
 		INT32 maxScrollableWidth = std::max(0, (INT32)unclippedTextBounds.width - (INT32)textDesc.width);
 		INT32 maxScrollableHeight = std::max(0, (INT32)unclippedTextBounds.height - (INT32)textDesc.height);
 		newTextOffset.x = Math::clamp(mTextOffset.x, -maxScrollableWidth, 0);
@@ -828,7 +828,7 @@ namespace BansheeEngine
 		mText.insert(mText.begin() + charIdx, string.begin(), string.end());
 
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
-		Int2 offset = getTextOffset();
+		Vector2I offset = getTextOffset();
 
 		gGUIManager().getInputCaretTool()->updateText(this, textDesc);
 		gGUIManager().getInputSelectionTool()->updateText(this, textDesc);
@@ -839,7 +839,7 @@ namespace BansheeEngine
 		mText.insert(mText.begin() + charIdx, charCode);
 
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
-		Int2 offset = getTextOffset();
+		Vector2I offset = getTextOffset();
 
 		gGUIManager().getInputCaretTool()->updateText(this, textDesc);
 		gGUIManager().getInputSelectionTool()->updateText(this, textDesc);
@@ -850,7 +850,7 @@ namespace BansheeEngine
 		mText.erase(charIdx, 1);
 
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
-		Int2 offset = getTextOffset();
+		Vector2I offset = getTextOffset();
 
 		gGUIManager().getInputCaretTool()->updateText(this, textDesc);
 		gGUIManager().getInputSelectionTool()->updateText(this, textDesc);
@@ -862,7 +862,7 @@ namespace BansheeEngine
 		mText.erase(mText.begin() + selStart, mText.begin() + gGUIManager().getInputSelectionTool()->getSelectionEnd());
 
 		TEXT_SPRITE_DESC textDesc = getTextDesc();
-		Int2 offset = getTextOffset();
+		Vector2I offset = getTextOffset();
 		gGUIManager().getInputCaretTool()->updateText(this, textDesc);
 		gGUIManager().getInputSelectionTool()->updateText(this, textDesc);
 
@@ -890,16 +890,16 @@ namespace BansheeEngine
 		mText.erase(mText.begin() + selStart, mText.begin() + gGUIManager().getInputSelectionTool()->getSelectionEnd());
 	}
 
-	CM::Int2 GUIInputBox::getTextOffset() const
+	CM::Vector2I GUIInputBox::getTextOffset() const
 	{
-		Rect textBounds = getContentBounds();
-		return Int2(textBounds.x, textBounds.y) + mTextOffset;
+		RectI textBounds = getContentBounds();
+		return Vector2I(textBounds.x, textBounds.y) + mTextOffset;
 	}
 
-	CM::Rect GUIInputBox::getTextClipRect() const
+	CM::RectI GUIInputBox::getTextClipRect() const
 	{
-		Rect contentClipRect = getContentClipRect();
-		return Rect(contentClipRect.x - mTextOffset.x, contentClipRect.y - mTextOffset.y, contentClipRect.width, contentClipRect.height);
+		RectI contentClipRect = getContentClipRect();
+		return RectI(contentClipRect.x - mTextOffset.x, contentClipRect.y - mTextOffset.y, contentClipRect.width, contentClipRect.height);
 	}
 
 	TEXT_SPRITE_DESC GUIInputBox::getTextDesc() const
@@ -909,7 +909,7 @@ namespace BansheeEngine
 		textDesc.font = mStyle->font;
 		textDesc.fontSize = mStyle->fontSize;
 
-		Rect textBounds = getContentBounds();
+		RectI textBounds = getContentBounds();
 		textDesc.width = textBounds.width;
 		textDesc.height = textBounds.height;
 		textDesc.horzAlign = mStyle->textHorzAlign;

+ 14 - 14
BansheeEngine/Source/BsGUIInputCaret.cpp

@@ -19,19 +19,19 @@ namespace BansheeEngine
 		cm_delete<PoolAlloc>(mCaretSprite);
 	}
 
-	Int2 GUIInputCaret::getSpriteOffset() const
+	Vector2I GUIInputCaret::getSpriteOffset() const
 	{
 		return getCaretPosition(getTextOffset());
 	}
 
-	Rect GUIInputCaret::getSpriteClipRect(const CM::Rect& parentClipRect) const
+	RectI GUIInputCaret::getSpriteClipRect(const CM::RectI& parentClipRect) const
 	{
-		Int2 clipOffset = getSpriteOffset() - mElement->_getOffset() - 
-			Int2(mElement->_getTextInputRect().x, mElement->_getTextInputRect().y);
+		Vector2I clipOffset = getSpriteOffset() - mElement->_getOffset() - 
+			Vector2I(mElement->_getTextInputRect().x, mElement->_getTextInputRect().y);
 
-		Rect clipRect(-clipOffset.x, -clipOffset.y, mTextDesc.width, mTextDesc.height);
+		RectI clipRect(-clipOffset.x, -clipOffset.y, mTextDesc.width, mTextDesc.height);
 
-		Rect localParentCliprect = parentClipRect;
+		RectI localParentCliprect = parentClipRect;
 
 		// Move parent rect to our space
 		localParentCliprect.x += mElement->_getTextInputOffset().x + clipRect.x;
@@ -97,7 +97,7 @@ namespace BansheeEngine
 			return;
 		}
 
-		Int2 caretCoords = getCaretPosition(mElement->_getTextInputOffset());
+		Vector2I caretCoords = getCaretPosition(mElement->_getTextInputOffset());
 		caretCoords.y -= getCaretHeight();
 
 		moveCaretToPos(caretCoords);
@@ -122,19 +122,19 @@ namespace BansheeEngine
 			return;
 		}
 
-		Int2 caretCoords = getCaretPosition(mElement->_getTextInputOffset());
+		Vector2I caretCoords = getCaretPosition(mElement->_getTextInputOffset());
 		caretCoords.y += getCaretHeight();
 
 		moveCaretToPos(caretCoords);
 	}
 
-	void GUIInputCaret::moveCaretToPos(const CM::Int2& pos)
+	void GUIInputCaret::moveCaretToPos(const CM::Vector2I& pos)
 	{
 		INT32 charIdx = getCharIdxAtPos(pos);
 
 		if(charIdx != -1)
 		{
-			Rect charRect = getCharRect(charIdx);
+			RectI charRect = getCharRect(charIdx);
 
 			float xCenter = charRect.x + charRect.width * 0.5f;
 			if(pos.x <= xCenter)
@@ -224,7 +224,7 @@ namespace BansheeEngine
 		return getCharIdxAtInputIdx(mCaretPos);
 	}
 
-	Int2 GUIInputCaret::getCaretPosition(const CM::Int2& offset) const
+	Vector2I GUIInputCaret::getCaretPosition(const CM::Vector2I& offset) const
 	{
 		if(mTextDesc.text.size() > 0)
 		{
@@ -237,7 +237,7 @@ namespace BansheeEngine
 				if(mCaretPos == curPos)
 				{
 					// Caret is on line start
-					return Int2(offset.x, lineDesc.getLineYStart() + getTextOffset().y);
+					return Vector2I(offset.x, lineDesc.getLineYStart() + getTextOffset().y);
 				}
 
 				curPos += lineDesc.getEndChar(false) - lineDesc.getStartChar() + 1; // + 1 for special line start position
@@ -249,11 +249,11 @@ namespace BansheeEngine
 
 			charIdx = std::min((UINT32)(mTextDesc.text.size() - 1), charIdx);
 
-			Rect charRect = getCharRect(charIdx);
+			RectI charRect = getCharRect(charIdx);
 			UINT32 lineIdx = getLineForChar(charIdx);
 			UINT32 yOffset = getLineDesc(lineIdx).getLineYStart() + getTextOffset().y;
 
-			return Int2(charRect.x + charRect.width, yOffset);
+			return Vector2I(charRect.x + charRect.width, yOffset);
 		}
 		else
 		{

+ 18 - 18
BansheeEngine/Source/BsGUIInputSelection.cpp

@@ -52,19 +52,19 @@ namespace BansheeEngine
 		}
 	}
 
-	Int2 GUIInputSelection::getSelectionSpriteOffset(UINT32 spriteIdx) const
+	Vector2I GUIInputSelection::getSelectionSpriteOffset(UINT32 spriteIdx) const
 	{
-		return Int2(mSelectionRects[spriteIdx].x, mSelectionRects[spriteIdx].y) + getTextOffset();
+		return Vector2I(mSelectionRects[spriteIdx].x, mSelectionRects[spriteIdx].y) + getTextOffset();
 	}
 
-	Rect GUIInputSelection::getSelectionSpriteClipRect(UINT32 spriteIdx, const CM::Rect& parentClipRect) const
+	RectI GUIInputSelection::getSelectionSpriteClipRect(UINT32 spriteIdx, const CM::RectI& parentClipRect) const
 	{
-		Int2 selectionOffset(mSelectionRects[spriteIdx].x, mSelectionRects[spriteIdx].y);
-		Int2 clipOffset = selectionOffset + mElement->_getTextInputOffset();
+		Vector2I selectionOffset(mSelectionRects[spriteIdx].x, mSelectionRects[spriteIdx].y);
+		Vector2I clipOffset = selectionOffset + mElement->_getTextInputOffset();
 
-		Rect clipRect(-clipOffset.x, -clipOffset.y, mTextDesc.width, mTextDesc.height);
+		RectI clipRect(-clipOffset.x, -clipOffset.y, mTextDesc.width, mTextDesc.height);
 
-		Rect localParentCliprect = parentClipRect;
+		RectI localParentCliprect = parentClipRect;
 
 		// Move parent rect to our space
 		localParentCliprect.x += mElement->_getTextInputOffset().x + clipRect.x;
@@ -79,9 +79,9 @@ namespace BansheeEngine
 		return clipRect;
 	}
 
-	Vector<Rect>::type GUIInputSelection::getSelectionRects() const
+	Vector<RectI>::type GUIInputSelection::getSelectionRects() const
 	{
-		Vector<Rect>::type selectionRects;
+		Vector<RectI>::type selectionRects;
 
 		if(mSelectionStart == mSelectionEnd)
 			return selectionRects;
@@ -107,10 +107,10 @@ namespace BansheeEngine
 
 			if(!isNewlineChar(startCharIdx) && !isNewlineChar(endCharIdx))
 			{
-				Rect startChar = getLocalCharRect(startCharIdx);
-				Rect endChar = getLocalCharRect(endCharIdx);
+				RectI startChar = getLocalCharRect(startCharIdx);
+				RectI endChar = getLocalCharRect(endCharIdx);
 
-				Rect selectionRect;
+				RectI selectionRect;
 				selectionRect.x = startChar.x;
 				selectionRect.y = lineDesc.getLineYStart();
 				selectionRect.height = lineDesc.getLineHeight();
@@ -130,10 +130,10 @@ namespace BansheeEngine
 			if(endCharIdx > 0)
 				endCharIdx = endCharIdx - 1;
 
-			Rect startChar = getLocalCharRect(lineDesc.getStartChar());
-			Rect endChar = getLocalCharRect(endCharIdx);
+			RectI startChar = getLocalCharRect(lineDesc.getStartChar());
+			RectI endChar = getLocalCharRect(endCharIdx);
 
-			Rect selectionRect;
+			RectI selectionRect;
 			selectionRect.x = startChar.x;
 			selectionRect.y = lineDesc.getLineYStart();
 			selectionRect.height = lineDesc.getLineHeight();
@@ -152,10 +152,10 @@ namespace BansheeEngine
 
 				if(!isNewlineChar(endCharIdx))
 				{
-					Rect startChar = getLocalCharRect(lineDesc.getStartChar());
-					Rect endChar = getLocalCharRect(endCharIdx);
+					RectI startChar = getLocalCharRect(lineDesc.getStartChar());
+					RectI endChar = getLocalCharRect(endCharIdx);
 
-					Rect selectionRect;
+					RectI selectionRect;
 					selectionRect.x = startChar.x;
 					selectionRect.y = lineDesc.getLineYStart();
 					selectionRect.height = lineDesc.getLineHeight();

+ 11 - 11
BansheeEngine/Source/BsGUIInputTool.cpp

@@ -45,7 +45,7 @@ namespace BansheeEngine
 		// Store cached line data
 		UINT32 curCharIdx = 0;
 		UINT32 curLineIdx = 0;
-		Vector<Int2>::type alignmentOffsets = TextSprite::getAlignmentOffsets(textData, mTextDesc.width, 
+		Vector<Vector2I>::type alignmentOffsets = TextSprite::getAlignmentOffsets(textData, mTextDesc.width, 
 			mTextDesc.height, mTextDesc.horzAlign, mTextDesc.vertAlign);
 
 		for(UINT32 i = 0; i < numLines; i++)
@@ -68,15 +68,15 @@ namespace BansheeEngine
 		}
 	}
 
-	Int2 GUIInputTool::getTextOffset() const
+	Vector2I GUIInputTool::getTextOffset() const
 	{
-		return mElement->_getOffset() + mElement->_getTextInputOffset() + Int2(mElement->_getTextInputRect().x, mElement->_getTextInputRect().y);
+		return mElement->_getOffset() + mElement->_getTextInputOffset() + Vector2I(mElement->_getTextInputRect().x, mElement->_getTextInputRect().y);
 	}
 
-	Rect GUIInputTool::getCharRect(UINT32 charIdx) const
+	RectI GUIInputTool::getCharRect(UINT32 charIdx) const
 	{
-		Rect charRect = getLocalCharRect(charIdx);
-		Int2 textOffset = getTextOffset();
+		RectI charRect = getLocalCharRect(charIdx);
+		Vector2I textOffset = getTextOffset();
 
 		charRect.x += textOffset.x;
 		charRect.y += textOffset.y;
@@ -84,14 +84,14 @@ namespace BansheeEngine
 		return charRect;
 	}
 
-	Rect GUIInputTool::getLocalCharRect(UINT32 charIdx) const
+	RectI GUIInputTool::getLocalCharRect(UINT32 charIdx) const
 	{
 		UINT32 lineIdx = getLineForChar(charIdx);
 
 		// If char is newline we don't have any geometry to return
 		const GUIInputLineDesc& lineDesc = getLineDesc(lineIdx);
 		if(lineDesc.isNewline(charIdx))
-			return Rect();
+			return RectI();
 
 		UINT32 numNewlineChars = 0;
 		for(UINT32 i = 0; i < lineIdx; i++)
@@ -102,7 +102,7 @@ namespace BansheeEngine
 		{
 			UINT32 vertIdx = quadIdx * 4;
 
-			Rect charRect;
+			RectI charRect;
 			charRect.x = Math::roundToInt(mQuads[vertIdx + 0].x);
 			charRect.y = Math::roundToInt(mQuads[vertIdx + 0].y);
 			charRect.width = Math::roundToInt(mQuads[vertIdx + 3].x - charRect.x);
@@ -114,7 +114,7 @@ namespace BansheeEngine
 		CM_EXCEPT(InternalErrorException, "Invalid character index: " + toString(charIdx));
 	}
 
-	INT32 GUIInputTool::getCharIdxAtPos(const Int2& pos) const
+	INT32 GUIInputTool::getCharIdxAtPos(const Vector2I& pos) const
 	{
 		Vector2 vecPos((float)pos.x, (float)pos.y);
 
@@ -146,7 +146,7 @@ namespace BansheeEngine
 		UINT32 nearestChar = 0;
 		bool foundChar = false;
 
-		Int2 textOffset = getTextOffset();
+		Vector2I textOffset = getTextOffset();
 		for(UINT32 i = lineStartQuad; i < lineEndQuad; i++)
 		{
 			UINT32 curVert = i * 4;

+ 1 - 1
BansheeEngine/Source/BsGUILabel.cpp

@@ -62,7 +62,7 @@ namespace BansheeEngine
 		mClippedBounds = mTextSprite->getBounds(mOffset, mClipRect);
 	}
 
-	Int2 GUILabel::_getOptimalSize() const
+	Vector2I GUILabel::_getOptimalSize() const
 	{
 		return GUIHelper::calcOptimalContentsSize(mContent, *mStyle, _getLayoutOptions());
 	}

+ 7 - 7
BansheeEngine/Source/BsGUILayoutX.cpp

@@ -2,7 +2,7 @@
 #include "BsGUIElement.h"
 #include "BsGUISpace.h"
 #include "CmMath.h"
-#include "CmInt2.h"
+#include "CmVector2I.h"
 
 using namespace CamelotFramework;
 
@@ -35,7 +35,7 @@ namespace BansheeEngine
 				GUIElement* element = static_cast<GUIElement*>(child);
 				const GUILayoutOptions& layoutOptions = element->_getLayoutOptions();
 
-				Int2 optimalSize;
+				Vector2I optimalSize;
 				if(!layoutOptions.fixedWidth || !layoutOptions.fixedHeight)
 					optimalSize = child->_getOptimalSize();
 
@@ -82,7 +82,7 @@ namespace BansheeEngine
 		}
 	}
 
-	void GUILayoutX::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height, Rect clipRect, UINT8 widgetDepth, UINT16 areaDepth)
+	void GUILayoutX::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height, RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth)
 	{
 		UINT32 totalOptimalSize = _getOptimalSize().x;
 		UINT32 totalNonClampedSize = 0;
@@ -367,15 +367,15 @@ namespace BansheeEngine
 				INT32 yOffset = Math::ceilToInt(((INT32)height - (INT32)element->_getHeight()) * 0.5f);
 				yOffset = std::max(0, yOffset);
 
-				Int2 offset(x + xOffset, y + yOffset);
+				Vector2I offset(x + xOffset, y + yOffset);
 				element->_setOffset(offset);
 				element->_setWidgetDepth(widgetDepth);
 				element->_setAreaDepth(areaDepth);
 
-				Rect elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
+				RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
 				element->_setClipRect(elemClipRect);
 
-				Rect newClipRect(offset.x, offset.y, elemWidth, elemHeight);
+				RectI newClipRect(offset.x, offset.y, elemWidth, elemHeight);
 				element->_updateLayoutInternal(offset.x, offset.y, elemWidth, elemHeight, newClipRect, widgetDepth, areaDepth);
 
 				mActualHeight = std::max(mActualHeight, elemHeight);
@@ -384,7 +384,7 @@ namespace BansheeEngine
 			{
 				GUILayout* layout = static_cast<GUILayout*>(child);
 
-				Rect newClipRect(x + xOffset, y, elemWidth, height);
+				RectI newClipRect(x + xOffset, y, elemWidth, height);
 				newClipRect.clip(clipRect);
 				layout->_updateLayoutInternal(x + xOffset, y, elemWidth, height, newClipRect, widgetDepth, areaDepth);
 

+ 7 - 7
BansheeEngine/Source/BsGUILayoutY.cpp

@@ -2,7 +2,7 @@
 #include "BsGUIElement.h"
 #include "BsGUISpace.h"
 #include "CmMath.h"
-#include "CmInt2.h"
+#include "CmVector2I.h"
 
 using namespace CamelotFramework;
 
@@ -35,7 +35,7 @@ namespace BansheeEngine
 				GUIElement* element = static_cast<GUIElement*>(child);
 				const GUILayoutOptions& layoutOptions = element->_getLayoutOptions();
 
-				Int2 optimalSize;
+				Vector2I optimalSize;
 				if(!layoutOptions.fixedWidth || !layoutOptions.fixedHeight)
 					optimalSize = child->_getOptimalSize();
 
@@ -83,7 +83,7 @@ namespace BansheeEngine
 		}
 	}
 
-	void GUILayoutY::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height, Rect clipRect, UINT8 widgetDepth, UINT16 areaDepth)
+	void GUILayoutY::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height, RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth)
 	{
 		UINT32 totalOptimalSize = _getOptimalSize().y;
 		UINT32 totalNonClampedSize = 0;
@@ -360,15 +360,15 @@ namespace BansheeEngine
 				INT32 xOffset = Math::ceilToInt((INT32)(width - (INT32)element->_getWidth()) * 0.5f);
 				xOffset = std::max(0, xOffset);
 
-				Int2 offset(x + xOffset, y + yOffset);
+				Vector2I offset(x + xOffset, y + yOffset);
 				element->_setOffset(offset);
 				element->_setWidgetDepth(widgetDepth);
 				element->_setAreaDepth(areaDepth);
 
-				Rect elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
+				RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
 				element->_setClipRect(elemClipRect);
 
-				Rect newClipRect(offset.x, offset.y, elemWidth, elemHeight);
+				RectI newClipRect(offset.x, offset.y, elemWidth, elemHeight);
 				element->_updateLayoutInternal(offset.x, offset.y, elemWidth, elemHeight, newClipRect, widgetDepth, areaDepth);
 
 				mActualWidth = std::max(mActualWidth, elemWidth);
@@ -377,7 +377,7 @@ namespace BansheeEngine
 			{
 				GUILayout* layout = static_cast<GUILayout*>(child);
 
-				Rect newClipRect(x, y + yOffset, width, elemHeight);
+				RectI newClipRect(x, y + yOffset, width, elemHeight);
 				newClipRect.clip(clipRect);
 				layout->_updateLayoutInternal(x, y + yOffset, width, elemHeight, newClipRect, widgetDepth, areaDepth);
 

+ 23 - 23
BansheeEngine/Source/BsGUIManager.cpp

@@ -12,7 +12,7 @@
 #include "CmUtil.h"
 #include "CmRenderWindowManager.h"
 #include "CmPlatform.h"
-#include "CmRect.h"
+#include "CmRectI.h"
 #include "CmApplication.h"
 #include "CmException.h"
 #include "CmInput.h"
@@ -53,7 +53,7 @@ namespace BansheeEngine
 		GUIMaterialInfo matInfo;
 		UINT32 numQuads;
 		UINT32 depth;
-		Rect bounds;
+		RectI bounds;
 		Vector<GUIGroupElement>::type elements;
 	};
 
@@ -358,7 +358,7 @@ namespace BansheeEngine
 				UINT32 renderElemIdx = elem.renderElement;
 				UINT32 elemDepth = guiElem->_getRenderElementDepth(renderElemIdx);
 
-				Rect tfrmedBounds = guiElem->_getClippedBounds();
+				RectI tfrmedBounds = guiElem->_getClippedBounds();
 				tfrmedBounds.transform(guiElem->_getParentWidget().SO()->getWorldTfrm());
 
 				const GUIMaterialInfo& matInfo = guiElem->getMaterial(renderElemIdx);
@@ -575,7 +575,7 @@ namespace BansheeEngine
 		{
 			if(mElementUnderCursor != nullptr)
 			{
-				mMouseEvent.setDragAndDropDroppedData(mElementUnderCursor, Int2(), DragAndDropManager::instance().getDragTypeId(), DragAndDropManager::instance().getDragData());
+				mMouseEvent.setDragAndDropDroppedData(mElementUnderCursor, Vector2I(), DragAndDropManager::instance().getDragTypeId(), DragAndDropManager::instance().getDragData());
 				bool processed = sendMouseEvent(mWidgetUnderCursor, mElementUnderCursor, mMouseEvent);
 
 				return processed;
@@ -598,7 +598,7 @@ namespace BansheeEngine
 		if(findElementUnderCursor(event.screenPos, buttonStates, event.shift, event.control, event.alt))
 			event.markAsUsed();
 
-		Int2 localPos;
+		Vector2I localPos;
 		
 		if(mWidgetUnderCursor != nullptr)
 			localPos = getWidgetRelativePos(*mWidgetUnderCursor, event.screenPos);
@@ -620,7 +620,7 @@ namespace BansheeEngine
 		// If mouse is being held down send MouseDrag events
 		if(mActiveElement != nullptr && mDragState == DragState::Dragging)
 		{
-			Int2 curLocalPos = getWidgetRelativePos(*mActiveWidget, event.screenPos);
+			Vector2I curLocalPos = getWidgetRelativePos(*mActiveWidget, event.screenPos);
 
 			if(mLastCursorLocalPos != curLocalPos)
 			{
@@ -681,7 +681,7 @@ namespace BansheeEngine
 
 		mMouseEvent = GUIMouseEvent(buttonStates, event.shift, event.control, event.alt);
 
-		Int2 localPos;
+		Vector2I localPos;
 		if(mWidgetUnderCursor != nullptr)
 		{
 			localPos = getWidgetRelativePos(*mWidgetUnderCursor, event.screenPos);
@@ -749,7 +749,7 @@ namespace BansheeEngine
 		bool acceptMouseDown = mActiveElement == nullptr && mElementUnderCursor != nullptr;
 		if(acceptMouseDown)
 		{
-			Int2 localPos = getWidgetRelativePos(*mWidgetUnderCursor, event.screenPos);
+			Vector2I localPos = getWidgetRelativePos(*mWidgetUnderCursor, event.screenPos);
 
 			mMouseEvent.setMouseDownData(mElementUnderCursor, localPos, guiButton);
 			if(sendMouseEvent(mWidgetUnderCursor, mElementUnderCursor, mMouseEvent))
@@ -787,7 +787,7 @@ namespace BansheeEngine
 			if(menu != nullptr)
 			{
 				const RenderWindow* window = getWidgetWindow(*mWidgetUnderCursor);
-				Int2 windowPos = window->screenToWindowPos(event.screenPos);
+				Vector2I windowPos = window->screenToWindowPos(event.screenPos);
 
 				menu->open(windowPos, *mWidgetUnderCursor);
 				event.markAsUsed();
@@ -816,7 +816,7 @@ namespace BansheeEngine
 		bool acceptMouseDown = mElementUnderCursor != nullptr;
 		if(acceptMouseDown)
 		{
-			Int2 localPos = getWidgetRelativePos(*mWidgetUnderCursor, event.screenPos);
+			Vector2I localPos = getWidgetRelativePos(*mWidgetUnderCursor, event.screenPos);
 
 			mMouseEvent.setMouseDoubleClickData(mElementUnderCursor, localPos, guiButton);
 			if(sendMouseEvent(mWidgetUnderCursor, mElementUnderCursor, mMouseEvent))
@@ -895,7 +895,7 @@ namespace BansheeEngine
 		sendCommandEvent(mKeyboardFocusWidget, mKeyboardFocusElement, mCommandEvent);
 	}
 
-	bool GUIManager::findElementUnderCursor(const CM::Int2& cursorScreenPos, bool buttonStates[3], bool shift, bool control, bool alt)
+	bool GUIManager::findElementUnderCursor(const CM::Vector2I& cursorScreenPos, bool buttonStates[3], bool shift, bool control, bool alt)
 	{
 		Vector<const RenderWindow*>::type widgetWindows;
 		for(auto& widgetInfo : mWidgets)
@@ -944,7 +944,7 @@ namespace BansheeEngine
 
 		if(windowUnderCursor != nullptr)
 		{
-			Int2 windowPos = windowUnderCursor->screenToWindowPos(cursorScreenPos);
+			Vector2I windowPos = windowUnderCursor->screenToWindowPos(cursorScreenPos);
 			Vector4 vecWindowPos((float)windowPos.x, (float)windowPos.y, 0.0f, 1.0f);
 
 			UINT32 topMostDepth = std::numeric_limits<UINT32>::max();
@@ -974,7 +974,7 @@ namespace BansheeEngine
 							selectiveInputData = &selectionIterFind->second;
 					}
 
-					Int2 localPos = getWidgetRelativePos(*widget, cursorScreenPos);
+					Vector2I localPos = getWidgetRelativePos(*widget, cursorScreenPos);
 
 					Vector<GUIElement*>::type sortedElements = widget->getElements();
 					std::sort(sortedElements.begin(), sortedElements.end(), 
@@ -1012,12 +1012,12 @@ namespace BansheeEngine
 		return handleCursorOver(cursorOverWidget, cursorOverElement, cursorScreenPos, buttonStates, shift, control, alt);
 	}
 
-	bool GUIManager::handleCursorOver(GUIWidget* widget, GUIElement* element, const CM::Int2& screenPos,
+	bool GUIManager::handleCursorOver(GUIWidget* widget, GUIElement* element, const CM::Vector2I& screenPos,
 		bool buttonStates[3], bool shift, bool control, bool alt)
 	{
 		bool eventProcessed = false;
 
-		Int2 localPos;
+		Vector2I localPos;
 		if(widget != nullptr)
 			localPos = getWidgetRelativePos(*widget, screenPos);
 
@@ -1032,7 +1032,7 @@ namespace BansheeEngine
 				// Send MouseOut event
 				if(mActiveElement == nullptr || mElementUnderCursor == mActiveElement)
 				{
-					Int2 curLocalPos = getWidgetRelativePos(*mWidgetUnderCursor, screenPos);
+					Vector2I curLocalPos = getWidgetRelativePos(*mWidgetUnderCursor, screenPos);
 
 					mMouseEvent.setMouseOutData(element, curLocalPos);
 					if(sendMouseEvent(mWidgetUnderCursor, mElementUnderCursor, mMouseEvent))
@@ -1099,7 +1099,7 @@ namespace BansheeEngine
 		buttonStates[1] = false;
 		buttonStates[2] = false;
 
-		handleCursorOver(nullptr, nullptr, Int2(), buttonStates, false, false, false);
+		handleCursorOver(nullptr, nullptr, Vector2I(), buttonStates, false, false, false);
 	}
 
 	void GUIManager::queueForDestroy(GUIElement* element)
@@ -1171,21 +1171,21 @@ namespace BansheeEngine
 		CM_EXCEPT(InvalidParametersException, "Provided button is not a GUI supported mouse button.");
 	}
 
-	Int2 GUIManager::getWidgetRelativePos(const GUIWidget& widget, const Int2& screenPos) const
+	Vector2I GUIManager::getWidgetRelativePos(const GUIWidget& widget, const Vector2I& screenPos) const
 	{
 		const RenderWindow* window = getWidgetWindow(widget);
-		Int2 windowPos = window->screenToWindowPos(screenPos);
+		Vector2I windowPos = window->screenToWindowPos(screenPos);
 		windowPos = windowToBridgedCoords(widget, windowPos);
 
 		const Matrix4& worldTfrm = widget.SO()->getWorldTfrm();
 
 		Vector4 vecLocalPos = worldTfrm.inverse().transform3x4(Vector4((float)windowPos.x, (float)windowPos.y, 0.0f, 1.0f));
-		Int2 curLocalPos(Math::roundToInt(vecLocalPos.x), Math::roundToInt(vecLocalPos.y));
+		Vector2I curLocalPos(Math::roundToInt(vecLocalPos.x), Math::roundToInt(vecLocalPos.y));
 
 		return curLocalPos;
 	}
 
-	Int2 GUIManager::windowToBridgedCoords(const GUIWidget& widget, const Int2& windowPos) const
+	Vector2I GUIManager::windowToBridgedCoords(const GUIWidget& widget, const Vector2I& windowPos) const
 	{
 		// This cast might not be valid (the render target could be a window), but we only really need to cast
 		// so that mInputBridge map allows us to search through it - we don't access anything unless the target is bridged
@@ -1200,7 +1200,7 @@ namespace BansheeEngine
 			const Matrix4& worldTfrm = bridgeElement->_getParentWidget().SO()->getWorldTfrm();
 
 			Vector4 vecLocalPos = worldTfrm.inverse().transform3x4(Vector4((float)windowPos.x, (float)windowPos.y, 0.0f, 1.0f));
-			Rect bridgeBounds = bridgeElement->getBounds();
+			RectI bridgeBounds = bridgeElement->getBounds();
 
 			// Find coordinates relative to the bridge element
 			float x = vecLocalPos.x - (float)bridgeBounds.x;
@@ -1209,7 +1209,7 @@ namespace BansheeEngine
 			float scaleX = renderTexture->getWidth() / (float)bridgeBounds.width;
 			float scaleY = renderTexture->getHeight() / (float)bridgeBounds.height;
 
-			return Int2(Math::roundToInt(x * scaleX), Math::roundToInt(y * scaleY));
+			return Vector2I(Math::roundToInt(x * scaleX), Math::roundToInt(y * scaleY));
 		}
 
 		return windowPos;

+ 23 - 23
BansheeEngine/Source/BsGUIMouseEvent.cpp

@@ -18,77 +18,77 @@ namespace BansheeEngine
 		memcpy(mButtonStates, buttonStates, sizeof(mButtonStates));
 	}
 
-	void GUIMouseEvent::setMouseOverData(GUIElement* mouseOverElement, const Int2& position)
+	void GUIMouseEvent::setMouseOverData(GUIElement* mouseOverElement, const Vector2I& position)
 	{
 		mType = GUIMouseEventType::MouseOver;
 		mPosition = position;
 		mMouseOverElement = mouseOverElement;
 		mButton = GUIMouseButton::Left;
-		mDragAmount = Int2();
+		mDragAmount = Vector2I();
 		mWheelScrollAmount = 0.0f;
 	}
 
-	void GUIMouseEvent::setMouseOutData(GUIElement* mouseOverElement, const Int2& position)
+	void GUIMouseEvent::setMouseOutData(GUIElement* mouseOverElement, const Vector2I& position)
 	{
 		mType = GUIMouseEventType::MouseOut;
 		mPosition = position;
 		mMouseOverElement = mouseOverElement;
 		mButton = GUIMouseButton::Left;
-		mDragAmount = Int2();
+		mDragAmount = Vector2I();
 		mWheelScrollAmount = 0.0f;
 	}
 
-	void GUIMouseEvent::setMouseMoveData(GUIElement* mouseOverElement, const Int2& position)
+	void GUIMouseEvent::setMouseMoveData(GUIElement* mouseOverElement, const Vector2I& position)
 	{
 		mType = GUIMouseEventType::MouseMove;
 		mPosition = position;
 		mMouseOverElement = mouseOverElement;
 		mButton = GUIMouseButton::Left;
-		mDragAmount = Int2();
+		mDragAmount = Vector2I();
 		mWheelScrollAmount = 0.0f;
 	}
 
 	void GUIMouseEvent::setMouseWheelScrollData(GUIElement* mouseOverElement, float scrollAmount)
 	{
 		mType = GUIMouseEventType::MouseWheelScroll;
-		mPosition = Int2();
+		mPosition = Vector2I();
 		mMouseOverElement = mouseOverElement;
 		mButton = GUIMouseButton::Left;
-		mDragAmount = Int2();
+		mDragAmount = Vector2I();
 		mWheelScrollAmount = scrollAmount;
 	}
 
-	void GUIMouseEvent::setMouseUpData(GUIElement* mouseOverElement, const Int2& position, GUIMouseButton button)
+	void GUIMouseEvent::setMouseUpData(GUIElement* mouseOverElement, const Vector2I& position, GUIMouseButton button)
 	{
 		mType = GUIMouseEventType::MouseUp;
 		mPosition = position;
 		mMouseOverElement = mouseOverElement;
 		mButton = button;
-		mDragAmount = Int2();
+		mDragAmount = Vector2I();
 		mWheelScrollAmount = 0.0f;
 	}
 
-	void GUIMouseEvent::setMouseDownData(GUIElement* mouseOverElement, const Int2& position, GUIMouseButton button)
+	void GUIMouseEvent::setMouseDownData(GUIElement* mouseOverElement, const Vector2I& position, GUIMouseButton button)
 	{
 		mType = GUIMouseEventType::MouseDown;
 		mPosition = position;
 		mMouseOverElement = mouseOverElement;
 		mButton = button;
-		mDragAmount = Int2();
+		mDragAmount = Vector2I();
 		mWheelScrollAmount = 0.0f;
 	}
 
-	void GUIMouseEvent::setMouseDoubleClickData(GUIElement* mouseOverElement, const Int2& position, GUIMouseButton button)
+	void GUIMouseEvent::setMouseDoubleClickData(GUIElement* mouseOverElement, const Vector2I& position, GUIMouseButton button)
 	{
 		mType = GUIMouseEventType::MouseDoubleClick;
 		mPosition = position;
 		mMouseOverElement = mouseOverElement;
 		mButton = button;
-		mDragAmount = Int2();
+		mDragAmount = Vector2I();
 		mWheelScrollAmount = 0.0f;
 	}
 
-	void GUIMouseEvent::setMouseDragData(GUIElement* mouseOverElement, const Int2& position, const Int2& dragAmount)
+	void GUIMouseEvent::setMouseDragData(GUIElement* mouseOverElement, const Vector2I& position, const Vector2I& dragAmount)
 	{
 		mType = GUIMouseEventType::MouseDrag;
 		mPosition = position;
@@ -98,45 +98,45 @@ namespace BansheeEngine
 		mWheelScrollAmount = 0.0f;
 	}
 
-	void GUIMouseEvent::setMouseDragStartData(GUIElement* mouseOverElement, const Int2& position)
+	void GUIMouseEvent::setMouseDragStartData(GUIElement* mouseOverElement, const Vector2I& position)
 	{
 		mType = GUIMouseEventType::MouseDragStart;
 		mPosition = position;
 		mMouseOverElement = mouseOverElement;
 		mButton = GUIMouseButton::Left;
-		mDragAmount = Int2();
+		mDragAmount = Vector2I();
 		mWheelScrollAmount = 0.0f;
 	}
 
-	void GUIMouseEvent::setMouseDragEndData(GUIElement* mouseOverElement, const Int2& position)
+	void GUIMouseEvent::setMouseDragEndData(GUIElement* mouseOverElement, const Vector2I& position)
 	{
 		mType = GUIMouseEventType::MouseDragEnd;
 		mPosition = position;
 		mMouseOverElement = mouseOverElement;
 		mButton = GUIMouseButton::Left;
-		mDragAmount = Int2();
+		mDragAmount = Vector2I();
 		mWheelScrollAmount = 0.0f;
 	}
 
-	void GUIMouseEvent::setDragAndDropDroppedData(GUIElement* mouseOverElement, const Int2& position, CM::UINT32 dragTypeId, void* dragData)
+	void GUIMouseEvent::setDragAndDropDroppedData(GUIElement* mouseOverElement, const Vector2I& position, CM::UINT32 dragTypeId, void* dragData)
 	{
 		mType = GUIMouseEventType::MouseDragAndDropDropped;
 		mPosition = position;
 		mMouseOverElement = mouseOverElement;
 		mButton = GUIMouseButton::Left;
-		mDragAmount = Int2();
+		mDragAmount = Vector2I();
 		mWheelScrollAmount = 0.0f;
 		mDragTypeId = dragTypeId;
 		mDragData = dragData;
 	}
 
-	void GUIMouseEvent::setDragAndDropDraggedData(GUIElement* mouseOverElement, const Int2& position, CM::UINT32 dragTypeId, void* dragData)
+	void GUIMouseEvent::setDragAndDropDraggedData(GUIElement* mouseOverElement, const Vector2I& position, CM::UINT32 dragTypeId, void* dragData)
 	{
 		mType = GUIMouseEventType::MouseDragAndDropDragged;
 		mPosition = position;
 		mMouseOverElement = mouseOverElement;
 		mButton = GUIMouseButton::Left;
-		mDragAmount = Int2();
+		mDragAmount = Vector2I();
 		mWheelScrollAmount = 0.0f;
 		mDragTypeId = dragTypeId;
 		mDragData = dragData;

+ 10 - 10
BansheeEngine/Source/BsGUIScrollArea.cpp

@@ -52,10 +52,10 @@ namespace BansheeEngine
 
 	void GUIScrollArea::updateClippedBounds()
 	{
-		mClippedBounds = Rect(0, 0, 0, 0); // We don't want any mouse input for this element. This is just a container.
+		mClippedBounds = RectI(0, 0, 0, 0); // We don't want any mouse input for this element. This is just a container.
 	}
 
-	Int2 GUIScrollArea::_getOptimalSize() const
+	Vector2I GUIScrollArea::_getOptimalSize() const
 	{
 		return mContentLayout->_getOptimalSize();
 	}
@@ -65,7 +65,7 @@ namespace BansheeEngine
 	{ }
 
 	void GUIScrollArea::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-		Rect clipRect, UINT8 widgetDepth, UINT16 areaDepth)
+		RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth)
 	{
 		mContentLayout->_updateLayoutInternal(x, y, width, height, clipRect, widgetDepth, areaDepth);
 		UINT32 contentWidth = mContentLayout->_getActualWidth();
@@ -75,7 +75,7 @@ namespace BansheeEngine
 		mClippedContentHeight = height;
 
 		bool hasScrollbars = false;
-		Rect layoutClipRect = clipRect;
+		RectI layoutClipRect = clipRect;
 
 		bool hasHorzScrollbar = false;
 		if(contentWidth > mWidth)
@@ -110,7 +110,7 @@ namespace BansheeEngine
 				mVertScroll->_setAcceptsKeyboardFocus(false);
 			}
 
-			Int2 offset(x + mClippedContentWidth, y);
+			Vector2I offset(x + mClippedContentWidth, y);
 			mVertScroll->_setOffset(offset);
 			mVertScroll->_setWidth(ScrollBarWidth);
 			mVertScroll->_setHeight(mClippedContentHeight);
@@ -118,11 +118,11 @@ namespace BansheeEngine
 			mVertScroll->_setWidgetDepth(widgetDepth);
 
 			UINT32 clippedScrollbarWidth = std::min(width, ScrollBarWidth);
-			Rect elemClipRect(0, 0, clippedScrollbarWidth, clipRect.height);
+			RectI elemClipRect(0, 0, clippedScrollbarWidth, clipRect.height);
 			mVertScroll->_setClipRect(elemClipRect);
 
 			// This element is not a child of any layout so we treat it as a root element
-			Rect scrollBarLayoutClipRect(clipRect.x + mClippedContentWidth, clipRect.y, clippedScrollbarWidth, clipRect.height);
+			RectI scrollBarLayoutClipRect(clipRect.x + mClippedContentWidth, clipRect.y, clippedScrollbarWidth, clipRect.height);
 			mVertScroll->_updateLayout(offset.x, offset.y, ScrollBarWidth, mClippedContentHeight, scrollBarLayoutClipRect, widgetDepth, areaDepth);
 
 			// Set new handle size and update position to match the new size
@@ -158,7 +158,7 @@ namespace BansheeEngine
 				mHorzScroll->_setAcceptsKeyboardFocus(false);
 			}
 
-			Int2 offset(x, y + mClippedContentHeight);
+			Vector2I offset(x, y + mClippedContentHeight);
 			mHorzScroll->_setOffset(offset);
 			mHorzScroll->_setWidth(mClippedContentWidth);
 			mHorzScroll->_setHeight(ScrollBarWidth);
@@ -166,11 +166,11 @@ namespace BansheeEngine
 			mHorzScroll->_setWidgetDepth(widgetDepth);
 
 			UINT32 clippedScrollbarHeight = std::min(height, ScrollBarWidth);
-			Rect elemClipRect(0, 0, clipRect.width, clippedScrollbarHeight);
+			RectI elemClipRect(0, 0, clipRect.width, clippedScrollbarHeight);
 			mHorzScroll->_setClipRect(elemClipRect);
 
 			// This element is not a child of any layout so we treat it as a root element
-			Rect scrollBarLayoutClipRect(clipRect.x, clipRect.y + mClippedContentHeight, clipRect.width, clippedScrollbarHeight);
+			RectI scrollBarLayoutClipRect(clipRect.x, clipRect.y + mClippedContentHeight, clipRect.width, clippedScrollbarHeight);
 			mHorzScroll->_updateLayout(offset.x, offset.y, mClippedContentWidth, ScrollBarWidth, scrollBarLayoutClipRect, widgetDepth, areaDepth);
 
 			// Set new handle size and update position to match the new size

+ 2 - 2
BansheeEngine/Source/BsGUIScrollBar.cpp

@@ -98,10 +98,10 @@ namespace BansheeEngine
 
 	void GUIScrollBar::updateClippedBounds()
 	{
-		mClippedBounds = Rect(0, 0, 0, 0); // We don't want any mouse input for this element. This is just a container.
+		mClippedBounds = RectI(0, 0, 0, 0); // We don't want any mouse input for this element. This is just a container.
 	}
 
-	Int2 GUIScrollBar::_getOptimalSize() const
+	Vector2I GUIScrollBar::_getOptimalSize() const
 	{
 		return mLayout->_getOptimalSize();
 	}

+ 8 - 8
BansheeEngine/Source/BsGUIScrollBarHandle.cpp

@@ -123,32 +123,32 @@ namespace BansheeEngine
 
 	void GUIScrollBarHandle::updateClippedBounds()
 	{
-		mClippedBounds = Rect(mOffset.x, mOffset.y, mWidth, mHeight);
+		mClippedBounds = RectI(mOffset.x, mOffset.y, mWidth, mHeight);
 
-		Rect localClipRect(mClipRect.x + mOffset.x, mClipRect.y + mOffset.y, mClipRect.width, mClipRect.height);
+		RectI localClipRect(mClipRect.x + mOffset.x, mClipRect.y + mOffset.y, mClipRect.width, mClipRect.height);
 		mClippedBounds.clip(localClipRect);
 	}
 
-	Int2 GUIScrollBarHandle::_getOptimalSize() const
+	Vector2I GUIScrollBarHandle::_getOptimalSize() const
 	{
 		if(mCurTexture != nullptr)
 		{
-			return Int2(mCurTexture->getTexture()->getWidth(), mCurTexture->getTexture()->getHeight());
+			return Vector2I(mCurTexture->getTexture()->getWidth(), mCurTexture->getTexture()->getHeight());
 		}
 
-		return Int2();
+		return Vector2I();
 	}
 
 	void GUIScrollBarHandle::fillBuffer(UINT8* vertices, UINT8* uv, UINT32* indices, UINT32 startingQuad, UINT32 maxNumQuads, 
 		UINT32 vertexStride, UINT32 indexStride, UINT32 renderElementIdx) const
 	{
-		Int2 offset = mOffset;
+		Vector2I offset = mOffset;
 		if(mHorizontal)
 			offset.x += Math::floorToInt(mHandlePos);
 		else
 			offset.y += Math::floorToInt(mHandlePos);
 
-		Rect clipRect = mClipRect;
+		RectI clipRect = mClipRect;
 		if(mHorizontal)
 			clipRect.x -= Math::floorToInt(mHandlePos);
 		else
@@ -308,7 +308,7 @@ namespace BansheeEngine
 		return false;
 	}
 
-	bool GUIScrollBarHandle::isOnHandle(const CM::Int2& pos) const
+	bool GUIScrollBarHandle::isOnHandle(const CM::Vector2I& pos) const
 	{
 		if(mHorizontal)
 		{

+ 3 - 3
BansheeEngine/Source/BsGUITexture.cpp

@@ -173,14 +173,14 @@ namespace BansheeEngine
 		mClippedBounds = mImageSprite->getBounds(mOffset, mClipRect);
 	}
 
-	Int2 GUITexture::_getOptimalSize() const
+	Vector2I GUITexture::_getOptimalSize() const
 	{
 		if(mDesc.texture != nullptr)
 		{
-			return Int2(mDesc.texture->getTexture()->getWidth(), mDesc.texture->getTexture()->getHeight());
+			return Vector2I(mDesc.texture->getTexture()->getWidth(), mDesc.texture->getTexture()->getHeight());
 		}
 
-		return Int2(0, 0);
+		return Vector2I(0, 0);
 	}
 
 	void GUITexture::fillBuffer(UINT8* vertices, UINT8* uv, UINT32* indices, UINT32 startingQuad, UINT32 maxNumQuads, 

+ 3 - 3
BansheeEngine/Source/BsGUIViewport.cpp

@@ -77,15 +77,15 @@ namespace BansheeEngine
 
 	void GUIViewport::updateClippedBounds()
 	{
-		Rect mBounds = Rect(0, 0, mWidth, mHeight);
+		RectI mBounds = RectI(0, 0, mWidth, mHeight);
 		mBounds.clip(mClipRect);
 		mBounds.x += mOffset.x;
 		mBounds.y += mOffset.y;
 	}
 
-	Int2 GUIViewport::_getOptimalSize() const
+	Vector2I GUIViewport::_getOptimalSize() const
 	{
-		return Int2(0, 0);
+		return Vector2I(0, 0);
 	}
 
 	void GUIViewport::fillBuffer(UINT8* vertices, UINT8* uv, UINT32* indices, UINT32 startingQuad, UINT32 maxNumQuads, 

+ 4 - 4
BansheeEngine/Source/BsGUIWidget.cpp

@@ -9,7 +9,7 @@
 #include "CmMaterial.h"
 #include "CmPass.h"
 #include "CmMesh.h"
-#include "CmInt2.h"
+#include "CmVector2I.h"
 #include "BsOverlayManager.h"
 #include "BsCamera.h"
 #include "CmViewport.h"
@@ -300,7 +300,7 @@ namespace BansheeEngine
 		}
 	}
 
-	bool GUIWidget::inBounds(const Int2& position) const
+	bool GUIWidget::inBounds(const Vector2I& position) const
 	{
 		// Technically GUI widget bounds can be larger than the viewport, so make sure we clip to viewport first
 		if(!getTarget()->getArea().contains(position))
@@ -310,7 +310,7 @@ namespace BansheeEngine
 		Vector3 vecPos((float)position.x, (float)position.y, 0.0f);
 		vecPos = worldTfrm.inverse().transform3x4(vecPos);
 
-		Int2 localPos(Math::roundToInt(vecPos.x), Math::roundToInt(vecPos.y));
+		Vector2I localPos(Math::roundToInt(vecPos.x), Math::roundToInt(vecPos.y));
 		return mBounds.contains(localPos);
 	}
 
@@ -321,7 +321,7 @@ namespace BansheeEngine
 
 		for(auto& elem : mElements)
 		{
-			Rect elemBounds = elem->_getClippedBounds();
+			RectI elemBounds = elem->_getClippedBounds();
 			mBounds.encapsulate(elemBounds);
 		}
 	}

+ 1 - 1
BansheeEngine/Source/BsImageSprite.cpp

@@ -86,7 +86,7 @@ namespace BansheeEngine
 			renderElem.indexes[i * 6 + 5] = i * 4 + 2;
 		}
 
-		Int2 offset = getAnchorOffset(desc.anchor, desc.width, desc.height);
+		Vector2I offset = getAnchorOffset(desc.anchor, desc.width, desc.height);
 		Vector2 uvOffset = desc.uvOffset;
 		Vector2 uvScale = desc.uvScale;
 		

+ 17 - 17
BansheeEngine/Source/BsSprite.cpp

@@ -16,9 +16,9 @@ namespace BansheeEngine
 		clearMesh();
 	}
 
-	CM::Rect Sprite::getBounds(const Int2& offset, const Rect& clipRect) const 
+	CM::RectI Sprite::getBounds(const Vector2I& offset, const RectI& clipRect) const 
 	{
-		Rect bounds = mBounds;
+		RectI bounds = mBounds;
 
 		if(clipRect.width > 0 && clipRect.height > 0)
 			bounds.clip(clipRect);
@@ -45,7 +45,7 @@ namespace BansheeEngine
 	}
 
 	UINT32 Sprite::fillBuffer(UINT8* vertices, UINT8* uv, UINT32* indices, UINT32 startingQuad, UINT32 maxNumQuads, 
-		UINT32 vertexStride, UINT32 indexStride, UINT32 renderElementIdx, const Int2& offset, const Rect& clipRect) const
+		UINT32 vertexStride, UINT32 indexStride, UINT32 renderElementIdx, const Vector2I& offset, const RectI& clipRect) const
 	{
 		auto renderElem = mCachedRenderElements.at(renderElementIdx);
 
@@ -174,31 +174,31 @@ namespace BansheeEngine
 		return renderElem.numQuads;
 	}
 
-	Int2 Sprite::getAnchorOffset(SpriteAnchor anchor, UINT32 width, UINT32 height)
+	Vector2I Sprite::getAnchorOffset(SpriteAnchor anchor, UINT32 width, UINT32 height)
 	{
 		switch(anchor)
 		{
 		case SA_TopLeft:
-			return -Int2(0, 0);
+			return -Vector2I(0, 0);
 		case SA_TopCenter:
-			return -Int2(width / 2, 0);
+			return -Vector2I(width / 2, 0);
 		case SA_TopRight:
-			return -Int2(width, 0);
+			return -Vector2I(width, 0);
 		case SA_MiddleLeft:
-			return -Int2(0, height / 2);
+			return -Vector2I(0, height / 2);
 		case SA_MiddleCenter:
-			return -Int2(width / 2, height / 2);
+			return -Vector2I(width / 2, height / 2);
 		case SA_MiddleRight:
-			return -Int2(width, height / 2);
+			return -Vector2I(width, height / 2);
 		case SA_BottomLeft:
-			return -Int2(0, height);
+			return -Vector2I(0, height);
 		case SA_BottomCenter:
-			return -Int2(width / 2, height);
+			return -Vector2I(width / 2, height);
 		case SA_BottomRight:
-			return -Int2(width, height);
+			return -Vector2I(width, height);
 		}
 
-		return Int2();
+		return Vector2I();
 	}
 
 	void Sprite::updateBounds() const
@@ -221,7 +221,7 @@ namespace BansheeEngine
 
 		if(!foundStartingPoint)
 		{
-			mBounds = Rect(0, 0, 0, 0);
+			mBounds = RectI(0, 0, 0, 0);
 			return;
 		}
 
@@ -240,7 +240,7 @@ namespace BansheeEngine
 			}
 		}
 
-		mBounds = Rect((int)min.x, (int)min.y, (int)(max.x - min.x), (int)(max.y - min.y));
+		mBounds = RectI((int)min.x, (int)min.y, (int)(max.x - min.x), (int)(max.y - min.y));
 	}
 
 	void Sprite::clearMesh() const
@@ -272,7 +272,7 @@ namespace BansheeEngine
 	// This will only properly clip an array of quads
 	// Vertices in the quad must be in a specific order: top left, top right, bottom left, bottom right
 	// (0, 0) represents top left of the screen
-	void Sprite::clipToRect(UINT8* vertices, UINT8* uv, UINT32 numQuads, UINT32 vertStride, const Rect& clipRect)
+	void Sprite::clipToRect(UINT8* vertices, UINT8* uv, UINT32 numQuads, UINT32 vertStride, const RectI& clipRect)
 	{
 		float left = (float)clipRect.x;
 		float right = (float)clipRect.x + clipRect.width;

+ 9 - 9
BansheeEngine/Source/BsTextSprite.cpp

@@ -124,8 +124,8 @@ namespace BansheeEngine
 		UINT32 numLines = textData.getNumLines();
 		UINT32 newNumQuads = textData.getNumQuadsForPage(page);
 
-		Vector<Int2>::type alignmentOffsets = getAlignmentOffsets(textData, width, height, horzAlign, vertAlign);
-		Int2 offset = getAnchorOffset(anchor, width, height);
+		Vector<Vector2I>::type alignmentOffsets = getAlignmentOffsets(textData, width, height, horzAlign, vertAlign);
+		Vector2I offset = getAnchorOffset(anchor, width, height);
 
 		UINT32 quadOffset = 0;
 		for(UINT32 i = 0; i < numLines; i++)
@@ -133,7 +133,7 @@ namespace BansheeEngine
 			const TextData::TextLine& line = textData.getLine(i);
 			UINT32 writtenQuads = line.fillBuffer(page, vertices, uv, indices, quadOffset, bufferSizeQuads);
 
-			Int2 position = offset + alignmentOffsets[i];
+			Vector2I position = offset + alignmentOffsets[i];
 			UINT32 numVertices = writtenQuads * 4;
 			for(UINT32 i = 0; i < numVertices; i++)
 			{
@@ -154,8 +154,8 @@ namespace BansheeEngine
 		UINT32 numLines = textData.getNumLines();
 		UINT32 numPages = textData.getNumPages();
 
-		Vector<Int2>::type alignmentOffsets = getAlignmentOffsets(textData, width, height, horzAlign, vertAlign);
-		Int2 offset = getAnchorOffset(anchor, width, height);
+		Vector<Vector2I>::type alignmentOffsets = getAlignmentOffsets(textData, width, height, horzAlign, vertAlign);
+		Vector2I offset = getAnchorOffset(anchor, width, height);
 
 		UINT32 quadOffset = 0;
 		
@@ -166,7 +166,7 @@ namespace BansheeEngine
 			{
 				UINT32 writtenQuads = line.fillBuffer(j, vertices, uv, indices, quadOffset, bufferSizeQuads);
 
-				Int2 position = offset + alignmentOffsets[i];
+				Vector2I position = offset + alignmentOffsets[i];
 
 				UINT32 numVertices = writtenQuads * 4;
 				for(UINT32 i = 0; i < numVertices; i++)
@@ -182,7 +182,7 @@ namespace BansheeEngine
 		return quadOffset;
 	}
 
-	Vector<Int2>::type TextSprite::getAlignmentOffsets(const TextData& textData, 
+	Vector<Vector2I>::type TextSprite::getAlignmentOffsets(const TextData& textData, 
 		UINT32 width, UINT32 height, TextHorzAlign horzAlign, TextVertAlign vertAlign)
 	{
 		UINT32 numLines = textData.getNumLines();
@@ -211,7 +211,7 @@ namespace BansheeEngine
 
 		// Calc horizontal alignment offset
 		UINT32 curY = 0;
-		Vector<Int2>::type lineOffsets;
+		Vector<Vector2I>::type lineOffsets;
 		for(UINT32 i = 0; i < numLines; i++)
 		{
 			const TextData::TextLine& line = textData.getLine(i);
@@ -230,7 +230,7 @@ namespace BansheeEngine
 				break;
 			}
 
-			lineOffsets.push_back(Int2(horzOffset, vertOffset + curY));
+			lineOffsets.push_back(Vector2I(horzOffset, vertOffset + curY));
 			curY += line.getYOffset();
 		}
 

+ 1 - 1
CamelotClient/Include/BsDockManager.h

@@ -33,7 +33,7 @@ namespace BansheeEditor
 			 *
 			 * @return	null if it fails, else the found DockContainer at position.
 			 */
-			DockContainer* findAtPos(const CM::Int2& pos);
+			DockContainer* findAtPos(const CM::Vector2I& pos);
 
 			bool mIsLeaf;
 			DockContainer* mChildren[2];

+ 1 - 1
CamelotClient/Include/BsGUITabButton.h

@@ -28,7 +28,7 @@ namespace BansheeEditor
 	private:
 		GUITabbedTitleBar* mTitleBar;
 		CM::UINT32 mIndex;
-		CM::Int2 mDragStartPosition;
+		CM::Vector2I mDragStartPosition;
 
 		static const CM::UINT32 DRAG_MIN_DISTANCE;
 

+ 3 - 3
CamelotClient/Source/BsDockManager.cpp

@@ -163,7 +163,7 @@ namespace BansheeEditor
 		return nullptr;
 	}
 
-	DockManager::DockContainer* DockManager::DockContainer::findAtPos(const CM::Int2& pos)
+	DockManager::DockContainer* DockManager::DockContainer::findAtPos(const CM::Vector2I& pos)
 	{
 		if(mIsLeaf)
 		{
@@ -451,13 +451,13 @@ namespace BansheeEditor
 		if(widget->getTarget() != mParent->getTarget())
 			return;
 
-		const Int2& widgetRelPos = event.getPosition();
+		const Vector2I& widgetRelPos = event.getPosition();
 
 		const Matrix4& worldTfrm = widget->SO()->getWorldTfrm();
 
 		Vector4 tfrmdPos = worldTfrm.transform3x4(Vector4((float)widgetRelPos.x, (float)widgetRelPos.y, 0.0f, 1.0f));
 		Vector2 windowPosVec(tfrmdPos.x, tfrmdPos.y);
-		Int2 windowPos(Math::roundToInt(windowPosVec.x), Math::roundToInt(windowPosVec.y));
+		Vector2I windowPos(Math::roundToInt(windowPosVec.x), Math::roundToInt(windowPosVec.y));
 
 		DockContainer* mouseOverContainer = mRootContainer.findAtPos(windowPos);
 

+ 1 - 1
CamelotClient/Source/BsEditorWidgetContainer.cpp

@@ -239,7 +239,7 @@ namespace BansheeEditor
 
 			newWindow->widgets().add(*draggedWidget);
 
-			Int2 mousePos = Input::instance().getCursorPosition();
+			Vector2I mousePos = Input::instance().getCursorPosition();
 			newWindow->setPosition(mousePos.x, mousePos.y);
 		}
 	}

+ 4 - 4
CamelotClient/Source/BsGUIMenuBar.cpp

@@ -325,15 +325,15 @@ namespace BansheeEditor
 		// so force the update right away so we get correct element bounds
 		mMainArea->_update();
 
-		CM::Vector<CM::Rect>::type nonClientAreas;
+		CM::Vector<CM::RectI>::type nonClientAreas;
 		nonClientAreas.push_back(mLogoTexture->getBounds());
 
 		if(mChildMenus.size() > 0)
 		{
-			Rect lastButtonBounds = mChildMenus.back().button->getBounds();
-			Rect minButtonBounds = mMinBtn->getBounds();
+			RectI lastButtonBounds = mChildMenus.back().button->getBounds();
+			RectI minButtonBounds = mMinBtn->getBounds();
 
-			Rect emptyArea(lastButtonBounds.x + lastButtonBounds.width, mMainArea->y(), 
+			RectI emptyArea(lastButtonBounds.x + lastButtonBounds.width, mMainArea->y(), 
 				minButtonBounds.x - (lastButtonBounds.x + lastButtonBounds.width), mMainArea->height());
 
 			nonClientAreas.push_back(emptyArea);

+ 1 - 1
CamelotClient/Source/BsGUITabbedTitleBar.cpp

@@ -194,7 +194,7 @@ namespace BansheeEditor
 		// so force the update right away so we get correct element bounds
 		mMainArea->_update();
 
-		CM::Vector<CM::Rect>::type nonClientAreas;
+		CM::Vector<CM::RectI>::type nonClientAreas;
 		for(auto& elem : mDragDropElements)
 		{
 			nonClientAreas.push_back(elem->getBounds());

+ 8 - 8
CamelotClient/Source/BsGUIWindowFrameWidget.cpp

@@ -73,35 +73,35 @@ namespace BansheeEditor
 		CM::Vector<NonClientResizeArea>::type nonClientAreas(8);
 
 		nonClientAreas[0].type = NonClientAreaBorderType::TopLeft;
-		nonClientAreas[0].area = Rect(x, y, 
+		nonClientAreas[0].area = RectI(x, y, 
 			RESIZE_BORDER_WIDTH, RESIZE_BORDER_WIDTH);
 
 		nonClientAreas[1].type = NonClientAreaBorderType::Top;
-		nonClientAreas[1].area = Rect(x + RESIZE_BORDER_WIDTH, y, 
+		nonClientAreas[1].area = RectI(x + RESIZE_BORDER_WIDTH, y, 
 			width - 2 * RESIZE_BORDER_WIDTH, RESIZE_BORDER_WIDTH);
 
 		nonClientAreas[2].type = NonClientAreaBorderType::TopRight;
-		nonClientAreas[2].area = Rect(x + width - RESIZE_BORDER_WIDTH, y, 
+		nonClientAreas[2].area = RectI(x + width - RESIZE_BORDER_WIDTH, y, 
 			RESIZE_BORDER_WIDTH, RESIZE_BORDER_WIDTH);
 
 		nonClientAreas[3].type = NonClientAreaBorderType::Left;
-		nonClientAreas[3].area = Rect(x, y + RESIZE_BORDER_WIDTH, 
+		nonClientAreas[3].area = RectI(x, y + RESIZE_BORDER_WIDTH, 
 			RESIZE_BORDER_WIDTH, height - 2 * RESIZE_BORDER_WIDTH);
 
 		nonClientAreas[4].type = NonClientAreaBorderType::Right;
-		nonClientAreas[4].area = Rect(x + width - RESIZE_BORDER_WIDTH, y + RESIZE_BORDER_WIDTH, 
+		nonClientAreas[4].area = RectI(x + width - RESIZE_BORDER_WIDTH, y + RESIZE_BORDER_WIDTH, 
 			RESIZE_BORDER_WIDTH, height - 2 * RESIZE_BORDER_WIDTH);
 
 		nonClientAreas[5].type = NonClientAreaBorderType::BottomLeft;
-		nonClientAreas[5].area = Rect(x, y + height - RESIZE_BORDER_WIDTH, 
+		nonClientAreas[5].area = RectI(x, y + height - RESIZE_BORDER_WIDTH, 
 			RESIZE_BORDER_WIDTH, RESIZE_BORDER_WIDTH);
 
 		nonClientAreas[6].type = NonClientAreaBorderType::Bottom;
-		nonClientAreas[6].area = Rect(x + RESIZE_BORDER_WIDTH, y + height - RESIZE_BORDER_WIDTH, 
+		nonClientAreas[6].area = RectI(x + RESIZE_BORDER_WIDTH, y + height - RESIZE_BORDER_WIDTH, 
 			width - 2 * RESIZE_BORDER_WIDTH, RESIZE_BORDER_WIDTH);
 
 		nonClientAreas[7].type = NonClientAreaBorderType::BottomRight;
-		nonClientAreas[7].area = Rect(x + width - RESIZE_BORDER_WIDTH, y + height - RESIZE_BORDER_WIDTH, 
+		nonClientAreas[7].area = RectI(x + width - RESIZE_BORDER_WIDTH, y + height - RESIZE_BORDER_WIDTH, 
 			RESIZE_BORDER_WIDTH, RESIZE_BORDER_WIDTH);
 
 		Platform::setResizeNonClientAreas(*mParentWindow, nonClientAreas);

+ 1 - 1
CamelotClient/Source/BsMainEditorWindow.cpp

@@ -13,7 +13,7 @@
 #include "CmDebugCamera.h"
 #include "BsDrawHelper2D.h"
 #include "BsDrawHelper3D.h"
-#include "CmFRect.h"
+#include "CmRectF.h"
 #include "BsProfilerOverlay.h"
 #include "CmPlatform.h"
 

+ 2 - 0
CamelotCore/CamelotCore.vcxproj

@@ -297,6 +297,7 @@
     <ClInclude Include="Include\CmPixelData.h" />
     <ClInclude Include="Include\CmPixelDataRTTI.h" />
     <ClInclude Include="Include\CmPixelUtil.h" />
+    <ClInclude Include="Include\CmPixelVolume.h" />
     <ClInclude Include="Include\CmPlatformWndProc.h" />
     <ClInclude Include="Include\CmProfiler.h" />
     <ClInclude Include="Include\CmQueryManager.h" />
@@ -465,6 +466,7 @@
     <ClCompile Include="Source\CmGpuProgIncludeImporter.cpp" />
     <ClCompile Include="Source\CmPixelData.cpp" />
     <ClCompile Include="Source\CmPixelUtil.cpp" />
+    <ClCompile Include="Source\CmPixelVolume.cpp" />
     <ClCompile Include="Source\CmPlatform.cpp" />
     <ClCompile Include="Source\CmPlatformWndProc.cpp" />
     <ClCompile Include="Source\CmProfiler.cpp" />

+ 6 - 0
CamelotCore/CamelotCore.vcxproj.filters

@@ -522,6 +522,9 @@
     <ClInclude Include="Include\CmMeshBaseRTTI.h">
       <Filter>Header Files\RTTI</Filter>
     </ClInclude>
+    <ClInclude Include="Include\CmPixelVolume.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="Source\CmApplication.cpp">
@@ -818,5 +821,8 @@
     <ClCompile Include="Source\CmMeshBase.cpp">
       <Filter>Source Files\Resources</Filter>
     </ClCompile>
+    <ClCompile Include="Source\CmPixelVolume.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>

+ 4 - 4
CamelotCore/Include/CmInput.h

@@ -2,7 +2,7 @@
 
 #include "CmPrerequisites.h"
 #include "CmModule.h"
-#include "CmRect.h"
+#include "CmRectI.h"
 #include "CmOSInputHandler.h"
 #include "CmRawInputHandler.h"
 #include "CmInputFwd.h"
@@ -49,7 +49,7 @@ namespace CamelotFramework
 
 		bool isButtonDown(ButtonCode keyCode) const;
 
-		Int2 getCursorPosition() const { return mMouseAbsPos; }
+		Vector2I getCursorPosition() const { return mMouseAbsPos; }
 	private:
 		std::shared_ptr<RawInputHandler> mRawInputHandler;
 		std::shared_ptr<OSInputHandler> mOSInputHandler;
@@ -62,8 +62,8 @@ namespace CamelotFramework
 		float* mTimesHistoryBuffer;
 		int	mCurrentBufferIdx;
 
-		Int2 mMouseLastRel;
-		Int2 mMouseAbsPos;
+		Vector2I mMouseLastRel;
+		Vector2I mMouseAbsPos;
 
 		RawAxisState mAxes[RawInputAxis::Count];
 		bool mKeyState[BC_Count];

+ 2 - 2
CamelotCore/Include/CmInputFwd.h

@@ -1,7 +1,7 @@
 #pragma once
 
 #include "CmPrerequisites.h"
-#include "CmInt2.h"
+#include "CmVector2I.h"
 
 namespace CamelotFramework
 {
@@ -281,7 +281,7 @@ namespace CamelotFramework
 			buttonStates[2] = false;
 		}
 
-		Int2 screenPos;
+		Vector2I screenPos;
 		bool buttonStates[PositionalInputEventButton::Count];
 		PositionalInputEventButton button;
 		PositionalInputEventType type;

+ 10 - 10
CamelotCore/Include/CmOSInputHandler.h

@@ -3,7 +3,7 @@
 #include "CmPrerequisites.h"
 #include "CmPlatform.h"
 #include <boost/signal.hpp>
-#include "CmInt2.h"	
+#include "CmVector2I.h"
 
 namespace CamelotFramework
 {
@@ -18,7 +18,7 @@ namespace CamelotFramework
 	{
 		struct ButtonStateChange
 		{
-			Int2 cursorPos;
+			Vector2I cursorPos;
 			OSPositionalInputButtonStates btnStates;
 			OSMouseButton button;
 			bool pressed;
@@ -26,7 +26,7 @@ namespace CamelotFramework
 
 		struct DoubleClick
 		{
-			Int2 cursorPos;
+			Vector2I cursorPos;
 			OSPositionalInputButtonStates btnStates;
 		};
 
@@ -35,7 +35,7 @@ namespace CamelotFramework
 		virtual ~OSInputHandler();
 
 		boost::signal<void(UINT32)> onCharInput;
-		boost::signal<void(const Int2&, float)> onMouseWheelScrolled;
+		boost::signal<void(const Vector2I&, float)> onMouseWheelScrolled;
 		boost::signal<void(const PositionalInputEvent&)> onCursorMoved;
 		boost::signal<void(const PositionalInputEvent&)> onCursorPressed;
 		boost::signal<void(const PositionalInputEvent&)> onCursorReleased;
@@ -54,8 +54,8 @@ namespace CamelotFramework
 
 	private:
 		CM_MUTEX(mOSInputMutex);
-		Int2 mLastCursorPos;
-		Int2 mCursorPosition;
+		Vector2I mLastCursorPos;
+		Vector2I mCursorPosition;
 		float mMouseScroll;
 		WString mInputString;
 		Queue<ButtonStateChange>::type mButtonStates;
@@ -79,22 +79,22 @@ namespace CamelotFramework
 		/**
 		 * @brief	Called from the message loop.
 		 */
-		void cursorMoved(const Int2& cursorPos, OSPositionalInputButtonStates& btnStates);
+		void cursorMoved(const Vector2I& cursorPos, OSPositionalInputButtonStates& btnStates);
 
 		/**
 		 * @brief	Called from the message loop.
 		 */
-		void cursorPressed(const Int2& cursorPos, OSMouseButton button, OSPositionalInputButtonStates& btnStates);
+		void cursorPressed(const Vector2I& cursorPos, OSMouseButton button, OSPositionalInputButtonStates& btnStates);
 
 		/**
 		 * @brief	Called from the message loop.
 		 */
-		void cursorReleased(const Int2& cursorPos, OSMouseButton button, OSPositionalInputButtonStates& btnStates);
+		void cursorReleased(const Vector2I& cursorPos, OSMouseButton button, OSPositionalInputButtonStates& btnStates);
 
 		/**
 		 * @brief	Called from the message loop.
 		 */
-		void cursorDoubleClick(const Int2& cursorPos, OSPositionalInputButtonStates& btnStates);
+		void cursorDoubleClick(const Vector2I& cursorPos, OSPositionalInputButtonStates& btnStates);
 
 		/**
 		 * @brief	Called from the message loop.

+ 3 - 3
CamelotCore/Include/CmPixelBuffer.h

@@ -59,10 +59,10 @@ namespace CamelotFramework {
         // Currently locked region (local coords)
         PixelData mCurrentLock;
 		// The current locked box of this surface (entire surface coords)
-		Box mLockedBox;
+		PixelVolume mLockedBox;
         
         /// Internal implementation of lock(), must be overridden in subclasses
-        virtual PixelData lockImpl(const Box lockBox,  GpuLockOptions options) = 0;
+        virtual PixelData lockImpl(const PixelVolume lockBox,  GpuLockOptions options) = 0;
 
         /// Internal implementation of lock(), do not OVERRIDE or CALL this
         /// for HardwarePixelBuffer implementations, but override the previous method
@@ -86,7 +86,7 @@ namespace CamelotFramework {
 		    @returns PixelBox containing the locked region, the pitches and
 		    	the pixel format
 		*/
-		virtual const PixelData& lock(const Box& lockBox, GpuLockOptions options);
+		virtual const PixelData& lock(const PixelVolume& lockBox, GpuLockOptions options);
 		/// @copydoc HardwareBuffer::lock
         virtual void* lock(UINT32 offset, UINT32 length, GpuLockOptions options);
 

+ 5 - 5
CamelotCore/Include/CmPixelData.h

@@ -1,7 +1,7 @@
 #pragma once
 
 #include "CmPrerequisites.h"
-#include "CmBox.h"
+#include "CmPixelVolume.h"
 #include "CmGpuResourceData.h"
 #include "CmIReflectable.h"
 
@@ -134,7 +134,7 @@ namespace CamelotFramework
     		@param pixelFormat	Format of this buffer
     		@param pixelData	Pointer to the actual data
     	*/
-		PixelData(const Box &extents, PixelFormat pixelFormat)
+		PixelData(const PixelVolume &extents, PixelFormat pixelFormat)
 			:mExtents(extents), mFormat(pixelFormat)
 		{
 			setConsecutive();
@@ -187,7 +187,7 @@ namespace CamelotFramework
 		UINT32 getFront() const { return mExtents.front; }
 		UINT32 getBack() const { return mExtents.back; }
 
-		Box getExtents() const { return mExtents; }
+		PixelVolume getExtents() const { return mExtents; }
 
         /** Return whether this buffer is laid out consecutive in memory (ie the pitches
          	are equal to the dimensions)
@@ -208,7 +208,7 @@ namespace CamelotFramework
       			the data of object.
       		@throws	Exception(ERR_INVALIDPARAMS) if def is not fully contained
       	*/
-      	PixelData getSubVolume(const Box &def) const;
+      	PixelData getSubVolume(const PixelVolume &def) const;
         
         /**
          * Get colour value from a certain location in the PixelBox. The z coordinate
@@ -225,7 +225,7 @@ namespace CamelotFramework
         void setColorAt(Color const &cv, UINT32 x, UINT32 y, UINT32 z = 0);
 
 	private:
-		Box mExtents;
+		PixelVolume mExtents;
 
         /// The pixel format 
         PixelFormat mFormat;

+ 1 - 1
CamelotCore/Include/CmPlatform.h

@@ -74,7 +74,7 @@ namespace CamelotFramework
 		void _setFileList(const Vector<WString>::type& fileList);
 		void _setActive(bool active) { mActive = active; }
 
-		bool _isInside(const Int2& pos) const;
+		bool _isInside(const Vector2I& pos) const;
 		bool _isActive() const { return mActive; }
 	private:
 		friend class Platform;

+ 1 - 1
CamelotCore/Include/CmPlatformWndProc.h

@@ -20,7 +20,7 @@ namespace CamelotFramework
 
 		static LRESULT translateNonClientAreaType(NonClientAreaBorderType type);
 
-		static void getMouseData(HWND hWnd, WPARAM wParam, LPARAM lParam, Int2& mousePos, OSPositionalInputButtonStates& btnStates);
+		static void getMouseData(HWND hWnd, WPARAM wParam, LPARAM lParam, Vector2I& mousePos, OSPositionalInputButtonStates& btnStates);
 		static bool getCommand(unsigned int virtualKeyCode, InputCommandType& command);
 	};
 }

+ 3 - 3
CamelotCore/Include/CmRawInputHandler.h

@@ -3,14 +3,14 @@
 #include "CmPrerequisites.h"
 #include "CmInputFwd.h"
 #include <boost/signal.hpp>
-#include "CmInt2.h"
+#include "CmVector2I.h"
 
 namespace CamelotFramework
 {
 	struct RawAxisState
 	{
-		Int2 rel;
-		Int2 abs;
+		Vector2I rel;
+		Vector2I abs;
 	};
 
 	enum class RawInputAxis

+ 3 - 3
CamelotCore/Include/CmRenderWindow.h

@@ -28,7 +28,7 @@ THE SOFTWARE
 #include "CmPrerequisites.h"
 
 #include "CmRenderTarget.h"
-#include "CmInt2.h"
+#include "CmVector2I.h"
 
 namespace CamelotFramework
 {
@@ -133,8 +133,8 @@ namespace CamelotFramework
 		 */
 		bool hasFocus() const { return mHasFocus; }
 
-		virtual Int2 screenToWindowPos(const Int2& screenPos) const = 0;
-		virtual Int2 windowToScreenPos(const Int2& windowPos) const = 0;
+		virtual Vector2I screenToWindowPos(const Vector2I& screenPos) const = 0;
+		virtual Vector2I windowToScreenPos(const Vector2I& windowPos) const = 0;
 
 		virtual void destroy();
 

+ 1 - 1
CamelotCore/Include/CmTextData.h

@@ -2,7 +2,7 @@
 
 #include "CmPrerequisites.h"
 #include "CmFontDesc.h"
-#include "CmInt2.h"
+#include "CmVector2I.h"
 
 namespace CamelotFramework
 {

+ 5 - 5
CamelotCore/Include/CmViewport.h

@@ -3,8 +3,8 @@
 #include "CmPrerequisites.h"
 #include "CmCommonEnums.h"
 #include "CmColor.h"
-#include "CmRect.h"
-#include "CmFRect.h"
+#include "CmRectI.h"
+#include "CmRectF.h"
 #include <boost/signals/connection.hpp>
 
 namespace CamelotFramework 
@@ -82,7 +82,7 @@ namespace CamelotFramework
 		/**
 		 * @brief	Returns actual area of the viewport, in pixels.
 		 */
-		const Rect& getArea() const { return mArea; }
+		const RectI& getArea() const { return mArea; }
 
 		const Color& getClearColor() const { return mClearColor; }
 		void setClearColor(const Color& clearColor) { mClearColor = clearColor; }
@@ -106,8 +106,8 @@ namespace CamelotFramework
     protected:
         RenderTargetPtr mTarget;
 
-		FRect mNormArea;
-		Rect mArea;
+		RectF mNormArea;
+		RectI mArea;
 
 		bool mRequiresColorClear;
 		bool mRequiresDepthClear;

+ 13 - 13
CamelotCore/Include/Win32/CmPlatformImpl.h

@@ -2,8 +2,8 @@
 
 #include "CmPrerequisites.h"
 #include "CmInputFwd.h"
-#include "CmInt2.h"
-#include "CmRect.h"
+#include "CmVector2I.h"
+#include "CmRectI.h"
 #include <boost/signals.hpp>
 
 namespace CamelotFramework
@@ -33,13 +33,13 @@ namespace CamelotFramework
 	struct CM_EXPORT NonClientResizeArea
 	{
 		NonClientAreaBorderType type;
-		Rect area;
+		RectI area;
 	};
 
 	struct CM_EXPORT WindowNonClientAreaData
 	{
 		Vector<NonClientResizeArea>::type resizeAreas;
-		Vector<Rect>::type moveAreas;
+		Vector<RectI>::type moveAreas;
 	};
 
 	/**
@@ -57,7 +57,7 @@ namespace CamelotFramework
 		 * 			
 		 * @note	Thread safe. 
 		 */
-		static void setCursorPosition(const Int2& screenPos);
+		static void setCursorPosition(const Vector2I& screenPos);
 
 		/**
 		 * @brief	Capture mouse to this window so that we get mouse input even if the mouse leaves the window area.
@@ -75,7 +75,7 @@ namespace CamelotFramework
 		/**
 		 * @brief	Checks if provided over screen position is over the specified window.
 		 */
-		static bool isPointOverWindow(const RenderWindow& window, const Int2& screenPos);
+		static bool isPointOverWindow(const RenderWindow& window, const Vector2I& screenPos);
 
 		/**
 		 * @brief	Limit cursor movement to the specified window.
@@ -88,7 +88,7 @@ namespace CamelotFramework
 		 *
 		 * @note	Thread safe.
 		 */
-		static void clipCursorToRect(const Rect& screenRect);
+		static void clipCursorToRect(const RectI& screenRect);
 		/**
 		 * @brief	Disables cursor clipping.
 		 * 			
@@ -130,7 +130,7 @@ namespace CamelotFramework
 		 * 						
 		 * @note	Thread safe.
 		 */
-		static void setCustomCursor(PixelData& pixelData, const Int2& hotSpot);
+		static void setCustomCursor(PixelData& pixelData, const Vector2I& hotSpot);
 
 		/**
 		 * @brief	Sets custom caption non client areas for the specified window. Using custom client
@@ -141,7 +141,7 @@ namespace CamelotFramework
 		 * 			All provided areas are relative to the specified window.
 		 * 			Mostly useful for frameless windows that don't have typical caption bar.
 		 */
-		static void setCaptionNonClientAreas(const RenderWindow& window, const Vector<Rect>::type& nonClientAreas);
+		static void setCaptionNonClientAreas(const RenderWindow& window, const Vector<RectI>::type& nonClientAreas);
 
 		/**
 		 * @brief	Sets custom non client areas for the specified window. Using custom client
@@ -240,10 +240,10 @@ namespace CamelotFramework
 
 		// Callbacks triggered on the core thread. Be careful so that none
 		// of the connected methods call methods intended for sim thread.
-		static boost::signal<void(const Int2&, OSPositionalInputButtonStates)> onCursorMoved;
-		static boost::signal<void(const Int2&, OSMouseButton button, OSPositionalInputButtonStates)> onCursorButtonPressed;
-		static boost::signal<void(const Int2&, OSMouseButton button, OSPositionalInputButtonStates)> onCursorButtonReleased;
-		static boost::signal<void(const Int2&, OSPositionalInputButtonStates)> onCursorDoubleClick;
+		static boost::signal<void(const Vector2I&, OSPositionalInputButtonStates)> onCursorMoved;
+		static boost::signal<void(const Vector2I&, OSMouseButton button, OSPositionalInputButtonStates)> onCursorButtonPressed;
+		static boost::signal<void(const Vector2I&, OSMouseButton button, OSPositionalInputButtonStates)> onCursorButtonReleased;
+		static boost::signal<void(const Vector2I&, OSPositionalInputButtonStates)> onCursorDoubleClick;
 		static boost::signal<void(InputCommandType)> onInputCommand;
 		static boost::signal<void(float)> onMouseWheelScrolled;
 		static boost::signal<void(UINT32)> onCharInput;

+ 6 - 6
CamelotCore/Include/Win32/CmWin32DropTarget.h

@@ -31,12 +31,12 @@ namespace CamelotFramework
 
 		struct DropTargetOp
 		{
-			DropTargetOp(DropOpType _type, const Int2& _pos)
+			DropTargetOp(DropOpType _type, const Vector2I& _pos)
 				:type(_type), position(_pos), dataType(DropOpDataType::None)
 			{ }
 
 			DropOpType type;
-			Int2 position;
+			Vector2I position;
 
 			DropOpDataType dataType;
 			union 
@@ -124,7 +124,7 @@ namespace CamelotFramework
 				mFileLists.push_back(getFileListFromData(pDataObj));
 
 				ScreenToClient(mHWnd, (POINT *)&pt);
-				mQueuedDropOps.push_back(DropTargetOp(DropOpType::DragOver, Int2((int)pt.x, (int)pt.y)));
+				mQueuedDropOps.push_back(DropTargetOp(DropOpType::DragOver, Vector2I((int)pt.x, (int)pt.y)));
 
 				DropTargetOp& op = mQueuedDropOps.back();
 				op.dataType = DropOpDataType::FileList;
@@ -145,7 +145,7 @@ namespace CamelotFramework
 				CM_LOCK_MUTEX(mSync);
 
 				ScreenToClient(mHWnd, (POINT *)&pt);
-				mQueuedDropOps.push_back(DropTargetOp(DropOpType::DragOver, Int2((int)pt.x, (int)pt.y)));
+				mQueuedDropOps.push_back(DropTargetOp(DropOpType::DragOver, Vector2I((int)pt.x, (int)pt.y)));
 
 				DropTargetOp& op = mQueuedDropOps.back();
 				op.dataType = DropOpDataType::FileList;
@@ -160,7 +160,7 @@ namespace CamelotFramework
 			{
 				CM_LOCK_MUTEX(mSync);
 
-				mQueuedDropOps.push_back(DropTargetOp(DropOpType::Leave, Int2()));
+				mQueuedDropOps.push_back(DropTargetOp(DropOpType::Leave, Vector2I()));
 
 				DropTargetOp& op = mQueuedDropOps.back();
 				op.dataType = DropOpDataType::FileList;
@@ -184,7 +184,7 @@ namespace CamelotFramework
 				mFileLists.push_back(getFileListFromData(pDataObj));
 
 				ScreenToClient(mHWnd, (POINT *)&pt);
-				mQueuedDropOps.push_back(DropTargetOp(DropOpType::Drop, Int2((int)pt.x, (int)pt.y)));
+				mQueuedDropOps.push_back(DropTargetOp(DropOpType::Drop, Vector2I((int)pt.x, (int)pt.y)));
 
 				DropTargetOp& op = mQueuedDropOps.back();
 				op.dataType = DropOpDataType::FileList;

+ 3 - 3
CamelotCore/Source/CmInput.cpp

@@ -1,7 +1,7 @@
 #include "CmInput.h"
 #include "CmTime.h"
 #include "CmMath.h"
-#include "CmRect.h"
+#include "CmRectI.h"
 #include "CmDebug.h"
 #include "CmRenderWindowManager.h"
 
@@ -123,7 +123,7 @@ namespace CamelotFramework
 	void Input::axisMoved(const RawAxisState& state, RawInputAxis axis)
 	{
 		if(axis == RawInputAxis::Mouse_XY)
-			mMouseLastRel = Int2(-state.rel.x, -state.rel.y);
+			mMouseLastRel = Vector2I(-state.rel.x, -state.rel.y);
 
 		mAxes[(int)axis] = state;
 	}
@@ -222,7 +222,7 @@ namespace CamelotFramework
 		mSmoothHorizontalAxis = Math::clamp(horizontalTotal / HISTORY_BUFFER_SIZE, -1.0f, 1.0f);
 		mSmoothVerticalAxis = Math::clamp(verticalTotal / HISTORY_BUFFER_SIZE, -1.0f, 1.0f);
 
-		mMouseLastRel = Int2(0, 0);
+		mMouseLastRel = Vector2I(0, 0);
 	}
 
 	Input& gInput()

+ 5 - 5
CamelotCore/Source/CmOSInputHandler.cpp

@@ -32,7 +32,7 @@ namespace CamelotFramework
 	void OSInputHandler::update()
 	{
 		WString inputString;
-		Int2 mousePosition;
+		Vector2I mousePosition;
 		float mouseScroll;
 		OSPositionalInputButtonStates mouseMoveBtnState;
 		Queue<ButtonStateChange>::type buttonStates;
@@ -174,7 +174,7 @@ namespace CamelotFramework
 		mInputString += character;
 	}
 
-	void OSInputHandler::cursorMoved(const Int2& cursorPos, OSPositionalInputButtonStates& btnStates)
+	void OSInputHandler::cursorMoved(const Vector2I& cursorPos, OSPositionalInputButtonStates& btnStates)
 	{
 		CM_LOCK_MUTEX(mOSInputMutex);
 
@@ -182,7 +182,7 @@ namespace CamelotFramework
 		mMouseMoveBtnState = btnStates;
 	}
 
-	void OSInputHandler::cursorPressed(const Int2& cursorPos, 
+	void OSInputHandler::cursorPressed(const Vector2I& cursorPos, 
 		OSMouseButton button, OSPositionalInputButtonStates& btnStates)
 	{
 		CM_LOCK_MUTEX(mOSInputMutex);
@@ -196,7 +196,7 @@ namespace CamelotFramework
 		btnState.btnStates = btnStates;
 	}
 
-	void OSInputHandler::cursorReleased(const Int2& cursorPos, 
+	void OSInputHandler::cursorReleased(const Vector2I& cursorPos, 
 		OSMouseButton button, OSPositionalInputButtonStates& btnStates)
 	{
 		CM_LOCK_MUTEX(mOSInputMutex);
@@ -210,7 +210,7 @@ namespace CamelotFramework
 		btnState.btnStates = btnStates;
 	}
 
-	void OSInputHandler::cursorDoubleClick(const Int2& cursorPos, OSPositionalInputButtonStates& btnStates)
+	void OSInputHandler::cursorDoubleClick(const Vector2I& cursorPos, OSPositionalInputButtonStates& btnStates)
 	{
 		CM_LOCK_MUTEX(mOSInputMutex);
 

+ 2 - 2
CamelotCore/Source/CmPixelBuffer.cpp

@@ -52,12 +52,12 @@ namespace CamelotFramework
         assert(!isLocked() && "Cannot lock this buffer, it is already locked!");
         assert(offset == 0 && length == mSizeInBytes && "Cannot lock memory region, most lock box or entire buffer");
         
-        Box myBox(0, 0, 0, mWidth, mHeight, mDepth);
+        PixelVolume myBox(0, 0, 0, mWidth, mHeight, mDepth);
         const PixelData &rv = lock(myBox, options);
         return rv.getData();
     }
 
-    const PixelData& PixelBuffer::lock(const Box& lockBox, GpuLockOptions options)
+    const PixelData& PixelBuffer::lock(const PixelVolume& lockBox, GpuLockOptions options)
     {
         // Lock the real buffer if there is no shadow buffer 
         mCurrentLock = lockImpl(lockBox, options);

+ 1 - 1
CamelotCore/Source/CmPixelUtil.cpp

@@ -779,7 +779,7 @@ namespace CamelotFramework {
 	{
 		return PixelUtil::getMemorySize(getWidth(), getHeight(), getDepth(), mFormat);
 	}
-	PixelData PixelData::getSubVolume(const Box &def) const
+	PixelData PixelData::getSubVolume(const PixelVolume &def) const
 	{
 		if(PixelUtil::isCompressed(mFormat))
 		{

+ 1 - 1
CamelotCore/Source/CmPlatform.cpp

@@ -31,7 +31,7 @@ namespace CamelotFramework
 		}
 	}
 
-	bool OSDropTarget::_isInside(const Int2& pos) const
+	bool OSDropTarget::_isInside(const Vector2I& pos) const
 	{
 		INT32 right = mX + mWidth;
 		INT32 bottom = mY + mHeight;

+ 11 - 11
CamelotCore/Source/CmPlatformWndProc.cpp

@@ -117,7 +117,7 @@ namespace CamelotFramework
 
 				ScreenToClient(hWnd, &mousePos);
 
-				Int2 mousePosInt;
+				Vector2I mousePosInt;
 				mousePosInt.x = mousePos.x;
 				mousePosInt.y = mousePos.y;
 
@@ -128,7 +128,7 @@ namespace CamelotFramework
 						return translateNonClientAreaType(area.type);
 				}
 
-				Vector<Rect>::type& moveAreasPerWindow = iterFind->second.moveAreas;
+				Vector<RectI>::type& moveAreasPerWindow = iterFind->second.moveAreas;
 				for(auto area : moveAreasPerWindow)
 				{
 					if(area.contains(mousePosInt))
@@ -150,7 +150,7 @@ namespace CamelotFramework
 			break;
 		case WM_LBUTTONUP:
 			{
-				Int2 intMousePos;
+				Vector2I intMousePos;
 				OSPositionalInputButtonStates btnStates;
 
 				getMouseData(hWnd, wParam, lParam, intMousePos, btnStates);
@@ -161,7 +161,7 @@ namespace CamelotFramework
 			break;
 		case WM_MBUTTONUP:
 			{
-				Int2 intMousePos;
+				Vector2I intMousePos;
 				OSPositionalInputButtonStates btnStates;
 
 				getMouseData(hWnd, wParam, lParam, intMousePos, btnStates);
@@ -172,7 +172,7 @@ namespace CamelotFramework
 			break;
 		case WM_RBUTTONUP:
 			{
-				Int2 intMousePos;
+				Vector2I intMousePos;
 				OSPositionalInputButtonStates btnStates;
 
 				getMouseData(hWnd, wParam, lParam, intMousePos, btnStates);
@@ -183,7 +183,7 @@ namespace CamelotFramework
 			break;
 		case WM_LBUTTONDOWN:
 			{
-				Int2 intMousePos;
+				Vector2I intMousePos;
 				OSPositionalInputButtonStates btnStates;
 
 				getMouseData(hWnd, wParam, lParam, intMousePos, btnStates);
@@ -194,7 +194,7 @@ namespace CamelotFramework
 			break;
 		case WM_MBUTTONDOWN:
 			{
-				Int2 intMousePos;
+				Vector2I intMousePos;
 				OSPositionalInputButtonStates btnStates;
 
 				getMouseData(hWnd, wParam, lParam, intMousePos, btnStates);
@@ -205,7 +205,7 @@ namespace CamelotFramework
 			break;
 		case WM_RBUTTONDOWN:
 			{
-				Int2 intMousePos;
+				Vector2I intMousePos;
 				OSPositionalInputButtonStates btnStates;
 
 				getMouseData(hWnd, wParam, lParam, intMousePos, btnStates);
@@ -216,7 +216,7 @@ namespace CamelotFramework
 			break;
 		case WM_LBUTTONDBLCLK:
 			{
-				Int2 intMousePos;
+				Vector2I intMousePos;
 				OSPositionalInputButtonStates btnStates;
 
 				getMouseData(hWnd, wParam, lParam, intMousePos, btnStates);
@@ -243,7 +243,7 @@ namespace CamelotFramework
 				if(uMsg == WM_NCMOUSEMOVE)
 					return true;
 
-				Int2 intMousePos;
+				Vector2I intMousePos;
 				OSPositionalInputButtonStates btnStates;
 				
 				getMouseData(hWnd, wParam, lParam, intMousePos, btnStates);
@@ -393,7 +393,7 @@ namespace CamelotFramework
 		return dir;
 	}
 
-	void PlatformWndProc::getMouseData(HWND hWnd, WPARAM wParam, LPARAM lParam, Int2& mousePos, OSPositionalInputButtonStates& btnStates)
+	void PlatformWndProc::getMouseData(HWND hWnd, WPARAM wParam, LPARAM lParam, Vector2I& mousePos, OSPositionalInputButtonStates& btnStates)
 	{
 		POINT clientPoint;
 

+ 9 - 9
CamelotCore/Source/Win32/CmPlatformImpl.cpp

@@ -10,10 +10,10 @@ namespace CamelotFramework
 {
 	boost::signal<void(RenderWindow*)> Platform::onMouseLeftWindow;
 
-	boost::signal<void(const Int2&, OSPositionalInputButtonStates)> Platform::onCursorMoved;
-	boost::signal<void(const Int2&, OSMouseButton button, OSPositionalInputButtonStates)> Platform::onCursorButtonPressed;
-	boost::signal<void(const Int2&, OSMouseButton button, OSPositionalInputButtonStates)> Platform::onCursorButtonReleased;
-	boost::signal<void(const Int2&, OSPositionalInputButtonStates)> Platform::onCursorDoubleClick;
+	boost::signal<void(const Vector2I&, OSPositionalInputButtonStates)> Platform::onCursorMoved;
+	boost::signal<void(const Vector2I&, OSMouseButton button, OSPositionalInputButtonStates)> Platform::onCursorButtonPressed;
+	boost::signal<void(const Vector2I&, OSMouseButton button, OSPositionalInputButtonStates)> Platform::onCursorButtonReleased;
+	boost::signal<void(const Vector2I&, OSPositionalInputButtonStates)> Platform::onCursorDoubleClick;
 	boost::signal<void(InputCommandType)> Platform::onInputCommand;
 	boost::signal<void(float)> Platform::onMouseWheelScrolled;
 	boost::signal<void(UINT32)> Platform::onCharInput;
@@ -70,7 +70,7 @@ namespace CamelotFramework
 	NativeCursorData Platform::mCursor;
 	bool Platform::mUsingCustomCursor = false;
 
-	void Platform::setCursorPosition(const Int2& screenPos)
+	void Platform::setCursorPosition(const Vector2I& screenPos)
 	{
 		SetCursorPos(screenPos.x, screenPos.y);
 	}
@@ -93,7 +93,7 @@ namespace CamelotFramework
 		PostMessage(hwnd, WM_CM_RELEASECAPTURE, WPARAM(hwnd), 0);
 	}
 
-	bool Platform::isPointOverWindow(const RenderWindow& window, const Int2& screenPos)
+	bool Platform::isPointOverWindow(const RenderWindow& window, const Vector2I& screenPos)
 	{
 		RenderWindowPtr primaryWindow = gApplication().getPrimaryWindow();
 
@@ -149,7 +149,7 @@ namespace CamelotFramework
 		}
 	}
 
-	void Platform::clipCursorToRect(const Rect& screenRect)
+	void Platform::clipCursorToRect(const RectI& screenRect)
 	{
 		RECT clipWindowRect;
 		clipWindowRect.left = screenRect.x;
@@ -217,7 +217,7 @@ namespace CamelotFramework
 	}
 
 	// TODO - Add support for animated custom cursor
-	void Platform::setCustomCursor(PixelData& pixelData, const Int2& hotSpot)
+	void Platform::setCustomCursor(PixelData& pixelData, const Vector2I& hotSpot)
 	{
 		if(mUsingCustomCursor)
 		{
@@ -294,7 +294,7 @@ namespace CamelotFramework
 		PostMessage(hwnd, WM_SETCURSOR, WPARAM(hwnd), (LPARAM)MAKELONG(HTCLIENT, WM_MOUSEMOVE));
 	}
 
-	void Platform::setCaptionNonClientAreas(const RenderWindow& window, const Vector<Rect>::type& nonClientAreas)
+	void Platform::setCaptionNonClientAreas(const RenderWindow& window, const Vector<RectI>::type& nonClientAreas)
 	{
 		CM_LOCK_MUTEX(mSync);
 

+ 1 - 1
CamelotD3D11RenderSystem/Include/CmD3D11Mappings.h

@@ -60,7 +60,7 @@ namespace CamelotFramework
 		static void get(const Color& inColour, float * outColour );
 		static bool isMappingWrite(D3D11_MAP map);
 		static bool isMappingRead(D3D11_MAP map);
-		static D3D11_BOX toDx11Box(const Box &inBox);
+		static D3D11_BOX toDx11Box(const PixelVolume &inBox);
 
 		/// utility method, convert D3D11 pixel format to engine pixel format
 		static PixelFormat _getPF(DXGI_FORMAT d3dPF);

+ 2 - 2
CamelotD3D11RenderSystem/Include/CmD3D11RenderWindow.h

@@ -58,12 +58,12 @@ namespace CamelotFramework
 		/**
 		 * @copydoc RenderWindow::screenToWindowPos
 		 */
-		Int2 screenToWindowPos(const Int2& screenPos) const;
+		Vector2I screenToWindowPos(const Vector2I& screenPos) const;
 
 		/**
 		 * @copydoc RenderWindow::windowToScreenPos
 		 */
-		Int2 windowToScreenPos(const Int2& windowPos) const;
+		Vector2I windowToScreenPos(const Vector2I& windowPos) const;
 
 		/**
 		 * @copydoc RenderWindow::getCustomAttribute

+ 1 - 1
CamelotD3D11RenderSystem/Source/CmD3D11Mappings.cpp

@@ -415,7 +415,7 @@ namespace CamelotFramework
 		outColour[3] = inColour.a;	
 	}
 
-	D3D11_BOX D3D11Mappings::toDx11Box(const Box &inBox)
+	D3D11_BOX D3D11Mappings::toDx11Box(const PixelVolume &inBox)
 	{
 		D3D11_BOX res;
 		res.left	= static_cast<UINT>(inBox.left);

+ 1 - 1
CamelotD3D11RenderSystem/Source/CmD3D11RenderSystem.cpp

@@ -592,7 +592,7 @@ namespace CamelotFramework
 		if(mActiveRenderTarget == nullptr)
 			return;
 
-		Rect clearArea((int)mViewport.TopLeftX, (int)mViewport.TopLeftY, (int)mViewport.Width, (int)mViewport.Height);
+		RectI clearArea((int)mViewport.TopLeftX, (int)mViewport.TopLeftY, (int)mViewport.Width, (int)mViewport.Height);
 
 		bool clearEntireTarget = clearArea.width == 0 || clearArea.height == 0;
 		clearEntireTarget |= (clearArea.x == 0 && clearArea.y == 0 && clearArea.width == mActiveRenderTarget->getWidth() && clearArea.height == mActiveRenderTarget->getHeight());

+ 1 - 1
CamelotD3D11RenderSystem/Source/CmD3D11RenderUtility.cpp

@@ -2,7 +2,7 @@
 #include "CmD3D11Device.h"
 #include "CmVector3.h"
 #include "CmColor.h"
-#include "CmRect.h"
+#include "CmRectI.h"
 #include "CmD3D11BlendState.h"
 #include "CmD3D11RasterizerState.h"
 #include "CmD3D11DepthStencilState.h"

+ 4 - 4
CamelotD3D11RenderSystem/Source/CmD3D11RenderWindow.cpp

@@ -526,24 +526,24 @@ namespace CamelotFramework
 		SAFE_RELEASE(backbuffer);
 	}
 
-	Int2 D3D11RenderWindow::screenToWindowPos(const Int2& screenPos) const
+	Vector2I D3D11RenderWindow::screenToWindowPos(const Vector2I& screenPos) const
 	{
 		POINT pos;
 		pos.x = screenPos.x;
 		pos.y = screenPos.y;
 
 		ScreenToClient(mHWnd, &pos);
-		return Int2(pos.x, pos.y);
+		return Vector2I(pos.x, pos.y);
 	}
 
-	Int2 D3D11RenderWindow::windowToScreenPos(const Int2& windowPos) const
+	Vector2I D3D11RenderWindow::windowToScreenPos(const Vector2I& windowPos) const
 	{
 		POINT pos;
 		pos.x = windowPos.x;
 		pos.y = windowPos.y;
 
 		ClientToScreen(mHWnd, &pos);
-		return Int2(pos.x, pos.y);
+		return Vector2I(pos.x, pos.y);
 	}
 
 	void D3D11RenderWindow::_windowMovedOrResized()

+ 5 - 5
CamelotD3D9Renderer/Include/CmD3D9PixelBuffer.h

@@ -104,8 +104,8 @@ namespace CamelotFramework {
 		CM_STATIC_MUTEX(msDeviceAccessMutex)		
 	protected:
 		/// Lock a box
-		PixelData lockImpl(const Box lockBox,  GpuLockOptions options);
-		PixelData lockBuffer(BufferResources* bufferResources, const Box &lockBox, DWORD flags);
+		PixelData lockImpl(const PixelVolume lockBox,  GpuLockOptions options);
+		PixelData lockBuffer(BufferResources* bufferResources, const PixelVolume &lockBox, DWORD flags);
 
 		/// Unlock a box
 		void unlockImpl(void);
@@ -115,12 +115,12 @@ namespace CamelotFramework {
 		BufferResources* createBufferResources();
 
 		void blit(IDirect3DDevice9* d3d9Device, const PixelBufferPtr &src,
-				const Box &srcBox, const Box &dstBox, 
+				const PixelVolume &srcBox, const PixelVolume &dstBox, 
 				BufferResources* srcBufferResources, 
 				BufferResources* dstBufferResources);
-		void blitFromMemory(const PixelData &src, const Box &dstBox, BufferResources* dstBufferResources);
+		void blitFromMemory(const PixelData &src, const PixelVolume &dstBox, BufferResources* dstBufferResources);
 
-		void blitToMemory(const Box &srcBox, const PixelData &dst, BufferResources* srcBufferResources, IDirect3DDevice9* d3d9Device);
+		void blitToMemory(const PixelVolume &srcBox, const PixelData &dst, BufferResources* srcBufferResources, IDirect3DDevice9* d3d9Device);
 	};
 };
 #endif

+ 1 - 1
CamelotD3D9Renderer/Include/CmD3D9RenderSystem.h

@@ -525,7 +525,7 @@ namespace CamelotFramework
 		 */
 		void setStencilRefValue(UINT32 refValue);
 
-		void clearArea(UINT32 buffers, const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0, const Rect& clearArea = Rect::EMPTY);
+		void clearArea(UINT32 buffers, const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0, const RectI& clearArea = RectI::EMPTY);
 
 		/// Notify when a device has been lost.
 		void notifyOnDeviceLost(D3D9Device* device);

+ 2 - 2
CamelotD3D9Renderer/Include/CmD3D9RenderWindow.h

@@ -101,12 +101,12 @@ namespace CamelotFramework
 		/**
 		 * @copydoc RenderWindow::screenToWindowPos
 		 */
-		Int2 screenToWindowPos(const Int2& screenPos) const;
+		Vector2I screenToWindowPos(const Vector2I& screenPos) const;
 
 		/**
 		 * @copydoc RenderWindow::windowToScreenPos
 		 */
-		Int2 windowToScreenPos(const Int2& windowPos) const;
+		Vector2I windowToScreenPos(const Vector2I& windowPos) const;
 
 		/**
 		 * @copydoc RenderWindow::_windowMovedOrResized

+ 4 - 4
CamelotD3D9Renderer/Source/CmD3D9PixelBuffer.cpp

@@ -224,7 +224,7 @@ namespace CamelotFramework
 		rval.setExternalBuffer((UINT8*)lbox.pBits);
 	}
 	// Convert Ogre integer Box to D3D rectangle
-	RECT toD3DRECT(const Box &lockBox)
+	RECT toD3DRECT(const PixelVolume &lockBox)
 	{
 		RECT prect;
 		assert(lockBox.getDepth() == 1);
@@ -235,7 +235,7 @@ namespace CamelotFramework
 		return prect;
 	}
 	// Convert Ogre integer Box to D3D box
-	D3DBOX toD3DBOX(const Box &lockBox)
+	D3DBOX toD3DBOX(const PixelVolume &lockBox)
 	{
 		D3DBOX pbox;
 	
@@ -271,7 +271,7 @@ namespace CamelotFramework
 		return pbox;
 	}
 	//-----------------------------------------------------------------------------  
-	PixelData D3D9PixelBuffer::lockImpl(const Box lockBox,  GpuLockOptions options)
+	PixelData D3D9PixelBuffer::lockImpl(const PixelVolume lockBox,  GpuLockOptions options)
 	{	
 		D3D9_DEVICE_ACCESS_CRITICAL_SECTION
 
@@ -308,7 +308,7 @@ namespace CamelotFramework
 
 	//-----------------------------------------------------------------------------  
 	CamelotFramework::PixelData D3D9PixelBuffer::lockBuffer(BufferResources* bufferResources, 
-													   const Box &lockBox, 
+													   const PixelVolume &lockBox, 
 													   DWORD flags)
 	{
 		// Set extents and format

+ 3 - 3
CamelotD3D9Renderer/Source/CmD3D9RenderSystem.cpp

@@ -1383,19 +1383,19 @@ namespace CamelotFramework
 		if(mActiveRenderTarget == nullptr)
 			return;
 
-		Rect clearRect(0, 0, mActiveRenderTarget->getWidth(), mActiveRenderTarget->getHeight());
+		RectI clearRect(0, 0, mActiveRenderTarget->getWidth(), mActiveRenderTarget->getHeight());
 
 		clearArea(buffers, color, depth, stencil, clearRect);
 	}
 
 	void D3D9RenderSystem::clearViewport(UINT32 buffers, const Color& color, float depth, UINT16 stencil)
 	{
-		Rect clearRect(mViewportLeft, mViewportTop, mViewportWidth, mViewportHeight);
+		RectI clearRect(mViewportLeft, mViewportTop, mViewportWidth, mViewportHeight);
 
 		clearArea(buffers, color, depth, stencil, clearRect);
 	}
 
-	void D3D9RenderSystem::clearArea(UINT32 buffers, const Color& color, float depth, UINT16 stencil, const Rect& clearRect)
+	void D3D9RenderSystem::clearArea(UINT32 buffers, const Color& color, float depth, UINT16 stencil, const RectI& clearRect)
 	{
 		THROW_IF_NOT_CORE_THREAD;
 

+ 4 - 4
CamelotD3D9Renderer/Source/CmD3D9RenderWindow.cpp

@@ -460,24 +460,24 @@ namespace CamelotFramework
 			mDevice->present(this);		
 	}
 
-	Int2 D3D9RenderWindow::screenToWindowPos(const Int2& screenPos) const
+	Vector2I D3D9RenderWindow::screenToWindowPos(const Vector2I& screenPos) const
 	{
 		POINT pos;
 		pos.x = screenPos.x;
 		pos.y = screenPos.y;
 
 		ScreenToClient(mHWnd, &pos);
-		return Int2(pos.x, pos.y);
+		return Vector2I(pos.x, pos.y);
 	}
 
-	Int2 D3D9RenderWindow::windowToScreenPos(const Int2& windowPos) const
+	Vector2I D3D9RenderWindow::windowToScreenPos(const Vector2I& windowPos) const
 	{
 		POINT pos;
 		pos.x = windowPos.x;
 		pos.y = windowPos.y;
 
 		ClientToScreen(mHWnd, &pos);
-		return Int2(pos.x, pos.y);
+		return Vector2I(pos.x, pos.y);
 	}
 
 	void D3D9RenderWindow::copyToMemory(const PixelData &dst, FrameBuffer buffer)

+ 5 - 5
CamelotGLRenderer/Include/CmGLPixelBuffer.h

@@ -39,16 +39,16 @@ namespace CamelotFramework
 	{
 	public:
 		// Upload a box of pixels to this buffer on the card
-		virtual void upload(const PixelData &data, const Box &dest);
+		virtual void upload(const PixelData &data, const PixelVolume &dest);
 		// Download a box of pixels from the card
 		virtual void download(const PixelData &data);
 
 		virtual void blitFromTexture(GLTextureBuffer *src);
-		virtual void blitFromTexture(GLTextureBuffer *src, const Box &srcBox, const Box &dstBox);
+		virtual void blitFromTexture(GLTextureBuffer *src, const PixelVolume &srcBox, const PixelVolume &dstBox);
 
 	protected:  
 		/// Lock a box
-		PixelData lockImpl(const Box lockBox,  GpuLockOptions options);
+		PixelData lockImpl(const PixelVolume lockBox,  GpuLockOptions options);
 
 		/// Unlock a box
 		void unlockImpl(void);
@@ -89,14 +89,14 @@ namespace CamelotFramework
         /// @copydoc HardwarePixelBuffer::bindToFramebuffer
         virtual void bindToFramebuffer(GLenum attachment, UINT32 zoffset);
         /// Upload a box of pixels to this buffer on the card
-		virtual void upload(const PixelData &data, const Box &dest);
+		virtual void upload(const PixelData &data, const PixelVolume &dest);
 		// Download a box of pixels from the card
 		virtual void download(const PixelData &data);
   
         /// Copy from framebuffer
         void copyFromFramebuffer(UINT32 zoffset);
 
-		void blitFromTexture(GLTextureBuffer *src, const Box &srcBox, const Box &dstBox);
+		void blitFromTexture(GLTextureBuffer *src, const PixelVolume &srcBox, const PixelVolume &dstBox);
     protected:
         // In case this is a texture level
 		GLenum mTarget;

+ 1 - 1
CamelotGLRenderer/Include/CmGLRenderSystem.h

@@ -581,7 +581,7 @@ namespace CamelotFramework {
 		 */
 		void endDraw();
 
-		void clearArea(UINT32 buffers, const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0, const Rect& clearArea = Rect::EMPTY);
+		void clearArea(UINT32 buffers, const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0, const RectI& clearArea = RectI::EMPTY);
 
 		void setActiveProgram(GpuProgramType gptype, GLSLGpuProgramPtr program);
 		GLSLGpuProgramPtr getActiveProgram(GpuProgramType gptype) const;

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است