Dynamically determine URI to scripts and styles included with a class which could be added from plugin/theme/child theme/mu plugin

For plugins it is:

$plugin_url = plugin_dir_url( __FILE__ );

This works even if wp-content is on a separate domain. You may get problems if your class is in a subdirectory of the plugin – you should probably make the __FILE__ a parameter for a function:

public function get_plugin_url( $base = __FILE__ )
{
    return plugin_dir_url( $base );
}

You could also check if the parent directory of your class is the plugin directory and adjust the path accordingly.

Similar, for themes use get_stylesheet_directory_uri(). It works for parent and child themes.