def calculate_occlusion(ray, obj, light, objects):
    """
    Calculate if there is an object between the light and object
    Args:
        ray: A ray starting in the hit point with direction to the light
        obj: The object where the hit point is
        light: A source of light to calculate if it's occluded
        objects: The objects in the scene

    Returns:
        bool: If there is an occlusion or not
    """
    # Check for occlusion
    # 1. Shoot ray from point to light
    # 2. Check collision with other objects
    # 3. If there is one between the hit point and the light, there is occlusion
    light_distance = light.get_distance(ray.pr)
    for other_obj in objects:
        if other_obj == obj:
            continue
        shadow_t = ray.intersect(other_obj)
        if 0 < shadow_t <= light_distance:
            return True
    return False