remove the ground plane

This commit is contained in:
Stephen Birarda 2013-10-29 15:22:04 -07:00
parent 08a368a9fd
commit f6c265dcf3
5 changed files with 0 additions and 63 deletions

View file

@ -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();

View file

@ -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,

View file

@ -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";

View file

@ -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);

View file

@ -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);