added some more geometry functions and simple hit calculation