private Collision trace(Scene scene, Ray ray) {
        Collision nearestCollision = null;
        
        for (SceneObject sceneObject : scene.getSceneObjects()) {
            if (sceneObject.checkIntersectionPossibility(ray)) {
                Collision collisions[] = sceneObject.trace(ray);

                if (collisions.length > 0 && collisions[0].getDistance() >= MathUtils.GEOMETRY_THRESHOLD) {
                    if (nearestCollision == null || nearestCollision.getDistance() > collisions[0].getDistance()) {
                        nearestCollision = collisions[0];
                    }
                }
            }
        }
        
        return nearestCollision;
    }