Sint32 njCollisionCheckSS( sphere1, sphere2 )
const NJS_SPHERE *sphere1
const NJS_SPHERE *sphere2
sphere1 1つ目の球のデータを格納する構造体のポインタ sphere2 2つ目の球のデータを格納する構造体のポインタ
1 接触 0 非接触
2つの球が接触しているかどうかの判定(コリジョンチェック)を行います。
2つの球sphere1、sphere2のコリジョンチェックを行います。 NJS_SPHERE sphere1,sphere2; sphere1.c.x = -80.f; sphere1.c.y = 0.f; sphere1.c.z = 0.f; sphere1.r = 100.f; sphere2.c.x = 80.f; sphere2.c.y = 0.f; sphere2.c.z = 0.f; sphere2.r = 100.f; njCollisionCheckSS(&sphere1, &sphere2); /* Result */ Return = 1