Added Camera distance computation functionality

Completely untested code, quite likely to not function. May have to
revert to last commit.