/// <summary> /// /// </summary> /// <param name="obj"></param> /// <param name="nodeCell"></param> /// <returns></returns> private static bool IsNodeEmpty(IVoxelizable obj, AACell nodeCell) { if (obj is Mesh) { var faces = (obj as Mesh).Faces; foreach (var face in faces) { if (Collision.AACellAndFace(nodeCell, face)) { return(false); } } } else if (obj is Sphere) { return(!Collision.AACellAndSphere(nodeCell, (obj as Sphere).Radius)); } return(true); }