-__attribute__ ((deprecated))
-VG_STATIC int rb_capsule_manifold_done( rigidbody *rba, rigidbody *rbb,
- capsule_manifold *manifold, rb_ct *buf )
-{
- float h = rba->inf.capsule.height,
- ra = rba->inf.capsule.radius;
-
- v3f p0, p1;
- v3_muladds( rba->co, rba->up, -h*0.5f+ra, p0 );
- v3_muladds( rba->co, rba->up, h*0.5f-ra, p1 );
-
- int count = 0;
- if( manifold->t0 <= 1.0f )
- {
- rb_ct *ct = buf;
-
- v3f pa;
- v3_muls( p0, 1.0f-manifold->t0, pa );
- v3_muladds( pa, p1, manifold->t0, pa );
-
- float d = v3_length( manifold->d0 );
- v3_muls( manifold->d0, 1.0f/d, ct->n );
- v3_muladds( pa, ct->n, -ra, ct->co );
-
- ct->p = manifold->r0 - d;
- ct->rba = rba;
- ct->rbb = rbb;
- ct->type = k_contact_type_default;
-
- count ++;
- }
-
- if( (manifold->t1 >= 0.0f) && (manifold->t0 != manifold->t1) )
- {
- rb_ct *ct = buf+count;
-
- v3f pa;
- v3_muls( p0, 1.0f-manifold->t1, pa );
- v3_muladds( pa, p1, manifold->t1, pa );
-
- float d = v3_length( manifold->d1 );
- v3_muls( manifold->d1, 1.0f/d, ct->n );
- v3_muladds( pa, ct->n, -ra, ct->co );
-
- ct->p = manifold->r1 - d;
- ct->rba = rba;
- ct->rbb = rbb;
- ct->type = k_contact_type_default;
-
- count ++;
- }
-
- /*
- * Debugging
- */
-
- if( count == 2 )
- vg_line( buf[0].co, buf[1].co, 0xff0000ff );
-
- return count;
-}
-