コード例 #1
0
ファイル: BoundingSphere.java プロジェクト: sathishpc/Ardor3D
  @Override
  public boolean intersects(final BoundingVolume bv) {
    if (bv == null) {
      return false;
    }

    return bv.intersectsSphere(this);
  }
コード例 #2
0
ファイル: CollisionTree.java プロジェクト: bandj/Ardor3D
 /**
  * Tests if the world bounds of the node at this level intersects a provided bounding volume. If
  * an intersection occurs, true is returned, otherwise false is returned. If the provided volume
  * is invalid, false is returned.
  *
  * @param volume the volume to intersect with.
  * @return true if there is an intersect, false otherwise.
  */
 public boolean intersectsBounding(final BoundingVolume volume) {
   switch (volume.getType()) {
     case AABB:
       return _worldBounds.intersectsBoundingBox((BoundingBox) volume);
     case OBB:
       return _worldBounds.intersectsOrientedBoundingBox((OrientedBoundingBox) volume);
     case Sphere:
       return _worldBounds.intersectsSphere((BoundingSphere) volume);
     default:
       return false;
   }
 }