Removed the calls to the 1st collision detection attempt
authorEleni Maria Stea <estea@igalia.com>
Sat, 26 Jan 2019 18:33:43 +0000 (20:33 +0200)
committerEleni Maria Stea <estea@igalia.com>
Sat, 26 Jan 2019 18:33:43 +0000 (20:33 +0200)
(but kept the collider code etc in case I want to add some other sort of
 collision detection later).

src/hair.cc
src/main.cc

index b99d133..ef93f2c 100644 (file)
@@ -187,7 +187,7 @@ void Hair::update(float dt)
                hair[i].velocity += ((-hair[i].velocity * DAMPING) + accel) * dt;
                Vec3 new_pos = hair[i].pos + hair[i].velocity * dt;
 
-               hair[i].pos = handle_collision(new_pos);
+               hair[i].pos = new_pos; //= handle_collision(new_pos);
 
                dbg_force = force;
        }
index 01f6716..852b7cb 100644 (file)
@@ -146,14 +146,18 @@ static void display()
        /* multiplying with the head rot matrix */
        glPushMatrix();
        glMultMatrixf(head_xform[0]);
+/*
        glPushAttrib(GL_LINE_BIT);
        glLineWidth(1);
        glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+*/
        for(size_t i=0; i<meshes.size(); i++) {
                meshes[i]->draw();
        }
+/*
        glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
        glPopAttrib();
+*/
 
        glPopMatrix();
 
@@ -182,7 +186,7 @@ static void display()
        }
        glEnd();
        glPopAttrib();
-       */
+*/
 
        glutSwapBuffers();
        assert(glGetError() == GL_NO_ERROR);