-#if 0
-__attribute__ ((deprecated))
-VG_STATIC int rb_capsule_scene( rigidbody *rba, rigidbody *rbb, rb_ct *buf )
-{
- scene *sc = rbb->inf.scene.bh_scene->user;
-
- bh_iter it;
- bh_iter_init( 0, &it );
- int idx;
-
- int count = 0;
-
- while( bh_next( rbb->inf.scene.bh_scene, &it, rba->bbx_world, &idx ) )
- {
- u32 *ptri = &sc->arrindices[ idx*3 ];
- v3f tri[3];
-
- for( int j=0; j<3; j++ )
- v3_copy( sc->arrvertices[ptri[j]].co, tri[j] );
-
- buf[ count ].element_id = ptri[0];
-
-#if 0
- vg_line( tri[0],tri[1],0x70ff6000 );
- vg_line( tri[1],tri[2],0x70ff6000 );
- vg_line( tri[2],tri[0],0x70ff6000 );
-#endif
-
- int contact = rb_capsule_triangle( rba, rbb, tri, buf+count );
- count += contact;
-
- if( count == 16 )
- {
- vg_warn("Exceeding capsule_vs_scene capacity. Geometry too dense!\n");
- return count;
- }
- }
-
- return count;
-}
-
-VG_STATIC int rb_scene_capsule( rigidbody *rba, rigidbody *rbb, rb_ct *buf )
-{
- return rb_capsule_scene( rbb, rba, buf );
-}
-#endif
-
-VG_STATIC int RB_MATRIX_ERROR( rigidbody *rba, rigidbody *rbb, rb_ct *buf )
-{
-#if 0
- vg_error( "Collision type is unimplemented between types %d and %d\n",
- rba->type, rbb->type );
-#endif
-
- return 0;
-}
-
-VG_STATIC int rb_sphere_capsule( rigidbody *rba, rigidbody *rbb, rb_ct *buf )
-{
- return rb_capsule_sphere( rbb, rba, buf );
-}
-
-#if 0
-VG_STATIC int rb_box_capsule( rigidbody *rba, rigidbody *rbb, rb_ct *buf )
-{
- return rb_capsule_box( rbb, rba, buf );
-}
-#endif
-
-VG_STATIC int rb_box_sphere( rigidbody *rba, rigidbody *rbb, rb_ct *buf )
-{
- return rb_sphere_box( rbb, rba, buf );
-}
-
-#if 0
-VG_STATIC int rb_scene_box( rigidbody *rba, rigidbody *rbb, rb_ct *buf )
-{
- return rb_box_scene( rbb, rba, buf );
-}
-#endif
-
-#if 0
-VG_STATIC int (*rb_jump_table[4][4])( rigidbody *a, rigidbody *b, rb_ct *buf ) =
-{
- /* box */ /* Sphere */ /* Capsule */ /* Mesh */
- { RB_MATRIX_ERROR, rb_box_sphere, rb_box_capsule, rb_box_scene },
- { rb_sphere_box, rb_sphere_sphere, rb_sphere_capsule, rb_sphere_scene },
- { rb_capsule_box, rb_capsule_sphere, rb_capsule_capsule, rb_capsule_scene },
- { rb_scene_box, RB_MATRIX_ERROR, rb_scene_capsule, RB_MATRIX_ERROR }
-};
-
-VG_STATIC int rb_collide( rigidbody *rba, rigidbody *rbb )
-{
- int (*collider_jump)(rigidbody *rba, rigidbody *rbb, rb_ct *buf )
- = rb_jump_table[rba->type][rbb->type];
-
- /*
- * 12 is the maximum manifold size we can generate, so we are forced to abort
- * potentially checking any more.
- */
- if( rb_contact_count + 12 > vg_list_size(rb_contact_buffer) )
- {
- vg_warn( "Too many contacts made in global collider buffer (%d of %d\n)",
- rb_contact_count, vg_list_size(rb_contact_buffer) );
- return 0;
- }
-
- /*
- * FUTURE: Replace this with a more dedicated broad phase pass
- */
- if( box_overlap( rba->bbx_world, rbb->bbx_world ) )
- {
- int count = collider_jump( rba, rbb, rb_contact_buffer+rb_contact_count);
- rb_contact_count += count;
- return count;
- }
- else
- return 0;
-}
-#endif
-