@Override
    public ShadeRec clone() {
        ShadeRec sr = new ShadeRec(world);
        sr.hitAnObject = hitAnObject;
        sr.material = material == null ? null : material.clone();
        sr.worldHitPoint = worldHitPoint == null ? null : worldHitPoint.clone();
        sr.ray = ray == null ? null : new Ray(ray.getOrigin(), ray.getDirection());
        sr.depth = depth;
        sr.dir = dir == null ? null : dir.clone();
        sr.normal = normal == null ? null : normal.clone();
        return sr;
    }