From 9be2b339715e5fb8618d5daec566e7ba262e8c10 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Fri, 10 Oct 2014 17:06:11 -0700 Subject: [PATCH 1/7] Hair draped for masks and driven by audio loudness --- interface/src/Hair.cpp | 52 ++++++++++++++++++++++--------- interface/src/Hair.h | 9 +++--- interface/src/avatar/Avatar.cpp | 1 + interface/src/avatar/MyAvatar.cpp | 1 + 4 files changed, 45 insertions(+), 18 deletions(-) diff --git a/interface/src/Hair.cpp b/interface/src/Hair.cpp index 810833d750..227adb10a6 100644 --- a/interface/src/Hair.cpp +++ b/interface/src/Hair.cpp @@ -17,13 +17,13 @@ const float HAIR_DAMPING = 0.99f; const float CONSTRAINT_RELAXATION = 10.0f; -const float HAIR_ACCELERATION_COUPLING = 0.025f; -const float HAIR_ANGULAR_VELOCITY_COUPLING = 0.01f; -const float HAIR_ANGULAR_ACCELERATION_COUPLING = 0.001f; +const float HAIR_ACCELERATION_COUPLING = 0.045f; +const float HAIR_ANGULAR_VELOCITY_COUPLING = 0.020f; +const float HAIR_ANGULAR_ACCELERATION_COUPLING = 0.003f; const float HAIR_MAX_LINEAR_ACCELERATION = 4.0f; -const float HAIR_STIFFNESS = 0.005f; -const glm::vec3 HAIR_COLOR1(0.98f, 0.92f, 0.843f); -const glm::vec3 HAIR_COLOR2(0.545f, 0.533f, 0.47f); +const float HAIR_STIFFNESS = 0.00f; +const glm::vec3 HAIR_COLOR1(0.98f, 0.76f, 0.075f); +const glm::vec3 HAIR_COLOR2(0.912f, 0.184f, 0.101f); Hair::Hair(int strands, int links, @@ -38,7 +38,8 @@ Hair::Hair(int strands, _acceleration(0.0f), _angularVelocity(0.0f), _angularAcceleration(0.0f), - _gravity(0.0f) + _gravity(0.0f), + _loudness() { _hairPosition = new glm::vec3[_strands * _links]; _hairOriginalPosition = new glm::vec3[_strands * _links]; @@ -48,12 +49,15 @@ Hair::Hair(int strands, _hairColors = new glm::vec3[_strands * _links]; _hairIsMoveable = new int[_strands * _links]; _hairConstraints = new int[_strands * _links * HAIR_CONSTRAINTS]; // Hair can link to two others - const float FACE_WIDTH = PI / 4.0f; glm::vec3 thisVertex; for (int strand = 0; strand < _strands; strand++) { float strandAngle = randFloat() * PI; - float azimuth = FACE_WIDTH / 2.0f + (randFloat() * (2.0 * PI - FACE_WIDTH)); - float elevation = PI_OVER_TWO - (randFloat() * 0.75 * PI); + float azimuth; + float elevation = PI_OVER_TWO - (randFloat() * 0.10f * PI); + azimuth = PI_OVER_TWO; + if (randFloat() < 0.5f) { + azimuth *= -1.0f; + } glm::vec3 thisStrand(sinf(azimuth) * cosf(elevation), sinf(elevation), -cosf(azimuth) * cosf(elevation)); thisStrand *= _radius; @@ -77,7 +81,7 @@ Hair::Hair(int strands, _hairOriginalPosition[vertexIndex] = _hairLastPosition[vertexIndex] = _hairPosition[vertexIndex] = thisVertex; _hairQuadDelta[vertexIndex] = glm::vec3(cos(strandAngle) * _hairThickness, 0.f, sin(strandAngle) * _hairThickness); - _hairQuadDelta[vertexIndex] *= 1.f - ((float)link / _links); + _hairQuadDelta[vertexIndex] *= ((float)link / _links); _hairNormals[vertexIndex] = glm::normalize(randVector()); if (randFloat() < elevation / PI_OVER_TWO) { _hairColors[vertexIndex] = HAIR_COLOR1 * ((float)(link + 1) / (float)_links); @@ -114,9 +118,15 @@ void Hair::simulate(float deltaTime) { _hairPosition[vertexIndex] += glm::normalize(_hairPosition[vertexIndex]) * (_radius - glm::length(_hairPosition[vertexIndex])); } - + // Add random thing driven by loudness + const float LOUD_BASE = 0.0005f; + float loudnessFactor = (_loudness > 0.0f) ? logf(_loudness) / 2000.0f : 0.0f; + + _hairPosition[vertexIndex] += randVector() * (LOUD_BASE + loudnessFactor) * ((float)link / (float)_links); + // Add gravity - _hairPosition[vertexIndex] += _gravity * deltaTime; + const float SCALE_GRAVITY = 0.10f; + _hairPosition[vertexIndex] += _gravity * deltaTime * SCALE_GRAVITY; // Add linear acceleration _hairPosition[vertexIndex] -= acceleration * HAIR_ACCELERATION_COUPLING * deltaTime; @@ -179,11 +189,23 @@ void Hair::render() { // // Before calling this function, translate/rotate to the origin of the owning object // + float loudnessFactor = (_loudness > 0.0f) ? logf(_loudness) / 16.0f : 0.0f; + const int SPARKLE_EVERY = 5; + const float HAIR_SETBACK = 0.125f; + int sparkleIndex = random() % 5; + glPushMatrix(); + glTranslatef(0.f, 0.f, HAIR_SETBACK); glBegin(GL_QUADS); for (int strand = 0; strand < _strands; strand++) { for (int link = 0; link < _links - 1; link++) { int vertexIndex = strand * _links + link; - glColor3fv(&_hairColors[vertexIndex].x); + glm::vec3 thisColor = _hairColors[vertexIndex]; + if (sparkleIndex % SPARKLE_EVERY == 0) { + thisColor.x += (1.f - thisColor.x) * loudnessFactor; + thisColor.y += (1.f - thisColor.y) * loudnessFactor; + thisColor.z += (1.f - thisColor.z) * loudnessFactor; + } + glColor3fv(&thisColor.x); glNormal3fv(&_hairNormals[vertexIndex].x); glVertex3f(_hairPosition[vertexIndex].x - _hairQuadDelta[vertexIndex].x, _hairPosition[vertexIndex].y - _hairQuadDelta[vertexIndex].y, @@ -198,9 +220,11 @@ void Hair::render() { glVertex3f(_hairPosition[vertexIndex + 1].x - _hairQuadDelta[vertexIndex].x, _hairPosition[vertexIndex + 1].y - _hairQuadDelta[vertexIndex].y, _hairPosition[vertexIndex + 1].z - _hairQuadDelta[vertexIndex].z); + sparkleIndex++; } } glEnd(); + glPopMatrix(); } diff --git a/interface/src/Hair.h b/interface/src/Hair.h index f5180f639d..036d137cd3 100644 --- a/interface/src/Hair.h +++ b/interface/src/Hair.h @@ -23,11 +23,11 @@ const int HAIR_CONSTRAINTS = 2; -const int DEFAULT_HAIR_STRANDS = 50; +const int DEFAULT_HAIR_STRANDS = 20; const int DEFAULT_HAIR_LINKS = 10; const float DEFAULT_HAIR_RADIUS = 0.15f; -const float DEFAULT_HAIR_LINK_LENGTH = 0.03f; -const float DEFAULT_HAIR_THICKNESS = 0.015f; +const float DEFAULT_HAIR_LINK_LENGTH = 0.04f; +const float DEFAULT_HAIR_THICKNESS = 0.025f; class Hair { public: @@ -42,6 +42,7 @@ public: void setAngularVelocity(const glm::vec3& angularVelocity) { _angularVelocity = angularVelocity; } void setAngularAcceleration(const glm::vec3& angularAcceleration) { _angularAcceleration = angularAcceleration; } void setGravity(const glm::vec3& gravity) { _gravity = gravity; } + void setLoudness(const float loudness) { _loudness = loudness; } private: int _strands; @@ -61,7 +62,7 @@ private: glm::vec3 _angularVelocity; glm::vec3 _angularAcceleration; glm::vec3 _gravity; - + float _loudness; }; diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 0477f6e04e..c2076397af 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -192,6 +192,7 @@ void Avatar::simulate(float deltaTime) { _hair.setAngularVelocity((getAngularVelocity() + getHead()->getAngularVelocity()) * getHead()->getFinalOrientationInWorldFrame()); _hair.setAngularAcceleration(getAngularAcceleration() * getHead()->getFinalOrientationInWorldFrame()); _hair.setGravity(Application::getInstance()->getEnvironment()->getGravity(getPosition()) * getHead()->getFinalOrientationInWorldFrame()); + _hair.setLoudness((float) getHeadData()->getAudioLoudness()); _hair.simulate(deltaTime); } } diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 36035880fd..b674254466 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -218,6 +218,7 @@ void MyAvatar::simulate(float deltaTime) { _hair.setAngularVelocity((getAngularVelocity() + getHead()->getAngularVelocity()) * getHead()->getFinalOrientationInWorldFrame()); _hair.setAngularAcceleration(getAngularAcceleration() * getHead()->getFinalOrientationInWorldFrame()); _hair.setGravity(Application::getInstance()->getEnvironment()->getGravity(getPosition()) * getHead()->getFinalOrientationInWorldFrame()); + _hair.setLoudness((float)getHeadData()->getAudioLoudness()); _hair.simulate(deltaTime); } } From bc6346c257f8f9a82d15a24fdb51700bf5636406 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Sun, 12 Oct 2014 20:14:51 -0700 Subject: [PATCH 2/7] Removed unused constant, class --- interface/src/Audio.h | 2 +- interface/src/world.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/interface/src/Audio.h b/interface/src/Audio.h index e94e5ab16c..b909cf5f71 100644 --- a/interface/src/Audio.h +++ b/interface/src/Audio.h @@ -26,7 +26,7 @@ #include "AudioSourceTone.h" #include "AudioSourceNoise.h" #include "AudioGain.h" -#include "AudioPan.h" +//#include "AudioPan.h" #include "AudioFilter.h" #include "AudioFilterBank.h" diff --git a/interface/src/world.h b/interface/src/world.h index 8e680f3d95..3af2390f83 100644 --- a/interface/src/world.h +++ b/interface/src/world.h @@ -13,6 +13,5 @@ #define hifi_world_h const float GRAVITY_EARTH = 9.80665f; -const float EDGE_SIZE_GROUND_PLANE = 20.f; #endif // hifi_world_h From dc09572776214321b019edd7e9e7863148e36c2b Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Sun, 12 Oct 2014 20:17:20 -0700 Subject: [PATCH 3/7] remove unused functions --- interface/src/Util.cpp | 17 ----------------- interface/src/Util.h | 5 ----- 2 files changed, 22 deletions(-) diff --git a/interface/src/Util.cpp b/interface/src/Util.cpp index 9d7f5518d0..d970d3e879 100644 --- a/interface/src/Util.cpp +++ b/interface/src/Util.cpp @@ -65,23 +65,6 @@ void eulerToOrthonormals(glm::vec3 * angles, glm::vec3 * front, glm::vec3 * righ front->x = frontNew.x; front->y = frontNew.y; front->z = frontNew.z; } -void printVector(glm::vec3 vec) { - qDebug("%4.2f, %4.2f, %4.2f", vec.x, vec.y, vec.z); -} - - -// Return the azimuth angle (in radians) between two points. -float azimuth_to(glm::vec3 head_pos, glm::vec3 source_pos) { - return atan2(head_pos.x - source_pos.x, head_pos.z - source_pos.z); -} - -// Return the angle (in radians) between the head and an object in the scene. -// The value is zero if you are looking right at it. -// The angle is negative if the object is to your right. -float angle_to(glm::vec3 head_pos, glm::vec3 source_pos, float render_yaw, float head_yaw) { - return atan2(head_pos.x - source_pos.x, head_pos.z - source_pos.z) + render_yaw + head_yaw; -} - // Draw a 3D vector floating in space void drawVector(glm::vec3 * vector) { glDisable(GL_LIGHTING); diff --git a/interface/src/Util.h b/interface/src/Util.h index 02cfd99f9a..8b113ed875 100644 --- a/interface/src/Util.h +++ b/interface/src/Util.h @@ -18,9 +18,6 @@ void eulerToOrthonormals(glm::vec3 * angles, glm::vec3 * fwd, glm::vec3 * left, glm::vec3 * up); -float azimuth_to(glm::vec3 head_pos, glm::vec3 source_pos); -float angle_to(glm::vec3 head_pos, glm::vec3 source_pos, float render_yaw, float head_yaw); - float randFloat(); const glm::vec3 randVector(); @@ -36,8 +33,6 @@ void drawvec3(int x, int y, float scale, float radians, float thick, int mono, g void drawVector(glm::vec3* vector); -void printVector(glm::vec3 vec); - void renderCollisionOverlay(int width, int height, float magnitude, float red = 0, float blue = 0, float green = 0); void renderOrientationDirections( glm::vec3 position, const glm::quat& orientation, float size ); From e5f93d00ac96762147bf08ea08add06c520f2796 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Sun, 12 Oct 2014 20:42:15 -0700 Subject: [PATCH 4/7] remove unused utility functions --- interface/src/Util.cpp | 170 ----------------------------------------- interface/src/Util.h | 12 +-- 2 files changed, 1 insertion(+), 181 deletions(-) diff --git a/interface/src/Util.cpp b/interface/src/Util.cpp index d970d3e879..b23b4fecb3 100644 --- a/interface/src/Util.cpp +++ b/interface/src/Util.cpp @@ -37,75 +37,7 @@ using namespace std; #define WORKAROUND_BROKEN_GLUT_STROKES // see http://www.opengl.org/resources/libraries/glut/spec3/node78.html -void eulerToOrthonormals(glm::vec3 * angles, glm::vec3 * front, glm::vec3 * right, glm::vec3 * up) { - // - // Converts from three euler angles to the associated orthonormal vectors - // - // Angles contains (pitch, yaw, roll) in radians - // - // First, create the quaternion associated with these euler angles - glm::quat q(glm::vec3(angles->x, -(angles->y), angles->z)); - - // Next, create a rotation matrix from that quaternion - glm::mat4 rotation; - rotation = glm::mat4_cast(q); - - // Transform the original vectors by the rotation matrix to get the new vectors - glm::vec4 qup(0,1,0,0); - glm::vec4 qright(-1,0,0,0); - glm::vec4 qfront(0,0,1,0); - glm::vec4 upNew = qup*rotation; - glm::vec4 rightNew = qright*rotation; - glm::vec4 frontNew = qfront*rotation; - - // Copy the answers to output vectors - up->x = upNew.x; up->y = upNew.y; up->z = upNew.z; - right->x = rightNew.x; right->y = rightNew.y; right->z = rightNew.z; - front->x = frontNew.x; front->y = frontNew.y; front->z = frontNew.z; -} - -// Draw a 3D vector floating in space -void drawVector(glm::vec3 * vector) { - glDisable(GL_LIGHTING); - glEnable(GL_POINT_SMOOTH); - glPointSize(3.0); - glLineWidth(2.0); - - // Draw axes - glBegin(GL_LINES); - glColor3f(1,0,0); - glVertex3f(0,0,0); - glVertex3f(1,0,0); - glColor3f(0,1,0); - glVertex3f(0,0,0); - glVertex3f(0, 1, 0); - glColor3f(0,0,1); - glVertex3f(0,0,0); - glVertex3f(0, 0, 1); - glEnd(); - - // Draw the vector itself - glBegin(GL_LINES); - glColor3f(1,1,1); - glVertex3f(0,0,0); - glVertex3f(vector->x, vector->y, vector->z); - glEnd(); - - // Draw spheres for magnitude - glPushMatrix(); - glColor3f(1,0,0); - glTranslatef(vector->x, 0, 0); - Application::getInstance()->getGeometryCache()->renderSphere(0.02f, 10, 10); - glColor3f(0,1,0); - glTranslatef(-vector->x, vector->y, 0); - Application::getInstance()->getGeometryCache()->renderSphere(0.02f, 10, 10); - glColor3f(0,0,1); - glTranslatef(0, -vector->y, vector->z); - Application::getInstance()->getGeometryCache()->renderSphere(0.02f, 10, 10); - glPopMatrix(); - -} void renderWorldBox() { // Show edge of world @@ -184,10 +116,6 @@ int widthText(float scale, int mono, char const* string) { return textRenderer(mono)->computeWidth(string) * (scale / 0.10); } -float widthChar(float scale, int mono, char ch) { - return textRenderer(mono)->computeWidth(ch) * (scale / 0.10); -} - void drawText(int x, int y, float scale, float radians, int mono, char const* string, const float* color) { // @@ -202,29 +130,6 @@ void drawText(int x, int y, float scale, float radians, int mono, glPopMatrix(); } - -void drawvec3(int x, int y, float scale, float radians, float thick, int mono, glm::vec3 vec, float r, float g, float b) { - // - // Draws vec3 on screen as stroked so it can be resized - // - char vectext[20]; - sprintf(vectext,"%3.1f,%3.1f,%3.1f", vec.x, vec.y, vec.z); - int len, i; - glPushMatrix(); - glTranslatef(static_cast(x), static_cast(y), 0); - glColor3f(r,g,b); - glRotated(180.0 + double(radians * DEGREES_PER_RADIAN), 0.0, 0.0, 1.0); - glRotated(180.0, 0.0, 1.0, 0.0); - glLineWidth(thick); - glScalef(scale, scale, 1.f); - len = (int) strlen(vectext); - for (i = 0; i < len; i++) { - if (!mono) glutStrokeCharacter(GLUT_STROKE_ROMAN, int(vectext[i])); - else glutStrokeCharacter(GLUT_STROKE_MONO_ROMAN, int(vectext[i])); - } - glPopMatrix(); -} - void renderCollisionOverlay(int width, int height, float magnitude, float red, float blue, float green) { const float MIN_VISIBLE_COLLISION = 0.01f; if (magnitude > MIN_VISIBLE_COLLISION) { @@ -238,27 +143,6 @@ void renderCollisionOverlay(int width, int height, float magnitude, float red, f } } -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)); - glm::vec3 up = glm::cross(right, vectorToPosition); - - glBegin(GL_LINE_STRIP); - for (int i=0; i MAX_POINTS_CORNER) { - numPointsCorner = MAX_POINTS_CORNER; - } - - // Precompute sin and cos for [0, PI/2) for the number of points (numPointCorner) - double radiusTimesSin[MAX_POINTS_CORNER]; - double radiusTimesCos[MAX_POINTS_CORNER]; - int i = 0; - for (int i = 0; i < numPointsCorner; i++) { - double t = (double)i * (double)PI_OVER_TWO / (double)(numPointsCorner - 1); - radiusTimesSin[i] = radius * sin(t); - radiusTimesCos[i] = radius * cos(t); - } - - glm::dvec2 cornerCenter; - glBegin(GL_POINTS); - - // Top left corner - cornerCenter = glm::vec2(x + radius, y + height - radius); - for (i = 0; i < numPointsCorner; i++) { - glVertex2d(cornerCenter.x - radiusTimesCos[i], cornerCenter.y + radiusTimesSin[i]); - } - - // Top rigth corner - cornerCenter = glm::vec2(x + width - radius, y + height - radius); - for (i = 0; i < numPointsCorner; i++) { - glVertex2d(cornerCenter.x + radiusTimesSin[i], cornerCenter.y + radiusTimesCos[i]); - } - - // Bottom right - cornerCenter = glm::vec2(x + width - radius, y + radius); - for (i = 0; i < numPointsCorner; i++) { - glVertex2d(cornerCenter.x + radiusTimesCos[i], cornerCenter.y - radiusTimesSin[i]); - } - - // Bottom left - cornerCenter = glm::vec2(x + radius, y + radius); - for (i = 0; i < numPointsCorner; i++) { - glVertex2d(cornerCenter.x - radiusTimesSin[i], cornerCenter.y - radiusTimesCos[i]); - } - glEnd(); -} void renderOrientationDirections(glm::vec3 position, const glm::quat& orientation, float size) { @@ -378,12 +214,6 @@ void renderOrientationDirections(glm::vec3 position, const glm::quat& orientatio glEnd(); } -bool closeEnoughForGovernmentWork(float a, float b) { - float distance = std::abs(a-b); - //qDebug("closeEnoughForGovernmentWork() a=%1.10f b=%1.10f distance=%1.10f\n",a,b,distance); - return (distance < 0.00001f); -} - // Do some basic timing tests and report the results void runTimingTests() { // How long does it take to make a call to get the time? diff --git a/interface/src/Util.h b/interface/src/Util.h index 8b113ed875..b2c5ee3b2f 100644 --- a/interface/src/Util.h +++ b/interface/src/Util.h @@ -16,30 +16,20 @@ #include #include -void eulerToOrthonormals(glm::vec3 * angles, glm::vec3 * fwd, glm::vec3 * left, glm::vec3 * up); - float randFloat(); const glm::vec3 randVector(); void renderWorldBox(); int widthText(float scale, int mono, char const* string); -float widthChar(float scale, int mono, char ch); void drawText(int x, int y, float scale, float radians, int mono, char const* string, const float* color); -void drawvec3(int x, int y, float scale, float radians, float thick, int mono, glm::vec3 vec, - float r=1.0, float g=1.0, float b=1.0); - -void drawVector(glm::vec3* vector); - void renderCollisionOverlay(int width, int height, float magnitude, float red = 0, float blue = 0, float green = 0); void renderOrientationDirections( glm::vec3 position, const glm::quat& orientation, float size ); -void renderSphereOutline(glm::vec3 position, float radius, int numSides, glm::vec3 cameraPosition); -void renderCircle(glm::vec3 position, float radius, glm::vec3 surfaceNormal, int numSides ); -void renderRoundedCornersRect(int x, int y, int width, int height, int radius, int numPointsCorner); + void renderBevelCornersRect(int x, int y, int width, int height, int bevelDistance); void runTimingTests(); From 18979adf2324a9a97e17c02eeb15b6bdf829ea57 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Sun, 12 Oct 2014 20:42:53 -0700 Subject: [PATCH 5/7] remove startup debug from buckyballs --- interface/src/BuckyBalls.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/src/BuckyBalls.cpp b/interface/src/BuckyBalls.cpp index 0ea73556c5..ece9dd7dda 100644 --- a/interface/src/BuckyBalls.cpp +++ b/interface/src/BuckyBalls.cpp @@ -35,7 +35,6 @@ BuckyBalls::BuckyBalls() { colors[1] = glm::vec3(0.64f, 0.16f, 0.16f); colors[2] = glm::vec3(0.31f, 0.58f, 0.80f); - qDebug("Creating buckyballs..."); for (int i = 0; i < NUM_BBALLS; i++) { _bballPosition[i] = CORNER_BBALLS + randVector() * RANGE_BBALLS; int element = (rand() % NUM_ELEMENTS); From c4000eb4681b8e339696f6139308b8363e22ef70 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Mon, 13 Oct 2014 17:33:01 +0100 Subject: [PATCH 6/7] fix windows error --- interface/src/Hair.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Hair.cpp b/interface/src/Hair.cpp index 227adb10a6..34114430df 100644 --- a/interface/src/Hair.cpp +++ b/interface/src/Hair.cpp @@ -192,7 +192,7 @@ void Hair::render() { float loudnessFactor = (_loudness > 0.0f) ? logf(_loudness) / 16.0f : 0.0f; const int SPARKLE_EVERY = 5; const float HAIR_SETBACK = 0.125f; - int sparkleIndex = random() % 5; + int sparkleIndex = (int) (randFloat() * SPARKLE_EVERY); glPushMatrix(); glTranslatef(0.f, 0.f, HAIR_SETBACK); glBegin(GL_QUADS); From 99e596ae7e1f854bb9c423dce6ef102922153752 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Mon, 13 Oct 2014 17:35:00 +0100 Subject: [PATCH 7/7] really remove file --- interface/src/Audio.h | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/src/Audio.h b/interface/src/Audio.h index b909cf5f71..e397f9564b 100644 --- a/interface/src/Audio.h +++ b/interface/src/Audio.h @@ -26,7 +26,6 @@ #include "AudioSourceTone.h" #include "AudioSourceNoise.h" #include "AudioGain.h" -//#include "AudioPan.h" #include "AudioFilter.h" #include "AudioFilterBank.h"