##### Ninja Library - Collision Function

# njCollisionCheckBC

Checks collision for a hexahedron and a capsule

### FORMAT

`

  Int njCollisionCheckBC( *box, *capsule )
  NJS_BOX *box
  NJS_CAPSULE *capsule

`

### PARAMETER

  `*box` | Hexahedron to be collision checked
  `*capsule` | Capsule to be collision checked

### RETURN

  1 | Hit |
  0 | Not hit |

### DESCRIPTION

  Checks collision for a hexahedron and a capsule.

### EXAMPLE

      The following checks collision for exahedron (box) and capsule (capsule).
      NJS_BOX box;
      NJS_CAPSULE capsule;
      box.v[0].x = -150.f; box.v[0].y = 100.f; box.v[0].z = 100;
      box.v[1].x = -150.f; box.v[1].y = 100.f; box.v[1].z = -100;
      box.v[2].x =  50.f; box.v[2].y = 100.f; box.v[2].z = -100;
      box.v[3].x =  50.f; box.v[3].y = 100.f; box.v[3].z = 100;
      box.v[4].x = -150.f; box.v[4].y = -100.f; box.v[4].z = 100;
      box.v[5].x = -150.f; box.v[5].y = -100.f; box.v[5].z = -100;
      box.v[6].x =  50.f; box.v[6].y = -100.f; box.v[6].z = -100;
      box.v[7].x =  50.f; box.v[7].y = -100.f; box.v[7].z = 100;
      capsule.c1.x = 100.f;
      capsule.c1.y =  0.f;
      capsule.c1.z =  0.f;
      capsule.c2.x = 200.f;
      capsule.c2.y =  0.f;
      capsule.c2.z =  0.f;
      capsule.r  = 100.f;
      njCollisionCheckBC(&box, &capsule);
      % Result %
      Return : 1

njCollisionCheckBC

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999