Box2D Lite question (clipping and bounce)

Hey! I have been trying to make my own 2D physics engine under the holidays, but I can't get it to work. I've decided to take a look at Box2D Lite since it seems to use the easiest way of making a simple physics engine. After studying the code there is some things I quite don't uderstand.

What exactly does the function
Code:
int ClipSegmentToLine(ClipVertex vOut[2], ClipVertex vIn[2], const Vec2& normal, float offset, char clipEdge)


do? Does it make sure that two objects aren't inside each other?

In
Code:
void Arbiter::Update(Contact* newContacts, int numNewContacts)
there's this:

Code:
if (cNew->feature.value == cOld->feature.value)
{
   k = j;
   break;
}


What does feature.value hold? I've been able to track it down to the clipping code, but I don't get the meaning of it.

Lastly, I want bodies being able to bounce in my physics engine, is it possible to use the sequential impulse method that Box2D Lite uses and just modify it so bodies can bounce?

Very thankful for any help 😉
I recommend reading this to help understand the code: http://box2d.googlecode.com/files/GDC2006_ErinCatto.zip

There are other documents on this page that might help: http://code.google.com/p/box2d/downloads/list
Those documents are great, but I'm stuck with still not understanding what I meantioned before. In the 2006 GDC powerpoint you say "Clip incident face against reference face side planes (but not the reference face)." and I don't understand the meaning of clipping, to clarify here's the page from the GDC presentation I don't get:

[url]In http://i.imgur.com/yXGHG.png[/url]

And while I'm at it, in short was does this function do?

Code:
void Arbiter::Update(Contact* newContacts, int numNewContacts)
{
   Contact mergedContacts[2];
   
   // numNewContacts är 1 eller 2 (box - box)

   for (int i = 0; i < numNewContacts; ++i)
   {
      // cNew is used like newContacs[i]
      Contact* cNew = newContacts + i;
      int k = -1;
      for (int j = 0; j < numContacts; ++j)
      {
         // cOld is used like contacs[j]
         Contact* cOld = contacts + j;
         if (cNew->feature.value == cOld->feature.value)
         {
            k = j;
            break;
         }
      }

      if (k > -1)
      {
         Contact* c = mergedContacts + i;
         Contact* cOld = contacts + k;
         *c = *cNew;
         if (World::warmStarting)
         {
            c->Pn = cOld->Pn;
            c->Pt = cOld->Pt;
            c->Pnb = cOld->Pnb;
         }
         else
         {
            c->Pn = 0.0f;
            c->Pt = 0.0f;
            c->Pnb = 0.0f;
         }
      }
      else
      {
         mergedContacts[i] = newContacts[i];
      }
   }

   for (int i = 0; i < numNewContacts; ++i)
      contacts[i] = mergedContacts[i];

   numContacts = numNewContacts;
}


It's probably asking to much but anyways.. Thanks in advance.
Maybe this will help you understand clipping: http://en.wikipedia.org/wiki/Clipping_(computer_graphics). Clipping is used a lot in rendering, but it is also useful for generating contact points.

The function you show is used to preserve contact forces across time steps for a feature called "warm starting." Since Box2D uses an iterative solver, the use of warm starting can improve convergence.

Original thread: https://box2d.org/forum/viewtopic.php?t=7473