From f6c265dcf3fb5297b10f4f21fec7475036da9d3f Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 29 Oct 2013 15:22:04 -0700 Subject: [PATCH] remove the ground plane --- interface/src/Application.cpp | 26 -------------------------- interface/src/Menu.cpp | 1 - interface/src/Menu.h | 1 - interface/src/Util.cpp | 33 --------------------------------- interface/src/Util.h | 2 -- 5 files changed, 63 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c05ebaa56e..6f1b8ae8e8 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2736,32 +2736,6 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { // disable specular lighting for ground and voxels glMaterialfv(GL_FRONT, GL_SPECULAR, NO_SPECULAR_COLOR); - //draw a grid ground plane.... - if (Menu::getInstance()->isOptionChecked(MenuOption::GroundPlane)) { - PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), - "Application::displaySide() ... ground plane..."); - - // draw grass plane with fog - glEnable(GL_FOG); - glEnable(GL_NORMALIZE); - const float FOG_COLOR[] = { 1.0f, 1.0f, 1.0f, 1.0f }; - glFogfv(GL_FOG_COLOR, FOG_COLOR); - glFogi(GL_FOG_MODE, GL_EXP2); - glFogf(GL_FOG_DENSITY, 0.025f); - glPushMatrix(); - const float GRASS_PLANE_SIZE = 256.0f; - glTranslatef(-GRASS_PLANE_SIZE * 0.5f, -0.01f, GRASS_PLANE_SIZE * 0.5f); - glScalef(GRASS_PLANE_SIZE, 1.0f, GRASS_PLANE_SIZE); - glRotatef(-90.0f, 1.0f, 0.0f, 0.0f); - glColor3ub(70, 134, 74); - const int GRASS_DIVISIONS = 40; - _geometryCache.renderSquare(GRASS_DIVISIONS, GRASS_DIVISIONS); - glPopMatrix(); - glDisable(GL_FOG); - glDisable(GL_NORMALIZE); - - //renderGroundPlaneGrid(EDGE_SIZE_GROUND_PLANE, _audio.getCollisionSoundMagnitude()); - } // Draw Cloud Particles if (Menu::getInstance()->isOptionChecked(MenuOption::ParticleCloud)) { _cloud.render(); diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index a31ff61ae8..a431b4b457 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -249,7 +249,6 @@ Menu::Menu() : addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::Stars, Qt::Key_Asterisk, true); addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::Atmosphere, Qt::SHIFT | Qt::Key_A, true); - addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::GroundPlane, 0, true); addActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::GlowMode, 0, diff --git a/interface/src/Menu.h b/interface/src/Menu.h index 0b5f6fcdce..9ba234fcb3 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -177,7 +177,6 @@ namespace MenuOption { const QString KillLocalVoxels = "Kill Local Voxels"; const QString GoHome = "Go Home"; const QString Gravity = "Use Gravity"; - const QString GroundPlane = "Ground Plane"; const QString ParticleCloud = "Particle Cloud"; const QString Log = "Log"; const QString Login = "Login"; diff --git a/interface/src/Util.cpp b/interface/src/Util.cpp index 2057198daf..447e1e6ccc 100644 --- a/interface/src/Util.cpp +++ b/interface/src/Util.cpp @@ -413,39 +413,6 @@ void renderCollisionOverlay(int width, int height, float magnitude) { } } -void renderGroundPlaneGrid(float size, float impact) { - float IMPACT_SOUND_MAGNITUDE_FOR_RECOLOR = 1.f; - glLineWidth(2.0); - glm::vec4 impactColor(1, 0, 0, 1); - glm::vec3 lineColor(0.4, 0.5, 0.3); - glm::vec4 surfaceColor(0.5, 0.5, 0.5, 0.4); - - glColor3fv(&lineColor.x); - for (float x = 0; x <= size; x++) { - glBegin(GL_LINES); - glVertex3f(x, 0, 0); - glVertex3f(x, 0, size); - glVertex3f(0, 0, x); - glVertex3f(size, 0, x); - glEnd(); - } - - // Draw the floor, colored for recent impact - glm::vec4 floorColor; - if (impact > IMPACT_SOUND_MAGNITUDE_FOR_RECOLOR) { - floorColor = impact * impactColor + (1.f - impact) * surfaceColor; - } else { - floorColor = surfaceColor; - } - glColor4fv(&floorColor.x); - glBegin(GL_QUADS); - glVertex3f(0, 0, 0); - glVertex3f(size, 0, 0); - glVertex3f(size, 0, size); - glVertex3f(0, 0, size); - glEnd(); -} - void renderMouseVoxelGrid(const float& mouseVoxelX, const float& mouseVoxelY, const float& mouseVoxelZ, const float& mouseVoxelS) { glm::vec3 origin = glm::vec3(mouseVoxelX, mouseVoxelY, mouseVoxelZ); diff --git a/interface/src/Util.h b/interface/src/Util.h index f304535d70..c208b67bef 100644 --- a/interface/src/Util.h +++ b/interface/src/Util.h @@ -61,8 +61,6 @@ glm::quat extractRotation(const glm::mat4& matrix, bool assumeOrthogonal = false double diffclock(timeval *clock1,timeval *clock2); -void renderGroundPlaneGrid(float size, float impact); - 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);