Basic transformation widgets

This commit is contained in:
2015-12-15 18:01:20 +01:00
parent 51dd627ae3
commit 322aedaf72
6 changed files with 285 additions and 40 deletions
+3
View File
@@ -34,6 +34,8 @@ public:
EntityID Entity;
//World position of the "pick"
glm::vec3 Position;
// Depth
float Depth;
};
PickData Pick(glm::vec2 screenCoord) const
@@ -43,6 +45,7 @@ public:
// Invert screen y coordinate
screenCoord.y = Resolution.Height - screenCoord.y;
ScreenCoords::PixelData data = ScreenCoords::ToPixelData(screenCoord, PickingBuffer, *DepthBuffer);
pickData.Depth = data.Depth;
auto it = PickingColorsToEntity->find(glm::vec2(data.Color[0], data.Color[1]));
if (it != PickingColorsToEntity->end()) {