Hey Rishis3D,
Easiest way I found to start with this was by learning from a great working example.
There's a python collision deformer for Maya available on the internet which is using the Compute Function.
I actually rewrote this to C++ for learning purposes some time ago. I'm not sure if I have it laying around somewhere. ;)
Check out the video here:
http://vimeo.com/13150202And you can download the script from the link underneath the video.
Is this enough info? ;)
- Roy