Here you can find the source of intersects(final float x, final float y, final float z, final int sx, final int sy, final int sz)
public static final boolean intersects(final float x, final float y, final float z, final int sx, final int sy, final int sz)
//package com.java2s; //License from project: Open Source License public class Main { public static final boolean intersects(final float x, final float y, final float z, final int sx, final int sy, final int sz) { if (x >= 0 && y >= 0 && z >= 0 && x < sx && y < sy && z < sz) return true; else//from www. jav a2 s . c om return false; } }