From d61ba02a387d07de67aa9e57a37abf78b06f613a Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Tue, 25 Feb 2014 21:44:38 -0800 Subject: [PATCH] removed more cruft --- interface/src/Application.h | 1 - interface/src/Util.cpp | 91 ------------------------------------- interface/src/Util.h | 6 --- 3 files changed, 98 deletions(-) diff --git a/interface/src/Application.h b/interface/src/Application.h index fcb6123eaf..7fbdec6cf8 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -430,7 +430,6 @@ private: float _touchDragStartedAvgY; bool _isTouchPressed; // true if multitouch has been pressed (clear when finished) - //VoxelDetail _mouseVoxelDragging; bool _mousePressed; // true if mouse has been pressed (clear when finished) VoxelDetail _hoverVoxel; // Stuff about the voxel I am hovering or clicking diff --git a/interface/src/Util.cpp b/interface/src/Util.cpp index 183ef116e6..f601618eae 100644 --- a/interface/src/Util.cpp +++ b/interface/src/Util.cpp @@ -419,97 +419,6 @@ void renderCollisionOverlay(int width, int height, float magnitude) { } } -void renderMouseVoxelGrid(const float& mouseVoxelX, const float& mouseVoxelY, const float& mouseVoxelZ, const float& mouseVoxelS) { - glm::vec3 origin = glm::vec3(mouseVoxelX, mouseVoxelY, mouseVoxelZ); - - glLineWidth(3.0); - - const int HALF_GRID_DIMENSIONS = 4; - glBegin(GL_LINES); - - glm::vec3 xColor(0.0, 0.6, 0.0); - glColor3fv(&xColor.x); - - glVertex3f(origin.x + HALF_GRID_DIMENSIONS * mouseVoxelS, 0, origin.z); - glVertex3f(origin.x - HALF_GRID_DIMENSIONS * mouseVoxelS, 0, origin.z); - - glm::vec3 zColor(0.0, 0.0, 0.6); - glColor3fv(&zColor.x); - - glVertex3f(origin.x, 0, origin.z + HALF_GRID_DIMENSIONS * mouseVoxelS); - glVertex3f(origin.x, 0, origin.z - HALF_GRID_DIMENSIONS * mouseVoxelS); - - glm::vec3 yColor(0.6, 0.0, 0.0); - glColor3fv(&yColor.x); - - glVertex3f(origin.x, 0, origin.z); - glVertex3f(origin.x, origin.y, origin.z); - glEnd(); -} - -void renderNudgeGrid(float voxelX, float voxelY, float voxelZ, float voxelS, float voxelPrecision) { - glm::vec3 origin = glm::vec3(voxelX, voxelY, voxelZ); - - glLineWidth(1.0); - - const int GRID_DIMENSIONS = 4; - const int GRID_SCALER = voxelS / voxelPrecision; - const int GRID_SEGMENTS = GRID_DIMENSIONS * GRID_SCALER; - glBegin(GL_LINES); - - for (int xz = - (GRID_SEGMENTS / 2); xz <= GRID_SEGMENTS / 2 + GRID_SCALER; xz++) { - glm::vec3 xColor(0.0, 0.6, 0.0); - glColor3fv(&xColor.x); - - glVertex3f(origin.x + GRID_DIMENSIONS * voxelS, 0, origin.z + xz * voxelPrecision); - glVertex3f(origin.x - (GRID_DIMENSIONS - 1) * voxelS, 0, origin.z + xz * voxelPrecision); - - glm::vec3 zColor(0.0, 0.0, 0.6); - glColor3fv(&zColor.x); - - glVertex3f(origin.x + xz * voxelPrecision, 0, origin.z + GRID_DIMENSIONS * voxelS); - glVertex3f(origin.x + xz * voxelPrecision, 0, origin.z - (GRID_DIMENSIONS - 1) * voxelS); - } - glEnd(); - - glColor3f(1.0f,1.0f,1.0f); - - glBegin(GL_POLYGON);//begin drawing of square - glVertex3f(voxelX, 0.0f, voxelZ);//first vertex - glVertex3f(voxelX + voxelS, 0.0f, voxelZ);//second vertex - glVertex3f(voxelX + voxelS, 0.0f, voxelZ + voxelS);//third vertex - glVertex3f(voxelX, 0.0f, voxelZ + voxelS);//fourth vertex - glEnd();//end drawing of polygon -} - -void renderNudgeGuide(float voxelX, float voxelY, float voxelZ, float voxelS) { - glm::vec3 origin = glm::vec3(voxelX, voxelY, voxelZ); - - glLineWidth(3.0); - - glBegin(GL_LINES); - - glm::vec3 guideColor(1.0, 1.0, 1.0); - glColor3fv(&guideColor.x); - - glVertex3f(origin.x + voxelS, 0, origin.z); - glVertex3f(origin.x, 0, origin.z); - - glVertex3f(origin.x, 0, origin.z); - glVertex3f(origin.x, 0, origin.z + voxelS); - - glVertex3f(origin.x + voxelS, 0, origin.z); - glVertex3f(origin.x + voxelS, 0, origin.z + voxelS); - - glVertex3f(origin.x, 0, origin.z + voxelS); - glVertex3f(origin.x + voxelS, 0, origin.z + voxelS); - - glEnd(); -} - - - - void renderSphereOutline(glm::vec3 position, float radius, int numSides, glm::vec3 cameraPosition) { glm::vec3 vectorToPosition(glm::normalize(position - cameraPosition)); glm::vec3 right = glm::cross(vectorToPosition, glm::vec3(0.0f, 1.0f, 0.0f)); diff --git a/interface/src/Util.h b/interface/src/Util.h index 5710be5f2b..04403aea16 100644 --- a/interface/src/Util.h +++ b/interface/src/Util.h @@ -61,12 +61,6 @@ float extractUniformScale(const glm::vec3& scale); double diffclock(timeval *clock1,timeval *clock2); -void renderMouseVoxelGrid(const float& mouseVoxelX, const float& mouseVoxelY, const float& mouseVoxelZ, const float& mouseVoxelS); - -void renderNudgeGrid(float voxelX, float voxelY, float voxelZ, float voxelS, float voxelPrecision); - -void renderNudgeGuide(float voxelX, float voxelY, float voxelZ, float voxelS); - void renderCollisionOverlay(int width, int height, float magnitude); void renderOrientationDirections( glm::vec3 position, const glm::quat& orientation, float size );