@ Pure public static boolean intersectsCapsuleCapsule ( double capsule1Ax , double capsule1Ay , double capsule1Az , double capsule1Bx , double capsule1By , double capsule1Bz , double capsule1Radius , double capsule2Ax , double capsule2Ay , double capsule2Az , double capsule2Bx , double capsule2By , double capsule2Bz , double capsule2Radius ) { double dist2 = AbstractSegment3F . distanceSquaredSegmentSegment ( capsule1Ax , capsule1Ay , capsule1Az , capsule1Bx , capsule1By , capsule1Bz , capsule2Ax , capsule2Ay , capsule2Az , capsule2Bx , capsule2By , capsule2Bz ) ; // If (squared) distance smaller than (squared) sum of radii, they collide double radius = capsule1Radius + capsule2Radius ; return dist2 <= ( radius * radius ) ; }
Replies if the specified capsules intersect .